Clean nomad+consul deploy tasks as we do not deploy anymore on ARM so it is untested for real
This commit is contained in:
parent
6b37b7c932
commit
9cf37f9fe0
6 changed files with 6 additions and 74 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
For each machine, **one by one** do:
|
For each machine, **one by one** do:
|
||||||
- Check that cluster is healthy
|
- 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 <machine> site.yml`
|
- Run `ansible-playbook -i production --limit <machine> site.yml`
|
||||||
- Reboot
|
- Reboot
|
||||||
- Check that cluster is healthy
|
- Check that cluster is healthy
|
||||||
|
|
|
@ -11,17 +11,8 @@
|
||||||
tags: kv
|
tags: kv
|
||||||
- role: nomad
|
- role: nomad
|
||||||
tags: orchestrator
|
tags: orchestrator
|
||||||
|
- role: network
|
||||||
# UNSAFE!! This section is disabled by default, to run it the flags -t net should be added
|
tags: net
|
||||||
# to the ansible playbook command line.
|
|
||||||
# Reason: when rules.{v4,v6} are changed, the whole iptables configuration is reloaded.
|
|
||||||
# This creates issues with Docker, which injects its own configuration in iptables when it starts.
|
|
||||||
# In practice, most (all?) containers will break if rules.{v4,v6} are changed,
|
|
||||||
# and docker will have to be restared.
|
|
||||||
- hosts: cluster_nodes
|
|
||||||
roles:
|
|
||||||
- role: network
|
|
||||||
tags: [ net, never ]
|
|
||||||
|
|
||||||
# UNSAFE!! This section configures glusterfs. Once done, don't run it ever again as it may break stuff.
|
# UNSAFE!! This section configures glusterfs. Once done, don't run it ever again as it may break stuff.
|
||||||
# - role: storage
|
# - role: storage
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: restart consul
|
|
||||||
service: name=consul state=restarted
|
|
|
@ -1,16 +1,6 @@
|
||||||
- name: "Set consul version"
|
- name: "Set consul version"
|
||||||
set_fact:
|
set_fact:
|
||||||
consul_version: 1.7.4
|
consul_version: 1.8.0
|
||||||
|
|
||||||
- name: "Download and install Consul for armv7l"
|
|
||||||
unarchive:
|
|
||||||
src: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_arm.zip"
|
|
||||||
dest: /usr/local/bin
|
|
||||||
remote_src: yes
|
|
||||||
when:
|
|
||||||
- "ansible_architecture == 'armv7l'"
|
|
||||||
notify:
|
|
||||||
- restart consul
|
|
||||||
|
|
||||||
- name: "Download and install Consul for x86_64"
|
- name: "Download and install Consul for x86_64"
|
||||||
unarchive:
|
unarchive:
|
||||||
|
@ -19,31 +9,15 @@
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
when:
|
when:
|
||||||
- "ansible_architecture == 'x86_64'"
|
- "ansible_architecture == 'x86_64'"
|
||||||
notify:
|
|
||||||
- restart consul
|
|
||||||
|
|
||||||
- name: "Download and install Consul for arm64"
|
|
||||||
unarchive:
|
|
||||||
src: "https://releases.hashicorp.com/consul/{{ consul_version }}/consul_{{ consul_version }}_linux_arm64.zip"
|
|
||||||
dest: /usr/local/bin
|
|
||||||
remote_src: yes
|
|
||||||
when:
|
|
||||||
- "ansible_architecture == 'aarch64'"
|
|
||||||
notify:
|
|
||||||
- restart consul
|
|
||||||
|
|
||||||
- name: "Create consul configuration directory"
|
- name: "Create consul configuration directory"
|
||||||
file: path=/etc/consul/ state=directory
|
file: path=/etc/consul/ state=directory
|
||||||
|
|
||||||
- name: "Deploy consul configuration"
|
- name: "Deploy consul configuration"
|
||||||
template: src=consul.json.j2 dest=/etc/consul/consul.json
|
template: src=consul.json.j2 dest=/etc/consul/consul.json
|
||||||
notify:
|
|
||||||
- restart consul
|
|
||||||
|
|
||||||
- name: "Deploy consul systemd service"
|
- name: "Deploy consul systemd service"
|
||||||
copy: src=consul.service dest=/etc/systemd/system/consul.service
|
copy: src=consul.service dest=/etc/systemd/system/consul.service
|
||||||
notify:
|
|
||||||
- restart consul
|
|
||||||
|
|
||||||
- name: "Enable consul systemd service at boot"
|
- name: "Enable consul systemd service at boot"
|
||||||
service: name=consul state=started enabled=yes daemon_reload=yes
|
service: name=consul state=started enabled=yes daemon_reload=yes
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
---
|
|
||||||
|
|
||||||
- name: restart nomad
|
|
||||||
service: name=nomad state=restarted
|
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
- name: "Set nomad version"
|
- name: "Set nomad version"
|
||||||
set_fact:
|
set_fact:
|
||||||
nomad_version: 0.11.3
|
nomad_version: 0.12.0-beta2
|
||||||
|
|
||||||
- name: "Download and install Nomad for armv7l"
|
|
||||||
unarchive:
|
|
||||||
src: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_arm.zip"
|
|
||||||
dest: /usr/local/bin
|
|
||||||
remote_src: yes
|
|
||||||
when:
|
|
||||||
- "ansible_architecture == 'armv7l'"
|
|
||||||
notify:
|
|
||||||
- restart nomad
|
|
||||||
|
|
||||||
- name: "Download and install Nomad for x86_64"
|
- name: "Download and install Nomad for x86_64"
|
||||||
unarchive:
|
unarchive:
|
||||||
|
@ -19,31 +9,15 @@
|
||||||
remote_src: yes
|
remote_src: yes
|
||||||
when:
|
when:
|
||||||
- "ansible_architecture == 'x86_64'"
|
- "ansible_architecture == 'x86_64'"
|
||||||
notify:
|
|
||||||
- restart nomad
|
|
||||||
|
|
||||||
- name: "Download and install Nomad for arm64"
|
|
||||||
unarchive:
|
|
||||||
src: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_arm64.zip"
|
|
||||||
dest: /usr/local/bin
|
|
||||||
remote_src: yes
|
|
||||||
when:
|
|
||||||
- "ansible_architecture == 'aarch64'"
|
|
||||||
notify:
|
|
||||||
- restart nomad
|
|
||||||
|
|
||||||
- name: "Create Nomad configuration directory"
|
- name: "Create Nomad configuration directory"
|
||||||
file: path=/etc/nomad/ state=directory
|
file: path=/etc/nomad/ state=directory
|
||||||
|
|
||||||
- name: "Deploy Nomad configuration"
|
- name: "Deploy Nomad configuration"
|
||||||
template: src=nomad.hcl.j2 dest=/etc/nomad/nomad.hcl
|
template: src=nomad.hcl.j2 dest=/etc/nomad/nomad.hcl
|
||||||
notify:
|
|
||||||
- restart nomad
|
|
||||||
|
|
||||||
- name: "Deploy Nomad systemd service"
|
- name: "Deploy Nomad systemd service"
|
||||||
copy: src=nomad.service dest=/etc/systemd/system/nomad.service
|
copy: src=nomad.service dest=/etc/systemd/system/nomad.service
|
||||||
notify:
|
|
||||||
- restart nomad
|
|
||||||
|
|
||||||
- name: "Enable Nomad systemd service at boot"
|
- name: "Enable Nomad systemd service at boot"
|
||||||
service: name=nomad state=started enabled=yes daemon_reload=yes
|
service: name=nomad state=started enabled=yes daemon_reload=yes
|
||||||
|
|
Reference in a new issue