Merge "Use bootstrap subnodes environment in CI"
This commit is contained in:
commit
095e0d6543
37
scripts/bootstrap-overcloud-full-minimal.sh
Executable file
37
scripts/bootstrap-overcloud-full-minimal.sh
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
export STABLE_RELEASE=${STABLE_RELEASE:-""}
|
||||||
|
|
||||||
|
# Source deploy.env if it exists. It should exist if we are running under
|
||||||
|
# tripleo-ci
|
||||||
|
export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/opt/stack/new"}
|
||||||
|
if [ -f "$TRIPLEO_ROOT/tripleo-ci/deploy.env" ]; then
|
||||||
|
source $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ensure epel-release is not installed
|
||||||
|
sudo yum erase -y epel-release || :
|
||||||
|
|
||||||
|
# Copied from toci_gate_test.sh...need to apply this fix on subnodes as well
|
||||||
|
# TODO(pabelanger): Why is python-requests installed from pip?
|
||||||
|
sudo rm -rf /usr/lib/python2.7/site-packages/requests
|
||||||
|
# Reinstall python-requests if it was already installed, otherwise it will be
|
||||||
|
# installed later when other packages are installed.
|
||||||
|
if rpm -q python-requests; then
|
||||||
|
sudo yum reinstall -y python-requests
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clear out any puppet modules on the node placed their by infra configuration
|
||||||
|
sudo rm -rf /etc/puppet/modules/*
|
||||||
|
|
||||||
|
# This will remove any puppet configuration done my infra setup
|
||||||
|
sudo yum -y remove puppet facter hiera
|
||||||
|
|
||||||
|
# Update everything
|
||||||
|
sudo yum -y update
|
||||||
|
|
||||||
|
# git is needed since oooq multinode jobs does a git clone
|
||||||
|
# See https://bugs.launchpad.net/tripleo-quickstart/+bug/1667043
|
||||||
|
sudo yum -y install git python-heat-agent*
|
@ -334,7 +334,7 @@ function layer_ci_repo {
|
|||||||
function echo_vars_to_deploy_env {
|
function echo_vars_to_deploy_env {
|
||||||
CALLER=$(caller)
|
CALLER=$(caller)
|
||||||
echo "# Written via echo_vars_to_deploy_env from $CALLER" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
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 OVERCLOUD_PINGTEST_ARGS FEATURE_BRANCH OVERCLOUD_ROLES UPGRADE_RELEASE OVERCLOUD_MAJOR_UPGRADE MAJOR_UPGRADE UNDERCLOUD_MAJOR_UPGRADE CA_SERVER UNDERCLOUD_TELEMETRY UNDERCLOUD_UI UNDERCLOUD_VALIDATIONS PREDICTABLE_PLACEMENT OPSTOOLS_REPO_ENABLED UPGRADE_ENV UNDERCLOUD_CONTAINERS; 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 OVERCLOUD_PINGTEST_ARGS FEATURE_BRANCH OVERCLOUD_ROLES UPGRADE_RELEASE OVERCLOUD_MAJOR_UPGRADE MAJOR_UPGRADE UNDERCLOUD_MAJOR_UPGRADE CA_SERVER UNDERCLOUD_TELEMETRY UNDERCLOUD_UI UNDERCLOUD_VALIDATIONS PREDICTABLE_PLACEMENT OPSTOOLS_REPO_ENABLED UPGRADE_ENV UNDERCLOUD_CONTAINERS BOOTSTRAP_SUBNODES_MINIMAL; do
|
||||||
echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
echo "export $VAR=\"${!VAR}\"" >> $TRIPLEO_ROOT/tripleo-ci/deploy.env
|
||||||
done
|
done
|
||||||
for role in $OVERCLOUD_ROLES; do
|
for role in $OVERCLOUD_ROLES; do
|
||||||
|
@ -7,6 +7,7 @@ gating_repo_enabled: true
|
|||||||
tripleo_root: "{{ lookup('env','TRIPLEO_ROOT') }}"
|
tripleo_root: "{{ lookup('env','TRIPLEO_ROOT') }}"
|
||||||
extra_args: >
|
extra_args: >
|
||||||
-e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml
|
-e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml
|
||||||
|
-e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-bootstrap-environment-centos.yaml
|
||||||
-e ${TRIPLEO_ROOT}/tripleo-ci/test-environments/worker-config.yaml
|
-e ${TRIPLEO_ROOT}/tripleo-ci/test-environments/worker-config.yaml
|
||||||
-e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml
|
-e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml
|
||||||
--compute-scale 0
|
--compute-scale 0
|
||||||
|
@ -1390,13 +1390,20 @@ function bootstrap_subnodes {
|
|||||||
|
|
||||||
bootstrap_subnodes_repos
|
bootstrap_subnodes_repos
|
||||||
|
|
||||||
|
local bootstrap_script
|
||||||
|
if [ "$BOOTSTRAP_SUBNODES_MINIMAL" = "1" ]; then
|
||||||
|
bootstrap_script=bootstrap-overcloud-full-minimal.sh
|
||||||
|
else
|
||||||
|
bootstrap_script=bootstrap-overcloud-full.sh
|
||||||
|
fi
|
||||||
|
|
||||||
for ip in $sub_nodes; do
|
for ip in $sub_nodes; do
|
||||||
log "Bootstrapping $ip"
|
log "Bootstrapping $ip"
|
||||||
# Run overcloud full bootstrap script
|
# Run overcloud full bootstrap script
|
||||||
log "Running bootstrap-overcloud-full.sh on $ip"
|
log "Running bootstrap-overcloud-full.sh on $ip"
|
||||||
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
ssh $SSH_OPTIONS -t -i /etc/nodepool/id_rsa $ip \
|
||||||
TRIPLEO_ROOT=$TRIPLEO_ROOT \
|
TRIPLEO_ROOT=$TRIPLEO_ROOT \
|
||||||
$TRIPLEO_ROOT/tripleo-ci/scripts/bootstrap-overcloud-full.sh
|
$TRIPLEO_ROOT/tripleo-ci/scripts/$bootstrap_script
|
||||||
done
|
done
|
||||||
|
|
||||||
log "Bootstrap subnodes - DONE".
|
log "Bootstrap subnodes - DONE".
|
||||||
|
@ -101,6 +101,7 @@ export UNDERCLOUD_CONTAINERS=0
|
|||||||
export PREDICTABLE_PLACEMENT=0
|
export PREDICTABLE_PLACEMENT=0
|
||||||
export OPSTOOLS_REPO_ENABLED=0
|
export OPSTOOLS_REPO_ENABLED=0
|
||||||
export POSTCI=1
|
export POSTCI=1
|
||||||
|
export BOOTSTRAP_SUBNODES_MINIMAL=1
|
||||||
|
|
||||||
if [[ $TOCI_JOBTYPE =~ upgrades ]]; then
|
if [[ $TOCI_JOBTYPE =~ upgrades ]]; then
|
||||||
# We deploy a master Undercloud and an Overcloud with the
|
# We deploy a master Undercloud and an Overcloud with the
|
||||||
@ -199,6 +200,9 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||||||
fi
|
fi
|
||||||
if [[ $TOCI_JOBTYPE =~ 'multinode-upgrades' ]] ; then
|
if [[ $TOCI_JOBTYPE =~ 'multinode-upgrades' ]] ; then
|
||||||
OVERCLOUD_MAJOR_UPGRADE=1
|
OVERCLOUD_MAJOR_UPGRADE=1
|
||||||
|
# We still bootstrap subnodes manually for multinode-upgrades
|
||||||
|
# because we are deploying Newton initially.
|
||||||
|
BOOTSTRAP_SUBNODES_MINIMAL=0
|
||||||
UNDERCLOUD_SSL=0
|
UNDERCLOUD_SSL=0
|
||||||
export UNDERCLOUD_SANITY_CHECK=0
|
export UNDERCLOUD_SANITY_CHECK=0
|
||||||
if [[ $TOCI_JOBTYPE == 'multinode-upgrades' ]] ; then
|
if [[ $TOCI_JOBTYPE == 'multinode-upgrades' ]] ; then
|
||||||
@ -265,6 +269,7 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||||||
INTROSPECT=0
|
INTROSPECT=0
|
||||||
SUBNODES_SSH_KEY=/etc/nodepool/id_rsa
|
SUBNODES_SSH_KEY=/etc/nodepool/id_rsa
|
||||||
OVERCLOUD_DEPLOY_ARGS="--libvirt-type=qemu -t $OVERCLOUD_DEPLOY_TIMEOUT"
|
OVERCLOUD_DEPLOY_ARGS="--libvirt-type=qemu -t $OVERCLOUD_DEPLOY_TIMEOUT"
|
||||||
|
BOOTSTRAP_SUBNODES_MINIMAL=1
|
||||||
|
|
||||||
if [[ "$TOCI_JOBTYPE" =~ "3nodes" ]]; then
|
if [[ "$TOCI_JOBTYPE" =~ "3nodes" ]]; then
|
||||||
NODECOUNT=2
|
NODECOUNT=2
|
||||||
@ -272,11 +277,11 @@ for JOB_TYPE_PART in $(sed 's/-/ /g' <<< "${TOCI_JOBTYPE:-}") ; do
|
|||||||
OVERCLOUD_ROLES="ControllerApi Controller"
|
OVERCLOUD_ROLES="ControllerApi Controller"
|
||||||
export ControllerApi_hosts=$(sed -n 1,1p /etc/nodepool/sub_nodes)
|
export ControllerApi_hosts=$(sed -n 1,1p /etc/nodepool/sub_nodes)
|
||||||
export Controller_hosts=$(sed -n 2,2p /etc/nodepool/sub_nodes)
|
export Controller_hosts=$(sed -n 2,2p /etc/nodepool/sub_nodes)
|
||||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/multinode-3nodes.yaml --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal -r /usr/share/openstack-tripleo-heat-templates/ci/environments/multinode-3nodes.yaml"
|
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-bootstrap-environment-centos.yaml -e $TRIPLEO_ROOT/tripleo-ci/test-environments/multinode-3nodes.yaml --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal -r /usr/share/openstack-tripleo-heat-templates/ci/environments/multinode-3nodes.yaml"
|
||||||
else
|
else
|
||||||
NODECOUNT=1
|
NODECOUNT=1
|
||||||
CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes)
|
CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes)
|
||||||
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e $MULTINODE_ENV_PATH --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"
|
OVERCLOUD_DEPLOY_ARGS="$OVERCLOUD_DEPLOY_ARGS -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/deployed-server-bootstrap-environment-centos.yaml -e $MULTINODE_ENV_PATH --compute-scale 0 --overcloud-ssh-user $OVERCLOUD_SSH_USER --validation-errors-nonfatal"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
undercloud)
|
undercloud)
|
||||||
|
Loading…
Reference in New Issue
Block a user