From 7bfb0db43f2bfe5cc1dca86827fec1121fa88afa Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 24 Aug 2018 15:09:58 +1000 Subject: [PATCH] Add role integration jobs The top-level roles in roles/* should be usable as roles under Zuul and as generic Ansible roles (for control plane). Add an integration job to ensure this. Start with the kerberos and afs roles. Change-Id: I9f5d572d5f69ca4b58e6e62b06fc873fe7a1e2f0 --- .zuul.yaml | 58 ++++++++++++++++++++++++++++++++++ roles-test/base.yaml | 11 +++++++ roles-test/openafs-client.yaml | 23 ++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 roles-test/base.yaml create mode 100644 roles-test/openafs-client.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 1b87b027a0..83e0938838 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -22,6 +22,62 @@ vars: project_src_dir: "{{ zuul.project.src_dir }}/modules/openstack_project" +# Role integration jobs. These test the top-level generic roles/* +# under Zuul. The range of platforms should be the same as those for +# openstack-zuul-jobs. +# +# NOTE(ianw): 2018-08 have left off Fedora & OpenSUSE because +# no roles currently run on them. +- job: + name: system-config-zuul-role-integration + description: | + Test roles provided by system-config with Zuul + abstract: true + parent: base + run: roles-test/base.yaml + +- job: + name: system-config-zuul-role-integration-centos-7 + parent: system-config-zuul-role-integration + nodeset: centos-7 + +- job: + name: system-config-zuul-role-integration-trusty + parent: system-config-zuul-role-integration + nodeset: ubuntu-trusty + +- job: + name: system-config-zuul-role-integration-xenial + parent: system-config-zuul-role-integration + nodeset: ubuntu-xenial + +- job: + name: system-config-zuul-role-integration-bionic + parent: system-config-zuul-role-integration + nodeset: ubuntu-bionic + +- job: + name: system-config-zuul-role-integration-debian-stable + parent: system-config-zuul-role-integration + nodeset: debian-stable + +- project-template: + name: system-config-zuul-role-integration + check: + jobs: + - system-config-zuul-role-integration-centos-7 + - system-config-zuul-role-integration-trusty + - system-config-zuul-role-integration-xenial + - system-config-zuul-role-integration-bionic + - system-config-zuul-role-integration-debian-stable + gate: + jobs: + - system-config-zuul-role-integration-centos-7 + - system-config-zuul-role-integration-trusty + - system-config-zuul-role-integration-xenial + - system-config-zuul-role-integration-bionic + - system-config-zuul-role-integration-debian-stable + - job: name: system-config-run-base nodeset: @@ -50,6 +106,8 @@ - testinfra/.* - project: + templates: + - system-config-zuul-role-integration check: jobs: - puppet-beaker-rspec-infra-system-config diff --git a/roles-test/base.yaml b/roles-test/base.yaml new file mode 100644 index 0000000000..78c93137d4 --- /dev/null +++ b/roles-test/base.yaml @@ -0,0 +1,11 @@ +# +# Test system-config roles/* +# +# This playbook should use and test roles defined in the system-config +# top-level roles/* directory. These roles should be generic enough +# to run under Zuul (here) and also directly under Ansible for the +# control-plane (see system-config-run-base) +# + +# Kerberos & afs roles +- import_playbook: openafs-client.yaml \ No newline at end of file diff --git a/roles-test/openafs-client.yaml b/roles-test/openafs-client.yaml new file mode 100644 index 0000000000..69150419fe --- /dev/null +++ b/roles-test/openafs-client.yaml @@ -0,0 +1,23 @@ +- name: Kerberos and OpenAFS client installation + hosts: all + roles: + - role: kerberos-client + kerberos_realm: 'OPENSTACK.ORG' + kerberos_admin_server: 'kdc.openstack.org' + kerberos_kdcs: + - kdc01.openstack.org + - kdc02.openstack.org + + - role: openafs-client + + tasks: + - name: Check for directory in /afs + stat: + path: "/afs/openstack.org/mirror" + register: afs_mirror + + - name: Ensure that AFS is mounted + assert: + that: + - afs_mirror.stat.exists +