Skip to content

Commit b32ae09

Browse files
committed
[NFV] Added IPV6 scenarios for NFV
Added IPV6 scenarios for IPV6: * OVS DPDK SRIOV with 1 nodeset * OVS DPDK SRIOV with 2 nodesets Fixed some issues found that corrupted yaml files when containing IPV6 addresses
1 parent a63bdc6 commit b32ae09

File tree

7 files changed

+420
-10
lines changed

7 files changed

+420
-10
lines changed

roles/ci_gen_kustomize_values/templates/common/network-values/values.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ data:
1919
node_{{ ns.ocp_index }}:
2020
{% set ns.ocp_index = ns.ocp_index+1 %}
2121
name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}
22+
node_name: {{ cifmw_networking_env_definition.instances[host]['hostname'] }}.ocp.openstack.lab
2223
{% for network in cifmw_networking_env_definition.instances[host]['networks'].values() %}
2324
{% set ns.interfaces = ns.interfaces |
2425
combine({network.network_name: (network.parent_interface |
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# source: ovs-dpdk-sriov-ipv6-2nodesets/edpm-nodeset-values/values.yaml.j2
3+
{% set instances_names = [] %}
4+
{% set _original_nodeset = (original_content.data | default({})).nodeset | default({}) %}
5+
{% set _original_nodes = _original_nodeset.nodes | default({}) %}
6+
{% set _original_services = _original_nodeset['services'] | default([]) %}
7+
{% if cifmw_baremetal_hosts | default([]) | length > 0 %}
8+
{% for _inst in cifmw_baremetal_hosts.keys() %}
9+
{% if (('label' in cifmw_baremetal_hosts[_inst]) and
10+
(cifmw_baremetal_hosts[_inst]['label'] == 'openstack')) %}
11+
{% set _ = instances_names.append(_inst) %}
12+
{% endif %}
13+
{% endfor %}
14+
{% else %}
15+
# Needed for verification gate
16+
{% set _vm_type = (_original_nodes.keys() | first).split('-')[1] %}
17+
{% for _inst in cifmw_networking_env_definition.instances.keys() %}
18+
{% if _inst.startswith(_vm_type) %}
19+
{% set _ = instances_names.append(_inst) %}
20+
{% endif %}
21+
{% endfor %}
22+
{% endif %}
23+
data:
24+
ssh_keys:
25+
authorized: {{ cifmw_ci_gen_kustomize_values_ssh_authorizedkeys | b64encode }}
26+
private: {{ cifmw_ci_gen_kustomize_values_ssh_private_key | b64encode }}
27+
public: {{ cifmw_ci_gen_kustomize_values_ssh_public_key | b64encode }}
28+
nova:
29+
migration:
30+
ssh_keys:
31+
private: {{ cifmw_ci_gen_kustomize_values_migration_priv_key | b64encode }}
32+
public: {{ cifmw_ci_gen_kustomize_values_migration_pub_key | b64encode }}
33+
nodeset:
34+
ansible:
35+
ansibleVars:
36+
edpm_fips_mode: "{{ 'enabled' if cifmw_fips_enabled|default(false)|bool else 'check' }}"
37+
timesync_ntp_servers:
38+
- hostname: "{{ cifmw_ci_gen_kustomize_values_ntp_srv | default('pool.ntp.org') }}"
39+
{% if cifmw_ci_gen_kustomize_values_sshd_ranges | default([]) | length > 0 %}
40+
edpm_sshd_allowed_ranges:
41+
{% for range in cifmw_ci_gen_kustomize_values_sshd_ranges %}
42+
- "{{ range }}"
43+
{% endfor %}
44+
{% endif %}
45+
nodes:
46+
{% for instance in instances_names %}
47+
edpm-{{ instance }}:
48+
hostName: {{ instance }}
49+
{% endfor %}
50+
51+
{% if ('repo-setup' not in (_original_nodeset['services'] | default([]))) and
52+
('repo-setup' in ci_gen_kustomize_edpm_nodeset_predeployed_services) %}
53+
services:
54+
- "repo-setup"
55+
{% for svc in _original_services %}
56+
- "{{ svc }}"
57+
{% endfor %}
58+
{% endif %}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# source: ovs-dpdk-sriov-ipv6-2nodesets/edpm-nodeset2-values/values.yaml.j2
3+
{% set instances_names = [] %}
4+
{% set _original_nodeset = (original_content.data | default({})).nodeset | default({}) %}
5+
{% set _original_nodes = _original_nodeset.nodes | default({}) %}
6+
{% set _original_services = _original_nodeset['services'] | default([]) %}
7+
{% if cifmw_baremetal_hosts | default([]) | length > 0 %}
8+
{% for _inst in cifmw_baremetal_hosts.keys() %}
9+
{% if (('label' in cifmw_baremetal_hosts[_inst]) and
10+
(cifmw_baremetal_hosts[_inst]['label'] == 'openstack-2')) %}
11+
{% set _ = instances_names.append(_inst) %}
12+
{% endif %}
13+
{% endfor %}
14+
{% else %}
15+
# Needed for verification gate
16+
{% set _vm_type = (_original_nodes.keys() | first).split('-')[1] %}
17+
{% for _inst in cifmw_networking_env_definition.instances.keys() %}
18+
{% if _inst.startswith(_vm_type) %}
19+
{% set _ = instances_names.append(_inst) %}
20+
{% endif %}
21+
{% endfor %}
22+
{% endif %}
23+
data:
24+
ssh_keys:
25+
authorized: {{ cifmw_ci_gen_kustomize_values_ssh_authorizedkeys | b64encode }}
26+
private: {{ cifmw_ci_gen_kustomize_values_ssh_private_key | b64encode }}
27+
public: {{ cifmw_ci_gen_kustomize_values_ssh_public_key | b64encode }}
28+
nova:
29+
migration:
30+
ssh_keys:
31+
private: {{ cifmw_ci_gen_kustomize_values_migration_priv_key | b64encode }}
32+
public: {{ cifmw_ci_gen_kustomize_values_migration_pub_key | b64encode }}
33+
nodeset:
34+
ansible:
35+
ansibleVars:
36+
edpm_fips_mode: "{{ 'enabled' if cifmw_fips_enabled|default(false)|bool else 'check' }}"
37+
timesync_ntp_servers:
38+
- hostname: "{{ cifmw_ci_gen_kustomize_values_ntp_srv | default('pool.ntp.org') }}"
39+
{% if cifmw_ci_gen_kustomize_values_sshd_ranges | default([]) | length > 0 %}
40+
edpm_sshd_allowed_ranges:
41+
{% for range in cifmw_ci_gen_kustomize_values_sshd_ranges %}
42+
- "{{ range }}"
43+
{% endfor %}
44+
{% endif %}
45+
nodes:
46+
{% for instance in instances_names %}
47+
edpm-{{ instance }}:
48+
hostName: {{ instance }}
49+
{% endfor %}
50+
51+
{% if ('repo-setup' not in (_original_nodeset['services'] | default([]))) and
52+
('repo-setup' in ci_gen_kustomize_edpm_nodeset_predeployed_services) %}
53+
services:
54+
- "repo-setup"
55+
{% for svc in _original_services %}
56+
- "{{ svc }}"
57+
{% endfor %}
58+
{% endif %}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
# source: ovs-dpdk-sriov-ipv6/edpm-nodeset-values/values.yaml.j2
3+
{% set instances_names = [] %}
4+
{% set _original_nodeset = (original_content.data | default({})).nodeset | default({}) %}
5+
{% set _original_nodes = _original_nodeset.nodes | default({}) %}
6+
{% set _original_services = _original_nodeset['services'] | default([]) %}
7+
{% for _inst in cifmw_baremetal_hosts.keys() %}
8+
{% set _ = instances_names.append(_inst) %}
9+
{% endfor %}
10+
data:
11+
ssh_keys:
12+
authorized: {{ cifmw_ci_gen_kustomize_values_ssh_authorizedkeys | b64encode }}
13+
private: {{ cifmw_ci_gen_kustomize_values_ssh_private_key | b64encode }}
14+
public: {{ cifmw_ci_gen_kustomize_values_ssh_public_key | b64encode }}
15+
nova:
16+
migration:
17+
ssh_keys:
18+
private: {{ cifmw_ci_gen_kustomize_values_migration_priv_key | b64encode }}
19+
public: {{ cifmw_ci_gen_kustomize_values_migration_pub_key | b64encode }}
20+
nodeset:
21+
ansible:
22+
ansibleVars:
23+
edpm_fips_mode: "{{ 'enabled' if cifmw_fips_enabled|default(false)|bool else 'check' }}"
24+
timesync_ntp_servers:
25+
- hostname: "{{ cifmw_ci_gen_kustomize_values_ntp_srv | default('pool.ntp.org') }}"
26+
{% if cifmw_ci_gen_kustomize_values_sshd_ranges | default([]) | length > 0 %}
27+
edpm_sshd_allowed_ranges:
28+
{% for range in cifmw_ci_gen_kustomize_values_sshd_ranges %}
29+
- "{{ range }}"
30+
{% endfor %}
31+
{% endif %}
32+
nodes:
33+
{% for instance in instances_names %}
34+
edpm-{{ instance }}:
35+
hostName: {{ instance }}
36+
{% endfor %}
37+
38+
{% if ('repo-setup' not in (_original_nodeset['services'] | default([]))) and
39+
('repo-setup' in ci_gen_kustomize_edpm_nodeset_predeployed_services) %}
40+
services:
41+
- "repo-setup"
42+
{% for svc in _original_services %}
43+
- "{{ svc }}"
44+
{% endfor %}
45+
{% endif %}

roles/libvirt_manager/tasks/generate_networking_data.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@
182182
networks:
183183
{{ _lnet_data.name | replace('cifmw_', '') }}:
184184
{% if _lnet_data.ranges[0].start_v4 is defined and _lnet_data.ranges[0].start_v4 %}
185-
{% set net_4 = _lnet_data.ranges[0].start_v4 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v4) %}
186-
network-v4: {{ net_4}}
185+
{%- set net_4 = _lnet_data.ranges[0].start_v4 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v4) %}
186+
network-v4: '{{ net_4 }}'
187187
{% endif %}
188188
{% if _lnet_data.ranges[0].start_v6 is defined and _lnet_data.ranges[0].start_v6 %}
189-
{% set net_6 = _lnet_data.ranges[0].start_v6 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v6) %}
190-
network-v6: {{ net_6 }}
189+
{%- set net_6 = _lnet_data.ranges[0].start_v6 | ansible.utils.ipsubnet(_lnet_data.ranges[0].prefix_length_v6) %}
190+
network-v6: '{{ net_6 }}'
191191
{% endif %}
192192
group-templates:
193193
{% for group in _cifmw_libvirt_manager_layout.vms.keys() if group != 'controller' and
@@ -202,12 +202,12 @@
202202
{% if cifmw_networking_definition['group-templates'][_gr ~ 's']['network-template'] is undefined %}
203203
{% if net_4 is defined %}
204204
range-v4:
205-
start: {{ net_4 | ansible.utils.nthhost(ns.ip_start | int ) }}
205+
start: '{{ net_4 | ansible.utils.nthhost(ns.ip_start | int ) }}'
206206
length: {{ _cifmw_libvirt_manager_layout.vms[group].amount | default(1) }}
207207
{% endif %}
208208
{% if net_6 is defined %}
209209
range-v6:
210-
start: {{ net_6 | ansible.utils.nthhost(ns.ip_start | int) }}
210+
start: '{{ net_6 | ansible.utils.nthhost(ns.ip_start | int) }}'
211211
length: {{ _cifmw_libvirt_manager_layout.vms[group].amount | default(1) }}
212212
{% endif %}
213213
{% set ns.ip_start = ns.ip_start|int + (_cifmw_libvirt_manager_layout.vms[group].amount | default(1) | int ) + 1 %}
@@ -220,12 +220,12 @@
220220
{{ cifmw_libvirt_manager_pub_net }}:
221221
{% if net_4 is defined and cifmw_networking_definition['group-templates']['baremetals']['network-template'] is undefined %}
222222
range-v4:
223-
start: {{ net_4 | ansible.utils.nthhost(ns.ip_start) }}
223+
start: '{{ net_4 | ansible.utils.nthhost(ns.ip_start) }}'
224224
length: {{ cifmw_baremetal_hosts | length }}
225225
{% endif %}
226226
{% if net_6 is defined and cifmw_networking_definition['group-templates']['baremetals']['network-template'] is undefined %}
227227
range-v6:
228-
start: {{ net_6 | ansible.utils.nthhost(ns.ip_start) }}
228+
start: '{{ net_6 | ansible.utils.nthhost(ns.ip_start) }}'
229229
length: {{ cifmw_baremetal_hosts | length }}
230230
{% endif %}
231231
{% endif %}
@@ -235,10 +235,10 @@
235235
networks:
236236
{{ _lnet_data.name | replace('cifmw_', '') }}:
237237
{% if net_4 is defined %}
238-
ip-v4: "{{ net_4 | ansible.utils.nthhost(9) }}"
238+
ip-v4: '{{ net_4 | ansible.utils.nthhost(9) }}'
239239
{% endif %}
240240
{% if net_6 is defined %}
241-
ip-v6: "{{ net_6 | ansible.utils.nthhost(9) }}"
241+
ip-v6: '{{ net_6 | ansible.utils.nthhost(9) }}'
242242
{% endif %}
243243
{% endif %}
244244
block:
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
# IPv6 variant of dt-nfv-ovs-dpdk-sriov-2nodesets
3+
# This reproducer configures NFV OVS-DPDK SR-IOV with 2 different nodesets using IPv6 as primary IP
4+
5+
cifmw_architecture_scenario: "ovs-dpdk-sriov-ipv6-2nodesets"
6+
7+
# Automation section. Most of those parameters will be passed to the
8+
# controller-0 as-is and be consumed by the `deploy-va.sh` script.
9+
# Please note, all paths are on the controller-0, meaning managed by the
10+
# Framework. Please do not edit them!
11+
_arch_repo: "{{ cifmw_architecture_repo }}"
12+
13+
# Enable IPv6 as primary IP version
14+
cifmw_ci_gen_kustomize_values_primary_ip_version: 6
15+
16+
# HERE if you want to override kustomization, you can uncomment this parameter
17+
# and push the data structure you want to apply.
18+
# cifmw_architecture_user_kustomize:
19+
# stage_0:
20+
# 'network-values':
21+
# data:
22+
# starwars: Obiwan
23+
24+
# HERE, if you want to stop the deployment loop at any stage, you can uncomment
25+
# the following parameter and update the value to match the stage you want to
26+
# reach. Known stages are:
27+
# pre_kustomize_stage_INDEX
28+
# pre_apply_stage_INDEX
29+
# post_apply_stage_INDEX
30+
#
31+
# cifmw_deploy_architecture_stopper:
32+
33+
cifmw_libvirt_manager_net_prefix_add: false
34+
cifmw_libvirt_manager_fixed_networks:
35+
- ocpbm
36+
- ocppr
37+
- osp_external
38+
- osp_trunk
39+
40+
cifmw_libvirt_manager_configuration:
41+
networks:
42+
ocpbm: |
43+
<network>
44+
<name>ocpbm</name>
45+
<forward mode='bridge' />
46+
<bridge name='ocpbm' />
47+
</network>
48+
ocppr: |
49+
<network>
50+
<name>ocppr</name>
51+
<forward mode='bridge' />
52+
<bridge name='ocppr' />
53+
</network>
54+
osp_external: |
55+
<network>
56+
<name>osp_external</name>
57+
<forward mode='bridge' />
58+
<bridge name='osp_external' />
59+
</network>
60+
osp_trunk: |
61+
<network>
62+
<name>osp_trunk</name>
63+
<forward mode='bridge' />
64+
<bridge name='osp_trunk' />
65+
</network>
66+
vms:
67+
controller:
68+
uefi: "{{ cifmw_use_uefi }}"
69+
root_part_id: "{{ cifmw_root_partition_id }}"
70+
image_url: "{{ cifmw_discovered_image_url }}"
71+
sha256_image_name: "{{ cifmw_discovered_hash }}"
72+
image_local_dir: "{{ cifmw_basedir }}/images/"
73+
disk_file_name: "base-os.qcow2"
74+
disksize: 50
75+
memory: 8
76+
cpus: 4
77+
nets:
78+
- ocpbm
79+
- osp_trunk
80+
ocp:
81+
amount: 3
82+
uefi: true
83+
root_part_id: 4
84+
admin_user: core
85+
image_local_dir: "{{ cifmw_basedir }}/images/"
86+
disk_file_name: "ocp_master"
87+
disksize: "100"
88+
extra_disks_num: 3
89+
extra_disks_size: "50G"
90+
cpus: 10
91+
memory: 32
92+
nets:
93+
- ocppr
94+
- ocpbm
95+
- osp_trunk
96+
- osp_external
97+
98+
# Note: with that extra_network_names "osp_trunk", we instruct
99+
# devscripts role to create a new network, and associate it to
100+
# the OCP nodes. This one is a "private network", and will hold
101+
# the VLANs used for network isolation.
102+
103+
# Please create a custom env file to provide:
104+
# cifmw_devscripts_ci_token:
105+
# cifmw_devscripts_pull_secret:
106+
107+
# Baremetal host configuration
108+
cifmw_config_bmh: true
109+
110+
# BMH are deployed in a different NS than the secret OSP BMO
111+
# references in each BMH. Metal3 requires the referenced
112+
# secrets to be in the same NS or be allowed to access them
113+
cifmw_devscripts_config_overrides_patch_bmo_watch_all_namespaces:
114+
bmo_watch_all_namespaces: true
115+
116+
# Use EDPM image for computes
117+
cifmw_update_containers_edpm_image_url: "{{ cifmw_update_containers_registry }}/{{ cifmw_update_containers_org }}/edpm-hardened-uefi:{{ cifmw_update_containers_tag }}"
118+
119+
# Set Logical Volume Manager Storage by default for local storage
120+
cifmw_use_lvms: true
121+
cifmw_lvms_disk_list:
122+
- /dev/vda
123+
- /dev/vdb
124+
- /dev/vdc

0 commit comments

Comments
 (0)