Skip to content

Commit

Permalink
[CI]Scale openstack services to speed up tempest
Browse files Browse the repository at this point in the history
  • Loading branch information
gibizer authored and openshift-merge-bot[bot] committed Jun 25, 2024
1 parent 86fadba commit 1784b40
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
post-run:
- ci/nova-operator-base/playbooks/collect-logs.yaml
vars:
cifmw_extras:
- "@scenarios/centos-9/multinode-ci.yml"
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/nova-operator'].src_dir }}/ci/nova-operator-tempest-multinode/ci_fw_vars.yaml"
cifmw_run_test_role: test_operator
cifmw_test_operator_concurrency: 4
cifmw_test_operator_timeout: 7200
Expand Down Expand Up @@ -130,6 +133,7 @@
name: nova-operator-tempest-multinode-ceph
parent: podified-multinode-hci-deployment-crc-3comp
dependencies: ["openstack-k8s-operators-content-provider"]
nodeset: centos-9-medium-3x-centos-9-crc-extracted-2-36-0-3xl
# Note: When inheriting from a job (or creating a variant of a job) vars are merged with previous definitions
post-run:
- ci/nova-operator-base/playbooks/collect-logs.yaml
Expand Down
6 changes: 5 additions & 1 deletion ci/nova-operator-tempest-multinode-ceph/ci_fw_vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ cifmw_install_yamls_vars:
INSTALL_CERT_MANAGER: false

cifmw_edpm_prepare_skip_crc_storage_creation: true

# as we scale the openstack services to 3 replicas we need more PVs
cifmw_cls_pv_count: 20

cifmw_services_swift_enabled: false
pre_deploy:
Expand All @@ -17,6 +18,9 @@ pre_deploy:
# https://github.com/openstack-k8s-operators/ci-framework/tree/main/hooks/playbooks
# if you want to use a different source you can use the full path on the ansible controller
post_deploy:
- name: 71 Kustomize control plane to scale openstack services
type: playbook
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/nova-operator'].src_dir }}/ci/nova-operator-tempest-multinode-ceph/control_plane_hook.yaml"
- name: 81 Kustomize OpenStack CR with Ceph
type: playbook
source: control_plane_ceph_backends.yml
Expand Down
51 changes: 51 additions & 0 deletions ci/nova-operator-tempest-multinode-ceph/control_plane_hook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
- name: Kustomize ControlPlane
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
gather_facts: false
tasks:
- name: Ensure the kustomizations dir exists
ansible.builtin.file:
path: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane"
state: directory

- name: Create kustomization
ansible.builtin.copy:
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/71-controlplane-kustomization.yaml"
content: |-
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
patches:
- target:
kind: OpenStackControlPlane
patch: |-
- op: replace
path: /spec/nova/template/apiServiceTemplate/replicas
value: 2
- op: replace
path: /spec/neutron/template/replicas
value: 2
- op: replace
path: /spec/neutron/template/customServiceConfig
value: |
[DEFAULT]
debug = True
- op: replace
path: /spec/ovn/template/ovnDBCluster/ovndbcluster-nb/replicas
value: 2
- op: replace
path: /spec/glance/template/glanceAPIs/default/replicas
value: 2
- op: replace
path: /spec/cinder/template/cinderAPI/replicas
value: 2
- op: replace
path: /spec/keystone/template/replicas
value: 2
30 changes: 30 additions & 0 deletions ci/nova-operator-tempest-multinode/ci_fw_vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
cifmw_install_yamls_vars:
BMO_SETUP: false
INSTALL_CERT_MANAGER: false

cifmw_edpm_prepare_skip_crc_storage_creation: true
# as we scale the openstack services to 3 replicas we need more PVs
cifmw_cls_pv_count: 20

cifmw_services_swift_enabled: false

# note by default the source for the playbook specified
# in the hooks is relative to
# https://github.com/openstack-k8s-operators/ci-framework/tree/main/hooks/playbooks
# if you want to use a different source you can use the full path on the ansible controller
post_deploy:
- name: 71 Kustomize control plane to scale openstack services
type: playbook
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/nova-operator'].src_dir }}/ci/nova-operator-tempest-multinode/control_plane_hook.yaml"
- name: 82 Kustomize and update Control Plane
type: playbook
source: control_plane_kustomize_deploy.yml


cifmw_run_tests: true
cifmw_tempest_container: openstack-tempest-extras
# we do not want the ci framework trying to enable any
# tempest groups by default we will manage all tempest execution
# via the job definition.
cifmw_tempest_default_groups: []
39 changes: 39 additions & 0 deletions ci/nova-operator-tempest-multinode/control_plane_hook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
- name: Kustomize ControlPlane
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
gather_facts: false
tasks:
- name: Ensure the kustomizations dir exists
ansible.builtin.file:
path: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane"
state: directory

- name: Create kustomization
ansible.builtin.copy:
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/controlplane/71-controlplane-kustomization.yaml"
content: |-
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
patches:
- target:
kind: OpenStackControlPlane
patch: |-
- op: replace
path: /spec/nova/template/apiServiceTemplate/replicas
value: 2
- op: replace
path: /spec/neutron/template/replicas
value: 2
- op: replace
path: /spec/neutron/template/customServiceConfig
value: |
[DEFAULT]
debug = True
- op: replace
path: /spec/keystone/template/replicas
value: 2

0 comments on commit 1784b40

Please sign in to comment.