Skip to content

Commit

Permalink
Make edpm_nodes input multi-cell aware.
Browse files Browse the repository at this point in the history
Assume a single cell1 yet.

Remove edpm_computes and computes env var
from tests as it is not multi-cell aware, and should be no longer
needed. The docs still use that env var, it will be removed in
multi-cell adoption follow up, where we also cover EDPM multi-cell
adoption.

This is required as rhe rdo-jobs dependency introduces that
change for edpm_nodes and provides a common base for this and future
multi-cell follow ups.

Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Dec 20, 2024
1 parent 261affb commit a729baa
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 102 deletions.
39 changes: 19 additions & 20 deletions tests/roles/dataplane_adoption/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,25 +69,24 @@ default_timesync_ntp_servers:
edpm_node_hostname: standalone.localdomain
edpm_user: root
edpm_nodes:
standalone:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
cell1:
standalone:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
subnetName: subnet1
- name: storage
subnetName: subnet1
- name: tenant
subnetName: subnet1
- name: storagemgmt
subnetName: subnet1
# The variables inside edpm_network_config_template are evaluated based
# on the OpenstackDataplaneNodeSet inventory. For adding a variable to the invetory,
# please add it to OpenstackDataplaneNodeSet.nodeTemplate.ansibleVars
Expand Down Expand Up @@ -200,7 +199,7 @@ dataplane_cr: |
value: "-C -o ControlMaster=auto -o ControlPersist=80s"
- name: ANSIBLE_VERBOSITY
value: "{{ dataplane_verbosity | default ('1') }}"
nodes: {{ edpm_nodes }}
nodes: {{ edpm_nodes["cell1"] }}
nodeTemplate:
ansibleSSHPrivateKeySecret: {{ ansible_ssh_private_key_secret }}
ansible:
Expand Down
75 changes: 38 additions & 37 deletions tests/roles/dataplane_adoption/vars/ospdo.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
# Specific OSPdO Adoption vars
# ospdo nodes deployment configuration template
edpm_nodes:
cell1:
compute-0:
# Use a FQDN here to avoid issues with value specified in netconfig.yaml
hostName: compute-0.osptest.test.metalkube.org
ansible:
ansibleHost: 172.22.0.170
ansibleUser: cloud-admin
networks:
- name: ctlplane
fixedIP: 172.22.0.170
subnetName: ctlplane
- name: internalapi
fixedIP: 172.17.0.170
subnetName: internalapi
- name: storage
fixedIP: 172.18.0.170
subnetName: storage
- name: tenant
fixedIP: 172.20.0.170
subnetName: tenant
hostName: compute-0.osptest.test.metalkube.org
ansible:
ansibleHost: 172.22.0.170
ansibleUser: cloud-admin
networks:
- name: ctlplane
fixedIP: 172.22.0.170
subnetName: ctlplane
- name: internalapi
fixedIP: 172.17.0.170
subnetName: internalapi
- name: storage
fixedIP: 172.18.0.170
subnetName: storage
- name: tenant
fixedIP: 172.20.0.170
subnetName: tenant
compute-1:
# Use a FQDN here to avoid issues with value specified in netconfig.yaml
hostName: compute-1.osptest.test.metalkube.org
ansible:
ansibleHost: 172.22.0.180
ansibleUser: cloud-admin
networks:
- name: ctlplane
fixedIP: 172.22.0.180
subnetName: ctlplane
- name: internalapi
fixedIP: 172.17.0.180
subnetName: internalapi
- name: storage
fixedIP: 172.18.0.180
subnetName: storage
- name: tenant
fixedIP: 172.20.0.180
subnetName: tenant
# Use a FQDN here to avoid issues with value specified in netconfig.yaml
hostName: compute-1.osptest.test.metalkube.org
ansible:
ansibleHost: 172.22.0.180
ansibleUser: cloud-admin
networks:
- name: ctlplane
fixedIP: 172.22.0.180
subnetName: ctlplane
- name: internalapi
fixedIP: 172.17.0.180
subnetName: internalapi
- name: storage
fixedIP: 172.18.0.180
subnetName: storage
- name: tenant
fixedIP: 172.20.0.180
subnetName: tenant

edpm_network_config_template: |
---
Expand Down Expand Up @@ -105,5 +106,5 @@ neutron_public_interface_name: nic3
edpm_ovn_bridge_mappings: datacentre:br-ex

edpm_sshd_allowed_ranges:
- 192.168.122.0/24
- 172.22.0.0/24
- 192.168.122.0/24
- 172.22.0.0/24
76 changes: 37 additions & 39 deletions tests/roles/dataplane_adoption/vars/rhev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,45 +40,43 @@ edpm_node_hostname: compute-0.redhat.local
edpm_node2_hostname: compute-1.redhat.local
edpm_user: stack
edpm_nodes:
compute-0:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.10
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.10
subnetName: subnet1
- name: External
fixedIP: 10.4.0.10
subnetName: subnet1
compute-1:
hostName: "{{ edpm_node2_hostname }}"
ansible:
ansibleHost: "{{ edpm_node2_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node2_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.11
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.11
subnetName: subnet1
- name: External
fixedIP: 10.4.0.11
subnetName: subnet1
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
["{{ edpm_node2_hostname }}"]="{{ edpm_node2_ip }}"
cell1:
compute-0:
hostName: "{{ edpm_node_hostname }}"
ansible:
ansibleHost: "{{ edpm_node_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.10
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.10
subnetName: subnet1
- name: External
fixedIP: 10.4.0.10
subnetName: subnet1
compute-1:
hostName: "{{ edpm_node2_hostname }}"
ansible:
ansibleHost: "{{ edpm_node2_ip }}"
networks:
- defaultRoute: true
fixedIP: "{{ edpm_node2_ip }}"
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.15.2.11
subnetName: subnet1
- name: tenant
fixedIP: 172.15.0.11
subnetName: subnet1
- name: External
fixedIP: 10.4.0.11
subnetName: subnet1
# The variables inside edpm_network_config_template are evaluated based
# on the OpenstackDataplaneNodeSet inventory. For adding a variable to the invetory,
# please add it to OpenstackDataplaneNodeSet.nodeTemplate.ansibleVars
Expand Down
2 changes: 0 additions & 2 deletions tests/roles/stop_remaining_services/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
edpm_node_hostname: standalone.localdomain
install_yamls_path: /home/zuul/src/github.com/openstack-k8s-operators/install_yamls/
edpm_privatekey_path: "{{ install_yamls_path }}/out/edpm/ansibleee-ssh-key-id_rsa"
edpm_computes: |-
["{{ edpm_node_hostname }}"]="{{ edpm_node_ip }}"
4 changes: 0 additions & 4 deletions tests/roles/stop_remaining_services/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
CONTROLLER2_SSH="{{ controller2_ssh }}"
CONTROLLER3_SSH="{{ controller3_ssh }}"
EDPM_PRIVATEKEY_PATH="{{ edpm_privatekey_path }}"
declare -A computes
computes=(
{{ edpm_computes }}
)
- name: stop pacemaker services
no_log: "{{ use_no_log }}"
Expand Down

0 comments on commit a729baa

Please sign in to comment.