This Ansible playbook initializes a Docker Swarm cluster on a group of Raspberry Pi devices. It includes roles for system updates, Docker installation, Keepalived configuration system configuration, and Swarm cluster initialization.
GPL-3.0 License
This Ansible playbook initializes a Docker Swarm cluster on a group of Raspberry Pi devices. It includes roles for system updates, Docker installation, Keepalived configuration system configuration, and Swarm cluster initialization.
Please read through the project to get a better understanding of what it does and what you need in order to be successful.
To use this playbook, ensure Ansible is installed on your machine. For macOS, you can install Ansible using Homebrew:
brew install ansible
Alternatively, for other platforms, install via pip
:
pip install ansible
Once Ansible is installed, clone this repository and run the playbook with the following command:
ansible-playbook -i <inventory_file> playbooks/main.yml
Replace <inventory_file>
with the path to your Ansible inventory file, which should contain the list of hosts for your Swarm cluster.
Simply run the playbook using the command above, specifying the hosts you want to include in your Swarm cluster. The playbook will handle updating the system, installing Docker, configuring the system, and initializing the Swarm cluster.
Example:
ansible-playbook -i inventory playbooks/main.yml
This will execute the playbook on all hosts listed in the inventory
file.
You can create a custom message of the day (MOTD), which appears when logging into your system. Update the this MOTD role's variables to define your MOTD message.
The swarm-initialization
role includes a step to create a Docker service running Docker Visualizer, which is published on port 8081.
Bootstraps a Raspbian system with Python and essential packages.
Features:
Upgrades system packages to their latest versions.
Features:
Features:
Installs and configures Docker on a target system.
Features:
Configures various system settings on a target host.
Features:
Initializes a Docker Swarm on a target host.
Features:
Installs and configures Keepalived for high availability using VRRP on target nodes.
Features:
GPLv3