// Module included in the following assemblies:
//
// * installing/installing_openstack/installing-openstack-installer-custom.adoc

:_mod-docs-content-type: PROCEDURE
[id="installation-configuring-shiftstack-single-ipv6_{context}"]
= Configuring a cluster with single-stack IPv6 networking

[role="_abstract"]
Create API and Ingress VIP ports and configure the `install-config.yaml` file to deploy a cluster with IPv6-only networking on {rh-openstack-first}.

You can create a single-stack IPv6 cluster on {rh-openstack-first} after you configure your {rh-openstack} deployment.

[NOTE]
====
For {rh-openstack} 17.1, you can also deploy a dual-stack {product-title} cluster on a single-stack IPv6 {rh-openstack} infrastructure. The {product-title} cluster offers IPv4 connectivity internally, even when the underlying {rh-openstack} network only has IPv6 subnets.
====

IMPORTANT: You cannot convert a dual-stack cluster into a single-stack IPv6 cluster.

.Prerequisites

* Your {rh-openstack} deployment has an existing network with a DHCPv6-stateful IPv6 subnet to use as the machine network.
* DNS is configured for the existing IPv6 subnet.
* The IPv6 subnet is added to a {rh-openstack} router, and the router is configured to send router advertisements (RAs).
* You added any additional IPv6 subnets that are used in the cluster to an {rh-openstack} router to enable router advertisements.
+
NOTE: Using an IPv6 SLAAC subnet is not supported because any `dns_nameservers` addresses are not enforced by {rh-openstack} Neutron.
* You have a mirror registry with an IPv6 interface.
* The {rh-openstack} network accepts a minimum MTU size of 1442 bytes.
* You created API and ingress virtual IP addresses (VIPs) as {rh-openstack} ports on the machine network and included those addresses in the `install-config.yaml` file.

.Procedure

. Create the API VIP port on the network by running the following command:
+
[source,bash]
----
$ openstack port create api --network <v6_machine_network>
----

. Create the Ingress VIP port on the network by running the following command:
+
[source,bash]
----
$ openstack port create ingress --network <v6_machine_network>
----

. After the networking resources are pre-created, deploy a cluster by using an `install-config.yaml` file that reflects your IPv6 network configuration. As an example:
+
[source,yaml]
----
apiVersion: v1
baseDomain: mydomain.test
compute:
- name: worker
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
controlPlane:
  name: master
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
metadata:
  name: mycluster
networking:
  machineNetwork:
  - cidr: "fd2e:6f44:5dd8:c956::/64"
  clusterNetwork:
  - cidr: fd01::/48
    hostPrefix: 64
  serviceNetwork:
  - fd02::/112
platform:
  openstack:
    ingressVIPs: ['fd2e:6f44:5dd8:c956::383']
    apiVIPs: ['fd2e:6f44:5dd8:c956::9a']
    controlPlanePort:
      fixedIPs:
      - subnet:
          name: subnet-v6
      network:
        name: v6-network
imageContentSources:
- mirrors:
  - <mirror>
  source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
- mirrors:
  - <mirror>
  source: registry.ci.openshift.org/ocp/release
additionalTrustBundle: |
<certificate_of_the_mirror>
----
* `networking.machineNetwork` specifies the CIDR of the subnet. The CIDR of the subnet specified in this field must match the CIDR of the subnet that is specified in the `controlPlanePort` section.
* `platform.openstack.ingressVIPs` and `platform.openstack.apiVIPs` specify the virtual IP addresses. Use the address from the ports you generated in the earlier steps as the values for these parameters.
* `platform.openstack.controlPlanePort.fixedIPs` and `platform.openstack.controlPlanePort.network` specify the control plane port configuration. Items under these keys can contain an ID, a name, or both.
* `imageContentSources` specifies the mirror details. For more information on configuring a local image registry, see "Creating a mirror registry with mirror registry for Red Hat OpenShift". 
