Merge "Set multinode scenarios with quickstart"

This commit is contained in:
Jenkins 2017-03-10 01:37:43 +00:00 committed by Gerrit Code Review
commit e833ea2c5d
3 changed files with 41 additions and 59 deletions

View File

@ -15,6 +15,21 @@
tags:
- build
- name: Create configs on subnodes
hosts: overcloud
roles:
- repo-setup
tasks:
- name: Create a clean hosts file on subnodes
copy:
dest: /etc/hosts
content: |
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
become: true
tags:
- undercloud-setup
- name: Prepare the undercloud for installation
hosts: undercloud
roles:
@ -61,3 +76,12 @@
- name: did the deployment pass or fail?
debug: var=overcloud_deploy_result
failed_when: overcloud_deploy_result == "failed"
# Validate the deployment
- name: validate the overcloud
hosts: undercloud
tags:
- overcloud-validate
gather_facts: no
roles:
- { role: validate-simple, when: test_ping|bool }

View File

@ -3,14 +3,14 @@ undercloud_user: jenkins
non_root_user: jenkins
enable_vbmc: false
gating_repo_enabled: true
test_ping: true
tripleo_root: "{{ lookup('env','TRIPLEO_ROOT') }}"
extra_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 ${TRIPLEO_ROOT}/tripleo-ci/test-environments/worker-config.yaml
-e /usr/share/openstack-tripleo-heat-templates/environments/debug.yaml
--compute-scale 0
--overcloud-ssh-user {{ lookup('env','USER') }}
deploy_composable_scenario: true
composable_scenario: "multinode.yaml"
@ -36,52 +36,10 @@ step_register: false
hypervisor_wait: false
deployed_server: true
validation_args: "--validation-errors-nonfatal"
deploy_timeout: 30
deploy_timeout: 80
undercloud_conf_extras: "net_config_override = /opt/stack/new/tripleo-ci/undercloud-configs/net-config-multinode.json.template"
# TODO(trown): Create repo configs for each release in the release configs
repos:
- type: generic
reponame: delorean
filename: delorean.repo
baseurl: http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-master-tripleo/
hash_url: http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-master-tripleo/delorean.repo
priority: 20
- type: generic
reponame: delorean-current
filename: delorean-current.repo
baseurl: http://trunk.rdoproject.org/centos7/current
hash_url: http://trunk.rdoproject.org/centos7/current/delorean.repo
priority: 10
includepkgs:
- diskimage-builder
- instack
- instack-undercloud
- os-apply-config
- os-cloud-config
- os-collect-config
- os-net-config
- os-refresh-config
- python-tripleoclient
- openstack-tripleo-common
- openstack-tripleo-heat-templates
- openstack-tripleo-image-elements
- openstack-tripleo
- openstack-tripleo-puppet-elements
- openstack-puppet-modules
- openstack-tripleo-ui
- puppet-*
- type: file
filename: delorean-deps.repo
down_url: http://trunk.rdoproject.org/centos7-master/delorean-deps.repo
- type: package
pkg_name: centos-release-ceph-jewel
custom_cmd: 'yum install -y --enablerepo=extras'
# TODO(sshnaidm): artcl_tar_gz should be tested before
# artcl_tar_gz: true
artcl_gzip_only: true

View File

