Skip to content

Commit

Permalink
Modify job to use metadata per cell
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkisaolamb authored and openshift-merge-bot[bot] committed Aug 20, 2024
1 parent bb7d79f commit 24ddb2b
Show file tree
Hide file tree
Showing 3 changed files with 136 additions and 1 deletion.
37 changes: 36 additions & 1 deletion ci/nova-operator-tempest-multinode/ci_fw_vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,22 @@ 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:
post_ctlplane_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
- name: 85 Create neutron-metadata-custom
type: playbook
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/nova-operator'].src_dir }}/ci/nova-operator-tempest-multinode/pre_deploy_hook.yml"



cifmw_run_tests: true
Expand All @@ -28,3 +33,33 @@ cifmw_tempest_container: openstack-tempest-extras
# tempest groups by default we will manage all tempest execution
# via the job definition.
cifmw_tempest_default_groups: []


cifmw_edpm_kustomize_content: |-
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults.NAMESPACE }}
patches:
- target:
kind: OpenStackDataPlaneNodeSet
patch: |-
- op: replace
path: /spec/services
value:
- repo-setup
- bootstrap
- download-cache
- configure-network
- validate-network
- install-os
- configure-os
- ssh-known-hosts
- run-os
- reboot-os
- install-certs
- ovn
- neutron-metadata-custom
- libvirt
- nova
- telemetry
29 changes: 29 additions & 0 deletions ci/nova-operator-tempest-multinode/control_plane_hook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,32 @@
- op: replace
path: /spec/keystone/template/replicas
value: 2
- op: add
path: /spec/nova/template/cellTemplates
value:
cell0:
cellDatabaseAccount: nova-cell0
hasAPIAccess: true
metadataServiceTemplate:
enabled: false
cell1:
cellDatabaseAccount: nova-cell1
hasAPIAccess: true
cellMessageBusInstance: rabbitmq-cell1
cellDatabaseInstance: openstack-cell1
metadataServiceTemplate:
enabled: true
override:
service:
metadata:
annotations:
metallb.universe.tf/address-pool: internalapi
metallb.universe.tf/allow-shared-ip: internalapi
metallb.universe.tf/loadBalancerIPs: 172.17.0.80
spec:
type: LoadBalancer
- op: add
path: /spec/nova/template/metadataServiceTemplate/enabled
value: false
71 changes: 71 additions & 0 deletions ci/nova-operator-tempest-multinode/pre_deploy_hook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
- name: Create custom service
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
gather_facts: false
tasks:
- name: Create kustomization
ansible.builtin.copy:
dest: "{{ cifmw_basedir }}/artifacts/manifests/kustomizations/dataplane/98-kustomization.yaml"
content: |-
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
namespace: {{ cifmw_install_yamls_defaults.NAMESPACE }}
patches:
- target:
kind: OpenStackDataPlaneNodeSet
patch: |-
- op: replace
path: /spec/services
value:
- repo-setup
- bootstrap
- download-cache
- configure-network
- validate-network
- install-os
- configure-os
- ssh-known-hosts
- run-os
- reboot-os
- install-certs
- ovn
- neutron-metadata-custom
- libvirt
- nova
- telemetry
- name: Create neutron-metadata-custom service
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
ansible.builtin.shell: |
oc apply -f - <<EOF
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneService
metadata:
name: neutron-metadata-custom
namespace: {{ cifmw_install_yamls_defaults['NAMESPACE'] }}
spec:
addCertMounts: false
caCerts: combined-ca-bundle
containerImageFields:
- EdpmNeutronMetadataAgentImage
dataSources:
- secretRef:
name: neutron-ovn-metadata-agent-neutron-config
- secretRef:
name: nova-cell1-metadata-neutron-config
edpmServiceType: neutron-metadata
playbook: osp.edpm.neutron_metadata
tlsCerts:
default:
contents:
- dnsnames
- ips
issuer: osp-rootca-issuer-ovn
keyUsages:
- digital signature
- key encipherment
- client auth
networks:
- ctlplane
EOF

0 comments on commit 24ddb2b

Please sign in to comment.