Browse Source

Merge "Add grenade job"

Zuul 2 months ago
parent
commit
8eff339106

+ 25
- 0
.zuul.yaml View File

@@ -15,6 +15,7 @@
15 15
         - murano-rally-task
16 16
         - murano-tempest-api
17 17
         - murano-tempest-cfapi
18
+        - murano-grenade
18 19
     gate:
19 20
       queue: murano
20 21
       jobs:
@@ -109,3 +110,27 @@
109 110
       devstack_services:
110 111
         murano-cfapi: true
111 112
       tempest_test_regex: service_broker
113
+
114
+- job:
115
+    name: murano-grenade
116
+    parent: legacy-dsvm-base
117
+    timeout: 10800
118
+    voting: false
119
+    run: playbooks/legacy/grenade-devstack-murano/run.yaml
120
+    post-run: playbooks/legacy/grenade-devstack-murano/post.yaml
121
+    irrelevant-files:
122
+      - ^(test-|)requirements.txt$
123
+      - ^setup.cfg$
124
+      - ^doc/.*$
125
+      - ^.*\.rst$
126
+      - ^releasenotes/.*$
127
+      - ^murano/tests/.*$
128
+    required-projects:
129
+      - openstack-dev/grenade
130
+      - openstack-infra/devstack-gate
131
+      - openstack/heat
132
+      - openstack/murano
133
+      - openstack/murano-dashboard
134
+      - openstack/python-heatclient
135
+      - openstack/python-muranoclient
136
+      - openstack/murano-tempest-plugin

+ 50
- 0
devstack/upgrade/resources.sh View File

@@ -0,0 +1,50 @@
1
+#!/bin/bash
2
+
3
+set -o errexit
4
+
5
+source $GRENADE_DIR/grenaderc
6
+source $GRENADE_DIR/functions
7
+
8
+source $TOP_DIR/openrc admin demo
9
+
10
+set -o xtrace
11
+
12
+function create {
13
+    # add later
14
+    :
15
+}
16
+
17
+function verify_noapi {
18
+    # currently no good way
19
+    :
20
+}
21
+
22
+function verify {
23
+    # add later
24
+    :
25
+}
26
+
27
+function destroy {
28
+    # add later
29
+    :
30
+}
31
+
32
+# Dispatcher
33
+case $1 in
34
+    "create")
35
+        create
36
+        ;;
37
+    "verify_noapi")
38
+        verify_noapi
39
+        ;;
40
+    "verify")
41
+        verify
42
+        ;;
43
+    "destroy")
44
+        destroy
45
+        ;;
46
+    "force_destroy")
47
+        set +o errexit
48
+        destroy
49
+        ;;
50
+esac

+ 11
- 0
devstack/upgrade/settings View File

@@ -0,0 +1,11 @@
1
+register_project_for_upgrade murano
2
+register_db_to_save murano
3
+
4
+devstack_localrc base enable_plugin murano https://git.openstack.org/openstack/murano
5
+devstack_localrc target enable_plugin murano https://git.openstack.org/openstack/murano
6
+
7
+devstack_localrc base enable_service murano-api murano-engine
8
+devstack_localrc target enable_service murano-api murano-engine
9
+
10
+BASE_RUN_SMOKE=False
11
+TARGET_RUN_SMOKE=False

+ 23
- 0
devstack/upgrade/shutdown.sh View File

@@ -0,0 +1,23 @@
1
+#!/bin/bash
2
+
3
+set -o errexit
4
+
5
+source $GRENADE_DIR/grenaderc
6
+source $GRENADE_DIR/functions
7
+
8
+# We need base DevStack functions for this
9
+source $BASE_DEVSTACK_DIR/functions
10
+source $BASE_DEVSTACK_DIR/stackrc # needed for status directory
11
+source $BASE_DEVSTACK_DIR/lib/tls
12
+source $BASE_DEVSTACK_DIR/lib/apache
13
+
14
+MURANO_DEVSTACK_DIR=$(dirname $(dirname $0))
15
+source $MURANO_DEVSTACK_DIR/settings
16
+source $MURANO_DEVSTACK_DIR/plugin.sh
17
+
18
+set -o xtrace
19
+
20
+stop_murano
21
+
22
+# sanity check that service is actually down
23
+ensure_services_stopped murano-api murano-engine

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

@@ -0,0 +1,70 @@
1
+#!/usr/bin/env bash
2
+
3
+# ``upgrade-murano``
4
+
5
+echo "*********************************************************************"
6
+echo "Begin $0"
7
+echo "*********************************************************************"
8
+
9
+# Clean up any resources that may be in use
10
+cleanup() {
11
+    set +o errexit
12
+
13
+    echo "********************************************************************"
14
+    echo "ERROR: Abort $0"
15
+    echo "********************************************************************"
16
+
17
+    # Kill ourselves to signal any calling process
18
+    trap 2; kill -2 $$
19
+}
20
+
21
+trap cleanup SIGHUP SIGINT SIGTERM
22
+
23
+# Keep track of the grenade directory
24
+RUN_DIR=$(cd $(dirname "$0") && pwd)
25
+
26
+# Source params
27
+source $GRENADE_DIR/grenaderc
28
+
29
+# Import common functions
30
+source $GRENADE_DIR/functions
31
+
32
+# This script exits on an error so that errors don't compound and you see
33
+# only the first error that occurred.
34
+set -o errexit
35
+
36
+# Upgrade murano
37
+# ==============
38
+
39
+# Get functions from current DevStack
40
+source $TARGET_DEVSTACK_DIR/stackrc
41
+source $TARGET_DEVSTACK_DIR/lib/apache
42
+source $TARGET_DEVSTACK_DIR/lib/tls
43
+source $(dirname $(dirname $BASH_SOURCE))/settings
44
+source $(dirname $(dirname $BASH_SOURCE))/plugin.sh
45
+
46
+# Print the commands being run so that we can see the command that triggers
47
+# an error.  It is also useful for following allowing as the install occurs.
48
+set -o xtrace
49
+
50
+# Save current config files for posterity
51
+[[ -d $SAVE_DIR/etc.murano ]] || cp -pr $MURANO_CONF_DIR $SAVE_DIR/etc.murano
52
+
53
+# Install the target murano
54
+install_murano
55
+
56
+# calls upgrade-murano for specific release
57
+upgrade_project murano $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
58
+
59
+# Migrate the database
60
+murano-db-manage upgrade || die $LINO "DB migration error"
61
+
62
+start_murano
63
+
64
+# Don't succeed unless the services come up
65
+ensure_services_started murano-api murano-engine
66
+
67
+set +o xtrace
68
+echo "*********************************************************************"
69
+echo "SUCCESS: End $0"
70
+echo "*********************************************************************"

+ 15
- 0
playbooks/legacy/grenade-devstack-murano/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

+ 67
- 0
playbooks/legacy/grenade-devstack-murano/run.yaml View File

@@ -0,0 +1,67 @@
1
+- hosts: all
2
+  name: legacy-grenade-dsvm-watcher
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='/opt/stack/new/murano-tempest-plugin'
33
+          enable_plugin heat git://git.openstack.org/openstack/heat
34
+          EOF
35
+        executable: /bin/bash
36
+        chdir: '{{ ansible_user_dir }}/workspace'
37
+      environment: '{{ zuul | zuul_legacy_vars }}'
38
+
39
+    - shell:
40
+        cmd: |
41
+          set -e
42
+          set -x
43
+          export PYTHONUNBUFFERED=true
44
+          export DEVSTACK_GATE_TEMPEST_NOTESTS=1
45
+          export DEVSTACK_GATE_NEUTRON=1
46
+          export PROJECTS="openstack-dev/grenade $PROJECTS"
47
+          export PROJECTS="openstack/heat $PROJECTS"
48
+          export PROJECTS="openstack/python-heatclient $PROJECTS"
49
+          export PROJECTS="openstack/murano $PROJECTS"
50
+          export PROJECTS="openstack/murano-dashboard $PROJECTS"
51
+          export PROJECTS="openstack/python-muranoclient $PROJECTS"
52
+          export PROJECTS="openstack/murano-tempest-plugin $PROJECTS"
53
+          export BRANCH_OVERRIDE=default
54
+
55
+          export GRENADE_PLUGINRC="enable_grenade_plugin murano https://git.openstack.org/openstack/murano"
56
+          export DEVSTACK_GATE_GRENADE=pullup
57
+
58
+
59
+          if [ "$BRANCH_OVERRIDE" != "default" ] ; then
60
+              export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
61
+          fi
62
+
63
+          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
64
+          ./safe-devstack-vm-gate-wrap.sh
65
+        executable: /bin/bash
66
+        chdir: '{{ ansible_user_dir }}/workspace'
67
+      environment: '{{ zuul | zuul_legacy_vars }}'

Loading…
Cancel
Save