@ -22,8 +22,8 @@ sudo chown $USER:$USER $HOME/.ssh/id_rsa.pub
# TODO(sshnaidm): To create tripleo-ci special yaml config files in oooq
# for every TOCI_JOBTYPE, i.e. ovb-nonha-ipv6.yml
if [[ "$TOCI_JOBTYPE" =~ "scenario" ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-quickstart-extras/config/general_config/${TOCI_JOBTYPE/-oooq*/}.yml"}
if [[ "$TOCI_JOBTYPE" =~ "multinode" ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_CI_DIR/tripleo-ci/scripts/quickstart/multinode-settings.yml"}
elif [[ "$TOCI_JOBTYPE" =~ "-ha" ]]; then
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-quickstart/config/general_config/ha.yml"}
elif [[ "$TOCI_JOBTYPE" =~ "-nonha" ]]; then
@ -32,6 +32,15 @@ else
CONFIG=${CONFIG:-"$TRIPLEO_ROOT/tripleo-quickstart/config/general_config/minimal.yml"}
fi
# This needs to be set for tripleo.sh's pingtest to be passed the correct template
# See tripleo.sh $TENANT_PINGTEST_TEMPLATE for more details
MULTINODE_ENV_NAME=${MULTINODE_ENV_NAME/-oooq/}
# Generate a scenario quickstart ARGs snippet
if [[ "$TOCI_JOBTYPE" =~ "scenario" ]]; then
SCENARIO_ARGS="--extra-vars @${SCENARIO_ARGS:-$TRIPLEO_ROOT/tripleo-quickstart-extras/config/general_config/${TOCI_JOBTYPE/-oooq*/}.yml}"
fi
# Add jenkin user's SSH key to root authorized_keys for Ansible to run
sudo mkdir -p /root/.ssh/
sudo cp ${HOME}/.ssh/authorized_keys /root/.ssh/
@ -68,11 +77,12 @@ export OOOQ_ARGS=" --working-dir ${OPT_WORKDIR} \
--bootstrap \
--no-clone \
--retain-inventory \
--tags build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-post-install,overcloud-scripts,overcloud-deploy \
--tags build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-post-install,overcloud-scripts,overcloud-deploy,overcloud-validate \
--teardown none \
--release ${STABLE_RELEASE:-master} \
--extra-vars @${TRIPLEO_ROOT}/tripleo-ci/scripts/quickstart/multinode-settings.yml \
--config ${CONFIG} \
--extra-vars @$TRIPLEO_ROOT/tripleo-quickstart/config/release/tripleo-ci/${STABLE_RELEASE:-master}.yml \
${SCENARIO_ARGS:-""} \
--playbook multinode-playbook.yml \
--requirements requirements.txt \
--requirements quickstart-extras-requirements.txt \
@ -114,8 +124,6 @@ cp $TRIPLEO_ROOT/tripleo-ci/scripts/quickstart/*y*ml $TRIPLEO_ROOT/tripleo-quick
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh --install-deps
pushd $TRIPLEO_ROOT/tripleo-quickstart/
# TODO(sshnaidm): fix inventory and collect-logs roles with prepares ssh.config.ansible,
sed -i '/ansible_user: stack/d' $TRIPLEO_ROOT/tripleo-quickstart/roles/common/defaults/main.yml
# We wrap the quickstart call in a timeout, so that we can get logs if the
# deploy hangs. 90m = 90 minutes = 1.5 hours
@ -123,14 +131,6 @@ sed -i '/ansible_user: stack/d' $TRIPLEO_ROOT/tripleo-quickstart/roles/common/de
$TRIPLEO_ROOT/tripleo-quickstart/quickstart.sh \
${OOOQ_ARGS} 2>&1 | tee $OOOQ_LOGS/quickstart_install.log && exit_value=0 || exit_value=$?
# We use the tripleo.sh pingtest rather than the validate-simple role in
# quickstart-extras so that we can easily support the multinode scenario
# pingtests. We should add support for that to the validate simple role,
# and use that instead.
# https://github.com/openstack/tripleo-heat-templates/tree/master/ci/pingtests
if [[ -e ${OOO_WORKDIR_LOCAL}/overcloudrc ]]; then
$TRIPLEO_CI_DIR/tripleo-ci/scripts/tripleo.sh --overcloud-pingtest &>$OOOQ_LOGS/multinode-overcloud-pingtest.txt
fi
sudo journalctl -u os-collect-config | sudo tee /var/log/os-collect-config.txt