Last active
May 21, 2020 19:24
-
-
Save alaypatel07/d3c81aa0039da23b2bb557101f5f54f6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
htpasswd -c -B -b users.htpasswd bob bob | |
oc create secret generic htpass-secret --from-file=htpasswd=./users.htpasswd -n openshift-config | |
oc patch oauth cluster --type='json' -p '[ { "op": "replace", "path": "/spec", "value": {"identityProviders": [{"htpasswd": {"fileData": {"name": "htpass-secret"}}, "mappingMethod": "claim", "name": "bob_httpassd_provider", "type": "HTPasswd"}]}}]' | |
oc login -u bob -p bob | |
oc new-project bob-destination | |
oc login -u kubeadmin -p $KUBEADMIN_PASSWORD | |
cat <<EOF | oc create -f - | |
apiVersion: migration.openshift.io/v1alpha1 | |
kind: MigrationTenant | |
metadata: | |
name: migration-controller | |
namespace: bob-destination | |
spec: | |
migration_controller: "true" | |
migration_ui: "true" | |
olm_managed: true | |
version: 1.0 (OLM) | |
EOF | |
rm users.htpasswd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
please export KUBECONFIG and KUBEADMIN_PASSWORD