Merge "Work on starting the upgrade job"
This commit is contained in:
commit
e7385105ee
@ -32,6 +32,12 @@ export ANSIBLE_ROLE_FETCH_MODE="git-clone"
|
|||||||
# Set the scenario to execute based on the first CLI parameter
|
# Set the scenario to execute based on the first CLI parameter
|
||||||
export SCENARIO=${1:-"aio"}
|
export SCENARIO=${1:-"aio"}
|
||||||
|
|
||||||
|
# TODO(sc68cal) update the job configs to have the stable branch
|
||||||
|
# So we have job names like:
|
||||||
|
# gate-openstack-ansible-openstack-ansible-upgrade-newton-ubuntu-xenial-nv
|
||||||
|
export UPGRADE_BASEBRANCH=${2:-"newton"}
|
||||||
|
export SCENARIO_BACKUP=${SCENARIO_BACKUP:-''}
|
||||||
|
|
||||||
## Functions -----------------------------------------------------------------
|
## Functions -----------------------------------------------------------------
|
||||||
info_block "Checking for required libraries." 2> /dev/null || source "$(dirname "${0}")/scripts-library.sh"
|
info_block "Checking for required libraries." 2> /dev/null || source "$(dirname "${0}")/scripts-library.sh"
|
||||||
|
|
||||||
@ -42,6 +48,16 @@ trap gate_job_exit_tasks EXIT
|
|||||||
# Log some data about the instance and the rest of the system
|
# Log some data about the instance and the rest of the system
|
||||||
log_instance_info
|
log_instance_info
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$SCENARIO" == "upgrade" ]]; then
|
||||||
|
# First, check out the base branch and build an AIO
|
||||||
|
git checkout origin/stable/$UPGRADE_BASEBRANCH
|
||||||
|
|
||||||
|
# Do a quick swap of SCENARIO since the newton branch doesn't know about the upgrade scenario
|
||||||
|
export SCENARIO_BACKUP=$SCENARIO
|
||||||
|
SCENARIO="aio"
|
||||||
|
fi
|
||||||
|
|
||||||
# Get minimum disk size
|
# Get minimum disk size
|
||||||
DATA_DISK_MIN_SIZE="$((1024**3 * $(awk '/bootstrap_host_data_disk_min_size/{print $2}' "$(dirname "${0}")/../tests/roles/bootstrap-host/defaults/main.yml") ))"
|
DATA_DISK_MIN_SIZE="$((1024**3 * $(awk '/bootstrap_host_data_disk_min_size/{print $2}' "$(dirname "${0}")/../tests/roles/bootstrap-host/defaults/main.yml") ))"
|
||||||
|
|
||||||
@ -105,4 +121,16 @@ bash "$(dirname "${0}")/run-playbooks.sh"
|
|||||||
# Log some data about the instance and the rest of the system
|
# Log some data about the instance and the rest of the system
|
||||||
log_instance_info
|
log_instance_info
|
||||||
|
|
||||||
|
if [ ! -z $SCENARIO_BACKUP ]; then
|
||||||
|
# Restore the scenario from L56
|
||||||
|
SCENARIO=$SCENARIO_BACKUP
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$SCENARIO" == "upgrade" ]]; then
|
||||||
|
# Hopefully we can re-check out the patch from Zuul.
|
||||||
|
git checkout FETCH_HEAD
|
||||||
|
export I_REALLY_KNOW_WHAT_I_AM_DOING=true
|
||||||
|
bash "$(dirname "${0}")/run-upgrade.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
exit_success
|
exit_success
|
||||||
|
@ -46,6 +46,20 @@
|
|||||||
- name: keystone.yml.aio
|
- name: keystone.yml.aio
|
||||||
- name: neutron.yml.aio
|
- name: neutron.yml.aio
|
||||||
- name: nova.yml.aio
|
- name: nova.yml.aio
|
||||||
|
upgrade:
|
||||||
|
# This starts as an AIO box, then an upgrade is run
|
||||||
|
- name: aodh.yml.aio
|
||||||
|
- name: cinder.yml.aio
|
||||||
|
- name: ceilometer.yml.aio
|
||||||
|
- name: designate.yml.aio
|
||||||
|
- name: glance.yml.aio
|
||||||
|
- name: gnocchi.yml.aio
|
||||||
|
- name: heat.yml.aio
|
||||||
|
- name: horizon.yml.aio
|
||||||
|
- name: keystone.yml.aio
|
||||||
|
- name: neutron.yml.aio
|
||||||
|
- name: nova.yml.aio
|
||||||
|
- name: swift.yml.aio
|
||||||
vars:
|
vars:
|
||||||
scenario: "{{ lookup('env','SCENARIO') | default('aio', true) }}"
|
scenario: "{{ lookup('env','SCENARIO') | default('aio', true) }}"
|
||||||
sshd:
|
sshd:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user