From e8fe5bae37e9faacb669c26e549e59457bb4972f Mon Sep 17 00:00:00 2001 From: Wes Hayutin Date: Fri, 16 Apr 2021 12:06:11 -0600 Subject: [PATCH] keystone only puppet deployment While evaluating new versions of a base operating system it is handy to have a very minimal deployment. * configure_[images,networks] turned off * tempest api tests only for keystone Match TripleO's scenario000 deployment: https://bit.ly/3tBNBor Change-Id: Ie7ebee89b1ca00ca2fc50b7d1cbd2d8364daca46 --- README.md | 76 ++++++++++++----------- fixtures/scenario000.pp | 91 ++++++++++++++++++++++++++++ manifests/tempest.pp | 14 ++++- playbooks/run-integration-tests.yaml | 1 + zuul.d/integration.yaml | 13 ++++ zuul.d/layout.yaml | 1 + 6 files changed, 157 insertions(+), 39 deletions(-) create mode 100644 fixtures/scenario000.pp diff --git a/README.md b/README.md index 15b55c26d..d8e87f740 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Description OpenStack Infrastructure is deploying four jobs per supported Operating System (Ubuntu and CentOS): scenario001, scenario002, scenario003 and scenario004. +For CentOS it is also deploying a job(scenario000) with very tiny installation. OpenStack services are balanced between four scenarios because OpenStack Infastructure Jenkins slaves can not afford the load of running everything on @@ -38,43 +39,44 @@ the same node. One manifest (scenario-aio) is used for people who want to [run a simple All-In-One scenario](#all-in-one). -| - | scenario001 | scenario002 | scenario003 | scenario004 | scenario-aio | -|:----------:|:-----------:|:-----------:|:-----------:|:-----------:|:------------:| -| ssl | yes | yes | yes | yes | no | -| ipv6 | centos7 | centos7 | centos7 | centos7 | no | -| keystone | X | X | X | X | X | -| glance | rbd | swift | file | swift+rgw | file | -| nova | rbd | X | X | rbd | X | -| neutron | ovs | ovs | linuxbridge | ovs | ovs | -| cinder | rbd | iscsi | | | iscsi | -| ceilometer | X | | | | | -| aodh | X | | | | | -| panko | X | | | | | -| designate | | | bind | | | -| backup | | swift | | | | -| gnocchi | rbd | | | | | -| ec2api | | X | | | | -| heat | X | | X | | | -| swift | | X | | | | -| sahara | | | X | | | -| trove | | | X | | | -| horizon | | | X | | X | -| ironic | | X | | | | -| zaqar | | X | | | | -| murano | | | X | | | -| magnum | | | X | | | -| mistral | | | X | | | -| barbican | | X | X | | | -| ceph | X | | | X | | -| ceph rgw | | | | X | | -| vitrage | X | | | | | -| watcher | | | | X | | -| bgpvpn-api | | | | X | | -| bgp-dr | | | | X | | -| redis | X | | | | | -| l2gw | | | | X | | -| om rpc | amqp1 | rabbit | rabbit | rabbit | rabbit | -| om notify | rabbit | rabbit | rabbit | rabbit | rabbit | +| - | scenario000 | scenario001 | scenario002 | scenario003 | scenario004 | scenario-aio | +|:----------:|:-----------:|------------:|:-----------:|:-----------:|:-----------:|:------------:| +| ssl | yes | yes | yes | yes | yes | no | +| ipv6 | centos8 | centos8 | centos8 | centos8 | centos8 | no | +| keystone | X | X | X | X | X | X | +| glance | | rbd | swift | file | swift+rgw | file | +| nova | | rbd | X | X | rbd | X | +| placement | | X | X | X | X | X | +| neutron | | ovs | ovs | linuxbridge | ovs | ovs | +| cinder | | rbd | iscsi | | | iscsi | +| ceilometer | | X | | | | | +| aodh | | X | | | | | +| panko | | X | | | | | +| designate | | | | bind | | | +| backup | | | swift | | | | +| gnocchi | | rbd | | | | | +| ec2api | | | X | | | | +| heat | | X | | X | | | +| swift | | | X | | | | +| sahara | | | | X | | | +| trove | | | | X | | | +| horizon | | | | X | | X | +| ironic | | | X | | | | +| zaqar | | | X | | | | +| murano | | | | X | | | +| magnum | | | | X | | | +| mistral | | | | X | | | +| barbican | | | X | X | | | +| ceph | | X | | | X | | +| ceph rgw | | | | | X | | +| vitrage | | X | | | | | +| watcher | | | | | X | | +| bgpvpn-api | | | | | X | | +| bgp-dr | | | | | X | | +| redis | | X | | | | | +| l2gw | | | | | X | | +| om rpc | amqp1 | amqp1 | rabbit | rabbit | rabbit | rabbit | +| om notify | rabbit | rabbit | rabbit | rabbit | rabbit | rabbit | When the Jenkins slave is created, the *run_tests.sh* script will be executed. This script will execute *install_modules.sh* that prepare /etc/puppet/modules diff --git a/fixtures/scenario000.pp b/fixtures/scenario000.pp new file mode 100644 index 000000000..b3a510016 --- /dev/null +++ b/fixtures/scenario000.pp @@ -0,0 +1,91 @@ +# +# Copyright 2015 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Keystone only puppet deployment + +if ($::os['name'] == 'Ubuntu') or ($::os['name'] == 'Fedora') { + $ssl = false +} else { + $ssl = true +} + +if $::osfamily == 'RedHat' { + # (amoralej) - disable selinux defaults until + # https://tickets.puppetlabs.com/browse/PUP-7559 is fixed + Concat { selinux_ignore_defaults => true } + File { selinux_ignore_defaults => true } +} + +case $::osfamily { + 'Debian': { + $ipv6 = false + # vitrage are not packaged yet in debian/ubuntu + $enable_vitrage = false + $om_rpc = 'rabbit' + $om_notify = 'rabbit' + $notification_topics = $::os_service_default + } + 'RedHat': { + $ipv6 = true + $enable_vitrage = false + $om_rpc = 'amqp' + $om_notify = 'rabbit' + $notification_topics = ['notifications', 'vitrage_notifications'] + } + default: { + fail("Unsupported osfamily (${::osfamily})") + } +} + +include openstack_integration +class { 'openstack_integration::config': + ssl => $ssl, + ipv6 => $ipv6, + rpc_backend => $om_rpc, + notify_backend => $om_notify, +} +if $ssl { + include openstack_integration::cacert +} +include openstack_integration::apache +include openstack_integration::memcached +include openstack_integration::rabbitmq +if ($om_rpc == 'amqp') { + include openstack_integration::qdr +} +include openstack_integration::mysql +class { 'openstack_integration::keystone': + # NOTE(sileht): Telemetry autoscaling tempest tests can't renew token, so we + # use a long one + token_expiration => '2400', +} + +# turn off glance, nova, neutron +class { 'openstack_integration::provision': + glance => false, + nova => false, + neutron => false, +} + +# Expected keystone resources logged to +# keystone-resources.txt +class { 'openstack_integration::tempest': + glance => false, + nova => false, + neutron => false, + configure_images => false, + configure_networks => false, +} diff --git a/manifests/tempest.pp b/manifests/tempest.pp index ef3ec608a..68a90cbaa 100644 --- a/manifests/tempest.pp +++ b/manifests/tempest.pp @@ -112,6 +112,14 @@ # (optional) Define if Encrypted Volumes need to be tested. # Default to false. # +# [*configure_images*] +# (optional) Define if images are configured for tempest. +# Default to true. +# +# [*configure_networks*] +# (optional) Define if networks are configured for tempest. +# Default to true. +# # [*neutron_api_extensions*] # (optional) Define list of neutron API extensions to test. # The list is known to work with the repo; this reflects extensions enabled @@ -146,6 +154,8 @@ class openstack_integration::tempest ( $vitrage = false, $zaqar = false, $attach_encrypted_volume = false, + $configure_images = true, + $configure_networks = true, $neutron_api_extensions = [ 'address-scope', 'agent', @@ -211,8 +221,8 @@ class openstack_integration::tempest ( tempest_clone_path => '/tmp/openstack/tempest', lock_path => '/tmp/openstack/tempest', tempest_config_file => '/tmp/openstack/tempest/etc/tempest.conf', - configure_images => true, - configure_networks => true, + configure_images => $configure_images, + configure_networks => $configure_networks, identity_uri_v3 => "${::openstack_integration::config::keystone_auth_uri}/v3", admin_username => 'admin', admin_project_name => 'openstack', diff --git a/playbooks/run-integration-tests.yaml b/playbooks/run-integration-tests.yaml index 570421749..4627e7531 100644 --- a/playbooks/run-integration-tests.yaml +++ b/playbooks/run-integration-tests.yaml @@ -12,3 +12,4 @@ executable: /bin/bash chdir: '{{ ansible_user_dir }}/workspace/puppet-openstack-integration' environment: '{{ zuul | zuul_legacy_vars }}' + diff --git a/zuul.d/integration.yaml b/zuul.d/integration.yaml index ad006fe4d..7e0013478 100644 --- a/zuul.d/integration.yaml +++ b/zuul.d/integration.yaml @@ -6,6 +6,19 @@ vars: puppet: 6 +- job: + name: puppet-openstack-integration-6-scenario000 + parent: puppet-openstack-integration-6 + abstract: true + vars: + scenario: scenario000 + +- job: + name: puppet-openstack-integration-6-scenario000-tempest-centos-8-stream + parent: puppet-openstack-integration-6-scenario000 + voting: false + nodeset: centos-8-stream + - job: name: puppet-openstack-integration-6-scenario001 parent: puppet-openstack-integration-6 diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml index 35bcfc473..74c29901d 100644 --- a/zuul.d/layout.yaml +++ b/zuul.d/layout.yaml @@ -49,6 +49,7 @@ - puppet-openstack-integration-6-scenario002-tempest-ubuntu-focal - puppet-openstack-integration-6-scenario003-tempest-ubuntu-focal - puppet-openstack-integration-6-scenario004-tempest-ubuntu-focal + - puppet-openstack-integration-6-scenario000-tempest-centos-8-stream - puppet-openstack-integration-6-scenario001-tempest-centos-8-stream - puppet-openstack-integration-6-scenario002-tempest-centos-8-stream - puppet-openstack-integration-6-scenario003-tempest-centos-8-stream