summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Folco <rfolco@redhat.com>2018-07-20 15:17:53 -0300
committerQuique Llorente <ellorent@redhat.com>2018-08-07 14:27:36 +0200
commitf9d47044033422c8a9287bd266a555c1eb9e5706 (patch)
tree66c232bb44d08d6903bb3204db4f596b8475fe71
parentb68fe171c2243eeccf12b467c3f2f0091c961cba (diff)
Cleanup variables and toci_jobtype leftovers
Implementing "Replace TOCI_JOBTYPE variable (s17)" " - $UNDERCLOUD $PLAYBOOKS $ENVIRONMENT $TAGS" - featureset is (should be) always set (never undefined) - environment_type is (should be) always set (no default) - Clear PLAYBOOKS, ENVIRONMENT and UNDERCLOUD vars - Remove old deprecated graphite line It also execise the same CI as the 'master' noop change [2]. basically, run the same amount of CI as tripleo-quickstart but for changes at tripleo-ci playbook only. Implements card [1] [1] https://trello.com/c/DdSHkgnE/884-replace-tocijobtype-variable-s17-undercloud-playbooks-environment-tags [2] https://review.openstack.org/#/c/560445 Change-Id: If16186ba2de37d2f47fdfbab3b83407eeb0020fc
Notes
Notes (review): Code-Review+2: Gabriele Cerami <gcerami@redhat.com> Verified+1: RDO Third Party CI <dmsimard+rdothirdparty@redhat.com> Code-Review+2: Marios Andreou <marios@redhat.com> Workflow+1: Gabriele Cerami <gcerami@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 09 Aug 2018 01:31:54 +0000 Reviewed-on: https://review.openstack.org/584465 Project: openstack-infra/tripleo-ci Branch: refs/heads/master
-rwxr-xr-xplaybooks/tripleo-ci/templates/toci_gate_test.sh.j229
-rwxr-xr-xplaybooks/tripleo-ci/templates/toci_quickstart.sh.j24
-rw-r--r--zuul.d/layout.yaml73
3 files changed, 75 insertions, 31 deletions
diff --git a/playbooks/tripleo-ci/templates/toci_gate_test.sh.j2 b/playbooks/tripleo-ci/templates/toci_gate_test.sh.j2
index c1db02f..31793b2 100755
--- a/playbooks/tripleo-ci/templates/toci_gate_test.sh.j2
+++ b/playbooks/tripleo-ci/templates/toci_gate_test.sh.j2
@@ -67,12 +67,8 @@ export FEATURESET_CONF=""
67export NODES_FILE="" 67export NODES_FILE=""
68# Set the number of overcloud nodes 68# Set the number of overcloud nodes
69export NODECOUNT=0 69export NODECOUNT=0
70# Sets the undercloud hostname
71export UNDERCLOUD=""
72# Select the tags to run 70# Select the tags to run
73export TAGS=all 71export TAGS=all
74# Identify in which environment we're deploying
75export ENVIRONMENT=""
76# Set the overcloud hosts for multinode 72# Set the overcloud hosts for multinode
77export OVERCLOUD_HOSTS= 73export OVERCLOUD_HOSTS=
78export CONTROLLER_HOSTS= 74export CONTROLLER_HOSTS=
@@ -96,41 +92,24 @@ export RELEASES_SCRIPT_LOGFILE=$WORKSPACE/logs/emit_releases_file.log
96case {{ environment_type | default('standalone') }} in 92case {{ environment_type | default('standalone') }} in
97 ovb) 93 ovb)
98 OVB=1 94 OVB=1
99 ENVIRONMENT="ovb"
100 UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]') 95 UCINSTANCEID=$(http_proxy= curl http://169.254.169.254/openstack/2015-10-15/meta_data.json | python -c 'import json, sys; print json.load(sys.stdin)["uuid"]')
101 {% if featureset == '001' %}
102 export PLAYBOOKS=${PLAYBOOKS:-"baremetal-full-deploy.yml"}
103 {% else %}
104 export PLAYBOOKS=${PLAYBOOKS:-"ovb-setup.yml baremetal-full-undercloud.yml baremetal-full-overcloud-prep.yml baremetal-full-overcloud.yml baremetal-full-overcloud-validate.yml"}
105 {% endif %}
106 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb.yml" 96 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb.yml"
107 if [[ -f "$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml" ]]; then 97 if [[ -f "$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml" ]]; then
108 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml" 98 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml"
109 fi 99 fi
110 UNDERCLOUD="undercloud"
111 ;; 100 ;;
112 multinode) 101 multinode)
113 SUBNODES_SSH_KEY=/etc/nodepool/id_rsa 102 SUBNODES_SSH_KEY=/etc/nodepool/id_rsa
114 ENVIRONMENT="osinfra"
115 {% if featureset == '010' %}
116 export PLAYBOOKS=${PLAYBOOKS:-"multinode.yml"}
117 {% else %}
118 export PLAYBOOKS=${PLAYBOOKS:-"quickstart.yml multinode-undercloud.yml multinode-overcloud-prep.yml multinode-overcloud.yml multinode-overcloud-update.yml multinode-overcloud-upgrade.yml multinode-validate.yml"}
119 {% endif %}
120 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF" 103 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
121 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml" 104 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
122 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then 105 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
123 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode-rdocloud.yml" 106 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode-rdocloud.yml"
124 fi 107 fi
125 UNDERCLOUD="127.0.0.2"
126 TAGS="build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-post-install,tripleo-validations,overcloud-scripts,overcloud-prep-config,overcloud-prep-containers,overcloud-deploy,overcloud-post-deploy,overcloud-validate" 108 TAGS="build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-post-install,tripleo-validations,overcloud-scripts,overcloud-prep-config,overcloud-prep-containers,overcloud-deploy,overcloud-post-deploy,overcloud-validate"
127 CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes_private) 109 CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes_private)
128 OVERCLOUD_HOSTS=$(cat /etc/nodepool/sub_nodes_private) 110 OVERCLOUD_HOSTS=$(cat /etc/nodepool/sub_nodes_private)
129 ;; 111 ;;
130 singlenode) 112 singlenode)
131 ENVIRONMENT="osinfra"
132 UNDERCLOUD="127.0.0.2"
133 export PLAYBOOKS=${PLAYBOOKS:-"quickstart.yml multinode-undercloud.yml multinode-undercloud-upgrade.yml multinode-overcloud-prep.yml multinode-overcloud.yml multinode-overcloud-upgrade.yml multinode-validate.yml"}
134 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF" 113 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
135 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml" 114 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
136 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then 115 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
@@ -139,9 +118,6 @@ case {{ environment_type | default('standalone') }} in
139 TAGS="build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-validate,images" 118 TAGS="build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-validate,images"
140 ;; 119 ;;
141 standalone) 120 standalone)
142 ENVIRONMENT="osinfra"
143 UNDERCLOUD="127.0.0.2"
144 export PLAYBOOKS=${PLAYBOOKS:-"quickstart.yml multinode-standalone.yml"}
145 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF" 121 FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
146 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml" 122 ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
147 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then 123 if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
@@ -224,7 +200,7 @@ fi
224# Start time tracking 200# Start time tracking
225export STATS_TESTENV=$(date +%s) 201export STATS_TESTENV=$(date +%s)
226pushd $TRIPLEO_ROOT/tripleo-ci 202pushd $TRIPLEO_ROOT/tripleo-ci
227if [ -z "${TE_DATAFILE:-}" -a "$ENVIRONMENT" = "ovb" ] ; then 203if [ -z "${TE_DATAFILE:-}" -a "{{ environment_infra }}" = "ovb" ] ; then
228 204
229 export GEARDSERVER=${TEBROKERIP-192.168.1.1} 205 export GEARDSERVER=${TEBROKERIP-192.168.1.1}
230 # NOTE(pabelanger): We need gear for testenv, but this really should be 206 # NOTE(pabelanger): We need gear for testenv, but this really should be
@@ -240,7 +216,7 @@ if [ -z "${TE_DATAFILE:-}" -a "$ENVIRONMENT" = "ovb" ] ; then
240 ./testenv-client -b $GEARDSERVER:4730 -t $TIMEOUT_SECS \ 216 ./testenv-client -b $GEARDSERVER:4730 -t $TIMEOUT_SECS \
241 --envsize $NODECOUNT --ucinstance $UCINSTANCEID \ 217 --envsize $NODECOUNT --ucinstance $UCINSTANCEID \
242 --net-iso $NETISO_ENV $EXTRANODE -- ./toci_quickstart.sh 218 --net-iso $NETISO_ENV $EXTRANODE -- ./toci_quickstart.sh
243elif [ "$ENVIRONMENT" = "ovb" ] ; then 219elif [ "{{ environment_infra }}" = "ovb" ] ; then
244 # We only support multi-nic at the moment 220 # We only support multi-nic at the moment
245 NETISO_ENV="multi-nic" 221 NETISO_ENV="multi-nic"
246 ./toci_quickstart.sh 222 ./toci_quickstart.sh
@@ -292,4 +268,3 @@ else
292fi 268fi
293 269
294echo "Run completed" 270echo "Run completed"
295echo "tripleo.${STABLE_RELEASE:-master}.{{ zuul.job }}.logs.size_mb" "$(du -sm $WORKSPACE/logs | awk {'print $1'})" "$(date +%s)" | nc 66.187.229.172 2003 || true
diff --git a/playbooks/tripleo-ci/templates/toci_quickstart.sh.j2 b/playbooks/tripleo-ci/templates/toci_quickstart.sh.j2
index c4fd610..3ce86cf 100755
--- a/playbooks/tripleo-ci/templates/toci_quickstart.sh.j2
+++ b/playbooks/tripleo-ci/templates/toci_quickstart.sh.j2
@@ -121,7 +121,7 @@ if [[ "$PLAYBOOK_DRY_RUN" == "1" ]]; then
121fi 121fi
122 122
123echo "-- Playbooks Output --------------------------" 123echo "-- Playbooks Output --------------------------"
124for playbook in $PLAYBOOKS; do 124for playbook in {{ " ".join(playbooks) }}; do
125 echo "$QUICKSTART_INSTALL_CMD \ 125 echo "$QUICKSTART_INSTALL_CMD \
126 ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} \ 126 ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} \
127 $NODES_ARGS \ 127 $NODES_ARGS \
@@ -142,7 +142,7 @@ if [[ "$PLAYBOOK_DRY_RUN" == "1" ]]; then
142else 142else
143 ## LOGS COLLECTION PREPARE 143 ## LOGS COLLECTION PREPARE
144 create_collect_logs_script 144 create_collect_logs_script
145for playbook in $PLAYBOOKS; do 145for playbook in {{ " ".join(playbooks) }}; do
146 echo "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}" 146 echo "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}"
147 run_with_timeout $START_JOB_TIME $QUICKSTART_INSTALL_CMD \ 147 run_with_timeout $START_JOB_TIME $QUICKSTART_INSTALL_CMD \
148 "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}" \ 148 "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}" \
diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml
index 1f07372..305386d 100644
--- a/zuul.d/layout.yaml
+++ b/zuul.d/layout.yaml
@@ -6,8 +6,8 @@
6 6
7- project: 7- project:
8 templates: 8 templates:
9 - tripleo-multinode-baremetal-minimal 9 - tripleo-multinode-baremetal-full
10 - tripleo-multinode-container-minimal 10 - tripleo-multinode-container-full
11 - tripleo-multinode-experimental 11 - tripleo-multinode-experimental
12 - tripleo-undercloud-jobs 12 - tripleo-undercloud-jobs
13 - tripleo-multinode-branchful 13 - tripleo-multinode-branchful
@@ -22,6 +22,45 @@
22 - openstack-tox-pep8: 22 - openstack-tox-pep8:
23 files: 23 files:
24 - ^scripts/emit_releases_file/.*$ 24 - ^scripts/emit_releases_file/.*$
25 - tripleo-ci-centos-7-scenario001-multinode-oooq:
26 files:
27 - ^playbooks/tripleo-ci/.*$
28 - tripleo-ci-centos-7-scenario002-multinode-oooq:
29 files:
30 - ^playbooks/tripleo-ci/.*$
31 - tripleo-ci-centos-7-scenario002-multinode-oooq:
32 files:
33 - ^playbooks/tripleo-ci/.*$
34 - tripleo-ci-centos-7-scenario003-multinode-oooq:
35 files:
36 - ^playbooks/tripleo-ci/.*$
37 - tripleo-ci-centos-7-scenario004-multinode-oooq:
38 files:
39 - ^playbooks/tripleo-ci/.*$
40 - tripleo-ci-centos-7-scenario007-multinode-oooq:
41 files:
42 - ^playbooks/tripleo-ci/.*$
43 - tripleo-ci-centos-7-scenario009-multinode-oooq:
44 files:
45 - ^playbooks/tripleo-ci/.*$
46 - tripleo-ci-centos-7-scenario001-multinode-oooq-container:
47 files:
48 - ^playbooks/tripleo-ci/.*$
49 - tripleo-ci-centos-7-scenario002-multinode-oooq-container:
50 files:
51 - ^playbooks/tripleo-ci/.*$
52 - tripleo-ci-centos-7-scenario003-multinode-oooq-container:
53 files:
54 - ^playbooks/tripleo-ci/.*$
55 - tripleo-ci-centos-7-scenario004-multinode-oooq-container:
56 files:
57 - ^playbooks/tripleo-ci/.*$
58 - tripleo-ci-centos-7-scenario007-multinode-oooq-container:
59 files:
60 - ^playbooks/tripleo-ci/.*$
61 - tripleo-ci-centos-7-scenario008-multinode-oooq-container:
62 files:
63 - ^playbooks/tripleo-ci/.*$
25 gate: 64 gate:
26 queue: tripleo 65 queue: tripleo
27 jobs: 66 jobs:
@@ -34,3 +73,33 @@
34 - openstack-tox-pep8: 73 - openstack-tox-pep8:
35 files: 74 files:
36 - ^scripts/emit_releases_file/.*$ 75 - ^scripts/emit_releases_file/.*$
76 - tripleo-ci-centos-7-scenario001-multinode-oooq:
77 files:
78 - ^playbooks/tripleo-ci/.*$
79 - tripleo-ci-centos-7-scenario002-multinode-oooq:
80 files:
81 - ^playbooks/tripleo-ci/.*$
82 - tripleo-ci-centos-7-scenario003-multinode-oooq:
83 files:
84 - ^playbooks/tripleo-ci/.*$
85 - tripleo-ci-centos-7-scenario004-multinode-oooq:
86 files:
87 - ^playbooks/tripleo-ci/.*$
88 - tripleo-ci-centos-7-scenario007-multinode-oooq:
89 files:
90 - ^playbooks/tripleo-ci/.*$
91 - tripleo-ci-centos-7-scenario001-multinode-oooq-container:
92 files:
93 - ^playbooks/tripleo-ci/.*$
94 - tripleo-ci-centos-7-scenario002-multinode-oooq-container:
95 files:
96 - ^playbooks/tripleo-ci/.*$
97 - tripleo-ci-centos-7-scenario003-multinode-oooq-container:
98 files:
99 - ^playbooks/tripleo-ci/.*$
100 - tripleo-ci-centos-7-scenario004-multinode-oooq-container:
101 files:
102 - ^playbooks/tripleo-ci/.*$
103 - tripleo-ci-centos-7-scenario007-multinode-oooq-container:
104 files:
105 - ^playbooks/tripleo-ci/.*$