Step 3: Set Variables (host_vars)#
- Similar to the group_vars file, the host_vars files for each LPAR (KVM host) must be filled in.
- For each KVM host to be acted upon with Ansible, you must have a corresponding host_vars file named
<kvm-hostname>.yaml(i.e. ocpz1.yaml, ocpz2.yaml, ocpz3.yaml), so you must copy and rename the templates found in the host_vars folder accordingly.
- The variables marked with an
Xare required to be filled in. Many values are pre-filled or are optional.
- Optional values are commented out; in order to use them, remove the
#and fill them in.
- Many of the variables in these host_vars files are only required if you are NOT using pre-existing LPARs with RHEL installed. See the
Important Notebelow this first section for more details.
- This is the most important step in the process. Take the time to make sure everything here is correct.
- Note on YAML syntax: Only the lowest value in each hierarchicy needs to be filled in. For example, at the top of the variables file networking does not need to be filled in, but the hostname does. There are X's where input is required to help you with this.
- Scroll the table to the right to see examples for each variable.
1 - KVM Host#
|networking.hostname||The hostname of the LPAR with RHEL installed natively (the KVM host).||kvm-host-01|
|networking.ip||The IPv4 address of the LPAR with RHEL installed natively (the KVM host).||192.168.10.2|
|networking.subnetmask||The subnet that the LPAR resides in within your network.||255.255.255.0|
|networking.gateway||The IPv4 address of the gateway to the network where the KVM host resides.||192.168.10.0|
|networking.nameserver1||The IPv4 address from which the KVM host gets its hostname resolved.||192.168.10.200|
|networking.nameserver2||(Optional) A second IPv4 address from which the KVM host can get its hostname
resolved. Used for high availability.
|networking.device1||The network interface card from Linux's perspective. Usually enc and then a number that comes
from the dev_num of the network adapter.
|networking.device2||(Optional) Another Linux network interface card. Usually enc and then a number that comes
from the dev_num of the second network adapter.
- You can skip the rest of the variables on this page IF you are using existing LPAR(s) that has RHEL already installed.
- Since this is how most production deployments on-prem are done on IBM zSystems, these variables have been marked as optional.
- With pre-existing LPARs with RHEL installed, you can also skip 1_create_lpar.yaml and 2_create_kvm_host.yaml playbooks. Make sure to still do 0_setup.yaml first though, then skip to 3_setup_kvm_host.yaml
2 - (Optional) CPC & HMC#
|cpc_name||The name of the IBM zSystems / LinuxONE mainframe that you are creating a Red Hat OpenShift Container
Platform cluster on. Can be found under the "Systems Management" tab of the Hardware Management
|hmc.host||The IPv4 address of the HMC you will be connecting to in order to create a Logical Partition (LPAR)
on which will act as the Kernel-based Virtual Machine (KVM) host aftering installing and setting up
Red Hat Enterprise Linux (RHEL).
|hmc.user||The username that the HMC API call will use to connect to the HMC. Must have access to create
LPARs, attach storage groups and networking cards.
|hmc.pass||The password that the HMC API call will use to connect to the HMC. Must have access to create
LPARs, attach storage groups and networking cards.
3 - (Optional) LPAR#
|lpar.name||The name of the Logical Partition (LPAR) that you would like to create/target for the creation of
your cluster. This LPAR will act as the KVM host, with RHEL installed natively.
|lpar.description||A short description of what this LPAR will be used for, will only be displayed in the HMC next to
the LPAR name for identification purposes.
|KVM host LPAR for RHOCP cluster.|
|lpar.access.user||The username that will be created in RHEL when it is installed on the LPAR (the KVM host).||kvm-admin|
|lpar.access.pass||The password for the user that will be created in RHEL when it is installed on the LPAR (the KVM host).||ch4ngeMe!|
|lpar.root_pass||The root password for RHEL installed on the LPAR (the KVM host).||$ecureP4ass!|
4 - (Optional) IFL & Memory#
|lpar.ifl.count||Number of Integrated Facilities for Linux (IFL) processors will be assigned to this LPAR.
6 or more recommended.
|lpar.ifl.initial memory||Initial memory allocation for LPAR to have at start-up (in megabytes).||55000|
|lpar.ifl.max_memory||The most amount of memory this LPAR can be using at any one time (in megabytes).||99000|
|lpar.ifl.initial_weight||For LPAR load balancing purposes, the processing weight this LPAR will have at start-up (1-999).||100|
|lpar.ifl.min_weight||For LPAR load balancing purposes, the minimum weight that this LPAR can have at any one time (1-999).||50|
|lpar.ifl.max_weight||For LPAR load balancing purposes, the maximum weight that this LPAR can have at any one time (1-999).||500|
5 - (Optional) Networking#
|lpar.networking.subnet_cidr||The same value as the above variable but in Classless Inter-
Domain Routing (CIDR) notation.
|lpar.networking.nic.card1.name||The logical name of the Network Interface Card (NIC) within the HMC.
An arbitrary value
that is human-readable that points to the NIC.
|lpar.networking.nic.card1.adapter||The physical adapter name reference to the logical adapter for the LPAR.||10Gb-A|
|lpar.networking.nic.card1.port||The port number for the NIC.||0|
|lpar.networking.nic.card1.dev_num||The logical device number for the NIC. In hex format.||0x0100|
|lpar.networking.nic.card2.name||(Optional) The logical name of a second Network Interface Card
(NIC) within the HMC. An arbitrary value that is human-readable
that points to the NIC.
|lpar.networking.nic.card2.adapter||(Optional) The physical adapter name of a second NIC.||10Gb-B|
|lpar.networking.nic.card2.port||(Optional) The port number for a second NIC.||1|
|lpar.networking.nic.card2.dev_num||(Optional) The logical device number for a second NIC. In hex format.||0x0001|
6 - (Optional) Storage#
|lpar.storage_group_1.name||The name of the storage group that will be attached to the LPAR.||OCP-storage-01|
|lpar.storage_group_1.type||Storage type. FCP is the only tested type as of now.||fcp|
|lpar.storage_group_1.storage_wwpn||World-wide port numbers for storage group. Use provided list formatting.||500708680235c3f0
|lpar.storage_group_1.dev_num||The logical device number of the Host Bus Adapter (HBA) for the storage group.||C001|
|lpar.storage_group_1.lun_name||The Logical Unit Numbers (LUN) that points to a specific virtual disk behind the WWPN.||4200569309ahhd240000000000000c001|
|lpar.storage_group_2.name||(Optional) The name of the storage group that will be attached to the LPAR.||OCP-storage-01|
|lpar.storage_group_2.auto_config||(Optional) Attempt to automate the addition of the disk space to the existing logical
volume. Check out roles/configure_storage/tasks/main.yaml to ensure this will work
properly with your setup.
|lpar.storage_group_2.type||(Optional) Storage type. FCP is the only tested type as of now.||fcp|
|lpar.storage_group_2_.storage_wwpn||(Optional) World-wide port numbers for storage group. Use provided list formatting.||500708680235c3f0
|lpar.storage_group_2_.dev_num||(Optional) The logical device number of the Host Bus Adapter (HBA) for the storage group.||C001|
|lpar.storage_group_2_.lun_name||(Optional) he Logical Unit Numbers (LUN) that points to a specific virtual disk
behind the WWPN.