diff --git a/.zuul.d/rally-docker-check.yaml b/.zuul.d/rally-docker-check.yaml new file mode 100644 index 00000000..ec57dc8f --- /dev/null +++ b/.zuul.d/rally-docker-check.yaml @@ -0,0 +1,6 @@ +- job: + name: rally-docker-check + parent: base + nodeset: ubuntu-xenial + run: tests/ci/playbooks/run-rally-docker-check.yaml + timeout: 1800 diff --git a/.zuul.d/zuul.yaml b/.zuul.d/zuul.yaml index fc759647..060f604a 100644 --- a/.zuul.d/zuul.yaml +++ b/.zuul.d/zuul.yaml @@ -34,6 +34,7 @@ - rally-tox-pep8 - rally-tox-py27 - rally-tox-py35 + - rally-docker-check - rally-task-simple-job - rally-task-basic-with-existing-users: # use_existing_users key did not trigger proper ansible tasks @@ -80,6 +81,7 @@ - rally-tox-pep8 - rally-tox-py27 - rally-tox-py35 + - rally-docker-check - rally-task-simple-job - rally-task-heat - rally-task-ironic diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 32a259d4..e808d215 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,6 +26,16 @@ Added * [scenario plugin] GnocchiMetric.create_metric * [scenario plugin] GnocchiMetric.create_delete_metric +Changed +~~~~~~~ + +* `Docker image `_ ported + to publish images from `rally-openstack + `_ repo instead of using the + rally framework repository. + Also, the CI is extended to check ability to build Docker image for any of + changes. + Fixed ~~~~~ diff --git a/tests/ci/playbooks/run-rally-docker-check.yaml b/tests/ci/playbooks/run-rally-docker-check.yaml new file mode 100644 index 00000000..9c365d3f --- /dev/null +++ b/tests/ci/playbooks/run-rally-docker-check.yaml @@ -0,0 +1,58 @@ + +- hosts: all + name: Performs checks for building rally-openstack docker image + tasks: + - name: Install docker + become: True + become_user: root + shell: + executable: /bin/sh + cmd: | + set -e + + apt-get update + + apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' + + apt-get update + apt-cache policy docker-engine + + apt-get install -y docker-engine + + - name: Check docker service status + become: True + become_user: root + command: systemctl status docker + + - name: Build rally-openstack image + become: True + become_user: root + shell: "cd {{ zuul.project.src_dir }} && docker build -t xrally/xrally-openstack ./" + + - name: Create Docker volume as for persistant Rally container storage + become: True + become_user: root + command: "docker volume create --name rally_volume" + + - name: Create an Environment + become: True + become_user: root + command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env create --name "special_env_name" + + - name: List all available environments + become: True + become_user: root + command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack env list + register: env_list + + # Check availability of that environment (check that volume stores Rally database) + - fail: + msg: There is no created environment available. + when: '"special_env_name" not in env_list.stdout' + + - name: Check loading of rally-openstack plugin + become: True + become_user: root + # this plugin was added with rally-openstack 1.1.0 + command: docker run -v rally_volume:/home/rally/data xrally/xrally-openstack plugin show GnocchiMetric.list_metric