From 6b37b7c932857e408fcf54da37925dc58b3a0d32 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 5 Jul 2020 19:52:31 +0200 Subject: Add a readme --- ansible/README.md | 56 +++++++------------------------------------------------ 1 file changed, 7 insertions(+), 49 deletions(-) (limited to 'ansible/README.md') diff --git a/ansible/README.md b/ansible/README.md index 0d0c607..806adf5 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -1,52 +1,10 @@ +# ANSIBLE -## Provisionning +## How to proceed - 1. Need a public IP address - 2. Deploy Debian sid/buster - 3. Add a DNS entry like xxxx.machine.deuxfleurs.fr A 0.0.0.0 in Cloudflare + Havelock - 4. Setup the fqdn in /etc/hosts (127.0.1.1 xxxx.machine.deuxfleurs.fr) - 5. Switch the SSH port to the port 110 - 6. Add the server to the ./production file - 7. Reboot machine - 8. Deploy Ansible - 9. Check that everything works as intended - 10. 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 -``` +For each machine, **one by one** do: + - Check that cluster is healthy + - Run `ansible-playbook -i production --limit site.yml` + - Reboot + - Check that cluster is healthy -- cgit v1.2.3 From 9cf37f9fe0da315b73df5933b7dd494727c1c7b8 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 5 Jul 2020 20:12:51 +0200 Subject: Clean nomad+consul deploy tasks as we do not deploy anymore on ARM so it is untested for real --- ansible/README.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ansible/README.md') diff --git a/ansible/README.md b/ansible/README.md index 806adf5..023b941 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -4,6 +4,8 @@ For each machine, **one by one** do: - Check that cluster is healthy + - `sudo gluster peer status` + - `sudo gluster volume status all` (check Online Col, only `Y` must appear) - Run `ansible-playbook -i production --limit site.yml` - Reboot - Check that cluster is healthy -- cgit v1.2.3 From 81480fa1f99dc374fa1a444c34683187b7525b43 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Sun, 5 Jul 2020 20:15:28 +0200 Subject: Add docs + fix warning --- ansible/README.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ansible/README.md') diff --git a/ansible/README.md b/ansible/README.md index 023b941..db8d960 100644 --- a/ansible/README.md +++ b/ansible/README.md @@ -6,6 +6,9 @@ For each machine, **one by one** do: - Check that cluster is healthy - `sudo gluster peer status` - `sudo gluster volume status all` (check Online Col, only `Y` must appear) + - Check that Nomad is healthy + - Check that Consul is healthy + - Check that Postgres is healthy - Run `ansible-playbook -i production --limit site.yml` - Reboot - Check that cluster is healthy -- cgit v1.2.3