Skip to content

Install

Follow the Docker Engine installation guide for your platform. On macOS and Windows that means Docker Desktop; on Linux, the distribution packages or Docker's own repository.

You need Docker for two unrelated reasons: building service and tool images, and — optionally — running the deployment playbooks in a container instead of installing Ansible on your workstation.

Running the playbooks in a container

The deployment repository includes a Dockerfile at the top level that builds an image capable of running the playbooks. It is useful when your workstation cannot easily run the Ansible version the playbooks expect.

# generate the SSH configuration the image expects
./create-ssh-configs.sh

# build the image
docker build -t cyverse-ansible .

# run the playbooks with the working tree mounted
docker run --rm -it -v "$(pwd)":/ansible -w /ansible cyverse-ansible /bin/bash

From the shell inside the container, run ansible-playbook as usual; see Ansible.

Never push this image

The build embeds your SSH configuration, and a run mounts your inventory. That image is a copy of your credentials, and pushing it to any registry publishes them. Build it locally, use it locally, and do not tag it for a registry.

Related