Commit 8fb40cc1 by Bach Dániel

update install.rst, add upstart config

parent 8c785bb9
...@@ -3,6 +3,7 @@ apt-get install install djbdns daemontools-run make ...@@ -3,6 +3,7 @@ apt-get install install djbdns daemontools-run make
initctl start svscan initctl start svscan
adduser --system --no-create-home --disabled-login --group tinydns adduser --system --no-create-home --disabled-login --group tinydns
adduser --system --no-create-home --disabled-login --group dnslog adduser --system --no-create-home --disabled-login --group dnslog
mkdir -p /etc/sv mkdir -p /etc/sv
...@@ -10,8 +11,23 @@ mkdir -p /etc/sv ...@@ -10,8 +11,23 @@ mkdir -p /etc/sv
tinydns-conf tinydns dnslog /etc/sv/tinydns <server-ip> tinydns-conf tinydns dnslog /etc/sv/tinydns <server-ip>
cd /etc/sv/tinydns/root cd /etc/sv/tinydns/root
make make
update-service --add /etc/sv/tinydns update-service --add /etc/sv/tinydns
chown -R cloud:cloud /etc/sv/tinydns/root chown -R cloud:cloud /etc/sv/tinydns/root
git clone git@git.ik.bme.hu:circle/dnsdriver.git
cd dnsdriver
mkvirtualenv dnsdriver
pip install -r requirements.txt
cp miscellaneous/dnscelery.conf /etc/init/
echo "export AMQP_URI='amqp://cloud:password@localhost:5672/circle'" >> ~/.virtualenvs/dnsdriver/bin/postactivate
start dnscelery
description "CIRCLE DNS Driver Celery Upstart"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 30 30
setgid cloud
setuid cloud
chdir /home/cloud/dnsdriver
script
. /home/cloud/.virtualenvs/dnsdriver/bin/activate
. /home/cloud/.virtualenvs/dnsdriver/bin/postactivate
HOSTNAME=$(hostname -s)
exec celery -A dnscelery worker --loglevel=info -n ${HOSTNAME}.dns
end script
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment