Last active
October 10, 2019 14:43
-
-
Save Bowenislandsong/925e66efaea26c8b5fe8087c890256bf 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
#!/bin/bash | |
# move content of clusterN to cluster dir and destroy cluster | |
# cp install-config from current dir to clusterN and edit cluster name with random suffix | |
# create the OpenShift Cluster there. | |
# Pre-req: dir(cluster, clusterN), installer-config.yaml, and openshift-install binary. | |
rm -rf cluster/* | |
mv clusterN/* cluster/ | |
./openshift-install destroy cluster --dir cluster & | |
cp install-config.yaml clusterN/ | |
nameSufix=$RANDOM % 100000 | bc | |
sed -i "/^\([[:space:]]*name: bsong-winc-\).*/s//\1bsong-winc-cluster-${nameSufix}/" clusterN/install-config.yaml | |
./openshift-install create cluster --dir clusterN/ |
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
#!/bin/bash | |
# move content of clusterN to cluster dir and destroy cluster | |
# cp install-config from current dir to clusterN and edit cluster name with random suffix | |
# create the OpenShift Cluster there. | |
# Pre-req: dir(cluster, clusterN), installer-config.yaml, and openshift-install binary. | |
rm -rf cluster/* | |
mv clusterN/* cluster/ | |
mv clusterN/.* cluster/ | |
./openshift-install destroy cluster --dir cluster & | |
cp install-config.yaml clusterN/ | |
nameSufix=($RANDOM % 100000) | |
sed -i "/^\([[:space:]]*name: bsong-winc-\).*/s//\1c${nameSufix}/" clusterN/install-config.yaml | |
./openshift-install create cluster --dir clusterN/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment