update docker config removing threads, correct path for syncalerts in docker

This commit is contained in:
Jeff Bryner 2015-05-20 12:54:00 -07:00
Родитель 085d0a5ff1
Коммит 9ce0d84467
3 изменённых файлов: 17 добавлений и 10 удалений

Просмотреть файл

@ -64,11 +64,11 @@ ADD conf/settings.js /opt/MozDef/meteor/app/lib/settings.js
ADD conf/config.py /opt/MozDef/alerts/lib/config.py ADD conf/config.py /opt/MozDef/alerts/lib/config.py
ADD conf/sampleData2MozDef.conf /opt/MozDef/examples/demo/sampleData2MozDef.conf ADD conf/sampleData2MozDef.conf /opt/MozDef/examples/demo/sampleData2MozDef.conf
ADD conf/mozdef.localloginenabled.css /opt/MozDef/meteor/public/css/mozdef.css ADD conf/mozdef.localloginenabled.css /opt/MozDef/meteor/public/css/mozdef.css
ADD conf/syncalerts.sh /opt/MozDef/examples/demo/syncalerts.sh
# elasticsearch # elasticsearch
RUN (curl -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.tar.gz | tar -C /opt -xz \ RUN (curl -L https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.tar.gz | tar -C /opt -xz \
&& /bin/ln -s /opt/elasticsearch-1.3.2 /opt/elasticsearch \ && /bin/ln -s /opt/elasticsearch-1.3.2 /opt/elasticsearch \
&& /opt/elasticsearch/bin/plugin --install elasticsearch/marvel/latest \
&& rm /opt/elasticsearch/config/elasticsearch.yml) && rm /opt/elasticsearch/config/elasticsearch.yml)
# ADD conf/elasticsearch/elasticsearch.yml /opt/elasticsearch/config/ # BUG https://github.com/dotcloud/docker/issues/2446 # ADD conf/elasticsearch/elasticsearch.yml /opt/elasticsearch/config/ # BUG https://github.com/dotcloud/docker/issues/2446
ADD conf/elasticsearch.yml /opt/elasticsearch-1.3.2/config/ ADD conf/elasticsearch.yml /opt/elasticsearch-1.3.2/config/
@ -114,5 +114,5 @@ EXPOSE 8081
RUN apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* RUN apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# Launch rabbit and sleep 10s for it to start # Launch rabbit and sleep 10s for it to start
CMD /etc/init.d/rabbitmq-server start && sleep 10 && /usr/bin/supervisord #CMD /etc/init.d/rabbitmq-server start && sleep 10 && /usr/bin/supervisord

Просмотреть файл

@ -1,9 +1,13 @@
[supervisord] [supervisord]
#Set true for debug #Set true for debug
nodaemon=true nodaemon=false
autostart=true autostart=true
autorestart=true autorestart=true
[program:rabbitmq]
priority=1
command=/etc/init.d/rabbitmq-server start
[program:elasticsearch] [program:elasticsearch]
priority=2 priority=2
command=/opt/elasticsearch/bin/elasticsearch command=/opt/elasticsearch/bin/elasticsearch
@ -14,10 +18,6 @@ command=/opt/elasticsearch/bin/elasticsearch
#priority=2 #priority=2
#command=/usr/bin/mongod --smallfiles --dbpath /var/lib/mongodb/ #command=/usr/bin/mongod --smallfiles --dbpath /var/lib/mongodb/
#[program:rabbitmq]
#priority=3
#command=/usr/sbin/rabbitmq-server
#startsecs=10
[program:nginx] [program:nginx]
priority=4 priority=4
@ -32,7 +32,7 @@ command=/usr/local/bin/uwsgi
--loop gevent --loop gevent
--socket /run/uwsgi/apps/loginput.socket --socket /run/uwsgi/apps/loginput.socket
--wsgi-file index.py --wsgi-file index.py
--buffer-size 32768 --master --async 5 --enable-threads --listen 100 --uid root --buffer-size 32768 --master --async 5 --listen 100 --uid root
--pp /opt/MozDef/loginput --pp /opt/MozDef/loginput
--chmod-socket --chmod-socket
--logto /var/log/mozdef/uwsgi.loginput.log --logto /var/log/mozdef/uwsgi.loginput.log
@ -48,7 +48,7 @@ command=/usr/local/bin/uwsgi
--loop gevent --loop gevent
--socket /run/uwsgi/apps/rest.socket --socket /run/uwsgi/apps/rest.socket
--wsgi-file index.py --wsgi-file index.py
--buffer-size 32768 --master --async 5 --enable-threads --listen 100 --uid root --buffer-size 32768 --master --async 5 --listen 100 --uid root
--pp /opt/MozDef/rest --pp /opt/MozDef/rest
--chmod-socket --chmod-socket
--logto /var/log/mozdef/uwsgi.rest.log --logto /var/log/mozdef/uwsgi.rest.log
@ -64,7 +64,7 @@ command=/usr/local/bin/uwsgi
--socket /run/uwsgi/apps/esworker.socket --socket /run/uwsgi/apps/esworker.socket
--mule=esworker.py --mule=esworker.py
--mule --mule
--buffer-size 32768 --master --async 5 --enable-threads --listen 100 --uid root --buffer-size 32768 --master --async 5 --listen 100 --uid root
--pp /opt/MozDef/mq --pp /opt/MozDef/mq
--stats 127.0.0.1:9192 --stats 127.0.0.1:9192
--logto /var/log/mozdef/uwsgi.esworker.log --logto /var/log/mozdef/uwsgi.esworker.log

7
docker/conf/syncalerts.sh Executable file
Просмотреть файл

@ -0,0 +1,7 @@
#!/usr/bin/env bash
while true
do
/opt/MozDef/cron/syncAlertsToMongo.py
/opt/MozDef/cron/collectAttackers.py
sleep 10
done