From c74a4da06eeb77824d298b40bb53f9cf154ae48e Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Fri, 8 Mar 2019 14:18:28 -0800 Subject: [PATCH] Fix puppet 4 installations Our old puppet 4 process was to run the install_puppet.sh script to transition from puppet 3 to puppet 4 but this ran after base.yaml which enforces a puppet version. Unfortunately we were enforcing puppet version 3 in the base.yaml playbook via the puppet-install role which meant base would install pupept 3 and our upgrade playbook would install puppet 4 in a loop. Thankfully we run puppet after the upgrade so we were using the puppet version we wanted. To fix this needless reinstall loop we do two things. We move the upgrade playbook before base.yaml so that we upgrade before we enforce a version. Then we update group vars for the puppet4 group to enforce the puppet 4 version. Change-Id: I97ca81ed5331e664f8e2e65b283793f0919f6033 --- playbooks/group_vars/puppet4.yaml | 1 + run_all.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 playbooks/group_vars/puppet4.yaml diff --git a/playbooks/group_vars/puppet4.yaml b/playbooks/group_vars/puppet4.yaml new file mode 100644 index 0000000000..761972c677 --- /dev/null +++ b/playbooks/group_vars/puppet4.yaml @@ -0,0 +1 @@ +puppet_install_version: 4 diff --git a/run_all.sh b/run_all.sh index 6fd8057263..6d3f826e52 100755 --- a/run_all.sh +++ b/run_all.sh @@ -88,6 +88,15 @@ start_timer timeout -k 2m 120m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/bootstrap-k8s-nodes.yaml send_timer k8s_bootstrap +# Update the puppet version +# We run this before base because base enforces the specified puppet version +# but does not transition from an older version to a newer version. +# This playbook will do the transition if necessary then base will enforce +# it going forward. +start_timer +timeout -k 2m 10m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/update_puppet_version.yaml +send_timer update_puppet_version + # Run the base playbook everywhere start_timer timeout -k 2m 120m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/base.yaml @@ -106,11 +115,6 @@ start_timer timeout -k 2m 10m ansible-playbook -f 50 -e @/etc/ansible/hosts/gitea-cluster.yaml ${SYSTEM_CONFIG}/kubernetes/gitea/gitea-playbook.yaml send_timer gitea_gitea -# Update the puppet version -start_timer -timeout -k 2m 10m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/update_puppet_version.yaml -send_timer update_puppet_version - # Run the git/gerrit/zuul sequence, since it's important that they all work together start_timer timeout -k 2m 30m ansible-playbook -f 50 ${ANSIBLE_PLAYBOOKS}/remote_puppet_git.yaml