Skip to content

Instantly share code, notes, and snippets.

@dmage
Last active February 25, 2019 09:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dmage/170c7db4a7dd2ac05e02d51f44c0f5ac to your computer and use it in GitHub Desktop.
Save dmage/170c7db4a7dd2ac05e02d51f44c0f5ac to your computer and use it in GitHub Desktop.
Using "override" in OKD installer

Get a pull secret from https://cloud.openshift.com/clusters/install.

Copy a part of the secret that looks like

"quay.io":{"auth":"...","email":"..."}

and add it to your ~/.docker/config.json.

You also will need credentials for registry.svc.ci.openshift.org:

docker login registry.svc.ci.openshift.org

Build your operator

$ make build-images
...
--> Committing changes to openshift/origin-cluster-authentication-operator:74c864b8 ...
...

and publish it

MY_REPO=docker.io/dmage
MY_OPERATOR=origin-cluster-authentication-operator:74c864b8

docker tag openshift/$MY_OPERATOR $MY_REPO/$MY_OPERATOR
docker push $MY_REPO/$MY_OPERATOR

Build new release:

RELEASE_IMAGE=registry.svc.ci.openshift.org/openshift/origin-release:v4.0
NEW_RELEASE_IMAGE=$MY_REPO/origin-v4.0

oc adm release new \
  --from-release="$RELEASE_IMAGE" \
  --to-image="$NEW_RELEASE_IMAGE" \
  cluster-authentication-operator=$MY_REPO/$MY_OPERATOR

In the output you'll get the tag for the new release image:

...
Pushed image sha256:86ebd30cf7d560ac90e43e2cf4d7491198daacc5e903b2333fe6849038f743be to docker.io/dmage/origin-v4.0:4.0.0-0.alpha-2019-02-22-112519
...

Installer your cluster:

CLUSTER_DIR=./cluster/aws
_OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE=docker.io/dmage/origin-v4.0:4.0.0-0.alpha-2019-02-22-112519 ./bin/openshift-install create cluster --dir=$CLUSTER_DIR

This is tested with

$ ./bin/openshift-install version
./bin/openshift-install v0.12.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment