Skip to content

Commit

Permalink
Add final two compute nodes for data plane adoption multinode job
Browse files Browse the repository at this point in the history
This introduces two more compute nodes for the multinode tripleo
source adoption job.

https://issues.redhat.com/browse/OSPRH-5756

Depends-On: openstack-k8s-operators/ci-framework#1802
Depends-On: openstack-k8s-operators/install_yamls#840

Change-Id: Ibeec3fa706900f5cced4cb3abfc89ca77e69c46a
  • Loading branch information
marios committed Jun 4, 2024
1 parent dee9f65 commit 0ea3325
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 37 deletions.
164 changes: 128 additions & 36 deletions playbooks/data_plane_adoption/deploy_tripleo_run_repo_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
rdo_dir: "/home/zuul/src/review.rdoproject.org/rdo-jobs/playbooks/data_plane_adoption"
framework_dir: "/home/zuul/src/github.com/openstack-k8s-operators/ci-framework"
cifmw_datadir: "/home/zuul/ci-framework-data"
edpm_node_ip: 192.168.122.106
edpm_node_ips:
- 192.168.122.106
- 192.168.122.107
- 192.168.122.108
source_mariadb_ip: 172.17.0.103
source_ovndb_ip: 172.17.0.103
tasks:
Expand Down Expand Up @@ -123,23 +126,131 @@
regexp: "'^source_ovndb_ip:'"
value: "source_ovndb_ip: {{ source_ovndb_ip }}"

- name: Place compute IP into vars.yaml for edpm_node_ip
ansible.builtin.lineinfile:
path: "{{ rdo_dir }}/vars.yaml"
regexp: "'^edpm_node_ip:'"
value: "edpm_node_ip: {{ edpm_node_ip }}"

- name: Fetch compute hostname to set edpm_node_hostname var
delegate_to: "overcloud-novacompute-0"
ansible.builtin.slurp:
path: /home/zuul/ansible_hostname
register: compute_hostname
- name: Prep and insert vars for multiple computes
when: not single_compute|default('true')|bool
block:
- name: Fetch compute hostnames to set edpm_node_hostname vars
delegate_to: "overcloud-novacompute-{{ item }}"
ansible.builtin.slurp:
path: /home/zuul/ansible_hostname
register: compute_hostnames
loop:
- 0
- 1
- 2
- name: Set compute hostnames facts to prevent repetition
ansible.builtin.set_fact:
compute0_hostname: "{{ compute_hostnames.results[0]['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"
compute1_hostname: "{{ compute_hostnames.results[1]['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"
compute2_hostname: "{{ compute_hostnames.results[2]['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"

