Skip to content

Commit 843c6f0

Browse files
Miguel Angel Nieto Jimenezopenshift-merge-bot[bot]
authored andcommitted
Add nodeset2 for scenarios using 2 nodesets
In NFV, we have some compute nodes belonging to the same deployment that are different and we need 2 nodesets to be able to deploy
1 parent a3d4e43 commit 843c6f0

File tree

5 files changed

+236
-1
lines changed

5 files changed

+236
-1
lines changed

docs/source/baremetal/01_baremetal_hosts_data.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ cifmw_baremetal_hosts:
5353
nmstate:
5454
# interfaces: # Sample nmstate state snippet
5555
# - name: enp6s0f0.161
56+
# Optional: (string) app label
57+
label: openstack
5658

5759
compute-1:
5860
# Another BM host
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# source: ovs-dpdk-sriov-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-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 %}

roles/deploy_bmh/template/bmh.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ metadata:
99
inspect.metal3.io: "disabled"
1010
{% endif %}
1111
labels:
12-
app: openstack
12+
app: {{ node_data['label'] | default("openstack") }}
1313
workload: {{ node_name.split('-')[0] }}
1414
spec:
1515
bmc:
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
---
2+
cifmw_architecture_scenario: "ovs-dpdk-sriov-2nodesets"
3+
4+
# Automation section. Most of those parameters will be passed to the
5+
# controller-0 as-is and be consumed by the `deploy-va.sh` script.
6+
# Please note, all paths are on the controller-0, meaning managed by the
7+
# Framework. Please do not edit them!
8+
_arch_repo: "{{ cifmw_architecture_repo | default('/home/zuul/src/github.com/openstack-k8s-operators/architecture') }}"
9+
10+
# HERE if you want to override kustomization, you can uncomment this parameter
11+
# and push the data structure you want to apply.
12+
# cifmw_architecture_user_kustomize:
13+
# stage_0:
14+
# 'network-values':
15+
# data:
16+
# starwars: Obiwan
17+
18+
# HERE, if you want to stop the deployment loop at any stage, you can uncomment
19+
# the following parameter and update the value to match the stage you want to
20+
# reach. Known stages are:
21+
# pre_kustomize_stage_INDEX
22+
# pre_apply_stage_INDEX
23+
# post_apply_stage_INDEX
24+
#
25+
# cifmw_deploy_architecture_stopper:
26+
27+
cifmw_libvirt_manager_net_prefix_add: false
28+
cifmw_libvirt_manager_fixed_networks:
29+
- ocpbm
30+
- ocppr
31+
- osp_external
32+
- osp_trunk
33+
34+
cifmw_libvirt_manager_configuration:
35+
networks:
36+
ocpbm: |
37+
<network>
38+
<name>ocpbm</name>
39+
<forward mode='bridge' />
40+
<bridge name='ocpbm' />
41+
</network>
42+
ocppr: |
43+
<network>
44+
<name>ocppr</name>
45+
<forward mode='bridge' />
46+
<bridge name='ocppr' />
47+
</network>
48+
osp_external: |
49+
<network>
50+
<name>osp_external</name>
51+
<forward mode='bridge' />
52+
<bridge name='osp_external' />
53+
</network>
54+
osp_trunk: |
55+
<network>
56+
<name>osp_trunk</name>
57+
<forward mode='bridge' />
58+
<bridge name='osp_trunk' />
59+
</network>
60+
vms:
61+
controller:
62+
uefi: "{{ cifmw_use_uefi }}"
63+
root_part_id: "{{ cifmw_root_partition_id }}"
64+
image_url: "{{ cifmw_discovered_image_url }}"
65+
sha256_image_name: "{{ cifmw_discovered_hash }}"
66+
image_local_dir: "{{ cifmw_basedir }}/images/"
67+
disk_file_name: "base-os.qcow2"
68+
disksize: 50
69+
memory: 8
70+
cpus: 4
71+
nets:
72+
- ocpbm
73+
- osp_trunk
74+
ocp:
75+
amount: 3
76+
uefi: true
77+
root_part_id: 4
78+
admin_user: core
79+
image_local_dir: "{{ cifmw_basedir }}/images/"
80+
disk_file_name: "ocp_master"
81+
disksize: "100"
82+
extra_disks_num: 3
83+
extra_disks_size: "50G"
84+
cpus: 10
85+
memory: 32
86+
nets:
87+
- ocppr
88+
- ocpbm
89+
- osp_trunk
90+
- osp_external
91+
92+
# Note: with that extra_network_names "osp_trunk", we instruct
93+
# devscripts role to create a new network, and associate it to
94+
# the OCP nodes. This one is a "private network", and will hold
95+
# the VLANs used for network isolation.
96+
97+
# Please create a custom env file to provide:
98+
# cifmw_devscripts_ci_token:
99+
# cifmw_devscripts_pull_secret:
100+
101+
# Baremetal host configuration
102+
cifmw_config_bmh: true
103+
104+
# BMH are deployed in a differnt NS than the secret OSP BMO
105+
# references in each BMH. Metal3 requires the referenced
106+
# secrets to be in the same NS or be allowed to access them
107+
cifmw_openshift_setup_metal3_watch_all_ns: true
108+
109+
# Use EDPM image for computes
110+
cifmw_update_containers_edpm_image_url: "{{ cifmw_update_containers_registry }}/{{ cifmw_update_containers_org }}/edpm-hardened-uefi:{{ cifmw_update_containers_tag }}"
111+
112+
# Set Logical Volume Manager Storage by default for local storage
113+
cifmw_use_lvms: true
114+
cifmw_lvms_disk_list:
115+
- /dev/vda
116+
- /dev/vdb
117+
- /dev/vdc

0 commit comments

Comments
 (0)