Browse Source

Add a new job on fedora-28 images to test python3

This patch is creating a new job running on fedora-28 images which
runs scenario-py3.sh to validate python3 builds on fedora.

Job is non-voting.

Additionally this patch is fixing puppetfile to get newer versions,
aligned with what we have in p-o-i.

Change-Id: I404fc6d38dd5177a3aaef51b0450ad2850595e32
Alfredo Moralejo 6 months ago
parent
commit
966fcf3250

+ 24
- 1
.zuul.yaml View File

@@ -2,7 +2,6 @@
2 2
     name: packstack-base
3 3
     parent: base
4 4
     timeout: 7200
5
-    pre-run: playbooks/packstack-pre.yaml
6 5
     post-run: playbooks/upload-logs.yaml
7 6
     irrelevant-files:
8 7
       - ^docs/.*$
@@ -36,15 +35,31 @@
36 35
 - job:
37 36
     name: packstack-allinone
38 37
     parent: packstack-base
38
+    pre-run: playbooks/packstack-pre.yaml
39 39
     nodeset:
40 40
       nodes:
41 41
         - name: allinone
42 42
           label: centos-7
43 43
     run: playbooks/packstack-integration-tempest.yaml
44 44
 
45
+- job:
46
+    name: packstack-fedora
47
+    parent: packstack-base
48
+    vars:
49
+      delorean: "https://trunk.rdoproject.org/fedora/consistent/delorean.repo"
50
+      delorean_deps: "https://trunk.rdoproject.org/fedora/delorean-deps.repo"
51
+      selinux_enforcing: "false"
52
+    pre-run: playbooks/packstack-fedora-pre.yaml
53
+    nodeset:
54
+      nodes:
55
+        - name: fedora
56
+          label: fedora-28
57
+    run: playbooks/packstack-integration-tempest.yaml
58
+
45 59
 - job:
46 60
     name: packstack-multinode
47 61
     parent: packstack-base
62
+    pre-run: playbooks/packstack-pre.yaml
48 63
     nodeset:
49 64
       nodes:
50 65
         - name: controller
@@ -71,6 +86,12 @@
71 86
     vars:
72 87
       scenario: scenario003
73 88
 
89
+- job:
90
+    name: packstack-fedora-integration-scenario-py3-tempest
91
+    parent: packstack-fedora
92
+    vars:
93
+      scenario: scenario-py3
94
+
74 95
 # We should have nested post-run jobs, according to
75 96
 # https://docs.openstack.org/infra/zuul/user/config.html#job
76 97
 - job:
@@ -87,6 +108,8 @@
87 108
         - packstack-integration-scenario002-tempest
88 109
         - packstack-integration-scenario003-tempest
89 110
         - packstack-multinode-scenario002-tempest
111
+        - packstack-fedora-integration-scenario-py3-tempest:
112
+            voting: false
90 113
         - openstack-tox-py36:
91 114
             voting: false
92 115
     gate:

+ 11
- 11
Puppetfile View File

@@ -98,7 +98,7 @@ mod 'vswitch',
98 98
 
99 99
 mod 'apache',
100 100
   :git => 'https://github.com/puppetlabs/puppetlabs-apache',
101
-  :ref => '1.11.0'
101
+  :ref => 'b4cbc858a61ba2eea4a1178c261a982a59db963d'
102 102
 
103 103
 mod 'certmonger',
104 104
   :git => 'https://github.com/rcritten/puppet-certmonger',
@@ -106,23 +106,23 @@ mod 'certmonger',
106 106
 
107 107
 mod 'concat',
108 108
   :git => 'https://github.com/puppetlabs/puppetlabs-concat',
109
-  :ref => '3.0.0'
109
+  :ref => '4.2.1'
110 110
 
111 111
 mod 'firewall',
112 112
   :git => 'https://github.com/puppetlabs/puppetlabs-firewall',
113
-  :ref => '1.8.2'
113
+  :ref => '1.12.0'
114 114
 
115 115
 mod 'inifile',
116 116
   :git => 'https://github.com/puppetlabs/puppetlabs-inifile',
117
-  :ref => '1.6.0'
117
+  :ref => '2.2.0'
118 118
 
119 119
 mod 'memcached',
120 120
   :git => 'https://github.com/saz/puppet-memcached',
121
-  :ref => 'v3.0.1'
121
+  :ref => 'v3.3.0'
122 122
 
123 123
 mod 'mysql',
124 124
   :git => 'https://github.com/puppetlabs/puppetlabs-mysql',
125
-  :ref => '3.10.0'
125
+  :ref => '6.0.0'
126 126
 
127 127
 mod 'nssdb',
128 128
   :git => 'https://github.com/rcritten/puppet-nssdb',
@@ -142,7 +142,7 @@ mod 'remote',
142 142
 
143 143
 mod 'rsync',
144 144
   :git => 'https://github.com/puppetlabs/puppetlabs-rsync',
145
-  :ref => '0.4.0'
145
+  :ref => '1.1.0'
146 146
 
