Skip to content

Commit 2d1f22f

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 815fcbf commit 2d1f22f

File tree

3 files changed

+258
-10
lines changed

3 files changed

+258
-10
lines changed

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
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
# IPv6 variant of va-nfv-ovs-dpdk-sriov
3+
# This reproducer configures NFV OVS-DPDK SR-IOV with 1 nodeset using IPv6 as primary IP
4+
5+
cifmw_architecture_scenario: "ovs-dpdk-sriov-ipv6"
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 differnt 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)