diff --git a/docs/set-variables-group-vars.md b/docs/set-variables-group-vars.md
index bd57a9ac..eeda9cb0 100644
--- a/docs/set-variables-group-vars.md
+++ b/docs/set-variables-group-vars.md
@@ -48,7 +48,7 @@
:--- | :--- | :---
**env.redhat.username** | Red Hat username with a valid license or free trial to Red Hat
OpenShift Container Platform (RHOCP), which comes with
necessary licenses for Red Hat Enterprise Linux (RHEL) and
Red Hat CoreOS (RHCOS). | redhat.user
**env.redhat.password** | Password to Red Hat above user's account. Used to auto-attach
necessary subscriptions to KVM Host, bastion VM, and pull live
images for OpenShift. | rEdHatPa$s!
-**env.redhat.attach_subscription** | True or False. Would you like to subscribe the server with Red Hat? | True
+**env.redhat.manage_subscription** | True or False. Would you like to subscribe the server with Red Hat? | True
**env.redhat.pull_secret** | Pull secret for OpenShift, comes from Red Hat's [Hybrid Cloud Console](https://console.redhat.com/openshift/install/ibmz/user-provisioned).
Make sure to enclose in 'single quotes'.
| '{"auths":{"cloud.openshift
.com":{"auth":"b3Blb
...
4yQQ==","email":"redhat.
user@gmail.com"}}}'
## 5 - Bastion
@@ -61,10 +61,13 @@
**env.bastion.resources.swap** | How much swap storage would you like to allocate the bastion (in
megabytes)? Recommended 4096 or more. | 4096
**env.bastion.resources.vcpu** | How many virtual CPUs would you like to allocate to the bastion? Recommended 4 or more. | 4
**env.bastion.networking.ip** | IPv4 address for the bastion. | 192.168.10.3
+**env.bastion.networking.ipv6** | IPv6 address for the bastion if use_ipv6 variable is 'True'. | fd00::3
**env.bastion.networking.hostname** | Hostname of the bastion. Will be combined with
env.bastion.networking.base_domain to create a Fully Qualified Domain Name (FQDN). | ocpz-bastion
**env.bastion.networking.base_
domain** | Base domain that, when combined with the hostname, creates a fully-qualified
domain name (FQDN) for the bastion? | ihost.com
**env.bastion.networking.
subnetmask** | Subnet of the bastion. | 255.255.255.0
**env.bastion.networking.gateway** | IPv4 of he bastion's gateway server. | 192.168.10.0
+**env.bastion.networking.ipv6_gateway** | IPv6 of he bastion's gateway server. | fd00::1
+**env.bastion.networking.ipv6_prefix** | IPv6 prefix. | 64
**env.bastion.networking.name
server1** | IPv4 address of the server that resolves the bastion's hostname. | 192.168.10.200
**env.bastion.networking.name
server2** | (Optional) A second IPv4 address that resolves the bastion's hostname. | 192.168.10.201
**env.bastion.networking.forwarder** | What IPv4 address will be used to make external DNS calls for the bastion? Can use 1.1.1.1 or 8.8.8.8 as defaults. | 8.8.8.8
@@ -81,10 +84,13 @@
**Variable Name** | **Description** | **Example**
:--- | :--- | :---
**env.cluster.networking.metadata_name** | Name to describe the cluster as a whole, can be anything if DNS will be hosted on the bastion. If
DNS is not on the bastion, must match your DNS configuration. Will be combined with the base_domain
and hostnames to create Fully Qualified Domain Names (FQDN). | ocpz
-**env.cluster.networking.base_domain** | The site name, where is the cluster being hosted? This will be combined with the metadata_name
and hostnames to create FQDNs. | ihost.com
+**env.cluster.networking.base_domain** | The site name, where is the cluster being hosted? This will be combined with the metadata_name
and hostnames to create FQDNs. | host.com
+**env.bastion.networking.ipv6_gateway** | IPv6 of he bastion's gateway server. | fd00::1
+**env.bastion.networking.ipv6_prefix** | IPv6 prefix. | 64
**env.cluster.networking.nameserver1** | IPv4 address that the cluster get its hostname resolution from. If env.bastion.options.dns
is True, this should be the IP address of the bastion. | 192.168.10.200
**env.cluster.networking.nameserver2** | (Optional) A second IPv4 address will the cluster get its hostname resolution from? If env.bastion.options.dns
is True, this should be left commented out. | 192.168.10.201
**env.cluster.networking.forwarder** | What IPv4 address will be used to make external DNS calls for the cluster? Can use 1.1.1.1 or 8.8.8.8 as defaults. | 8.8.8.8
+**env.cluster.networking.interface** | Name of the networking interface on the bastion from Linux's perspective. Most likely enc1. | enc1
## 7 - Bootstrap Node
**Variable Name** | **Description** | **Example**
@@ -94,6 +100,7 @@
**env.cluster.nodes.bootstrap.vcpu** | How many virtual CPUs would you like to allocate to the temporary bootstrap node?
Recommended 4 or more. | 4
**env.cluster.nodes.bootstrap.vm_name** | Name of the temporary bootstrap node VM. Arbitrary value. | bootstrap
**env.cluster.nodes.bootstrap.ip** | IPv4 address of the temporary bootstrap node. | 192.168.10.4
+**env.cluster.nodes.bootstrap.ipv6** | IPv6 address for the bootstrap if use_ipv6 variable is 'True'. | fd00::4
**env.cluster.nodes.bootstrap.hostname** | Hostname of the temporary boostrap node. If DNS is hosted on the bastion, this can be anything.
If DNS is hosted elsewhere, this must match DNS definition. This will be combined with the
metadata_name and base_domain to create a Fully Qualififed Domain Name (FQDN). | bootstrap-ocpz
## 8 - Control Nodes
@@ -104,6 +111,7 @@
**env.cluster.nodes.control.vcpu** | How many virtual CPUs would you like to allocate to each control node? Recommended 4 or more. | 4
**env.cluster.nodes.control.vm_name** | Name of the control node VMs. Arbitrary values. Usually no more or less than 3 are used. Must match
the total number of IP addresses and hostnames for control nodes. Use provided list format. | control-1
control-2
control-3
**env.cluster.nodes.control.ip** | IPv4 address of the control nodes. Use provided
list formatting. | 192.168.10.5
192.168.10.6
192.168.10.7
+**env.cluster.nodes.control.ipv6** | IPv6 address for the control nodes. Use iprovided
list formatting (if use_ipv6 variable is 'True'). | fd00::5
fd00::6
fd00::7
**env.cluster.nodes.control.hostname** | Hostnames for control nodes. Must match the total number of IP addresses for control nodes
(usually 3). If DNS is hosted on the bastion, this can be anything. If DNS is hosted elsewhere,
this must match DNS definition. This will be combined with the metadata_name and
base_domain to create a Fully Qualififed Domain Name (FQDN). | control-01
control-02
control-03
## 9 - Compute Nodes
@@ -114,6 +122,7 @@
**env.cluster.nodes.compute.vcpu** | How many virtual CPUs would you like to allocate to each compute node? Recommended 2 or more. | 2
**env.cluster.nodes.compute.vm_name** | Name of the compute node VMs. Arbitrary values. This list can be expanded to any
number of nodes, minimum 2. Must match the total number of IP
addresses and hostnames for compute nodes. Use provided list format. | compute-1
compute-2
**env.cluster.nodes.compute.ip** | IPv4 address of the compute nodes. Must match the total number of VM names and
hostnames for compute nodes. Use provided list formatting. | 192.168.10.8
192.168.10.9
+**env.cluster.nodes.control.ipv6** | IPv6 address for the compute nodes. Use iprovided
list formatting (if use_ipv6 variable is 'True'). | fd00::8
fd00::9
**env.cluster.nodes.compute.hostname** | Hostnames for compute nodes. Must match the total number of IP addresses and
VM names for compute nodes. If DNS is hosted on the bastion, this can be anything.
If DNS is hosted elsewhere, this must match DNS definition. This will be combined with the
metadata_name and base_domain to create a Fully Qualififed Domain Name (FQDN). | compute-01
compute-02
## 10 - Infra Nodes
@@ -123,7 +132,8 @@
**env.cluster.nodes.infra.ram** | (Optional) How much memory would you like to allocate to the each infra node (in
megabytes)? Recommended 16384 or more. | 16384
**env.cluster.nodes.infra.vcpu** | (Optional) How many virtual CPUs would you like to allocate to each infra node?
Recommended 2 or more. | 2
**env.cluster.nodes.infra.vm_name** | (Optional) Name of additional infra node VMs. Arbitrary values. This list can be
expanded to any number of nodes, minimum 2. Must match the total
number of IP addresses and hostnames for infra nodes. Use provided list format. | infra-1
infra-2
-**env.cluster.nodes.infra.ip** | (Optional) IPv4 address of the infra nodes. This list can be expanded to any number of nodes,
minimum 2. Use provided list formatting. | 192.168.10.8
192.168.10.9
+**env.cluster.nodes.infra.ip** | (Optional) IPv4 address of the infra nodes. This list can be expanded to any number of nodes,
minimum 2. Use provided list formatting. | 192.168.10.10
192.168.10.11
+**env.cluster.nodes.infra.ipv6** | (Optional) IPv6 address of the infra nodes. iThis list can be expanded to any number of nodes,
minimum 2. Use provided list formatting (if use_ipv6 variable is 'True'). | fd00::10
fd00::11
**env.cluster.nodes.infra.hostname** | (Optional) Hostnames for infra nodes. Must match the total number of IP addresses for infra nodes.
If DNS is hosted on the bastion, this can be anything. If DNS is hosted elsewhere, this must match
DNS definition. This will be combined with the metadata_name and base_domain
to create a Fully Qualififed Domain Name (FQDN). | infra-01
infra-02
## 11 - (Optional) Packages
@@ -165,6 +175,7 @@
**env.ocp_key_name** | Comment to describe the SSH key used for OCP. Arbitrary value. | OCPZ-01 key
**env.bridge_name** | (Optional) Name of the macvtap bridge that will be created on the KVM host or in case of NAT the name of the NAT network defenition (usually it is 'default'). If NAT is being used and a jumphost is needed, the parameters network_mode, jumphost.name, jumphost.user and jumphost.pass must be specified, too. In case of default (NAT) network verify that the configured IP ranges does not interfere with the IPs defined for the controle and compute nodes. Modify the default network (dhcp range setting) to prevent issues with VMs using dhcp and OCP nodes having fixed IPs.| macvtap-net
**env.network_mode** | (Optional) In case the network mode will be NAT and the installation will be executed from remote (e.g. your laptop), a jumphost needs to be defined to let the installation access the bastion host. If macvtap for networking is being used this variable should be empty. | NAT
+**env.use_ipv6** | If ipv6 addresses should be assigned to the controle and compute nodes, this variable should be true (default) and the matching ipv6 settings should be specified. | True
**env.jumphost.name** | (Optional) If env.network.mode is set to 'NAT' the name of the jumphost (e.g. the name of KVM host if used as jumphost) should be specified. | kvm-host-01
**env.jumphost.ip** | (Optional) The ip of the jumphost. | 192.168.10.1
**env.jumphost.user** | (Optional) The user name to login to the jumphost. | admin
@@ -238,5 +249,7 @@
**day2_compute_node.vm_name** | Name of the compute node VM. | compute-4
**day2_compute_node.vm_hostname** | Hostnames for compute node. | compute-4
**day2_compute_node.vm_vm_ip** | IPv4 address of the compute node. | 192.168.10.99
+**day2_compute_node.vm_vm_ipv6** | IPv6 address of the compute node. | fd00::99
+**day2_compute_node.vm_vm_interface** | The network interface used for given IP addresses of the compute node. | enc1
**day2_compute_node.hostname** | The hostname of the KVM host | kvm-host-01
**day2_compute_node.host_arch** | KVM host architecture. | s390x
diff --git a/inventories/default/group_vars/all.yaml.template b/inventories/default/group_vars/all.yaml.template
index 7f7d88d2..a669dd59 100644
--- a/inventories/default/group_vars/all.yaml.template
+++ b/inventories/default/group_vars/all.yaml.template
@@ -44,7 +44,7 @@ env:
redhat:
username: #X
password: #X
- attach_subscription: true
+ manage_subscription: True
# Make sure to enclose pull_secret in 'single quotes'
pull_secret: #'X'
@@ -59,10 +59,13 @@ env:
vcpu: 4
networking:
ip: #X
+ ipv6: #X
hostname: #X
base_domain: #X
subnetmask: #X
gateway: #X
+ ipv6_gateway: #X
+ ipv6_prefix: #X
nameserver1: #X
# nameserver2:
forwarder: 1.1.1.1
@@ -85,9 +88,12 @@ env:
base_domain: #X
subnetmask: #X
gateway: #X
+ ipv6_gateway: #X
+ ipv6_prefix: #X
nameserver1: #X
# nameserver2:
forwarder: 1.1.1.1
+ interface: #X
# Section 7 - Bootstrap Node
nodes:
@@ -97,6 +103,7 @@ env:
vcpu: 4
vm_name: #X
ip: #X
+ ipv6: #X
hostname: #X
# Section 8 - Control Nodes
@@ -112,6 +119,10 @@ env:
- #X
- #X
- #X
+ ipv6:
+ - #X
+ - #X
+ - #X
hostname:
- #X
- #X
@@ -128,6 +139,9 @@ env:
ip:
- #X
- #X
+ ipv6:
+ - #X
+ - #X
hostname:
- #X
- #X
@@ -143,6 +157,9 @@ env:
# ip:
# - 1.1.1.1
# - 1.1.1.2
+# ipv6:
+# - fd00::11
+# - fd00::12
# hostname:
# - infra1
# - infra2
@@ -190,6 +207,7 @@ env:
ocp_ssh_key_comment: OpenShift key
bridge_name: macvtap
network_mode:
+ use_ipv6: True
#jumphost if network mode is NAT
jumphost:
@@ -294,5 +312,7 @@ day2_compute_node:
vm_name:
vm_hostname:
vm_ip:
+ vm_ipv6:
+ vm_interface:
hostname:
host_arch:
diff --git a/playbooks/3_setup_kvm_host.yaml b/playbooks/3_setup_kvm_host.yaml
index 2b83b81a..ce3da1e1 100644
--- a/playbooks/3_setup_kvm_host.yaml
+++ b/playbooks/3_setup_kvm_host.yaml
@@ -71,7 +71,7 @@
vars:
packages: "{{ env.pkgs.kvm }}"
roles:
- - { role: attach_subscription, when: env.redhat.attach_subscription }
+ - { role: attach_subscription, when: env.redhat.manage_subscription }
- install_packages
- httpd
post_tasks:
diff --git a/playbooks/5_setup_bastion.yaml b/playbooks/5_setup_bastion.yaml
index 7871768c..a5763af9 100644
--- a/playbooks/5_setup_bastion.yaml
+++ b/playbooks/5_setup_bastion.yaml
@@ -71,7 +71,7 @@
tasks_from: initial-resolv.yaml
when: env.bastion.options.dns is defined and env.bastion.options.dns
roles:
- - { role: attach_subscription, when: env.redhat.username is defined and env.redhat.password is defined }
+ - { role: attach_subscription, when: env.redhat.manage_subscription }
- install_packages
- ssh_ocp_key_gen
- set_firewall
diff --git a/playbooks/create_compute_node.yaml b/playbooks/create_compute_node.yaml
index 7ed874e8..036712f2 100644
--- a/playbooks/create_compute_node.yaml
+++ b/playbooks/create_compute_node.yaml
@@ -6,6 +6,8 @@
# vm_name:
# vm_hostname:
# vm_ip:
+# vm_ipv6:
+# vm_interface:
# hostname:
# host_arch:
#
diff --git a/roles/create_bastion/templates/bastion-ks.cfg.j2 b/roles/create_bastion/templates/bastion-ks.cfg.j2
index 64e265fa..a5d9befe 100644
--- a/roles/create_bastion/templates/bastion-ks.cfg.j2
+++ b/roles/create_bastion/templates/bastion-ks.cfg.j2
@@ -33,7 +33,7 @@ timezone {{ env.timezone }}
eula --agreed
# Network information
-network --bootproto=static --device={{ env.bastion.networking.interface }} --ip={{ env.bastion.networking.ip }} --gateway={{ env.bastion.networking.gateway }} --netmask={{ env.bastion.networking.subnetmask }} --noipv6 --nameserver={{ env.bastion.networking.nameserver1 }}{{ (',' + env.bastion.networking.nameserver2) if env.bastion.networking.nameserver2 is defined else '' }} --activate
+network --bootproto=static --device={{ env.bastion.networking.interface }} --ip={{ env.bastion.networking.ip }} --gateway={{ env.bastion.networking.gateway }} --netmask={{ env.bastion.networking.subnetmask }} {{'--ipv6=' + env.bastion.networking.ipv6 if env.use_ipv6 else --noipv6}} {{'--ipv6gateway=' + env.bastion.networking.ipv6_gateway if env.use_ipv6 else ''}} --nameserver={{ env.bastion.networking.nameserver1 }}{{ (',' + env.bastion.networking.nameserver2) if env.bastion.networking.nameserver2 is defined else '' }} --activate
network --hostname={{ env.bastion.networking.hostname }}.{{ env.cluster.networking.base_domain }}
# Firewall and SELinux
diff --git a/roles/create_bootstrap/tasks/main.yaml b/roles/create_bootstrap/tasks/main.yaml
index 40ce8823..b03dfefd 100644
--- a/roles/create_bootstrap/tasks/main.yaml
+++ b/roles/create_bootstrap/tasks/main.yaml
@@ -18,8 +18,9 @@
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
--extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda \
coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} \
- ip={{ env.cluster.nodes.bootstrap.ip }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.bootstrap.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}::none:1500 \
+ ip={{ env.cluster.nodes.bootstrap.ip }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.bootstrap.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ env.cluster.networking.interface }}:none:1500 \
nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} \
+ {{ ('ip=[' + env.cluster.nodes.bootstrap.ipv6 + ']::[' + env.cluster.networking.ipv6_gateway + ']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} \
coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/bootstrap.ign {{ _vm_console }}" \
--graphics none \
--console pty,target_type=serial \
diff --git a/roles/create_compute_node/tasks/main.yaml b/roles/create_compute_node/tasks/main.yaml
index e45ee5bf..83376046 100644
--- a/roles/create_compute_node/tasks/main.yaml
+++ b/roles/create_compute_node/tasks/main.yaml
@@ -69,7 +69,8 @@
--noautoconsole \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
--extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda \
- ip={{ param_compute_node.vm_ip }}::{{ env.bastion.networking.gateway }}:{{ env.bastion.networking.subnetmask }}:{{ param_compute_node.vm_hostname }}::none:1500 \
+ ip={{ param_compute_node.vm_ip }}::{{ env.bastion.networking.gateway }}:{{ env.bastion.networking.subnetmask }}:{{ param_compute_node.vm_hostname }}:{{ param_compute_node.vm_interface }}:none:1500 \
+ {{ ('ip=[' + param_compute_node.vm_ipv6 + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + param_compute_node.vm_interface + ':none' ) if env.use_ipv6 == True else '' }} \
nameserver={{ env.cluster.networking.nameserver1 }}{{ (',' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} \
coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} \
coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}"
diff --git a/roles/create_compute_node/vars/main.yaml b/roles/create_compute_node/vars/main.yaml
index 99f849d5..7336a066 100644
--- a/roles/create_compute_node/vars/main.yaml
+++ b/roles/create_compute_node/vars/main.yaml
@@ -3,5 +3,7 @@ param_compute_node:
# vm_name:
# vm_hostname:
# vm_ip:
+ # vm_ipv6:
+ # vm_interface:
# hostname:
# host_arch:
diff --git a/roles/create_compute_nodes/tasks/main.yaml b/roles/create_compute_nodes/tasks/main.yaml
index 9918b5db..41fe9c95 100644
--- a/roles/create_compute_nodes/tasks/main.yaml
+++ b/roles/create_compute_nodes/tasks/main.yaml
@@ -15,7 +15,7 @@
--vcpus {{ env.cluster.nodes.compute.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.compute.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.compute.hostname[i] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.compute.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.compute.hostname[i] }}:{{ env.cluster.networking.interface }}:none:1500 {{ ('ip=[' + env.cluster.nodes.compute.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
--wait=-1 \
--noautoconsole
timeout: 360
@@ -38,7 +38,7 @@
--vcpus {{ env.cluster.nodes.infra.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.infra.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.infra.hostname[i] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.infra.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.infra.hostname[i] }}:{{ env.cluster.networking.interface }}:none:1500 {{ ('ip=[' + env.cluster.nodes.infra.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
--wait=-1 \
--noautoconsole
with_sequence: start=0 end={{ ( env.cluster.nodes.infra.hostname | length ) - 1}} stride=1
@@ -55,6 +55,7 @@
compute_name: "{{ env.cluster.nodes.compute.vm_name[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
compute_hostname: "{{ env.cluster.nodes.compute.hostname[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
compute_ip: "{{ env.cluster.nodes.compute.ip[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
+ compute_ipv6: "{{ env.cluster.nodes.compute.ipv6[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
when: env.z.high_availability == True
- name: Split information for infra nodes into groups. The number of groups being equal to the number of KVM hosts there are.
@@ -63,6 +64,7 @@
infra_name: "{{ env.cluster.nodes.infra.vm_name[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
infra_hostname: "{{ env.cluster.nodes.infra.hostname[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
infra_ip: "{{ env.cluster.nodes.infra.ip[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
+ infra_ipv6: "{{ env.cluster.nodes.infra.ipv6[groups['kvm_host'].index(inventory_hostname)::groups['kvm_host'] | length] }}"
when: env.z.high_availability == True and env.cluster.nodes.infra.hostname is defined
- name: Create CoreOS compute nodes on KVM hosts, if cluster is to be highly available.
@@ -78,7 +80,7 @@
--vcpus {{ env.cluster.nodes.compute.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ compute_ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ compute_hostname[i] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ compute_ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ compute_hostname[i] }}:{{ env.cluster.networking.interface }}:none:1500 {{ ('ip=[' + compute_ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
--wait=-1 \
--noautoconsole
loop: "{{ compute_name | zip(compute_hostname, compute_ip) | list }}"
@@ -100,7 +102,7 @@
--vcpus {{ env.cluster.nodes.infra.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ infra_ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ infra_hostname[i] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ infra_ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ infra_hostname[i] }}:{{ env.cluster.networking.interface }}:none:1500 {{ ('ip=[' + infra_ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/worker.ign {{ _vm_console }}" \
--wait=-1 \
--noautoconsole
loop: "{{ infra_name | zip(infra_hostname, infra_ip) | list }}"
diff --git a/roles/create_control_nodes/tasks/main.yaml b/roles/create_control_nodes/tasks/main.yaml
index 03377d97..67db9c7c 100644
--- a/roles/create_control_nodes/tasks/main.yaml
+++ b/roles/create_control_nodes/tasks/main.yaml
@@ -13,7 +13,7 @@
--vcpus {{ env.cluster.nodes.control.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[i] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[i] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[i] }}:{{ env.cluster.networking.interface }}:none:1500 {{ ('ip=[' + env.cluster.nodes.control.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
--graphics none \
--console pty,target_type=serial \
--wait=-1 \
@@ -24,6 +24,7 @@
extended: yes
index_var: i
when: env.z.high_availability == False and inventory_hostname == env.z.lpar1.hostname
+# {{ ('ip=[' + env.cluster.nodes.control.ipv6[i] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} \
- name: Create the first CoreOS control node on the first KVM host, if cluster is to be highly available.
tags: create_control_nodes
@@ -38,7 +39,9 @@
--vcpus {{ env.cluster.nodes.control.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[0] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[0] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[0] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[0] }}:{{ env.cluster.networking.interface }}:none:1500 \
+ {{ ('ip=[' + env.cluster.nodes.control.ipv6[0] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' + env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} \
+ nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
--graphics none \
--wait=-1 \
--noautoconsole
@@ -57,7 +60,9 @@
--vcpus {{ env.cluster.nodes.control.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[1] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[1] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[1] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[1] }}::none:1500 \
+ {{ ('ip=[' + env.cluster.nodes.control.ipv6[1] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' env.cluster.networking.interface + ':none' ) if env.use_ipv6 == True else '' }} \
+ nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
--graphics none \
--wait=-1 \
--noautoconsole
@@ -76,7 +81,9 @@
--vcpus {{ env.cluster.nodes.control.vcpu }} \
--network network={{ env.bridge_name }} \
--location {{ rhcos_download_url }},kernel={{ rhcos_live_kernel }},initrd={{ rhcos_live_initrd }} \
- --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[2] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[2] }}::none:1500 nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
+ --extra-args "rd.neednet=1 coreos.inst=yes coreos.inst.install_dev=vda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} ip={{ env.cluster.nodes.control.ip[2] }}::{{ env.cluster.networking.gateway }}:{{ env.cluster.networking.subnetmask }}:{{ env.cluster.nodes.control.hostname[2] }}::none:1500 \
+ {{ ('ip=[' + env.cluster.nodes.control.ipv6[2] + ']::[' + env.cluster.networking.ipv6_gateway +']:' + env.cluster.networking.ipv6_prefix | string + '::' env.cluster.networking.interface ':none' ) if env.use_ipv6 == True else '' }} \
+ nameserver={{ env.cluster.networking.nameserver1 }} {{ ('--nameserver=' + env.cluster.networking.nameserver2) if env.cluster.networking.nameserver2 is defined else '' }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/master.ign {{ _vm_console }}" \
--graphics none \
--wait=-1 \
--noautoconsole