Compare commits

...

2 Commits

Author SHA1 Message Date
9408bf709c Only install pvcapid on coordinators
There should be no reason for the API to be installed on non-coordinator
hosts, so separate it out.
2023-12-01 01:40:56 -05:00
15fc3261de Add PVC role tasks to update-pvc-daemons
Ensures that configurations are always updated whenever the daemons are.
This will be necessary for 0.9.83 with the fundamental change from
pvcXd.yaml to pvc.conf configuration formats, while also ensuring that
future daemon updates also include any configuration changes that may be
pending in the group_vars.
2023-12-01 01:37:39 -05:00
2 changed files with 36 additions and 3 deletions

View File

@ -1,4 +1,5 @@
---
# Set the cluster into maintenance mode
- hosts: all
remote_user: deploy
become: yes
@ -15,6 +16,28 @@
run_once: yes
ignore_errors: yes
# Run the PVC daemon role against the system (update pvc.conf)
- hosts: all
remote_user: deploy
become: yes
become_user: root
gather_facts: yes
tasks:
- set_fact:
this_node: "{{ inventory_hostname.split('.')[0] }}"
- set_fact:
is_coordinator: "{% for node in pvc_nodes if node.hostname == this_node %}{{ node.is_coordinator }}{% endfor %}"
- set_fact:
new_host: no
- name: import PVC daemon role
include_role:
name: pvc
tasks_from: pvc/main.yml
# Install the latest PVC packages & restart daemons to apply
- hosts: all
remote_user: deploy
become: yes
@ -92,6 +115,7 @@
become: no
connection: local
# Set the cluster out of maintenance mode
- hosts: all
remote_user: deploy
become: yes

View File

@ -1,19 +1,28 @@
---
- name: install pvc packages
- name: install pvc packages (all)
apt:
name:
- pvc-daemon-node
- pvc-daemon-health
- pvc-daemon-worker
- pvc-daemon-api
- pvc-daemon-common
- pvc-client-cli
- ethtool
- jq
# default provisioner script helper programs
state: present
register: apt_res
retries: 5
until: apt_res is success
- name: install pvc packages (coordinators only)
apt:
name:
- pvc-daemon-api
# default provisioner script helper programs (pvcworkerd)
- debootstrap
- rinse
state: present
when: is_coordinator
register: apt_res
retries: 5
until: apt_res is success