147 147
 mod 'ssh',
148 148
   :git => 'https://github.com/saz/puppet-ssh',
@@ -150,17 +150,17 @@ mod 'ssh',
150 150
 
151 151
 mod 'stdlib',
152 152
   :git => 'https://github.com/puppetlabs/puppetlabs-stdlib',
153
-  :ref => '4.18.0'
153
+  :ref => '5.0.0'
154 154
 
155 155
 mod 'sysctl',
156 156
   :git => 'https://github.com/duritong/puppet-sysctl',
157
-  :ref => 'v0.0.11'
157
+  :ref => 'v0.0.12'
158 158
 
159 159
 mod 'vcsrepo',
160 160
   :git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo',
161
-  :ref => '1.5.0'
161
+  :ref => '2.3.0'
162 162
 
163 163
 mod 'xinetd',
164 164
   :git => 'https://github.com/puppetlabs/puppetlabs-xinetd',
165
-  :ref => '2.0.0'
165
+  :ref => '3.1.0'
166 166
 

+ 28
- 0
playbooks/packstack-fedora-pre.yaml View File

@@ -0,0 +1,28 @@
1
+- hosts: all
2
+  name: packstack-fedora-pre
3
+  tasks:
4
+    - name: Ensure legacy workspace directory
5
+      file:
6
+        path: '{{ ansible_user_dir }}/workspace'
7
+        state: directory
8
+
9
+    - shell:
10
+        cmd: |
11
+          cp -pr /home/zuul/src/git.openstack.org/openstack/packstack {{ ansible_user_dir }}/workspace
12
+
13
+    - shell:
14
+        cmd: |
15
+          set -e
16
+          set -x
17
+          dnf -y install wget
18
+          rm -rf /etc/yum.repos.d/fedora*
19
+          wget -O /etc/yum.repos.d/fedora-stable.repo http://trunk.rdoproject.org/fedora/delorean-deps.repo
20
+          dnf clean all
21
+          sudo sed -i '/^exclude.*/d' /etc/dnf/dnf.conf
22
+          dnf -y install libxml2-devel libxslt-devel ruby-devel zlib-devel
23
+          dnf -y install gcc gettext diffstat doxygen patch patchutils subversion systemtap git python-setuptools wget redhat-lsb-core libselinux-python yum-plugin-priorities dnf-yum
24
+          pip uninstall requests -y || true
25
+        executable: /bin/bash
26
+        chdir: '{{ ansible_user_dir }}/workspace'
27
+      become: true
28
+      environment: '{{ zuul }}'

+ 3
- 0
roles/packstack-integration-tempest/tasks/main.yaml View File

@@ -4,6 +4,9 @@
4 4
         set -e
5 5
         set -x
6 6
         export SCENARIO='{{ scenario }}'
7
+        export DELOREAN='{{ delorean | default('') }}'
8
+        export DELOREAN_DEPS='{{ delorean_deps | default('') }}'
9
+        export SELINUX_ENFORCING='{{ selinux_enforcing | default('true') }}'
7 10
         ./run_tests.sh
8 11
       executable: /bin/bash
9 12
       chdir: '{{ ansible_user_dir }}/workspace/packstack'

+ 19
- 5
run_tests.sh View File

@@ -32,6 +32,9 @@ COPY_LOGS=${COPY_LOGS:-true}
32 32
 CONTROLLER_NODE=${CONTROLLER_NODE:-}
33 33
 COMPUTE_NODE=${COMPUTE_NODE:-}
34 34
 
35
+# Use dnf as package manager if it exist
36
+type -p dnf && export PKG_MGR=dnf || export PKG_MGR=yum
37
+
35 38
 # Install external Puppet modules with r10k
36 39
 # Uses the following variables:
37 40
 #
@@ -150,11 +153,11 @@ fi
150 153
 if [ "${MANAGE_REPOS}" = true ]; then
151 154
     $SUDO curl -L ${DELOREAN} -o /etc/yum.repos.d/delorean.repo
152 155
     $SUDO curl -L ${DELOREAN_DEPS} -o /etc/yum.repos.d/delorean-deps.repo
153
-    $SUDO yum update -y
156
+    $SUDO $PKG_MGR update -y
154 157
 fi
155 158
 
156 159
 # Install dependencies
157
-$SUDO yum -y install puppet \
160
+$SUDO $PKG_MGR -y install puppet \
158 161
                      yum-plugin-priorities \
159 162
                      iproute \
160 163
                      dstat \
@@ -170,7 +173,13 @@ $SUDO yum -y install puppet \
170 173
                      policycoreutils \
171 174
                      rubygems \
172 175
                      wget \
173
-                     "@Development Tools"
176
+                     gettext \
177
+                     diffstat \
178
+                     doxygen \
179
+                     patch \
180
+                     patchutils \
181
+                     subversion \
182
+                     systemtap
174 183
 
175 184
 # Don't assume pip is installed
176 185
 which pip || $SUDO easy_install pip
@@ -253,7 +262,12 @@ fi
253 262
 # Setup packstack
254 263
 if [ "${INSTALL_FROM_SOURCE}" = true ]; then
255 264
   $SUDO pip install .
256
-  export GEM_BIN_DIR=/tmp/packstackgems/bin/
265
+  # In Fedora when running with sudo gems are installed at /usr/local/bin/ even when GEM_HOME/GEM_BIN_DIR are set
266
+  if [ "${PKG_MGR}" = "dnf" ]; then
267
+      export GEM_BIN_DIR=/usr/local/bin/
268
+  else
269
+      export GEM_BIN_DIR=/tmp/packstackgems/bin/
270
+  fi
257 271
   export PUPPETFILE_DIR=/usr/share/openstack-puppet/modules
258 272
   export GEM_HOME=/tmp/packstackgems
259 273
   $SUDO gem install r10k -v 2.6.4 --no-ri --no-rdoc
@@ -261,7 +275,7 @@ if [ "${INSTALL_FROM_SOURCE}" = true ]; then
261 275
   $SUDO rm -rf "${PUPPETFILE_DIR:?}/"*
262 276
   install_modules
263 277
 else
264
-  $SUDO yum -y install openstack-packstack
278
+  $SUDO $PKG_MGR -y install openstack-packstack
265 279
 fi
266 280
 
267 281
 # Make sure there are no other puppet modules in the system (happens in gate)

+ 44
- 0
tests/scenario-py3.sh View File

@@ -0,0 +1,44 @@
1
+#!/bin/bash
2
+CONTROLLER_NODE=${CONTROLLER_NODE:-}
3
+COMPUTE_NODE=${COMPUTE_NODE:-}
4
+
5
+if [ $(id -u) != 0 ]; then
6
+    SUDO='sudo'
7
+fi
8
+
9
+echo -e "Generating packstack config for:
10
+- keystone
11
+- glance (file backend)
12
+- nova
13
+- neutron (ovs+vxlan)
14
+- cinder (lvm+iscsi)
15
+- tempest (regex: 'smoke')"
16
+echo "tempest will run if packstack's installation completes successfully."
17
+echo
18
+
19
+if [ -z $COMPUTE_NODE ]; then
20
+  NODE_FLAGS="--allinone"
21
+else
22
+  NODE_FLAGS="--allinone --os-controller-host=$CONTROLLER_NODE --os-network-hosts=$CONTROLLER_NODE --os-compute-hosts=$COMPUTE_NODE"
23
+fi
24
+
25
+$SUDO packstack ${ADDITIONAL_ARGS} \
26
+          ${NODE_FLAGS} \
27
+          --cinder-volume-name="aVolume" \
28
+          --debug \
29
+          --service-workers=2 \
30
+          --default-password="packstack" \
31
+          --os-aodh-install=n \
32
+          --os-ceilometer-install=n \
33
+          --os-swift-install=n \
34
+          --os-manila-install=n \
35
+          --os-horizon-ssl=n \
36
+          --amqp-enable-ssl=n \
37
+          --glance-backend=file \
38
+          --provision-uec-kernel-url="/tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-vmlinuz" \
39
+          --provision-uec-ramdisk-url="/tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-initrd" \
40
+          --provision-uec-disk-url="/tmp/cirros/cirros-$CIRROS_VERSION-$CIRROS_ARCH-disk.img" \
41
+          --provision-demo=y \
42
+          --provision-tempest=y \
43
+          --run-tempest=y \
44
+          --run-tempest-tests="smoke dashboard" || export FAILURE=true

+ 5
- 2
tools/copy-logs.sh View File

@@ -27,6 +27,9 @@ PROJECTS_URL="${GIT_URL}/openstack/governance/plain/reference/projects.yaml"
27 27
 if [ $(id -u) != 0 ]; then
28 28
     SUDO='sudo'
29 29
 fi
30
+
31
+type -p dnf && export PKG_MGR=dnf || export PKG_MGR=yum
32
+
30 33
 $SUDO mkdir -p "${DIAG_LOGDIR}"
31 34
 $SUDO mkdir -p "${CONF_LOGDIR}"
32 35
 
@@ -48,14 +51,14 @@ function get_diag_commands {
48 51
         'netstat -ntlp'
49 52
         'pstree -p'
50 53
         'sysctl -a'
51
-        'yum repolist -v'
54
+        "$PKG_MGR repolist -v"
52 55
         'rpm -qa'
53 56
         'journalctl --no-pager'
54 57
         'ulimit -n'
55 58
     )
56 59
 
57 60
     echo "Installing required RPM packages..."
58
-    $SUDO yum -y install coreutils curl file lsof net-tools psmisc
61
+    $SUDO $PKG_MGR -y install coreutils curl file lsof net-tools psmisc
59 62
 
60 63
     echo "Running diagnostic commands..."
61 64
     for ((i = 0; i < ${#commands[@]}; i++)); do

Loading…
Cancel
Save