Browse Source

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
changes/65/584465/24
Rafael Folco 11 months ago
parent
commit
f9d4704403

+ 2
- 27
playbooks/tripleo-ci/templates/toci_gate_test.sh.j2 View File

@@ -67,12 +67,8 @@ export FEATURESET_CONF=""
67 67
 export NODES_FILE=""
68 68
 # Set the number of overcloud nodes
69 69
 export NODECOUNT=0
70
-# Sets the undercloud hostname
71
-export UNDERCLOUD=""
72 70
 # Select the tags to run
73 71
 export TAGS=all
74
-# Identify in which environment we're deploying
75
-export ENVIRONMENT=""
76 72
 # Set the overcloud hosts for multinode
77 73
 export OVERCLOUD_HOSTS=
78 74
 export CONTROLLER_HOSTS=
@@ -96,41 +92,24 @@ export RELEASES_SCRIPT_LOGFILE=$WORKSPACE/logs/emit_releases_file.log
96 92
 case {{ environment_type | default('standalone') }} in
97 93
     ovb)
98 94
         OVB=1
99
-        ENVIRONMENT="ovb"
100 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 96
         ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb.yml"
107 97
         if [[ -f  "$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml" ]]; then
108 98
             ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/ovb-$RHCLOUD.yml"
109 99
         fi
110
-        UNDERCLOUD="undercloud"
111 100
     ;;
112 101
     multinode)
113 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 103
         FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
121 104
         ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
122 105
         if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
123 106
             ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode-rdocloud.yml"
124 107
         fi
125
-        UNDERCLOUD="127.0.0.2"
126 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 109
         CONTROLLER_HOSTS=$(sed -n 1,1p /etc/nodepool/sub_nodes_private)
128 110
         OVERCLOUD_HOSTS=$(cat /etc/nodepool/sub_nodes_private)
129 111
     ;;
130 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 113
         FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
135 114
         ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
136 115
         if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
@@ -139,9 +118,6 @@ case {{ environment_type | default('standalone') }} in
139 118
         TAGS="build,undercloud-setup,undercloud-scripts,undercloud-install,undercloud-validate,images"
140 119
     ;;
141 120
     standalone)
142
-        ENVIRONMENT="osinfra"
143
-        UNDERCLOUD="127.0.0.2"
144
-        export PLAYBOOKS=${PLAYBOOKS:-"quickstart.yml multinode-standalone.yml"}
145 121
         FEATURESET_CONF=" --extra-vars @$LWD/config/general_config/featureset-multinode-common.yml $FEATURESET_CONF"
146 122
         ENV_VARS="$ENV_VARS --extra-vars @$TRIPLEO_ROOT/tripleo-ci/toci-quickstart/config/testenv/multinode.yml"
147 123
         if [[ $NODEPOOL_PROVIDER == "rdo-cloud-tripleo" ]]; then
@@ -224,7 +200,7 @@ fi
224 200
 # Start time tracking
225 201
 export STATS_TESTENV=$(date +%s)
226 202
 pushd $TRIPLEO_ROOT/tripleo-ci
227
-if [ -z "${TE_DATAFILE:-}" -a "$ENVIRONMENT" = "ovb" ] ; then
203
+if [ -z "${TE_DATAFILE:-}" -a "{{ environment_infra }}" = "ovb" ] ; then
228 204
 
229 205
     export GEARDSERVER=${TEBROKERIP-192.168.1.1}
230 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 216
     ./testenv-client -b $GEARDSERVER:4730 -t $TIMEOUT_SECS \
241 217
         --envsize $NODECOUNT --ucinstance $UCINSTANCEID \
242 218
         --net-iso $NETISO_ENV $EXTRANODE -- ./toci_quickstart.sh
243
-elif [ "$ENVIRONMENT" = "ovb" ] ; then
219
+elif [ "{{ environment_infra }}" = "ovb" ] ; then
244 220
     # We only support multi-nic at the moment
245 221
     NETISO_ENV="multi-nic"
246 222
     ./toci_quickstart.sh
@@ -292,4 +268,3 @@ else
292 268
 fi
293 269
 
294 270
 echo "Run completed"
295
-echo "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

+ 2
- 2
playbooks/tripleo-ci/templates/toci_quickstart.sh.j2 View File

@@ -121,7 +121,7 @@ if [[ "$PLAYBOOK_DRY_RUN" == "1" ]]; then
121 121
 fi
122 122
 
123 123
 echo "-- Playbooks Output --------------------------"
124
-for playbook in $PLAYBOOKS; do
124
+for playbook in {{ " ".join(playbooks) }}; do
125 125
     echo "$QUICKSTART_INSTALL_CMD \
126 126
         ${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG} \
127 127
         $NODES_ARGS \
@@ -142,7 +142,7 @@ if [[ "$PLAYBOOK_DRY_RUN" == "1" ]]; then
142 142
 else
143 143
     ## LOGS COLLECTION PREPARE
144 144
     create_collect_logs_script
145
-for playbook in $PLAYBOOKS; do
145
+for playbook in {{ " ".join(playbooks) }}; do
146 146
         echo "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}"
147 147
         run_with_timeout $START_JOB_TIME $QUICKSTART_INSTALL_CMD \
148 148
            "${RELEASE_ARGS[$playbook]:=$QUICKSTART_DEFAULT_RELEASE_ARG}" \

+ 71
- 2
zuul.d/layout.yaml View File

@@ -6,8 +6,8 @@
6 6
 
7 7
 - project:
8 8
     templates:
9
-      - tripleo-multinode-baremetal-minimal
10
-      - tripleo-multinode-container-minimal
9
+      - tripleo-multinode-baremetal-full
10
+      - tripleo-multinode-container-full
11 11
       - tripleo-multinode-experimental
12 12
       - tripleo-undercloud-jobs
13 13
       - tripleo-multinode-branchful
@@ -22,6 +22,45 @@
22 22
         - openstack-tox-pep8:
23 23
             files:
24 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 64
     gate:
26 65
       queue: tripleo
27 66
       jobs:
@@ -34,3 +73,33 @@
34 73
         - openstack-tox-pep8:
35 74
             files:
36 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/.*$

Loading…
Cancel
Save