From: Chris Wheeler Date: Thu, 12 Jun 2025 23:47:37 +0000 (+0000) Subject: Support for multi-node OKD O-Cloud clusters X-Git-Tag: l-release~1^2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=0a57dcf7ee243fcb833df1b74333f60062c5e114;p=pti%2Frtp.git Support for multi-node OKD O-Cloud clusters - Modified automation to support deployment of multi-node clusters - Defined multiple inventory examples to clarify the requirements for various deployment infrastructures and topologies - Removed extraneous variables from playbooks - Updated README.md Change-Id: Ieba79b131be86fd0215fa9089fdf1d3e137edfe6 Signed-Off-By: Chris Wheeler Issue-ID: INF-489 --- diff --git a/okd/README.md b/okd/README.md index 7087bc9b..0916566c 100644 --- a/okd/README.md +++ b/okd/README.md @@ -24,6 +24,7 @@ Several packages are required by Ansible modules or deployment scripts that are - ansible - make +- nmstate - pip - wget - python development headers/libraries @@ -101,17 +102,18 @@ is being used (see okd/inventory/host_vars/http_store/ for example): ### General -Update inventory/hosts.yml to specify the deployment target host(s) under the 'ocloud' group. The sample -inventory can be used without modification to deploy to a VM host. For bare metal deployment, populate -the 'ocloud' group with the hostname(s) of the baremetal server(s) and create a directory for each -host under inventory/host_vars/ containing required variables as defined under [Infrastructure / Bare Metal](#infrastructure--bare-metal) -below. +Customize one of the inventories under the 'inventory-examples' directory to match the desired infrastructure +and deployment topology for your cluster. The 'ocloud' host group determines the hosts that will comprise +the cluster. The 'ocloud-vm-okd-aio' sample inventory can be used without modification to deploy to a single-node, +VM-based cluster. For bare metal deployment, populate the 'ocloud' group with the hostname(s) of the baremetal +server(s) and create a directory for each host under host_vars/ containing required variables as defined under +[Infrastructure / Bare Metal](#infrastructure--bare-metal) below. #### Optional The following variables can be set to override deployment defaults: - ocloud_infra [default="vm"]: infrastructure target (supported values: "vm", "baremetal") - ocloud_platform [default="okd"]: platform target -- ocloud_topology [default="aio"]: O-Cloud cluster topology +- ocloud_topology [default="aio"]: O-Cloud cluster topology (supported values: "aio", "multinode") - ocloud_cluster_name [default="ocloud-{{ ocloud_infra }}-{{ ocloud_platform }}-{{ ocloud_topology }}"]: O-Cloud cluster name - ocloud_domain_name [default="example.com"]: O-Cloud domain name - ocloud_net_cidr [default="192.168.123.0/24"]: O-Cloud machine network CIDR @@ -160,8 +162,10 @@ The following Ansible variables must be defined in group_vars/all.yml: #### Optional Optionally, the following variables can be set to override default settings: -- ocloud_platform_okd_release [default=4.14.0-0.okd-2024-01-26-175629]: OKD release, as defined in [OKD releases](https://github.com/okd-project/okd/releases) +- ocloud_platform_okd_release [default=4.19.0-okd-scos.0]: OKD release, as defined in [OKD releases](https://github.com/okd-project/okd/releases) - ocloud_platform_okd_pull_secret [default=None]: pull secret for use with non-public image registries +- ocloud_platform_okd_api_vips [default=None]: list of virtual IPs to use for OKD API access (required if deploying a multi-node cluster) +- ocloud_platform_okd_ingress_vips [default=None]: list of virtual IPs to use for ingress (required if deploying a multi-node cluster) # Installation @@ -414,12 +418,40 @@ $ curl -H "Authorization: Bearer $TOKEN" -k https://o2ims.apps.ocloud-baremetal- "extensions": { } ``` + +## ORAN O2 IMS Compliance + +A playbook is provided to automate execution of O2 IMS compliance tests from the [it/test](https://gerrit.o-ran-sc.org/r/q/project:it/test) repo. The following extra variables must be provided: + +- ocloud_kubeconfig: path of the kubeconfig for the cluster hosting the O2 API server +- ocloud_compliance_resource_type: name of a resource type associated with the target O-Cloud +- ocloud_compliance_resource_desc_substring: substring of a resource description associated with the target O-Cloud + +For example: + +``` +ansible-playbook -i inventory playbooks/ocloud_compliance.yml -e ocloud_kubeconfig=$KUBECONFIG -e ocloud_compliance_resource_type=pserver -e ocloud_compliance_resource_desc_substring=pserver +``` + +## Sample Workload Deployment + +A playbook is provided to deploy a sample workload to the O-Cloud. The following extra variables must be provided: + +- ocloud_workloads: comma-delimited list of workloads to deploy +- ocloud_dms_host: hostname of the O2 API server providing the DMS interface +- ocloud_dms_deployment_mgr_id: deployment manager ID where the sample workload(s) will be deployed +- ocloud_kubeconfig: path of the kubeconfig for the cluster hosting the O2 API server + +For example: +``` +ansible-playbook -i inventory playbooks/ocloud_workload.yml -e ocloud_dms_host=o2ims.apps.ocloud-vm-okd-aio.example.com -e ocloud_dms_deployment_mgr_id=local-cluster -e ocloud_workloads=oaicucp -e ocloud_kubeconfig=$KUBECONFIG +``` + # Troubleshooting ## OKD -Refer to [Troubleshooting installation issues](https://docs.okd.io/4.14/installing/installing-troubleshooting.html) for information -on diagnosing OKD deployment failures. +Refer to [Troubleshooting installation issues](https://docs.okd.io/latest/installing/validation_and_troubleshooting/installing-troubleshooting.html) for information on diagnosing OKD deployment failures. # Cleanup diff --git a/okd/inventory b/okd/inventory new file mode 120000 index 00000000..ce8f6cc8 --- /dev/null +++ b/okd/inventory @@ -0,0 +1 @@ +inventory-examples/ocloud-vm-okd-aio \ No newline at end of file diff --git a/okd/inventory-examples/ocloud-baremetal-okd-aio/group_vars/all/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/group_vars/all/vars.yml new file mode 100644 index 00000000..9a55fad1 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-aio/group_vars/all/vars.yml @@ -0,0 +1,12 @@ +--- +ocloud_infra: baremetal +ocloud_platform: okd +ocloud_topology: aio +ocloud_platform_okd_ssh_pubkey: ~ +ocloud_cluster_name: "ocloud-baremetal-okd-aio" +ocloud_domain_name: "example.com" +ocloud_dns_servers: ["192.168.45.11"] +ocloud_ntp_servers: ["192.168.45.11"] +ocloud_net_cidr: "192.168.45.0/24" +# Uncomment to override default release from ocloud_platform_okd role: +#ocloud_platform_okd_release: ~ diff --git a/okd/inventory/group_vars/all/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/group_vars/all/vault.yml similarity index 100% rename from okd/inventory/group_vars/all/vault.yml rename to okd/inventory-examples/ocloud-baremetal-okd-aio/group_vars/all/vault.yml diff --git a/okd/inventory/host_vars/http_store/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/http_store/vars.yml similarity index 100% rename from okd/inventory/host_vars/http_store/vars.yml rename to okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/http_store/vars.yml diff --git a/okd/inventory/host_vars/master-0-baremetal/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/master-0-baremetal/vars.yml similarity index 88% rename from okd/inventory/host_vars/master-0-baremetal/vars.yml rename to okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/master-0-baremetal/vars.yml index b38802bc..19eccbce 100644 --- a/okd/inventory/host_vars/master-0-baremetal/vars.yml +++ b/okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/master-0-baremetal/vars.yml @@ -1,7 +1,4 @@ --- -ocloud_infra: baremetal -ocloud_platform: okd -ocloud_topology: aio bmc_address: "192.168.12.34" bmc_user: admin role: master diff --git a/okd/inventory/host_vars/master-0-baremetal/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/master-0-baremetal/vault.yml similarity index 100% rename from okd/inventory/host_vars/master-0-baremetal/vault.yml rename to okd/inventory-examples/ocloud-baremetal-okd-aio/host_vars/master-0-baremetal/vault.yml diff --git a/okd/inventory-examples/ocloud-baremetal-okd-aio/hosts.yml b/okd/inventory-examples/ocloud-baremetal-okd-aio/hosts.yml new file mode 100644 index 00000000..ba509479 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-aio/hosts.yml @@ -0,0 +1,12 @@ +deployer: + hosts: + localhost: + ansible_connection: local + +http_store: + hosts: + http_store: + +ocloud: + hosts: + master-0-baremetal: diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vars.yml new file mode 100644 index 00000000..29da237d --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vars.yml @@ -0,0 +1,14 @@ +--- +ocloud_infra: baremetal +ocloud_platform: okd +ocloud_topology: multinode +ocloud_platform_okd_ssh_pubkey: ~ +ocloud_cluster_name: "ocloud-baremetal-okd-multinode" +ocloud_domain_name: "example.com" +ocloud_dns_servers: ["192.168.45.11"] +ocloud_ntp_servers: ["192.168.45.11"] +ocloud_net_cidr: "192.168.45.0/24" +ocloud_platform_okd_api_vips: ["192.168.45.123"] +ocloud_platform_okd_ingress_vips: ["192.168.45.124"] +# Uncomment to override default release from ocloud_platform_okd role: +#ocloud_platform_okd_release: ~ diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vault.yml new file mode 100644 index 00000000..51458e00 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/group_vars/all/vault.yml @@ -0,0 +1,4 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +# Uncomment to override default pull secret from ocloud_platform_okd role: +#ocloud_platform_okd_pull_secret: ~ diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/http_store/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/http_store/vars.yml new file mode 100644 index 00000000..79eb11a6 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/http_store/vars.yml @@ -0,0 +1,4 @@ +ansible_host: 192.168.89.10 +http_store_dir: /opt/http_store/data +http_port: 80 +ansible_connection: local diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vars.yml new file mode 100644 index 00000000..19eccbce --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vars.yml @@ -0,0 +1,23 @@ +--- +bmc_address: "192.168.12.34" +bmc_user: admin +role: master +installation_disk_path: "/dev/disk/by-path/pci-0000:c3:00.0-nvme-1" +mac_addresses: + ens1f0: "12:34:56:78:9A:BC" +network_config: + interfaces: + - name: ens1f0 + type: ethernet + state: up + ipv4: + enabled: true + dhcp: false + address: + - ip: "192.168.45.67" + prefix-length: "24" + routes: + config: + - destination: 0.0.0.0/0 + next-hop-address: "192.168.45.1" + next-hop-interface: "ens1f0" diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vault.yml new file mode 100644 index 00000000..ac228b2f --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-0-baremetal/vault.yml @@ -0,0 +1,3 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +bmc_password: ~ diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vars.yml new file mode 100644 index 00000000..45da3e24 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vars.yml @@ -0,0 +1,23 @@ +--- +bmc_address: "192.168.12.35" +bmc_user: admin +role: master +installation_disk_path: "/dev/disk/by-path/pci-0000:c3:00.0-nvme-1" +mac_addresses: + ens1f0: "12:34:56:78:9A:CD" +network_config: + interfaces: + - name: ens1f0 + type: ethernet + state: up + ipv4: + enabled: true + dhcp: false + address: + - ip: "192.168.45.68" + prefix-length: "24" + routes: + config: + - destination: 0.0.0.0/0 + next-hop-address: "192.168.45.1" + next-hop-interface: "ens1f0" diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vault.yml new file mode 100644 index 00000000..ac228b2f --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-1-baremetal/vault.yml @@ -0,0 +1,3 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +bmc_password: ~ diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vars.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vars.yml new file mode 100644 index 00000000..3e0f6955 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vars.yml @@ -0,0 +1,23 @@ +--- +bmc_address: "192.168.12.36" +bmc_user: admin +role: master +installation_disk_path: "/dev/disk/by-path/pci-0000:c3:00.0-nvme-1" +mac_addresses: + ens1f0: "12:34:56:78:9A:DE" +network_config: + interfaces: + - name: ens1f0 + type: ethernet + state: up + ipv4: + enabled: true + dhcp: false + address: + - ip: "192.168.45.69" + prefix-length: "24" + routes: + config: + - destination: 0.0.0.0/0 + next-hop-address: "192.168.45.1" + next-hop-interface: "ens1f0" diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vault.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vault.yml new file mode 100644 index 00000000..ac228b2f --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/host_vars/master-2-baremetal/vault.yml @@ -0,0 +1,3 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +bmc_password: ~ diff --git a/okd/inventory-examples/ocloud-baremetal-okd-multinode/hosts.yml b/okd/inventory-examples/ocloud-baremetal-okd-multinode/hosts.yml new file mode 100644 index 00000000..677053c8 --- /dev/null +++ b/okd/inventory-examples/ocloud-baremetal-okd-multinode/hosts.yml @@ -0,0 +1,14 @@ +deployer: + hosts: + localhost: + ansible_connection: local + +http_store: + hosts: + http_store: + +ocloud: + hosts: + master-0-baremetal: + master-1-baremetal: + master-2-baremetal: diff --git a/okd/inventory/group_vars/all/vars.yml b/okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vars.yml similarity index 58% rename from okd/inventory/group_vars/all/vars.yml rename to okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vars.yml index d2c01a30..d22328f1 100644 --- a/okd/inventory/group_vars/all/vars.yml +++ b/okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vars.yml @@ -1,4 +1,8 @@ --- +ocloud_infra: vm +ocloud_platform: okd +ocloud_topology: aio ocloud_platform_okd_ssh_pubkey: ~ +ocloud_cluster_name: "ocloud-vm-okd-aio" # Uncomment to override default release from ocloud_platform_okd role: #ocloud_platform_okd_release: ~ diff --git a/okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vault.yml b/okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vault.yml new file mode 100644 index 00000000..51458e00 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-aio/group_vars/all/vault.yml @@ -0,0 +1,4 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +# Uncomment to override default pull secret from ocloud_platform_okd role: +#ocloud_platform_okd_pull_secret: ~ diff --git a/okd/inventory-examples/ocloud-vm-okd-aio/host_vars/master-0-vm/vars.yml b/okd/inventory-examples/ocloud-vm-okd-aio/host_vars/master-0-vm/vars.yml new file mode 100644 index 00000000..e83d2493 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-aio/host_vars/master-0-vm/vars.yml @@ -0,0 +1,2 @@ +--- +role: master diff --git a/okd/inventory/hosts.yml b/okd/inventory-examples/ocloud-vm-okd-aio/hosts.yml similarity index 81% rename from okd/inventory/hosts.yml rename to okd/inventory-examples/ocloud-vm-okd-aio/hosts.yml index 41c456ee..d2a0c923 100644 --- a/okd/inventory/hosts.yml +++ b/okd/inventory-examples/ocloud-vm-okd-aio/hosts.yml @@ -8,10 +8,6 @@ kvm: localhost: ansible_connection: local -http_store: - hosts: - http_store: - ocloud: hosts: master-0-vm: diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vars.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vars.yml new file mode 100644 index 00000000..84e3d4c8 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vars.yml @@ -0,0 +1,10 @@ +--- +ocloud_infra: vm +ocloud_platform: okd +ocloud_topology: multinode +ocloud_platform_okd_ssh_pubkey: ~ +ocloud_cluster_name: "ocloud-vm-okd-multinode" +ocloud_platform_okd_api_vips: ["192.168.123.100"] +ocloud_platform_okd_ingress_vips: ["192.168.123.101"] +# Uncomment to override default release from ocloud_platform_okd role: +#ocloud_platform_okd_release: ~ diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vault.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vault.yml new file mode 100644 index 00000000..51458e00 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/group_vars/all/vault.yml @@ -0,0 +1,4 @@ +--- +# Encrypt with `ansible-vault encrypt vault.yml` before adding secrets +# Uncomment to override default pull secret from ocloud_platform_okd role: +#ocloud_platform_okd_pull_secret: ~ diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-0-vm/vars.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-0-vm/vars.yml new file mode 100644 index 00000000..e83d2493 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-0-vm/vars.yml @@ -0,0 +1,2 @@ +--- +role: master diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-1-vm/vars.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-1-vm/vars.yml new file mode 100644 index 00000000..e83d2493 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-1-vm/vars.yml @@ -0,0 +1,2 @@ +--- +role: master diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-2-vm/vars.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-2-vm/vars.yml new file mode 100644 index 00000000..e83d2493 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/host_vars/master-2-vm/vars.yml @@ -0,0 +1,2 @@ +--- +role: master diff --git a/okd/inventory-examples/ocloud-vm-okd-multinode/hosts.yml b/okd/inventory-examples/ocloud-vm-okd-multinode/hosts.yml new file mode 100644 index 00000000..63d036a9 --- /dev/null +++ b/okd/inventory-examples/ocloud-vm-okd-multinode/hosts.yml @@ -0,0 +1,15 @@ +deployer: + hosts: + localhost: + ansible_connection: local + +kvm: + hosts: + localhost: + ansible_connection: local + +ocloud: + hosts: + master-0-vm: + master-1-vm: + master-2-vm: diff --git a/okd/inventory/host_vars/master-0-vm/vars.yml b/okd/inventory/host_vars/master-0-vm/vars.yml deleted file mode 100644 index 917fee10..00000000 --- a/okd/inventory/host_vars/master-0-vm/vars.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -ocloud_infra: vm -ocloud_platform: okd -ocloud_topology: aio -role: master diff --git a/okd/playbooks/deploy_dns.yml b/okd/playbooks/deploy_dns.yml index c73fae57..7d97f641 100644 --- a/okd/playbooks/deploy_dns.yml +++ b/okd/playbooks/deploy_dns.yml @@ -4,4 +4,3 @@ gather_facts: false roles: - role: insert_dns_records - when: setup_dns_service | bool diff --git a/okd/playbooks/deploy_http_store.yml b/okd/playbooks/deploy_http_store.yml index 9be8e779..856f0524 100644 --- a/okd/playbooks/deploy_http_store.yml +++ b/okd/playbooks/deploy_http_store.yml @@ -4,4 +4,3 @@ gather_facts: false roles: - role: setup_http_store - when: setup_http_store_service | bool \ No newline at end of file diff --git a/okd/playbooks/deploy_ntp.yml b/okd/playbooks/deploy_ntp.yml index b4184996..fc3a845e 100644 --- a/okd/playbooks/deploy_ntp.yml +++ b/okd/playbooks/deploy_ntp.yml @@ -4,5 +4,3 @@ gather_facts: false roles: - role: setup_ntp - when: setup_ntp_service | bool - diff --git a/okd/roles/ocloud/tasks/main.yml b/okd/roles/ocloud/tasks/main.yml index c52293e4..7eb11992 100644 --- a/okd/roles/ocloud/tasks/main.yml +++ b/okd/roles/ocloud/tasks/main.yml @@ -3,6 +3,7 @@ ansible.builtin.import_role: name: "ocloud_platform_okd" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" - name: Include infra role - {{ ocloud_infra }} @@ -23,28 +24,33 @@ ansible.builtin.import_role: name: "ocloud_platform_stolostron" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" - name: Include platform role - SiteConfig ansible.builtin.import_role: name: "ocloud_platform_siteconfig" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" - name: Include platform role - ClusterGroupUpgrades ansible.builtin.import_role: name: "ocloud_platform_cgu" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" - name: Include platform role - MultiClusterObservability ansible.builtin.import_role: name: "ocloud_platform_mco" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" - name: Include platform role - oran-o2ims ansible.builtin.import_role: name: "ocloud_platform_o2ims" delegate_to: "{{ groups['deployer'][0] }}" + run_once: true when: ocloud_platform == "okd" diff --git a/okd/roles/ocloud_platform_okd/handlers/main.yml b/okd/roles/ocloud_platform_okd/handlers/main.yml index 9f830a30..ac61e2fe 100644 --- a/okd/roles/ocloud_platform_okd/handlers/main.yml +++ b/okd/roles/ocloud_platform_okd/handlers/main.yml @@ -8,3 +8,4 @@ - bootstrap-complete - install-complete listen: monitor_platform_deployment + run_once: true