From 98730869a5fa281de4147dd27cb7c06e07c49c4a Mon Sep 17 00:00:00 2001 From: April King Date: Tue, 6 Oct 2015 14:58:52 -0500 Subject: [PATCH] Update Minion to require API keys --- docs/source/install_guide.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/source/install_guide.rst b/docs/source/install_guide.rst index 7a32fe6..75134c4 100644 --- a/docs/source/install_guide.rst +++ b/docs/source/install_guide.rst @@ -25,6 +25,12 @@ Then, regardless of whether we're using Vagrant or Docker, it is necessary to ed MINION_ADMINISTRATOR_EMAIL="youremail@yourorganization.org" MINION_ADMINISTRATOR_NAME="Your Name" +You'll also need to generate an API key:: + + $ python apikey.py + +Which will generate a file called apikey in your current directory that will be used automatically by Vagrant and Docker. + Installation via Vagrant ------------------------ @@ -103,6 +109,7 @@ Next, setup your system with the following directories and the `minion` user acc # useradd -m minion # install -m 700 -o minion -g minion -d /run/minion -d /var/lib/minion -d /var/log/minion -d ~minion/.python-eggs + # install -m 710 -o root -g minion -d /etc/minion # echo -e "\n# Automatically source minion-backend virtualenv" >> ~minion/.profile # echo -e "source /opt/minion/minion-env/bin/activate" >> ~minion/.profile @@ -118,6 +125,19 @@ Now we can checkout Minion and install it:: # source minion-env/bin/activate (minion-env)# python setup.py develop +Then, we'll need to setup an API key so that Minion Backend and Minion Frontend can talk to each other:: + + # cp /opt/minion/minion-backend/etc/backend.json /etc/minion + # chown root:minion /etc/minion/*.json + # chmod 640 /etc/minion/*.json + # vi /etc/minion/backend.json + +In backend.json, replace SECRETKEYHERE with your own custom secret API key. You can use apikey.py, included with Minion VM to create an API key file (called apikey) in your current directory:: + + # python apikey.py + +Or you can use any number of online UUID or password generators to create a secret key. This key must be identical in both the Backend and Frontend. + To make sure that Minion starts when the system reboots, we need to install the Minion init script. We can also disable the global `supervisord` installed with `apt-get install` above, if it wasn't being used before:: @@ -202,6 +222,7 @@ Next, setup your system with the following directories and the `minion` user acc # useradd -m minion # install -m 700 -o minion -g minion -d /run/minion -d /var/lib/minion -d /var/log/minion -d ~minion/.python-eggs + # install -m 710 -o root -g minion -d /etc/minion # echo -e "\n# Automatically source minion-frontend virtualenv" >> ~minion/.profile # echo -e "source /opt/minion/minion-env/bin/activate" >> ~minion/.profile @@ -217,6 +238,19 @@ Now we can checkout Minion and install it:: # source minion-env/bin/activate (minion-env)# python setup.py develop +Then, we'll need to setup an API key so that Minion Backend and Minion Frontend can talk to each other:: + + # cp /opt/minion/minion-backend/etc/frontend.json /etc/minion + # chown root:minion /etc/minion/*.json + # chmod 640 /etc/minion/*.json + # vi /etc/minion/frontend.json + +In frontend.json, replace SECRETKEYHERE with your own custom secret API key. You can use apikey.py, included with Minion VM to create an API key file (called apikey) in your current directory:: + + # python apikey.py + +Or you can use any number of online UUID or password generators to create a secret key. This key must be identical in both the Backend and Frontend. + To make sure that Minion starts when the system reboots, we need to install the Minion init script. We can also disable the global `supervisord` installed with `apt-get install` above, if it wasn't being used before::