Implement major upgrade for Newton to Ocata
Implement the major upgrade from Newton to Ocata based on multinode. Currently we will start with the very basic use case, just few services in the controller. Co-Authored-By: Steven Hardy <shardy@redhat.com> Co-Authored-By: James Slagle <jslagle@redhat.com> Depends-On: I45991b60a151abf3c5e4d05a3aa7246b2d25ac5a Change-Id: Id2e0d7bbb76734e84dac6a192c213ea246ec6e6a
This commit is contained in:
parent
fec1652bba
commit
2912afb90f
|
@ -47,7 +47,9 @@ resources:
|
|||
str_replace:
|
||||
template: |
|
||||
#!/bin/bash
|
||||
ip addr add CONTROLPLANEIP/CONTROLPLANESUBNETCIDR dev $bridge_name
|
||||
if ! ip addr show dev $bridge_name | grep CONTROLPLANEIP/CONTROLPLANESUBNETCIDR; then
|
||||
ip addr add CONTROLPLANEIP/CONTROLPLANESUBNETCIDR dev $bridge_name
|
||||
fi
|
||||
params:
|
||||
CONTROLPLANEIP: {get_param: ControlPlaneIp}
|
||||
CONTROLPLANESUBNETCIDR: {get_param: ControlPlaneSubnetCidr}
|
||||
|
|
|
@ -324,7 +324,7 @@ function layer_ci_repo {
|
|||
function echo_vars_to_deploy_env {
|
||||
CALLER=$(caller)
|
||||
echo "# Written via echo_vars_to_deploy_env from $CALLER" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
for VAR in CENTOS_MIRROR http_proxy INTROSPECT MY_IP no_proxy NODECOUNT OVERCLOUD_DEPLOY_ARGS OVERCLOUD_UPDATE_ARGS PACEMAKER SSH_OPTIONS STABLE_RELEASE TRIPLEO_ROOT TRIPLEO_SH_ARGS NETISO_V4 NETISO_V6 TOCI_JOBTYPE UNDERCLOUD_SSL UNDERCLOUD_HEAT_CONVERGENCE RUN_TEMPEST_TESTS RUN_PING_TEST JOB_NAME OVB UNDERCLOUD_IDEMPOTENT MULTINODE CONTROLLER_HOSTS COMPUTE_HOSTS SUBNODES_SSH_KEY TEST_OVERCLOUD_DELETE OVERCLOUD OSINFRA UNDERCLOUD_SANITY_CHECK PINGTEST_TEMPLATE OVERCLOUD_PINGTEST_ARGS FEATURE_BRANCH OVERCLOUD_ROLES; do
|
||||
for VAR in CENTOS_MIRROR http_proxy INTROSPECT MY_IP no_proxy NODECOUNT OVERCLOUD_DEPLOY_ARGS OVERCLOUD_UPDATE_ARGS PACEMAKER SSH_OPTIONS STABLE_RELEASE TRIPLEO_ROOT TRIPLEO_SH_ARGS NETISO_V4 NETISO_V6 TOCI_JOBTYPE UNDERCLOUD_SSL UNDERCLOUD_HEAT_CONVERGENCE RUN_TEMPEST_TESTS RUN_PING_TEST JOB_NAME OVB UNDERCLOUD_IDEMPOTENT MULTINODE CONTROLLER_HOSTS COMPUTE_HOSTS SUBNODES_SSH_KEY TEST_OVERCLOUD_DELETE OVERCLOUD OSINFRA UNDERCLOUD_SANITY_CHECK PINGTEST_TEMPLATE OVERCLOUD_PINGTEST_ARGS FEATURE_BRANCH OVERCLOUD_ROLES UPGRADE_RELEASE OVERCLOUD_MAJOR_UPGRADE MAJOR_UPGRADE UNDERCLOUD_MAJOR_UPGRADE; do
|
||||
echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
done
|
||||
for role in $OVERCLOUD_ROLES; do
|
||||
|
@ -372,3 +372,14 @@ function collect_oooq_logs {
|
|||
tar -czf $OOOQ_LOGS/quickstart.tar.gz $OPT_WORKDIR
|
||||
mkdir -p $OOOQ_LOGS/collected_logs
|
||||
}
|
||||
|
||||
function subnodes_scp_deploy_env {
|
||||
for ip in $(cat /etc/nodepool/sub_nodes); do
|
||||
sanitized_address=$(sanitize_ip_address $ip)
|
||||
scp $SSH_OPTIONS -i /etc/nodepool/id_rsa \
|
||||
$TRIPLEO_ROOT/tripleo-ci/deploy.env ${sanitized_address}:
|
||||
ssh $SSH_OPTIONS -tt -i /etc/nodepool/id_rsa $ip \
|
||||
sudo cp deploy.env $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -163,8 +163,28 @@ fi
|
|||
if [ "$MULTINODE" = "1" ]; then
|
||||
# Start the script that will configure os-collect-config on the subnodes
|
||||
source ~/stackrc
|
||||
/usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/get-occ-config.sh 2>&1 | sudo dd of=/var/log/deployed-server-os-collect-config.log &
|
||||
|
||||
if [ "$OVERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
|
||||
# Download the previous release openstack-tripleo-heat-templates to a directory
|
||||
# we then deploy this and later upgrade to the default --templates location
|
||||
# FIXME - we should make the tht-compat package work here instead
|
||||
OLD_THT=$(curl https://trunk.rdoproject.org/centos7-newton/current/ | grep "openstack-tripleo-heat-templates" | grep "noarch.rpm" | grep -v "tripleo-heat-templates-compat" | sed "s/^.*>openstack-tripleo-heat-templates/openstack-tripleo-heat-templates/" | cut -d "<" -f1)
|
||||
echo "Downloading https://trunk.rdoproject.org/centos7-newton/current/$OLD_THT"
|
||||
rm -fr $TRIPLEO_ROOT/$UPGRADE_RELEASE/*
|
||||
mkdir -p $TRIPLEO_ROOT/$UPGRADE_RELEASE
|
||||
curl -o $TRIPLEO_ROOT/$UPGRADE_RELEASE/$OLD_THT https://trunk.rdoproject.org/centos7-newton/current/$OLD_THT
|
||||
pushd $TRIPLEO_ROOT/$UPGRADE_RELEASE
|
||||
rpm2cpio openstack-tripleo-heat-templates-*.rpm | cpio -ivd
|
||||
popd
|
||||
# Backup current deploy args:
|
||||
CURRENT_OVERCLOUD_DEPLOY_ARGS=$OVERCLOUD_DEPLOY_ARGS
|
||||
# Set deploy args for newton deployment:
|
||||
export OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --templates $TRIPLEO_ROOT/$UPGRADE_RELEASE/usr/share/openstack-tripleo-heat-templates -e $TRIPLEO_ROOT/$UPGRADE_RELEASE/usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml"
|
||||
echo_vars_to_deploy_env
|
||||
$TRIPLEO_ROOT/$UPGRADE_RELEASE/usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/get-occ-config.sh 2>&1 | sudo dd of=/var/log/deployed-server-os-collect-config.log &
|
||||
else
|
||||
/usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/get-occ-config.sh 2>&1 | sudo dd of=/var/log/deployed-server-os-collect-config.log &
|
||||
fi
|
||||
# Create dummy overcloud-full image since there is no way (yet) to disable
|
||||
# this constraint in the heat templates
|
||||
qemu-img create -f qcow2 overcloud-full.qcow2 1G
|
||||
|
@ -268,3 +288,16 @@ if [ "$UNDERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
|
|||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --undercloud-upgrade 2>&1 | ts '%Y-%m-%d %H:%M:%S.000 |' | sudo dd of=/var/log/undercloud_upgrade.txt || (tail -n 50 /var/log/undercloud_upgrade.txt && false)
|
||||
fi
|
||||
|
||||
if [ "$OVERCLOUD_MAJOR_UPGRADE" == 1 ] ; then
|
||||
source ~/stackrc
|
||||
# Set deploy args for newton deployment:
|
||||
# We have to use the backward compatible
|
||||
# update-from-deployed-server-newton.yaml environment when upgrading from
|
||||
# newton.
|
||||
export OVERCLOUD_DEPLOY_ARGS="$CURRENT_OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/updates/update-from-deployed-server-newton.yaml"
|
||||
echo_vars_to_deploy_env
|
||||
if [ "$MULTINODE" = "1" ]; then
|
||||
/usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/get-occ-config.sh 2>&1 | sudo dd of=/var/log/deployed-server-os-collect-config-22.log &
|
||||
fi
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --overcloud-upgrade
|
||||
fi
|
||||
|
|
|
@ -63,6 +63,7 @@ function show_options {
|
|||
echo " --undercloud-upgrade -- Upgrade a deployed undercloud."
|
||||
echo " --overcloud-deploy -- Deploy an overcloud."
|
||||
echo " --overcloud-update -- Update a deployed overcloud."
|
||||
echo " --overcloud-upgrade -- Upgrade a deployed overcloud."
|
||||
echo " --overcloud-delete -- Delete the overcloud."
|
||||
echo " --use-containers -- Use a containerized compute node."
|
||||
echo " --enable-check -- Enable checks on update."
|
||||
|
@ -82,7 +83,7 @@ if [ ${#@} = 0 ]; then
|
|||
fi
|
||||
|
||||
TEMP=$(getopt -o ,h \
|
||||
-l,help,repo-setup,delorean-setup,delorean-build,multinode-setup,bootstrap-subnodes,undercloud,overcloud-images,register-nodes,introspect-nodes,overcloud-deploy,overcloud-update,overcloud-delete,use-containers,overcloud-pingtest,undercloud-upgrade,skip-pingtest-cleanup,all,enable-check,run-tempest,setup-nodepool-files \
|
||||
-l,help,repo-setup,delorean-setup,delorean-build,multinode-setup,bootstrap-subnodes,undercloud,overcloud-images,register-nodes,introspect-nodes,overcloud-deploy,overcloud-update,overcloud-upgrade,overcloud-delete,use-containers,overcloud-pingtest,undercloud-upgrade,skip-pingtest-cleanup,all,enable-check,run-tempest,setup-nodepool-files \
|
||||
-o,x,h,a \
|
||||
-n $SCRIPT_NAME -- "$@")
|
||||
|
||||
|
@ -105,6 +106,7 @@ fi
|
|||
ALL=${ALL:-""}
|
||||
CONTAINER_ARGS=${CONTAINER_ARGS:-"-e /usr/share/openstack-tripleo-heat-templates/environments/docker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/docker-network.yaml --libvirt-type=qemu"}
|
||||
STABLE_RELEASE=${STABLE_RELEASE:-}
|
||||
UPGRADE_RELEASE=${UPGRADE_RELEASE:-""}
|
||||
DELOREAN_REPO_FILE=${DELOREAN_REPO_FILE:-"delorean.repo"}
|
||||
DELOREAN_REPO_URL=${DELOREAN_REPO_URL:-"\
|
||||
http://trunk.rdoproject.org/centos7/current-tripleo/"}
|
||||
|
@ -125,6 +127,7 @@ else
|
|||
OVERCLOUD_VALIDATE_ARGS=${OVERCLOUD_VALIDATE_ARGS-"--validation-warnings-fatal"}
|
||||
fi
|
||||
OVERCLOUD_UPDATE=${OVERCLOUD_UPDATE:-""}
|
||||
OVERCLOUD_UPGRADE=${OVERCLOUD_UPGRADE:-""}
|
||||
OVERCLOUD_UPDATE_RM_FILES=${OVERCLOUD_UPDATE_RM_FILES:-"1"}
|
||||
OVERCLOUD_UPDATE_ARGS=${OVERCLOUD_UPDATE_ARGS:-"$OVERCLOUD_DEPLOY_ARGS $OVERCLOUD_VALIDATE_ARGS"}
|
||||
OVERCLOUD_UPDATE_CHECK=${OVERCLOUD_UPDATE_CHECK:-}
|
||||
|
@ -134,6 +137,11 @@ OVERCLOUD_IMAGES=${OVERCLOUD_IMAGES:-""}
|
|||
OVERCLOUD_IMAGES_LEGACY_ARGS=${OVERCLOUD_IMAGES_LEGACY_ARGS:-"--all"}
|
||||
OVERCLOUD_IMAGES_ARGS=${OVERCLOUD_IMAGES_ARGS:-"--output-directory $OVERCLOUD_IMAGES_PATH --config-file $OVERCLOUD_IMAGES_YAML_PATH/overcloud-images.yaml --config-file $OVERCLOUD_IMAGES_YAML_PATH/overcloud-images-centos7.yaml"}
|
||||
OVERCLOUD_NAME=${OVERCLOUD_NAME:-"overcloud"}
|
||||
OVERCLOUD_UPGRADE_THT_PATH=${OVERCLOUD_UPGRADE_THT_PATH:-"/usr/share/openstack-tripleo-heat-templates"}
|
||||
OVERCLOUD_UPGRADE_ARGS=${OVERCLOUD_UPGRADE_ARGS:-"-e $OVERCLOUD_UPGRADE_THT_PATH/overcloud-resource-registry-puppet.yaml $OVERCLOUD_DEPLOY_ARGS -e $OVERCLOUD_UPGRADE_THT_PATH/environments/major-upgrade-all-in-one.yaml -e $HOME/init-repo.yaml --templates $OVERCLOUD_UPGRADE_THT_PATH"}
|
||||
UPGRADE_VERSION=${UPGRADE_VERSION:-"master"}
|
||||
UPGRADE_REPO_URL=${UPGRADE_REPO_URL:-"http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-$UPGRADE_VERSION-tested/delorean.repo"}
|
||||
UPGRADE_OVERCLOUD_REPO_URL=${UPGRADE_OVERCLOUD_REPO_URL:-"http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-$UPGRADE_VERSION-tested/delorean.repo"}
|
||||
UNDERCLOUD_UPGRADE=${UNDERCLOUD_UPGRADE:-""}
|
||||
UPGRADE_VERSION=${UPGRADE_VERSION:-"master"}
|
||||
SKIP_PINGTEST_CLEANUP=${SKIP_PINGTEST_CLEANUP:-""}
|
||||
|
@ -196,6 +204,7 @@ while true ; do
|
|||
--register-nodes) REGISTER_NODES="1"; shift 1;;
|
||||
--overcloud-deploy) OVERCLOUD_DEPLOY="1"; shift 1;;
|
||||
--overcloud-update) OVERCLOUD_UPDATE="1"; shift 1;;
|
||||
--overcloud-upgrade) OVERCLOUD_UPGRADE="1"; shift 1;;
|
||||
--overcloud-delete) OVERCLOUD_DELETE="1"; shift 1;;
|
||||
--overcloud-images) OVERCLOUD_IMAGES="1"; shift 1;;
|
||||
--overcloud-pingtest) OVERCLOUD_PINGTEST="1"; shift 1;;
|
||||
|
@ -265,7 +274,7 @@ function repo_setup {
|
|||
# Note yum --installroot doesn't seem to work as it can't find the extras repos in the
|
||||
# system yum.repos.d, so download the package then extraact the repo file
|
||||
mkdir -p $REPO_PREFIX
|
||||
sudo yum -y install --enablerepo=extras --downloadonly --downloaddir=$REPO_PREFIX $CEPH_REPO_RPM
|
||||
yumdownloader --destdir $REPO_PREFIX $CEPH_REPO_RPM
|
||||
pushd $REPO_PREFIX
|
||||
rpm2cpio ${CEPH_REPO_RPM}*.rpm | cpio -ivd
|
||||
mv etc/yum.repos.d/* .
|
||||
|
@ -275,7 +284,8 @@ function repo_setup {
|
|||
fi
|
||||
sudo sed -i -e 's%gpgcheck=.*%gpgcheck=0%' ${REPO_PREFIX}/${CEPH_REPO_FILE}
|
||||
fi
|
||||
|
||||
# @matbu TBR debuginfo:
|
||||
log "Stable release: $STABLE_RELEASE"
|
||||
if [ -z "$STABLE_RELEASE" ]; then
|
||||
# Enable the Delorean Deps repository
|
||||
sudo curl -Lvo $REPO_PREFIX/delorean-deps.repo http://trunk.rdoproject.org/centos7/delorean-deps.repo
|
||||
|
@ -541,6 +551,7 @@ except:
|
|||
|
||||
}
|
||||
|
||||
|
||||
function register_nodes {
|
||||
|
||||
log "Register nodes"
|
||||
|
@ -585,6 +596,8 @@ function overcloud_deploy {
|
|||
stackrc_check
|
||||
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS $OVERCLOUD_VALIDATE_ARGS"
|
||||
# Set dns server for the overcloud nodes
|
||||
neutron subnet-update $(neutron net-list | grep ctlplane | cut -d ' ' -f 6) --dns-nameserver $(cat /etc/resolv.conf | grep nameserver | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ --dns-nameserver /g')
|
||||
|
||||
if [[ $USE_CONTAINERS == 1 ]]; then
|
||||
if ! glance image-list | grep -q atomic-image; then
|
||||
|
@ -675,6 +688,61 @@ function overcloud_update {
|
|||
fi
|
||||
}
|
||||
|
||||
function overcloud_upgrade {
|
||||
stackrc_check
|
||||
if heat stack-show "$OVERCLOUD_NAME" ; then
|
||||
log "Create overcloud repo template file"
|
||||
/bin/bash -c "cat <<EOF>$HOME/init-repo.yaml
|
||||
|
||||
parameter_defaults:
|
||||
UpgradeInitCommand: |
|
||||
set -e
|
||||
# For some reason '$HOME' is not defined when the Heat agent executes this
|
||||
# script and tripleo.sh expects it. Just reuse the same value from the
|
||||
# current undercloud user.
|
||||
yum clean all
|
||||
HOME=$HOME $TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup
|
||||
yum clean all
|
||||
yum install -y python-heat-agent-*
|
||||
|
||||
# TODO: (slagle)
|
||||
# remove the --noscripts install of openstack-tripleo-image-elements
|
||||
# once https://review.rdoproject.org/r/4225 merges
|
||||
pushd /tmp
|
||||
yumdownloader openstack-tripleo-image-elements
|
||||
rpm -Uvh --noscripts --force ./openstack-tripleo-image-elements*
|
||||
rm -f openstack-tripleo-image-elements*
|
||||
popd
|
||||
|
||||
# FIXME: matbu
|
||||
# Remove those packages is temporary workaround since the fix in
|
||||
# https://bugs.launchpad.net/tripleo/+bug/1649284
|
||||
# will be release and landed in the packages
|
||||
yum remove -y python-UcsSdk openstack-neutron-bigswitch-agent python-networking-bigswitch openstack-neutron-bigswitch-lldp python-networking-odl
|
||||
# Ref https://review.openstack.org/#/c/392615 disable the old hiera hook
|
||||
# FIXME - this should probably be handled via packaging?
|
||||
rm -f /usr/libexec/os-apply-config/templates/etc/puppet/hiera.yaml
|
||||
rm -f /usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles
|
||||
rm -f /etc/puppet/hieradata/*.yaml
|
||||
EOF"
|
||||
log "Overcloud upgrade started."
|
||||
log "Upgrade command arguments: $OVERCLOUD_UPGRADE_ARGS"
|
||||
log "Execute major upgrade."
|
||||
openstack overcloud deploy $OVERCLOUD_UPGRADE_ARGS
|
||||
log "Major upgrade - DONE."
|
||||
|
||||
if heat stack-show "$OVERCLOUD_NAME" | grep "stack_status " | egrep "UPDATE_COMPLETE"; then
|
||||
log "Major Upgrade - DONE."
|
||||
else
|
||||
log "Major Upgrade FAILED."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
log "Overcloud FAILED - No stack $OVERCLOUD_NAME."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function overcloud_delete {
|
||||
|
||||
log "Overcloud delete"
|
||||
|
@ -1024,14 +1092,10 @@ function bootstrap_subnodes {
|
|||
local sub_nodes
|
||||
sub_nodes=$(cat /etc/nodepool/sub_nodes_private)
|
||||
|
||||
bootstrap_subnodes_repos
|
||||
|
||||
for ip in $sub_nodes; do
|
||||
log "Bootstrapping $ip"
|
||||
log "Running --repo-setup on $ip"
|
||||
# Do repo setup
|
||||
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
||||
TRIPLEO_ROOT=$TRIPLEO_ROOT \
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup
|
||||
|
||||
# Run overcloud full bootstrap script
|
||||
log "Running bootstrap-overcloud-full.sh on $ip"
|
||||
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
||||
|
@ -1042,6 +1106,7 @@ function bootstrap_subnodes {
|
|||
log "Bootstrap subnodes - DONE".
|
||||
}
|
||||
|
||||
|
||||
function setup_nodepool_files {
|
||||
log "Setup nodepool files"
|
||||
|
||||
|
@ -1090,6 +1155,37 @@ function setup_nodepool_files {
|
|||
log "Setup nodepool files - DONE"
|
||||
}
|
||||
|
||||
|
||||
function bootstrap_subnodes_repos {
|
||||
log "Bootstrap subnodes repos"
|
||||
|
||||
local sub_nodes
|
||||
sub_nodes=$(cat /etc/nodepool/sub_nodes_private)
|
||||
|
||||
for ip in $sub_nodes; do
|
||||
log "Bootstrapping $ip"
|
||||
log "Running --repo-setup on $ip"
|
||||
# Do repo setup
|
||||
# if UPGRADE_RELEASE is set, then we are making an upgrade, so
|
||||
# we need to set the stable_release.
|
||||
if [ ! -z $UPGRADE_RELEASE ]; then
|
||||
log "Stable release $UPGRADE_RELEASE"
|
||||
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
||||
"TRIPLEO_ROOT=$TRIPLEO_ROOT; \
|
||||
unset STABLE_RELEASE; \
|
||||
export STABLE_RELEASE=$UPGRADE_RELEASE; \
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup"
|
||||
else
|
||||
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
||||
TRIPLEO_ROOT=$TRIPLEO_ROOT \
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --repo-setup
|
||||
fi
|
||||
done
|
||||
|
||||
log "Bootstrap subnodes repos - DONE".
|
||||
}
|
||||
|
||||
|
||||
if [ "$REPO_SETUP" = 1 ]; then
|
||||
repo_setup
|
||||
fi
|
||||
|
@ -1134,6 +1230,10 @@ if [ "$OVERCLOUD_UPDATE" = 1 ]; then
|
|||
overcloud_update
|
||||
fi
|
||||
|
||||
if [ "$OVERCLOUD_UPGRADE" = 1 ]; then
|
||||
overcloud_upgrade
|
||||
fi
|
||||
|
||||
if [ "$OVERCLOUD_DELETE" = 1 ]; then
|
||||
overcloud_delete
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
resource_registry:
|
||||
OS::TripleO::Controller::Net::SoftwareConfig: ../heat-templates/net-config-multinode.yaml
|
||||
OS::TripleO::Compute::Net::SoftwareConfig: ../heat-templates/net-config-multinode.yaml
|
||||
OS::TripleO::Services::Core: multinode-core.yaml
|
||||
|
||||
parameter_defaults:
|
||||
ControllerServices:
|
||||
- OS::TripleO::Services::CACerts
|
||||
- OS::TripleO::Services::Core
|
||||
- OS::TripleO::Services::Kernel
|
||||
- OS::TripleO::Services::Keystone
|
||||
- OS::TripleO::Services::MySQL
|
||||
- OS::TripleO::Services::RabbitMQ
|
||||
- OS::TripleO::Services::HAproxy
|
||||
- OS::TripleO::Services::Keepalived
|
||||
- OS::TripleO::Services::Ntp
|
||||
- OS::TripleO::Services::Timezone
|
||||
- OS::TripleO::Services::TripleoPackages
|
||||
- OS::TripleO::Services::TripleoFirewall
|
||||
ControllerExtraConfig:
|
||||
nova::compute::libvirt::services::libvirt_virt_type: qemu
|
||||
nova::compute::libvirt::libvirt_virt_type: qemu
|
||||
# Required for Centos 7.3 and Qemu 2.6.0
|
||||
nova::compute::libvirt::libvirt_cpu_mode: 'none'
|
||||
SwiftCeilometerPipelineEnabled: False
|
|
@ -0,0 +1,4 @@
|
|||
# Only a controller as we're doing all-in-one testing via the multinode job
|
||||
- name: Controller
|
||||
CountDefault: 1
|
||||
# Note services are defined in multinode_major_upgrade.yaml
|
|
@ -53,6 +53,9 @@ export INTROSPECT=0
|
|||
export NODECOUNT=2
|
||||
export PACEMAKER=0
|
||||
export UNDERCLOUD_MAJOR_UPGRADE=0
|
||||
export OVERCLOUD_MAJOR_UPGRADE=0
|
||||
export MAJOR_UPGRADE=0
|
||||
export UPGRADE_RELEASE=
|
||||
# Whether or not we deploy an Overcloud
|
||||
export OVERCLOUD=1
|
||||
# NOTE(bnemec): At this time, the undercloud install + image build is taking from
|
||||
|
@ -154,17 +157,28 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||
fi
|
||||
;;
|
||||
upgrades)
|
||||
MAJOR_UPGRADE=1
|
||||
if [ $TOCI_JOBTYPE == 'undercloud-upgrades' ] ; then
|
||||
UNDERCLOUD_MAJOR_UPGRADE=1
|
||||
export UNDERCLOUD_SANITY_CHECK=1
|
||||
|
||||
# We want to start by installing an Undercloud from the
|
||||
# previous stable release.
|
||||
# We want to start by installing an Undercloud
|
||||
# from the previous stable release.
|
||||
if [ "$STABLE_RELEASE" = "newton" ]; then
|
||||
STABLE_RELEASE=mitaka
|
||||
elif [ -z $STABLE_RELEASE ]; then
|
||||
STABLE_RELEASE=newton
|
||||
fi
|
||||
UNDERCLOUD_MAJOR_UPGRADE=1
|
||||
export UNDERCLOUD_SANITY_CHECK=1
|
||||
fi
|
||||
if [ $TOCI_JOBTYPE == 'multinode-upgrades' ] ; then
|
||||
# We deploy a master Undercloud and an Overcloud with the
|
||||
# previous release. The pingtest is disable because it won't
|
||||
# work with the few services deployed.
|
||||
UPGRADE_RELEASE=newton
|
||||
OVERCLOUD_MAJOR_UPGRADE=1
|
||||
RUN_PING_TEST=0
|
||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS --libvirt-type=qemu -t $OVERCLOUD_DEPLOY_TIMEOUT -e $TRIPLEO_ROOT/tripleo-ci/test-environments/multinode_major_upgrade.yaml -r $TRIPLEO_ROOT/tripleo-ci/test-environments/upgrade_roles_data.yaml --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"
|
||||
UNDERCLOUD_SSL=0
|
||||
export UNDERCLOUD_SANITY_CHECK=0
|
||||
fi
|
||||
;;
|
||||
ha)
|
||||
|
|
|
@ -95,6 +95,25 @@ if [ -s /etc/nodepool/sub_nodes ]; then
|
|||
sudo cp deploy.env $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||
done
|
||||
|
||||
subnodes_scp_deploy_env
|
||||
|
||||
if [ "$OVERCLOUD_MAJOR_UPGRADE" = "1" ]; then
|
||||
# If upgrading the overcloud, we want to bootstrap the subnodes at the
|
||||
# release defined by $UPGRADE_RELEASE
|
||||
# Save the current value of $STABLE_RELEASE
|
||||
CURR_STABLE_RELEASE=$STABLE_RELEASE
|
||||
# Set $STABLE_RELEASE to the release at which we want to start the subnodes
|
||||
STABLE_RELEASE=$UPGRADE_RELEASE
|
||||
# Update and copy deploy.env to the subnodes
|
||||
echo_vars_to_deploy_env
|
||||
subnodes_scp_deploy_env
|
||||
# Reset $STABLE_RELEASE
|
||||
STABLE_RELEASE=$CURR_STABLE_RELEASE
|
||||
# Update the local deploy.env only so that the undercloud will install
|
||||
# at the current $STABLE_RELEASE
|
||||
echo_vars_to_deploy_env
|
||||
fi
|
||||
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --multinode-setup
|
||||
echo "INFO: Check /var/log/boostrap-subnodes.log for boostrap subnodes output"
|
||||
$TRIPLEO_ROOT/tripleo-ci/scripts/tripleo.sh --bootstrap-subnodes 2>&1 | sudo dd of=/var/log/bootstrap-subnodes.log || (tail -n 50 /var/log/bootstrap-subnodes.log && false)
|
||||
|
|
Loading…
Reference in New Issue