Ubuntu 16.04ΒΆ

We’ll assume that you’re starting with a virtual machine of the latest Ubuntu LTS. At time of writing that’s Ubuntu LTS 16.04

Everything starts with pip:

sudo apt-get install python-pip=8.1.1-2 python-pip-whl=8.1.1-2

Now we should have pip 8.1.1. If you’ve got pip 8.1.2, and you will if you just blindly install any package for python-pip, it won’t work with salt due to https://github.com/saltstack/salt/issues/33163. So, we use this specific version

Next we need to configure pip to use the authentise pip repository to install packages:

sudo vim /etc/pip.conf

You’ll need to configure it like so:

[global]
extra-index-url=https://<username>:<password>@pip.authentise.com

Now we get the deployment package:

sudo pip install deployment

Let’s make sure it worked:

ls /usr/local/deployment

Next you’ll need salt-minion:

wget -O bootstrap-salt.sh https://bootstrap.saltstack.com
chmod +x bootstrap-salt.sh
./bootstrap-salt.sh stable

Your package manager likely installed a large, well-commented version of the salt minion file at /etc/salt/minion. You can safely remove the contents and replace them with the salt config included in the deployment package:

cp /usr/local/deployment/config/minion.ubuntu /etc/salt/minion

Create the config directory:

sudo mkdir -p /etc/salt/prod
sudo cp /usr/local/deployment/salt/pillars/top.sls /etc/salt/prod
sudo cp all.sls /etc/salt/prod

Now highstate and log it:

sudo salt-call state.highstate -l debug 2>&1 | tee /tmp/3diax-install.log

You may see failures the first run through. They’ll look like this:

Summary for local
--------------
Succeeded: 189 (changed=174)
Failed:     30
--------------

If you do, that’s fine, run highstate a second time:

sudo salt-call state.highstate -l debug 2>&1 | tee /tmp/3diax-install2.log

That’s because we have to install some dependencies for salt to work properly with docker and we have to restart our python environment to get those dependencies resolved:

Summary for local
--------------
Succeeded: 219 (changed=34)
Failed:     0
--------------

At this point things worked. You can verify that by checking that all the docker services are up and working:

docker service ls

You should see a list of 25 services where each has a single replica that is online. If not, reach out to Authentise support at support@authentise.com