Alex Auvolat
351e6f13d5
- Remove nomad interface (unused) - Deactivate systemd-resolved - Add dns_server to production nodes variables - Add recursors option to Consul so that it can resolve outside DNS queries - Use consul as a global DNS server for machines and containers, with the outside DNS as a fallback (see roles/consul/templates/resolv.conf.j2) |
||
---|---|---|
.. | ||
group_vars/all | ||
roles | ||
cluster_nodes.yml | ||
production | ||
README.md | ||
site.yml |
Provisionning
- Need a public IP address
- Deploy Debian sid/buster
- Add a DNS entry like xxxx.machine.deuxfleurs.fr A 0.0.0.0 in Cloudflare + Havelock
- Setup the fqdn in /etc/hosts (127.0.1.1 xxxx.machine.deuxfleurs.fr)
- Switch the SSH port to the port 110
- Add the server to the ./production file
- Reboot machine
- Deploy Ansible
- Check that everything works as intended
- Update NS 1.cluster.deuxfleurs.fr
Useful commands
Show every variables collected by Ansible for a given host:
ansible -i production villequin.machine.deuxfleurs.fr -m setup
Run playbook for only one host:
ansible-playbook -i production --limit villequin.machine.deuxfleurs.fr site.yml
Dump hostvars:
ansible -m debug villequin.machine.deuxfleurs.fr -i ./production -a "var=hostvars"
Deploy only one tag:
ansible-playbook -i production site.yml --tags "container"
Redeploy everything:
ansible-playbook -i production site.yml
Upgrade packages and force overwirte to fix bad packing done by GlusterFS:
apt-get -o Dpkg::Options::="--force-overwrite" dist-upgrade -y