From e03fc5a279a967215611aae1d8f6ff20aba81d03 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Tue, 23 Jan 2024 12:13:43 +0000 Subject: [PATCH] Add hook playbook install and test magnum capi driver Change-Id: I3a7ee79c10c39cb805ed2134b21055d63786663d --- .../openstack_deploy/user_variables_hooks.yml | 1 + .../user_variables_tempest.yml | 2 +- mcapi_vexxhost/playbooks/functional_test.yml | 19 +++++++++++++++++++ mcapi_vexxhost/playbooks/install_and_test.yml | 19 +++++++++++++++++++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_hooks.yml create mode 100644 mcapi_vexxhost/playbooks/install_and_test.yml diff --git a/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_hooks.yml b/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_hooks.yml new file mode 100644 index 00000000..d207d131 --- /dev/null +++ b/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_hooks.yml @@ -0,0 +1 @@ +post_setup_openstack_hook: osa_ops.mcapi_vexxhost.install_and_test diff --git a/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_tempest.yml b/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_tempest.yml index 070c4ae5..1f6aaef8 100644 --- a/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_tempest.yml +++ b/mcapi_vexxhost/playbooks/files/openstack_deploy/user_variables_tempest.yml @@ -1 +1 @@ -tempest_tempest_install: False \ No newline at end of file +tempest_install: False \ No newline at end of file diff --git a/mcapi_vexxhost/playbooks/functional_test.yml b/mcapi_vexxhost/playbooks/functional_test.yml index 30f324e5..693b8d20 100644 --- a/mcapi_vexxhost/playbooks/functional_test.yml +++ b/mcapi_vexxhost/playbooks/functional_test.yml @@ -31,6 +31,19 @@ functional_test_master_count: 1 functional_test_node_count: 1 + functional_test_resources_network: + networks: + - name: 'public' + network_type: 'flat' + physical_network: 'physnet1' + external: True + project: 'admin' + subnets: + - name: 'public-subnet' + cidr: '172.29.248.0/22' + allocation_start: '172.29.249.110' + allocation_end: '172.29.249.200' + functional_test_resources_compute: flavors: - specs: @@ -84,6 +97,12 @@ import_role: name: openstack.osa.install_defaults + - name: Create public network and subnet + include_role: + name: openstack.osa.openstack_resources + vars: + openstack_resources_network: "{{ functional_test_resources_network }}" + - name: Create image and flavors include_role: name: openstack.osa.openstack_resources diff --git a/mcapi_vexxhost/playbooks/install_and_test.yml b/mcapi_vexxhost/playbooks/install_and_test.yml new file mode 100644 index 00000000..3d91fbc8 --- /dev/null +++ b/mcapi_vexxhost/playbooks/install_and_test.yml @@ -0,0 +1,19 @@ +# Copyright 2024, BBC +# +# 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. + +- name: Import installation playbook + import_playbook: osa_ops.mcapi_vexxhost.k8s_install + +- name: Import test playbook + import_playbook: osa_ops.mcapi_vexxhost.functional_test