3b90164102
Now that the previous release is Wallaby, we can add overcloud and seed upgrades on Ubuntu. Change-Id: I69868dca6e1f3e4a1bf123c9e7f1f3412162b264
144 lines
5.6 KiB
YAML
144 lines
5.6 KiB
YAML
---
|
|
- hosts: primary
|
|
tasks:
|
|
|
|
# Install the previous release of Kayobe, and use it to deploy a control
|
|
# plane.
|
|
|
|
- block:
|
|
- name: Ensure kayobe is installed
|
|
shell:
|
|
cmd: dev/install.sh &> {{ logs_dir }}/ansible/install-pre-upgrade
|
|
chdir: "{{ previous_kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Configure the firewall
|
|
# We run kayobe commands to determine variable values. So this must
|
|
# be run after install.
|
|
shell:
|
|
cmd: dev/configure-firewall.sh
|
|
# TODO(mgoddard): Use the previous repo when the previous release
|
|
# is no longer Wallaby.
|
|
chdir: "{{ kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Ensure overcloud is deployed
|
|
shell:
|
|
cmd: dev/overcloud-deploy.sh &> {{ logs_dir }}/ansible/overcloud-deploy-pre-upgrade
|
|
chdir: "{{ previous_kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
environment:
|
|
KAYOBE_CONFIG_SOURCE_PATH: "{{ previous_kayobe_config_src_dir }}"
|
|
|
|
- name: Ensure qemu-img is available for Tenks
|
|
command: docker exec -u root nova_libvirt bash -c 'apt update && apt -y install qemu-utils'
|
|
become: true
|
|
when: ansible_os_family == 'Debian'
|
|
|
|
# Update the Kayobe configuration to the current release.
|
|
|
|
- name: Ensure kolla config directory exists
|
|
file:
|
|
path: "{{ kayobe_config_src_dir }}/etc/kolla"
|
|
state: directory
|
|
|
|
- name: Copy across relevant kayobe-config files
|
|
copy:
|
|
src: "{{ previous_kayobe_config_src_dir }}/{{ item }}"
|
|
dest: "{{ kayobe_config_src_dir }}/{{ item }}"
|
|
remote_src: true
|
|
with_items:
|
|
- etc/kayobe/kolla/passwords.yml
|
|
- etc/kolla/admin-openrc.sh
|
|
- etc/kolla/public-openrc.sh
|
|
|
|
# NOTE(mgoddard): Use the name zz-overrides.yml to ensure this takes
|
|
# precedence over the standard config files.
|
|
- name: Ensure kayobe-config override config file exists
|
|
template:
|
|
src: overrides.yml.j2
|
|
dest: "{{ kayobe_config_src_dir }}/etc/kayobe/zz-overrides.yml"
|
|
|
|
- name: Ensure kolla-ansible globals.yml override config file exists
|
|
template:
|
|
src: globals.yml.j2
|
|
dest: "{{ kayobe_config_src_dir }}/etc/kayobe/kolla/globals.yml"
|
|
|
|
# Perform a smoke test against the previous release.
|
|
|
|
- block:
|
|
- name: Ensure test Tenks cluster is deployed
|
|
shell:
|
|
# Pass absolute source directory, since otherwise the `chdir` will
|
|
# cause this to fail.
|
|
cmd: dev/tenks-deploy-compute.sh '{{ tenks_src_dir }}' &> {{ logs_dir }}/ansible/tenks-deploy
|
|
chdir: "{{ kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Perform testing of the VMs in the overcloud prior to upgrade
|
|
shell:
|
|
cmd: dev/overcloud-test-vm.sh &> {{ logs_dir }}/ansible/overcloud-test-vm-pre-upgrade
|
|
chdir: "{{ previous_kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Perform testing of the baremetal machines in the overcloud prior to upgrade
|
|
shell:
|
|
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-bm-pre-upgrade
|
|
chdir: "{{ previous_kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
# FIXME(mgoddard): Bare metal testing is unreliable on Ubuntu - some jobs
|
|
# see IPMI failures such as the following:
|
|
# ipmitool chassis bootdev pxe
|
|
# Error setting Chassis Boot Parameter 5\nError setting Chassis Boot
|
|
# Parameter 0\n
|
|
when: ansible_os_family != 'Debian'
|
|
|
|
# Upgrade Kayobe, and use it to perform an upgrade of the control plane.
|
|
|
|
- name: Ensure overcloud is upgraded
|
|
shell:
|
|
cmd: "{{ kayobe_src_dir }}/dev/overcloud-upgrade.sh &> {{ logs_dir }}/ansible/overcloud-upgrade"
|
|
executable: /bin/bash
|
|
|
|
# Remove unused Docker images to avoid reaching full disk
|
|
- name: Remove unused Docker images
|
|
shell:
|
|
cmd: "docker image prune --all --force"
|
|
become: true
|
|
|
|
# TODO(mgoddard): Remove this task when the previous release is no
|
|
# longer Wallaby.
|
|
- name: Switch ironic nodes deploy interface to direct
|
|
shell:
|
|
cmd: >-
|
|
source ~/tenks-venv/bin/activate &&
|
|
source {{ kayobe_config_src_dir }}/etc/kolla/public-openrc.sh &&
|
|
openstack baremetal node set tk0 --deploy-interface direct &&
|
|
openstack baremetal node set tk1 --deploy-interface direct
|
|
executable: /bin/bash
|
|
|
|
# Perform a smoke test against the upgraded current release.
|
|
|
|
- name: Perform testing of VMs in the upgraded overcloud
|
|
shell:
|
|
cmd: dev/overcloud-test-vm.sh &> {{ logs_dir }}/ansible/overcloud-test-vm-post-upgrade
|
|
chdir: "{{ kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
|
|
- name: Perform testing of the baremetal machines in the upgraded overcloud
|
|
shell:
|
|
cmd: dev/overcloud-test-baremetal.sh &> {{ logs_dir }}/ansible/overcloud-test-bm-post-upgrade
|
|
chdir: "{{ kayobe_src_dir }}"
|
|
executable: /bin/bash
|
|
# FIXME(mgoddard): Bare metal testing is unreliable on Ubuntu - some jobs
|
|
# see IPMI failures such as the following:
|
|
# ipmitool chassis bootdev pxe
|
|
# Error setting Chassis Boot Parameter 5\nError setting Chassis Boot
|
|
# Parameter 0\n
|
|
when: ansible_os_family != 'Debian'
|
|
|
|
environment:
|
|
KAYOBE_CONFIG_SOURCE_PATH: "{{ kayobe_config_src_dir }}"
|
|
KAYOBE_SOURCE_PATH: "{{ kayobe_src_dir }}"
|