- Create hosted Zones:
- jpdv.aws.kerbeross.com depends on aws.kerbeross.com
- hc.jpdv.aws.kerbeross.com depends on jpdv.aws.kerbeross.com
- guest.jpdv.aws.kerbeross.com depends on jpdv.aws.kerbeross.com
Dev will be the Source Management Cluster
/Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create cluster aws --aws-creds ~/.aws/credentials --instance-type m6i.xlarge --region us-west-1 --auto-repair --generate-ssh --name jparrill-dev --namespace jparrill --base-domain jpdv.aws.kerbeross.com --node-pool-replicas 2 --pull-secret /Users/jparrill/RedHat/RedHat_Engineering/pull_secret.json --release-image quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64; sleep 120;mkdir -p /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dev && /Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create kubeconfig --name jparrill-dev --namespace jparrill > /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dev/kubeconfig
Dest will be the Destination Management Cluster
/Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create cluster aws --aws-creds ~/.aws/credentials --instance-type m6i.xlarge --region us-west-1 --auto-repair --generate-ssh --name jparrill-dest --namespace jparrill --base-domain jpdv.aws.kerbeross.com --node-pool-replicas 2 --pull-secret /Users/jparrill/RedHat/RedHat_Engineering/pull_secret.json --release-image quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64; sleep 120; mkdir -p /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dest && /Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create kubeconfig --name jparrill-dest --namespace jparrill > /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dest/kubeconfig
- Dev and Dest Cluster
export KUBECONFIG=/Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dev/kubeconfig
/Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift install --oidc-storage-provider-s3-bucket-name jparrill-hosted-us-west-1 --oidc-storage-provider-s3-credentials ~/.aws/credentials --oidc-storage-provider-s3-region us-west-1 --external-dns-provider=aws --external-dns-credentials=$HOME/.aws/credentials --external-dns-domain-filter=guest.jpdv.aws.kerbeross.com --private-platform AWS --aws-private-creds ~/.aws/credentials --aws-private-region us-west-1 --platform-monitoring=OperatorOnly --enable-uwm-telemetry-remote-write --enable-ci-debug-output
export KUBECONFIG=/Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dest/kubeconfig
/Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift install --oidc-storage-provider-s3-bucket-name jparrill-hosted-us-west-1 --oidc-storage-provider-s3-credentials ~/.aws/credentials --oidc-storage-provider-s3-region us-west-1 --external-dns-provider=aws --external-dns-credentials=$HOME/.aws/credentials --external-dns-domain-filter=guest.jpdv.aws.kerbeross.com --private-platform AWS --aws-private-creds ~/.aws/credentials --aws-private-region us-west-1 --platform-monitoring=OperatorOnly --enable-uwm-telemetry-remote-write --enable-ci-debug-output
export KUBECONFIG=/Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/jparrill-jparrill-dev/kubeconfig
/Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create cluster aws --aws-creds ~/.aws/credentials --instance-type m6i.xlarge --region us-west-1 --auto-repair --generate-ssh --name jparrill-hosted --namespace clusters --base-domain hc.jpdv.aws.kerbeross.com --external-dns-domain guest.jpdv.aws.kerbeross.com --node-pool-replicas 2 --pull-secret /Users/jparrill/RedHat/RedHat_Engineering/pull_secret.json --release-image quay.io/openshift-release-dev/ocp-release:4.12.0-rc.1-x86_64; sleep 120;mkdir -p /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/clusters-jparrill-hosted && /Users/jparrill/RedHat/RedHat_Engineering/hypershift/repos/hypershift/bin/hypershift create kubeconfig --name jparrill-hosted --namespace clusters > /Users/jparrill/RedHat/RedHat_Engineering/hypershift/hosted_clusters/clusters-jparrill-hosted/kubeconfig
To execute the migration I use this bash script which delegates the variables in this common file