Browse Source

Import the legacy grenade sahara job

While it would have been better to directly use a native Zuul v3 job,
the work towards a common grenade job seems to be stalled.
Import the job locally and fix some issues:
- make sure that the heat_tempest_plugin is loaded correctly,
  so that the heat upgrade tests work;
- bump the starting point from stable/ocata (!) to stable/queens;
  it will be changed to stable/rocky when grenade supports it;
  will require additional fixes due to the standalone->uwsgi change.
- import lib/apache so that wsgi deployment works.

Story: 2001686
Task: 24517
Change-Id: Ia8de2b8286287355e8e9d3f702027aa282ed8282
tags/10.0.0.0b1
Luigi Toscano 10 months ago
parent
commit
5a3ae85cc1

+ 26
- 5
.zuul.yaml View File

@@ -16,11 +16,7 @@
16 16
         - openstack-tox-lower-constraints
17 17
         - openstack-tox-cover:
18 18
             voting: false
19
-        - legacy-grenade-dsvm-sahara:
20
-            voting: false
21
-            irrelevant-files:
22
-              - ^(test-|)requirements.txt$
23
-              - ^setup.cfg$
19
+        - sahara-grenade
24 20
     gate:
25 21
       queue: sahara
26 22
       jobs:
@@ -38,6 +34,31 @@
38 34
       jobs:
39 35
         - openstack-tox-cover
40 36
 
37
+- job:
38
+    name: sahara-grenade
39
+    parent: legacy-dsvm-base
40
+    run: playbooks/sahara-grenade/run.yaml
41
+    post-run: playbooks/sahara-grenade/post.yaml
42
+    timeout: 10800
43
+    required-projects:
44
+      - openstack-dev/grenade
45
+      - openstack-infra/devstack-gate
46
+      - openstack/sahara
47
+      - openstack/python-saharaclient
48
+      - openstack/heat
49
+      - openstack/heat-tempest-plugin
50
+      - openstack/python-heatclient
51
+      - openstack/sahara-tests
52
+    irrelevant-files:
53
+      - ^(test-|)requirements.txt$
54
+      - ^.*\.rst$
55
+      - ^doc/.*$
56
+      - ^sahara/locale/.*$
57
+      - ^sahara/tests/unit/.*$
58
+      - ^releasenotes/.*$
59
+      - ^tools/.*$
60
+      - ^tox.ini$
61
+
41 62
 - job:
42 63
     name: sahara-buildimages-base
43 64
     nodeset: centos-7

+ 8
- 6
devstack/upgrade/settings View File

@@ -3,22 +3,24 @@
3 3
 register_project_for_upgrade sahara
4 4
 register_db_to_save sahara
5 5
 devstack_localrc base IMAGE_URLS=\
6
-"http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz,\
6
+"http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-uec.tar.gz,\
7 7
 http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2"
8 8
 devstack_localrc base enable_plugin sahara \
9 9
                                     git://git.openstack.org/openstack/sahara \
10
-                                    stable/ocata
10
+                                    stable/queens
11 11
 devstack_localrc base enable_plugin heat \
12 12
                                     git://git.openstack.org/openstack/heat \
13
-                                    stable/ocata
14
-devstack_localrc base DEFAULT_IMAGE_NAME="cirros-0.3.2-x86_64-uec"
13
+                                    stable/queens
14
+devstack_localrc base DEFAULT_IMAGE_NAME="cirros-0.3.5-x86_64-uec"
15
+devstack_localrc base DEFAULT_IMAGE_NAME="cirros-0.3.5-x86_64-uec"
15 16
 
16 17
 devstack_localrc target IMAGE_URLS=\
17
-"http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz,\
18
+"http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-uec.tar.gz,\
18 19
 http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2"
19 20
 devstack_localrc target enable_plugin sahara \
20 21
                                     git://git.openstack.org/openstack/sahara
21 22
 devstack_localrc target enable_plugin heat \
22 23
                                     git://git.openstack.org/openstack/heat
23 24
 devstack_localrc target LIBS_FROM_GIT=python-saharaclient
24
-devstack_localrc target DEFAULT_IMAGE_NAME="cirros-0.3.2-x86_64-uec"
25
+devstack_localrc target DEFAULT_IMAGE_NAME="cirros-0.3.5-x86_64-uec"
26
+devstack_localrc target SAHARA_USE_MOD_WSGI="False"

+ 1
- 0
devstack/upgrade/upgrade.sh View File

@@ -38,6 +38,7 @@ set -o errexit
38 38
 
39 39
 # Get functions from current DevStack
40 40
 . $TARGET_DEVSTACK_DIR/stackrc
41
+. $TARGET_DEVSTACK_DIR/lib/apache
41 42
 . $TARGET_DEVSTACK_DIR/lib/tls
42 43
 . $(dirname $(dirname $BASH_SOURCE))/plugin.sh
43 44
 . $(dirname $(dirname $BASH_SOURCE))/settings

+ 15
- 0
playbooks/sahara-grenade/post.yaml View File

@@ -0,0 +1,15 @@
1
+- hosts: primary
2
+  tasks:
3
+
4
+    - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
5
+      synchronize:
6
+        src: '{{ ansible_user_dir }}/workspace/'
7
+        dest: '{{ zuul.executor.log_root }}'
8
+        mode: pull
9
+        copy_links: true
10
+        verify_host: true
11
+        rsync_opts:
12
+          - --include=/logs/**
13
+          - --include=*/
14
+          - --exclude=*
15
+          - --prune-empty-dirs

+ 65
- 0
playbooks/sahara-grenade/run.yaml View File

@@ -0,0 +1,65 @@
1
+- hosts: all
2
+  name: Autoconverted job legacy-grenade-dsvm-sahara from old job gate-grenade-dsvm-sahara-ubuntu-xenial-nv
3
+  tasks:
4
+
5
+    - name: Ensure legacy workspace directory
6
+      file:
7
+        path: '{{ ansible_user_dir }}/workspace'
8
+        state: directory
9
+
10
+    - shell:
11
+        cmd: |
12
+          set -e
13
+          set -x
14
+          cat > clonemap.yaml << EOF
15
+          clonemap:
16
+            - name: openstack-infra/devstack-gate
17
+              dest: devstack-gate
18
+          EOF
19
+          /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
20
+              git://git.openstack.org \
21
+              openstack-infra/devstack-gate
22
+        executable: /bin/bash
23
+        chdir: '{{ ansible_user_dir }}/workspace'
24
+      environment: '{{ zuul | zuul_legacy_vars }}'
25
+
26
+    - shell:
27
+        cmd: |
28
+          set -e
29
+          set -x
30
+          cat << 'EOF' >>"/tmp/dg-local.conf"
31
+          [[local|localrc]]
32
+          TEMPEST_PLUGINS+=' ../heat-tempest-plugin ../sahara-tests'
33
+          EOF
34
+        executable: /bin/bash
35
+        chdir: '{{ ansible_user_dir }}/workspace'
36
+      environment: '{{ zuul | zuul_legacy_vars }}'
37
+
38
+    - shell:
39
+        cmd: |
40
+          set -e
41
+          set -x
42
+          export PROJECTS="openstack-dev/grenade $PROJECTS"
43
+          export PROJECTS="openstack/sahara $PROJECTS"
44
+          export PROJECTS="openstack/python-saharaclient $PROJECTS"
45
+          export PROJECTS="openstack/heat-tempest-plugin $PROJECTS"
46
+          export PROJECTS="openstack/python-heatclient $PROJECTS"
47
+          export PROJECTS="openstack/sahara-tests $PROJECTS"
48
+          export PYTHONUNBUFFERED=true
49
+          export GRENADE_PLUGINRC="enable_grenade_plugin sahara https://git.openstack.org/openstack/sahara"
50
+          export GRENADE_PLUGINRC+=$'\n'"enable_grenade_plugin heat https://git.openstack.org/openstack/heat"
51
+
52
+          export DEVSTACK_GATE_NEUTRON=1
53
+          export DEVSTACK_GATE_TEMPEST=1
54
+          export DEVSTACK_GATE_TEMPEST_REGEX="sahara_tempest_plugin.tests.api"
55
+          export DEVSTACK_GATE_GRENADE=pullup
56
+          export BRANCH_OVERRIDE=default
57
+          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
58
+              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
59
+          fi
60
+
61
+          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
62
+          ./safe-devstack-vm-gate-wrap.sh
63
+        executable: /bin/bash
64
+        chdir: '{{ ansible_user_dir }}/workspace'
65
+      environment: '{{ zuul | zuul_legacy_vars }}'

Loading…
Cancel
Save