All roles and playbooks required to fully deploy our system components
clone: git clone --recurese-submodules <url>
update: git pull --recurse-submodules
- ensure Ansible is present on management host:
pip3 install ansible
- target host(s) accessible over SSH (or other possible connection protocol)
- all hosts are configured in the inventory file hosts
Development playbooks are in the dev directory. These playbooks are dependent on an existing LXC container defined in the hosts file.
REQUIREMENTS:
- setup
lxd
(e.g. ansible-role-lxd) - run the dev_container.yml playbook
- it creates and starts the dev container 'pseudo-raspbian'
Now you have a running instance of a Debian buster LXC container, which will host all applications.
DEPLOYMENT
- run any of the dev playbooks as specified in the Exmaple on the bottom of this README.
If you're not on Linux or you don't want to use LXC containers.
- modify the hosts file to your need
- change the target host in each playbook you use
Production playbooks are in the prod directory. These playbooks are dependent on a accessible Raspberry pi.
REQUIREMENTS:
- Raspberry pi accessible over SSH host
brewmaster-pi
as specified in the hosts file. (configured in~/.ssh/config
on the ansible host)- NOTE: this requirement is more specific to eliminate any skeleton modifications
Host brewmaster-pi
Hostname 192.168.0.22
Port 22
User pi
DEPLOYMENT
- use the master playbook to deploy the whole brewmaster system
- possible role variables can be configured in the host variables
cd ansible-skeleton/
ansible-playbook playbooks/dev/brewmasters_backend.yml
# or
ansible-playbook playbooks/prod/master.yml
'-i <path_to_inventory>' option
- specifies the path to an inventory file
- contains all target hostnames (example inventory)
'-K' option
ask_for_pass
option which is often requirement in case of privilege escalation
'-C' option
- runs a playbook in a check mode. Meaning no action is really done on the target system
'-D' option
- runs a playbook in 'diff' mode. Shows differences in configuration files and other
refer to other options in the official ansible-playbook docs