]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/suites/rbd: OpenStack devstack tempest full suite 13158/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 15 Dec 2016 18:31:37 +0000 (13:31 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 27 Jan 2017 19:22:48 +0000 (14:22 -0500)
This mimics the OpenStack tempest gate tests that OpenStack
Zuul executes as a gate test.

Fixes: http://tracker.ceph.com/issues/18594
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/suites/rbd/openstack/% [new file with mode: 0644]
qa/suites/rbd/openstack/base/install.yaml [new file with mode: 0644]
qa/suites/rbd/openstack/clusters/+ [new file with mode: 0644]
qa/suites/rbd/openstack/clusters/fixed-2.yaml [new file with mode: 0644]
qa/suites/rbd/openstack/clusters/openstack.yaml [new file with mode: 0644]
qa/suites/rbd/openstack/features/minimum.yaml [new file with mode: 0644]
qa/suites/rbd/openstack/fs [new symlink]
qa/suites/rbd/openstack/objectstore [new symlink]
qa/suites/rbd/openstack/workloads/devstack-tempest-gate.yaml [new file with mode: 0644]
qa/workunits/rbd/run_devstack_tempest.sh [new file with mode: 0755]

diff --git a/qa/suites/rbd/openstack/% b/qa/suites/rbd/openstack/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rbd/openstack/base/install.yaml b/qa/suites/rbd/openstack/base/install.yaml
new file mode 100644 (file)
index 0000000..2030acb
--- /dev/null
@@ -0,0 +1,3 @@
+tasks:
+- install:
+- ceph:
diff --git a/qa/suites/rbd/openstack/clusters/+ b/qa/suites/rbd/openstack/clusters/+
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/rbd/openstack/clusters/fixed-2.yaml b/qa/suites/rbd/openstack/clusters/fixed-2.yaml
new file mode 100644 (file)
index 0000000..93be2fc
--- /dev/null
@@ -0,0 +1,9 @@
+overrides:
+  ceph-deploy:
+    conf:
+      global:
+        osd pool default size: 2
+        osd crush chooseleaf type: 0
+roles:
+- [mon.a, osd.0, osd.1, osd.2]
+- [client.0]
diff --git a/qa/suites/rbd/openstack/clusters/openstack.yaml b/qa/suites/rbd/openstack/clusters/openstack.yaml
new file mode 100644 (file)
index 0000000..3310e9d
--- /dev/null
@@ -0,0 +1,4 @@
+openstack:
+  - volumes: # attached to each instance
+      count: 1
+      size: 30 # GB
diff --git a/qa/suites/rbd/openstack/features/minimum.yaml b/qa/suites/rbd/openstack/features/minimum.yaml
new file mode 100644 (file)
index 0000000..420e3d5
--- /dev/null
@@ -0,0 +1,6 @@
+overrides:
+  ceph:
+    conf:
+      client:
+        rbd default format: 2
+        rbd default features: 1
diff --git a/qa/suites/rbd/openstack/fs b/qa/suites/rbd/openstack/fs
new file mode 120000 (symlink)
index 0000000..3658920
--- /dev/null
@@ -0,0 +1 @@
+../basic/fs
\ No newline at end of file
diff --git a/qa/suites/rbd/openstack/objectstore b/qa/suites/rbd/openstack/objectstore
new file mode 120000 (symlink)
index 0000000..4c8ebad
--- /dev/null
@@ -0,0 +1 @@
+../../../objectstore
\ No newline at end of file
diff --git a/qa/suites/rbd/openstack/workloads/devstack-tempest-gate.yaml b/qa/suites/rbd/openstack/workloads/devstack-tempest-gate.yaml
new file mode 100644 (file)
index 0000000..f7c3413
--- /dev/null
@@ -0,0 +1,36 @@
+tasks:
+- qemu:
+    all:
+      type: filesystem
+      cpus: 4
+      memory: 12288
+      disks:
+      - image_size: 30720
+      - image_size: 30720
+      test: http://git.ceph.com/?p={repo};a=blob_plain;hb={branch};f=qa/workunits/rbd/run_devstack_tempest.sh
+      image_url: https://cloud-images.ubuntu.com/releases/16.04/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img
+      cloud_config_archive:
+      - type: text/cloud-config
+        content: |
+          users:
+          - name: stack
+            lock_passwd: False
+            shell: /bin/bash
+            sudo: ["ALL=(root) NOPASSWD:ALL\nDefaults:stack,tempest !requiretty"]
+          - name: tempest
+            lock_passwd: False
+            shell: /bin/bash
+            sudo:
+            - "ALL=(root) NOPASSWD:/sbin/ip"
+            - "ALL=(root) NOPASSWD:/sbin/iptables"
+            - "ALL=(root) NOPASSWD:/usr/bin/ovsdb-client"
+      - |
+        #!/bin/bash -ex
+        mount --bind /mnt/test_b /opt
+        mkdir /opt/stack
+        chown -R stack:stack /home/stack
+        chown -R stack:stack /opt/stack
+
+        mkdir /mnt/log/stack
+        chmod a+rwx /mnt/log/stack
+        chown -R stack:stack /mnt/log/stack
diff --git a/qa/workunits/rbd/run_devstack_tempest.sh b/qa/workunits/rbd/run_devstack_tempest.sh
new file mode 100755 (executable)
index 0000000..f87f95c
--- /dev/null
@@ -0,0 +1,107 @@
+#!/bin/bash -ex
+
+STACK_USER=${STACK_USER:-stack}
+STACK_GROUP=${STACK_GROUP:-stack}
+TEMPEST_USER=${TEMPEST_USER:-tempest}
+
+STACK_HOME_PATH=${STACK_HOME_PATH:-/home/stack}
+STACK_OPT_PATH=${STACK_OPT_PATH:-/opt/stack}
+STACK_LOG_PATH=${STACK_LOG_PATH:-/mnt/log/stack}
+
+cleanup() {
+  echo "**** cleanup"
+
+  # ensure teuthology can clean up the logs
+  [ -d ${STACK_LOG_PATH} ] && chmod -R a+rwx ${STACK_LOG_PATH}
+
+  # kill all OpenStack services
+  if [ -d ${STACK_OPT_PATH}/devstack ]; then
+    cd ${STACK_OPT_PATH}/devstack
+    sudo -H -u ${STACK_USER} ./unstack.sh || true
+  fi
+}
+
+trap cleanup INT TERM EXIT
+
+# devstack configuration adapted from upstream gate
+cat<<EOF > ${STACK_HOME_PATH}/local.conf
+[[local|localrc]]
+Q_USE_DEBUG_COMMAND=True
+NETWORK_GATEWAY=10.1.0.1
+USE_SCREEN=False
+DATA_DIR=${STACK_OPT_PATH}/data
+ACTIVE_TIMEOUT=90
+BOOT_TIMEOUT=90
+ASSOCIATE_TIMEOUT=60
+TERMINATE_TIMEOUT=60
+MYSQL_PASSWORD=secretmysql
+DATABASE_PASSWORD=secretdatabase
+RABBIT_PASSWORD=secretrabbit
+ADMIN_PASSWORD=secretadmin
+SERVICE_PASSWORD=secretservice
+SERVICE_TOKEN=111222333444
+SWIFT_HASH=1234123412341234
+ROOTSLEEP=0
+ENABLED_SERVICES=c-api,c-bak,c-sch,c-vol,ceilometer-acentral,ceilometer-acompute,ceilometer-alarm-evaluator,ceilometer-alarm-notifier,ceilometer-anotification,ceilometer-api,ceilometer-collector,cinder,dstat,g-api,g-reg,horizon,key,mysql,n-api,n-cond,n-cpu,n-crt,n-obj,n-sch,q-agt,q-dhcp,q-l3,q-meta,q-metering,q-svc,quantum,rabbit,s-account,s-container,s-object,s-proxy,tempest
+SKIP_EXERCISES=boot_from_volume,bundle,client-env,euca
+SYSLOG=False
+SCREEN_LOGDIR=${STACK_LOG_PATH}/screen-logs
+LOGFILE=${STACK_LOG_PATH}/devstacklog.txt
+VERBOSE=True
+FIXED_RANGE=10.1.0.0/20
+IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20
+FLOATING_RANGE=172.24.5.0/24
+PUBLIC_NETWORK_GATEWAY=172.24.5.1
+FIXED_NETWORK_SIZE=4096
+VIRT_DRIVER=libvirt
+SWIFT_REPLICAS=1
+LOG_COLOR=False
+UNDO_REQUIREMENTS=False
+CINDER_PERIODIC_INTERVAL=10
+
+export OS_NO_CACHE=True
+OS_NO_CACHE=True
+CEILOMETER_BACKEND=mysql
+LIBS_FROM_GIT=
+DATABASE_QUERY_LOGGING=True
+EBTABLES_RACE_FIX=True
+CINDER_SECURE_DELETE=False
+CINDER_VOLUME_CLEAR=none
+LIBVIRT_TYPE=kvm
+VOLUME_BACKING_FILE_SIZE=24G
+TEMPEST_HTTP_IMAGE=http://git.openstack.org/static/openstack.png
+FORCE_CONFIG_DRIVE=False
+
+CINDER_ENABLED_BACKENDS=ceph:ceph
+TEMPEST_STORAGE_PROTOCOL=ceph
+REMOTE_CEPH=True
+enable_plugin devstack-plugin-ceph git://git.openstack.org/openstack/devstack-plugin-ceph
+EOF
+
+cat<<EOF > ${STACK_HOME_PATH}/start.sh
+#!/bin/bash -ex
+cd ${STACK_OPT_PATH}
+git clone https://git.openstack.org/openstack-dev/devstack
+cd devstack
+git checkout stable/newton
+
+cp ${STACK_HOME_PATH}/local.conf .
+
+export PYTHONUNBUFFERED=true
+export PROJECTS="openstack/devstack-plugin-ceph"
+
+./stack.sh
+EOF
+
+
+# execute devstack
+chmod 0755 ${STACK_HOME_PATH}/start.sh
+sudo -H -u ${STACK_USER} ${STACK_HOME_PATH}/start.sh
+
+# execute tempest
+chown -R ${TEMPEST_USER}:${STACK_GROUP} ${STACK_OPT_PATH}/tempest
+chown -R ${TEMPEST_USER}:${STACK_GROUP} ${STACK_OPT_PATH}/data/tempest
+chmod -R o+rx ${STACK_OPT_PATH}/devstack/files
+
+cd ${STACK_OPT_PATH}/tempest
+sudo -H -u ${TEMPEST_USER} tox -eall-plugin -- '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)|(^cinder\.tests.tempest))' --concurrency=3