Leveraging Docker Engine's built-in Swarm Mode on Ubuntu Server LTS Virtual Machines. This is the first piece of code that should be executed against a fresh host on the diesel.net
domain
To add a new host (or set of hosts) create a new local branch name with the pattern check-in/*
, add the new hosts and their configuration to the inventory, then push. Please delete your check-in/*
branch after merging.
Pushes to stable
branches will trigger the entire fleet to be bootstrapped.
You will need the following installed:
Python 3.11+
-
Create a Python Virtual Environment (venv) and activate it.
python3 -m venv venv
source venv/bin/activate
-
Install Ansible.
pip install --upgrade pip setuptools wheel pip-tools
pip install ansible==7.2.0
-
Install Ansible roles.
ansible-galaxy install --force --role-file .ansible/roles/check-in_requirements.yaml --roles-path .ansible/roles
-
Update all the Ubuntu hosts's Apt packages and reboot if necessary.
ansible-playbook --inventory .ansible/inventories/dev --inventory .ansible/inventories/prod --extra-vars auto_reboot=yes .ansible/update.yaml