Permalink
Browse files

Merge pull request #389 from mozilla/convert2systemd

Convert2systemd
  • Loading branch information...
pwnbus committed Nov 29, 2016
2 parents cf7ce6f + 848436b commit 539e82233f2e6700b8453279afa381aa46f97bbd
View
No changes.
View
@@ -0,0 +1,45 @@
+# mongod.conf
+
+# for documentation of all options, see:
+# http://docs.mongodb.org/manual/reference/configuration-options/
+
+# where to write logging data.
+systemLog:
+ destination: file
+ logAppend: true
+ path: /opt/mozdef/envs/mozdef/logs/meteor-mongo.log
+
+# Where and how to store data.
+storage:
+ dbPath: /opt/mozdef/envs/mongo/db
+ journal:
+ enabled: true
+ mmapv1:
+ smallFiles: true
+# wiredTiger:
+
+# how the process runs
+processManagement:
+ fork: true # fork and run in background
+ pidFilePath: /var/run/mozdefdb/mozdefdb.pid # location of pidfile
+
+# network interfaces
+net:
+ port: 3002
+ bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces.
+
+
+#security:
+
+#operationProfiling:
+
+replication:
+ oplogSizeMB: 8
+
+#sharding:
+
+## Enterprise-Only Options
+
+#auditLog:
+
+#snmp:
@@ -0,0 +1,16 @@
+[Unit]
+Description=Kibana
+Requires=elasticsearch.service
+
+[Service]
+ExecStart=/opt/mozdef/envs/kibana/bin/kibana
+Restart=always
+StandardOutput=syslog
+StandardError=syslog
+SyslogIdentifier=kibana4
+User=mozdef
+Group=mozdef
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target
@@ -0,0 +1,21 @@
+[Unit]
+Description=MongoDB Database Service
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/mozdefdb/mozdefdb.pid
+ExecStart=/usr/bin/mongod --config /etc/mongod.conf
+ExecReload=/bin/kill -HUP $MAINPID
+<<<<<<< HEAD
+Restart=always
+=======
+#Restart=always
+>>>>>>> 8d519538b9afa92609f5afa587256e02a25a554e
+User=mozdef
+Group=mozdef
+StandardOutput=syslog
+StandardError=syslog
+
+[Install]
+WantedBy=multi-user.target
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef Alert Plugins
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/alerts; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini alertPlugins.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=alertPlugins
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdefloginput
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/loginput; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini loginput.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=loginput
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwAutoland
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwAutoland.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwautoloand
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwBroStage
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwBroStage.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwbrostage
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwFXA Stage
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwFxaStage.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwfxastage
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwInfosecSQSNonProd
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwInfosecSQSNonProd.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwinfosecsqsnonprod
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwNubisNonProd
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwNubisNonProd.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwnubisnonprod
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef mqwRelengPapertrail
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwRelengPapertrail.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwrelengpapertrail
@@ -0,0 +1,18 @@
+Unit]
+Description=uWSGI mozdef mqwSyslog
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/mq; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini mqwSyslog.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=mqwsyslog
@@ -0,0 +1,18 @@
+[Unit]
+Description=uWSGI mozdef restapi
+After=syslog.target
+
+[Service]
+# Requires systemd version 211 or newer
+User=mozdef
+Group=mozdef
+ExecStart=/bin/bash -c 'cd /opt/mozdef/envs/mozdef/rest; source /opt/mozdef/envs/mozdef/bin/activate; uwsgi --ini restapi.ini'
+Restart=always
+KillSignal=SIGQUIT
+Type=notify
+StandardError=syslog
+NotifyAccess=all
+
+[Install]
+WantedBy=multi-user.target
+Alias=restapi

0 comments on commit 539e822

Please sign in to comment.