Skip to content

Instantly share code, notes, and snippets.

@aojea
Last active March 25, 2021 09:16
Show Gist options
  • Select an option

  • Save aojea/5dc3220ff8d332725a179de2f173a96b to your computer and use it in GitHub Desktop.

Select an option

Save aojea/5dc3220ff8d332725a179de2f173a96b to your computer and use it in GitHub Desktop.
Dual Stack Openshift in Azure

HOWTO Create a Dual-Stack Openshift Cluster in Azure

  1. Follow the Openshift Azure documentation to setup your Azure account and configure all the prerequisites.

  2. You'll need to create a custom release payload with following PRs:

You can create the images locally and override the release payload with those images, you can get the releases from the Openshift CI Releases and obtain the pull_secret from the corresponding Openshift CI registry

VER=4.8.0-0.ci-2021-03-25-042637
RELEASE=registry.ci.openshift.org/ocp/release:${VER}

$ oc login --token=sha256~YOUR_TOKEN_HERE --server=https://api.ci.l2s4.p1.openshiftapps.com:6443
Logged into "https://api.ci.l2s4.p1.openshiftapps.com:6443" as "aojea" using the token provided.

You don't have any projects. Contact your system administrator to request a project.

$ oc registry login --to=pull-secret.txt

$ oc adm release new \
	-a ~/pull-secret.txt \
	--from-release ${RELEASE} \
	machine-config-operator="quay.io/aojea/openshift:mco-dual" \
        azure-machine-controllers="quay.io/aojea/openshift:azure-dual" \
	--to-image quay.io/aojea/openshift:release-dual

or use cluster-bot

NOTE: seems cluster-bot build doesn't get the azure-machine-controller, you can follow this guide to use your own one https://github.com/openshift/machine-api-operator/blob/master/docs/dev/hacking-guide.md#how-to-build-the-software-in-a-container-for-remote-testing

build openshift/machine-config-operator#2479,openshift/cluster-api-provider-azure#208

and remember to add the pull-secret to the install-config file.

  1. Use the intaller to generate the manifests based in the configuration install-config.yaml
mkdir dualstack
cp install-config.yaml ./dualstack
openshift-install create manifests --dir=./dualstack --log-level=debug
  1. Add the ipv6-dual-stack-no-upgrade.yaml manifest to the installer to enablel the FeatureGate
cp ipv6-dual-stack-no-upgrade.yaml ./dualstack/manifests
  1. Run the installer using the RELEASE_IMAGE override
OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=quay.io/aojea/openshift:release-dual openshift-install create cluster --dir=./dualstack --log-level=debug

You should have your cluster ready once the installer finish.

NOTE: The installer sometimes leaves DNS resources, maybe some failure cleaning up, you must delete them if you want to create a new cluster all the installer will fail complaining about that. You can do it from the Azure console https://portal.azure.com/

apiVersion: v1
baseDomain: sdn.azure.devcluster.openshift.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform: {}
replicas: 2
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform: {}
replicas: 3
metadata:
creationTimestamp: null
name: aojeadual
networking:
clusterNetwork:
- cidr: 10.128.0.0/16
hostPrefix: 23
- cidr: fd00:10:128::/56
hostPrefix: 64
machineNetwork:
- cidr: 10.0.0.0/16
- cidr: fd00:10::/48
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
- fd00:172:30::/112
platform:
azure:
baseDomainResourceGroupName: os4-common
cloudName: AzurePublicCloud
outboundType: Loadbalancer
region: centralus
publish: External
pullSecret: <PULL_SECRET>
sshKey: <SSH_KEY>
apiVersion: config.openshift.io/v1
kind: FeatureGate
metadata:
name: cluster
spec:
featureSet: IPv6DualStackNoUpgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment