Skip to content

Commit 4da977d

Browse files
committed
Several fixes for byol
1 parent 6125c3a commit 4da977d

File tree

5 files changed

+28
-32
lines changed

5 files changed

+28
-32
lines changed

Diff for: ansible/roles/create-ai-cluster/tasks/static_network_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
item_network_config:
77
network_yaml: "{{ lookup('template', 'nmstate.yml.j2') }}"
88
mac_interface_map: "{{ lookup('template', 'mac_interface_map.json.j2') }}"
9-
when: lab in rh_labs
9+
when: lab in rh_labs or lab == "byol"
1010

1111
- name: Assemble static network config for ibmcloud lab
1212
set_fact:

Diff for: ansible/roles/validate-vars/tasks/main.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
- name: Validate lab
55
fail:
6-
msg: "Invalid lab selected('{{ lab }}') Select from {{ rh_labs }} and {{ cloud_labs }}"
6+
msg: "Invalid lab selected('{{ lab }}') Select from {{ rh_labs }}, {{ cloud_labs }} and 'byol'"
77
when:
88
- lab not in rh_labs
99
- lab not in cloud_labs
10+
- lab != "byol"
1011

1112
- name: Check pull secret var is set
1213
fail:

Diff for: ansible/roles/wait-hosts-discovered/tasks/set_hostname_role.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
hostname: "{{ item }}"
1717
host_role: "{{ hostvars[item]['role'] }}"
1818
when:
19-
- lab in rh_labs
19+
- lab in rh_labs or lab == "byol"
2020
- hostvars[item]['mac_address'] | lower in host_macs
2121
loop: "{{ inventory_nodes }}"
2222

Diff for: ansible/vars/lab.yml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ cloud_labs:
99
rh_labs:
1010
- performancelab
1111
- scalelab
12-
- byol
1312

1413
labs:
1514
performancelab:

Diff for: docs/deploy-mno-byol.md

+24-28
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
# Deploy a Multi Node OpenShift cluster via Jetlag from a non-standard lab, BYOL (Bring Your Own Lab), quickstart
1+
# Deploy a Multi Node OpenShift cluster via Jetlag without create-inventory playbook, BYOL (Bring Your Own Lab), quickstart
22

3-
Assuming that you receive a set of machines to install OCP, this guide walks you through getting a multi node cluster installed on this allocation. For the purposes of the guide, the machines used are Dell r660s and r760s running RHEL 9.2. In a BYOL (or with any non-homogeneous allocation containing machines of different models) due to the non-standard interface names and NIC PCI slots, you must craft Jetlag's inventory file by hand.
4-
5-
In other words, the `create-inventory` playbook is not used with BYOL. You must instead create your own inventory file manually, which means gathering information regarding the machines such as NIC names and MAC addresses. Therefore, thinking about simplifying this step, it is recommended to group machines of same/similar models wisely to be the cluster's control-plane and worker nodes.
3+
In a BYOL you will have to write your own Jetlag's inventory file as the `create-inventory` playbook is not used. You must gather information regarding the machines such as NIC names and MAC addresses and assemble an inventory file. If you have a non-homogenous set of machines, it is recommended to group machines of same/similar models to be the cluster's control-plane and worker nodes.
64

75
The bastion machine needs 2 interfaces:
86
- The interface connected to the network, i.e., with an IP assigned, a L3 network. This interface usually referred to as *lab_network* as it provides the connectivity into the bastion machine.
97
- The control-plane interface, from which the cluster nodes are accessed (this is a L2 network, i.e., it does not have an IP assigned).
108

11-
Sometimes the bastion machine may have firewall rules in place that prevent proper connectivity from the target cluster machines to the assisted-service API hosted on the bastion. Depending on the lab setup, you might need to add rules to allow this traffic, or if the bastion machine is already behind a firewall, the firewall could be disabled. One can, for instance, check for `firewalld` or `iptables`.
9+
Sometimes the bastion machine may have firewall rules in place that prevent proper connectivity from the target cluster machines to the assisted-service API hosted on the bastion. Depending on the lab setup, you might need to add rules to allow this traffic, or if the bastion machine is already behind a firewall, the firewall could be disabled. You should check both `firewalld` and/or `iptables`.
1210

1311
The cluster machines need a minimum of 1 online private interface:
1412
- The control-plane interface, from which other cluster nodes are accessed.
@@ -226,10 +224,10 @@ Set `smcipmitool_url` to the location of the Supermicro SMCIPMITool binary. Sinc
226224

227225
In case of BYOL, the lab itself determines the values of `bastion_lab_interface` and `bastion_controlplane_interface`.
228226