- name: Set EDPM node hostname in vars.yaml
ansible.builtin.lineinfile:
path: "{{ rdo_dir }}/vars.yaml"
regexp: "'^edpm_node_hostname:'"
value: "edpm_node_hostname: {{ compute_hostname['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"
- name: Set edpm_node_ip, _hostname, edpm_nodes, edpm_computes in vars.yaml with compute hostnames
ansible.builtin.blockinfile:
marker_begin: "BEGIN edpm_node_ip hostname vars"
marker_end: "END edpm_node_ip hostname vars"
path: "{{ rdo_dir }}/vars.yaml"
block: |
edpm_node_hostname: {{ compute0_hostname }}
edpm_node_ip: {{ edpm_node_ips[0] }}
edpm_node1_hostname: {{ compute1_hostname }}
edpm_node1_ip: {{ edpm_node_ips[1] }}
edpm_node2_hostname: {{ compute2_hostname }}
edpm_node2_ip: {{ edpm_node_ips[2] }}
edpm_computes: |
["{{ compute0_hostname }}"]="{{ edpm_node_ips[0] }}"
["{{ compute1_hostname }}"]="{{ edpm_node2_ips[1] }}"
["{{ compute2_hostname }}"]="{{ edpm_node2_ips[2] }}"
edpm_nodes:
{{ compute_hostnames.results[0]['content'] | b64decode | trim }}:
hostName: "{{ compute0_hostname }}"
ansible:
ansibleHost: {{ edpm_node_ips[0] }}
networks:
- defaultRoute: true
fixedIP: {{ edpm_node_ips[0] }}
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.17.0.106
subnetName: subnet1
- name: storage
fixedIP: 172.18.0.106
subnetName: subnet1
- name: tenant
fixedIP: 172.19.0.106
subnetName: subnet1
{{ compute_hostnames.results[1]['content'] | b64decode | trim }}:
hostName: "{{ compute1_hostname }}"
ansible:
ansibleHost: {{ edpm_node_ips[1] }}
networks:
- defaultRoute: true
fixedIP: {{ edpm_node_ips[1] }}
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.17.0.107
subnetName: subnet1
- name: storage
fixedIP: 172.18.0.107
subnetName: subnet1
- name: tenant
fixedIP: 172.19.0.107
subnetName: subnet1
{{ compute_hostnames.results[2]['content'] | b64decode | trim }}:
hostName: "{{ compute2_hostname }}"
ansible:
ansibleHost: {{ edpm_node_ips[2] }}
networks:
- defaultRoute: true
fixedIP: {{ edpm_node_ips[2] }}
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.17.0.108
subnetName: subnet1
- name: storage
fixedIP: 172.18.0.108
subnetName: subnet1
- name: tenant
fixedIP: 172.19.0.108
subnetName: subnet1
- name: Prep and insert vars for single compute
when: single_compute|default('true')|bool
block:
- name: Fetch compute hostname to set edpm_node_hostname var
delegate_to: "overcloud-novacompute-0"
ansible.builtin.slurp:
path: /home/zuul/ansible_hostname
register: compute_hostname
- name: Set edpm_node_ip, _hostname, edpm_nodes, edpm_computes in vars.yaml with compute hostname
ansible.builtin.blockinfile:
marker_begin: "BEGIN edpm_node_ip hostname vars"
marker_end: "END edpm_node_ip hostname vars"
path: "{{ rdo_dir }}/vars.yaml"
block: |
edpm_node_ip: {{ edpm_node_ips[0] }}
edpm_node_hostname: {{ compute_hostname['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}
edpm_nodes:
{{ compute_hostname['content'] | b64decode | trim }}:
hostName: "{{ compute_hostname['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"
ansible:
ansibleHost: {{ edpm_node_ips[0] }}
networks:
- defaultRoute: true
fixedIP: {{ edpm_node_ips[0] }}
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.17.0.106
subnetName: subnet1
- name: storage
fixedIP: 172.18.0.106
subnetName: subnet1
- name: tenant
fixedIP: 172.19.0.106
subnetName: subnet1
- name: Set TLS Everywhere in vars.yaml
ansible.builtin.lineinfile:
Expand All @@ -161,25 +272,6 @@
edpm_user: zuul
standalone_ip: "{{ standalone_ip | default('192.168.122.100') }}"
neutron_physical_bridge_name: br-ex
edpm_nodes:
{{ compute_hostname['content'] | b64decode | trim }}:
hostName: "{{ compute_hostname['content'] | b64decode | trim }}.{{ cloud_domain | default('localdomain') }}"
ansible:
ansibleHost: {{ edpm_node_ip }}
networks:
- defaultRoute: true
fixedIP: {{ edpm_node_ip }}
name: ctlplane
subnetName: subnet1
- name: internalapi
fixedIP: 172.17.0.106
subnetName: subnet1
- name: storage
fixedIP: 172.18.0.106
subnetName: subnet1
- name: tenant
fixedIP: 172.19.0.106
subnetName: subnet1
- name: Read the ssh key downloaded from undercloud
ansible.builtin.slurp:
Expand Down
2 changes: 2 additions & 0 deletions playbooks/data_plane_adoption/files/hostnamemap.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ parameter_defaults:
overcloud-controller-1: "{{ controller_1_hostname }}"
overcloud-controller-2: "{{ controller_2_hostname }}"
overcloud-novacompute-0: "{{ compute_0_hostname }}"
overcloud-novacompute-1: "{{ compute_1_hostname }}"
overcloud-novacompute-2: "{{ compute_2_hostname }}"
6 changes: 5 additions & 1 deletion playbooks/data_plane_adoption/setup_tripleo_hostnamemap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
vars:
rdo_dir: "review.rdoproject.org/rdo-jobs/playbooks/data_plane_adoption"
tasks:
- name: Fetch ansible hostnames from the controllers
- name: Fetch ansible hostnames from the tripleo nodes
delegate_to: "overcloud-{{ item }}"
ansible.builtin.slurp:
path: /home/zuul/ansible_hostname
Expand All @@ -12,6 +12,8 @@
- controller-1
- controller-2
- novacompute-0
- novacompute-1
- novacompute-2

- name: Template out hostnamemap with tripleo hostnames
ansible.builtin.template:
Expand All @@ -22,3 +24,5 @@
controller_1_hostname: "{{ tripleo_hostnames.results[1]['content'] | b64decode | trim }}"
controller_2_hostname: "{{ tripleo_hostnames.results[2]['content'] | b64decode | trim }}"
compute_0_hostname: "{{ tripleo_hostnames.results[3]['content'] | b64decode | trim }}"
compute_1_hostname: "{{ tripleo_hostnames.results[4]['content'] | b64decode | trim }}"
compute_2_hostname: "{{ tripleo_hostnames.results[5]['content'] | b64decode | trim }}"
6 changes: 6 additions & 0 deletions zuul.d/_data_plane_adoption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
standalone_gateway: 192.168.122.10
standalone_private_key: /home/zuul/.ssh/id_rsa
os_net_config_file: "overcloud_net_config.j2"
single_compute: false
host-vars:
undercloud:
address_suffix: 100
Expand All @@ -89,6 +90,11 @@
address_suffix: 105
overcloud-novacompute-0:
address_suffix: 106
overcloud-novacompute-1:
address_suffix: 107
overcloud-novacompute-2:
address_suffix: 108


- job:
name: data-plane-adoption-osp17-multinode-to-extracted-crc-with-ceph
Expand Down

0 comments on commit 0ea3325

Please sign in to comment.