Skip to content

Commit

Permalink
Multi-cell adoption support
Browse files Browse the repository at this point in the history
Adapt vars for multi-cell layout.
Remove no longer used edpm_computes.

Assume a single default cell exists only (which becomes cell1
after adoption).

Change data formats to become compliant with multi-cell topology.

Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Dec 17, 2024
1 parent 93de89d commit 297ba8e
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
#jinja2: trim_blocks:True, lstrip_blocks:True
source_mariadb_ip: {{ _controller_1_internalapi_ip }}
source_mariadb_ip:
default:
{{ _controller_1_internalapi_ip }}
source_ovndb_ip: {{ _controller_1_internalapi_ip }}
edpm_node_hostname: {{ _compute_1_name }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}
edpm_node_ip: {{ _compute_1_ip }}
edpm_computes: |
{% for compute in _vm_groups['osp-computes'] %}
{% set node_nets = cifmw_networking_env_definition.instances[compute] %}
["{{ compute }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}"]="{{ node_nets.networks.ctlplane.ip_v4 }}"
{% endfor %}
edpm_networkers: |
{% for networker in _vm_groups['osp-networkers'] | default([]) %}
{% set node_nets = cifmw_networking_env_definition.instances[networker] %}
["{{ networker }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}"]="{{ node_nets.networks.ctlplane.ip_v4 }}"
{% endfor %}


source_galera_members: |
{% for controller in _vm_groups['osp-controllers'] %}
{% set node_nets = cifmw_networking_env_definition.instances[controller] %}
["{{ controller }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}"]="{{ node_nets.networks.internalapi.ip_v4 }}"
{% endfor %}
source_galera_members:
default:
{% for controller in _vm_groups['osp-controllers'] %}
{% set node_nets = cifmw_networking_env_definition.instances[controller] %}
- name: "{{ controller }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}"
ip: "{{ node_nets.networks.internalapi.ip_v4 }}"
{% endfor %}

edpm_nodes:
{% for compute in _vm_groups['osp-computes'] %}
{% set node_nets = cifmw_networking_env_definition.instances[compute] %}
{{ compute }}:
hostName: {{ compute }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% endfor %}
{% endfor %}
{% for networker in _vm_groups['osp-networkers'] | default([]) %}
{% set node_nets = cifmw_networking_env_definition.instances[networker] %}
{{ networker }}:
hostName: {{ networker }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% endfor %}
{% endfor %}
cell1:
{% for compute in _vm_groups['osp-computes'] %}
{% set node_nets = cifmw_networking_env_definition.instances[compute] %}
{{ compute }}:
hostName: {{ compute }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% endfor %}
{% endfor %}
{% for networker in _vm_groups['osp-networkers'] | default([]) %}
{% set node_nets = cifmw_networking_env_definition.instances[networker] %}
{{ networker }}:
hostName: {{ networker }}.{{ cifmw_adoption_osp_deploy_scenario.cloud_domain }}
ansible:
ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }}
networks:
{% for net in node_nets.networks.keys() %}
- defaultRoute: true
fixedIP: {{ node_nets.networks[net].ip_v4 }}
name: {{ net }}
subnetName: subnet1
{% endfor %}
{% endfor %}


upstream_dns: {{ cifmw_networking_env_definition.networks.ctlplane.dns_v4 | first }}
Expand Down

0 comments on commit 297ba8e

Please sign in to comment.