229-
* `bastion_lab_interface` should be the L2 NIC interface
230-
* `bastion_controlplane_interface` should be the L3 network NIC interface
227+
* `bastion_lab_interface` should be the public lab network interface
228+
* `bastion_controlplane_interface` should be the private network inferface
231229

232-
For Dell r660 from this guide, set those vars to the following:
230+
For the hardware in this guide, set those vars to the following (Your hardware will be different, and you must determine those values):
233231

234232
```yaml
235233
bastion_lab_interface: eno8303
@@ -238,11 +236,10 @@ bastion_controlplane_interface: ens1f0
238236
239237
### OCP node vars
240238
241-
The system type determines the value of `controlplane_lab_interface`.
242239
243-
* `controlplane_lab_interface` should be the L2 NIC interface
240+
* `controlplane_lab_interface` should be the public lab interface
244241

245-
For Dell r660 from this guide, set this var to the following:
242+
For the hardware in this guide, set this var to the following (Your hardware will be different, and you must determine the correct interface):
246243

247244
```yaml
248245
controlplane_lab_interface: eno8303
@@ -290,6 +287,10 @@ ocp_version: "latest-4.18"
290287
# SNOs require manual configuration with additional variables.
291288
public_vlan: false
292289

290+
# SNOs only require a single IP address and can be deployed using the lab DHCP interface instead of a private or
291+
# public vlan network. Set to true to have your SNO deployed on the public lab DHCP network.
292+
sno_use_lab_dhcp: false
293+
293294
# Enables FIPs security standard
294295
enable_fips: false
295296

@@ -324,14 +325,9 @@ use_bastion_registry: false
324325
################################################################################
325326
# OCP node vars
326327
################################################################################
327-
# Network configuration for all mno cluster nodes
328+
# Network configuration for all mno/sno cluster nodes
328329
controlplane_lab_interface: eno8303
329330

330-
# Network configuration for public VLAN based sno cluster_type deployment
331-
controlplane_pub_network_cidr:
332-
controlplane_pub_network_gateway:
333-
jumbo_mtu: false
334-
335331
################################################################################
336332
# Extra vars
337333
################################################################################
@@ -364,9 +360,9 @@ bmc_user=root
364360
bmc_password=password
365361
366362
[controlplane]
367-
control-plane-0 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.10.5 vendor=Dell install_disk=/dev/disk/by-path/...
368-
control-plane-1 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.10.6 vendor=Dell install_disk=/dev/disk/by-path/...
369-
control-plane-2 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.10.7 vendor=Dell install_disk=/dev/disk/by-path/...
363+
control-plane-0 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.0.5 vendor=Dell install_disk=/dev/disk/by-path/...
364+
control-plane-1 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.0.6 vendor=Dell install_disk=/dev/disk/by-path/...
365+
control-plane-2 bmc_address=<IP or FQDN> mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.0.7 vendor=Dell install_disk=/dev/disk/by-path/...
370366
371367
[controlplane:vars]
372368
role=master
@@ -375,14 +371,14 @@ bmc_user=root
375371
bmc_password=password
376372
lab_interface=<lab_mac interface name>
377373
network_interface=<anything>
378-
network_prefix=24
379-
gateway=198.18.10.1
380-
dns1=198.18.10.1
374+
network_prefix=16
375+
gateway=198.18.0.1
376+
dns1=198.18.0.1
381377
dns2=<DNS ip_address>
382378
383379
[worker]
384-
worker-0 bmc_address=172.29.170.219 mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.10.8 vendor=Dell install_disk=/dev/disk/by-path/...
385-
worker-1 bmc_address=172.29.170.73 mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.10.9 vendor=Dell install_disk=/dev/disk/by-path/...
380+
worker-0 bmc_address=172.29.170.219 mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.0.8 vendor=Dell install_disk=/dev/disk/by-path/...
381+
worker-1 bmc_address=172.29.170.73 mac_address=<L3 NIC> lab_mac=<L2 NIC> ip=198.18.0.9 vendor=Dell install_disk=/dev/disk/by-path/...
386382
387383
[worker:vars]
388384
role=worker
@@ -391,9 +387,9 @@ bmc_user=root
391387
bmc_password=password
392388
lab_interface=<lab_mac interface name>
393389
network_interface=<anything>
394-
network_prefix=24
395-
gateway=198.18.10.1
396-
dns1=198.18.10.1
390+
network_prefix=16
391+
gateway=198.18.0.1
392+
dns1=198.18.0.1
397393
dns2=<DNS ip_address>
398394
399395
[sno]

0 commit comments

Comments
 (0)