Created
March 4, 2020 21:29
-
-
Save ironicbadger/fcb36c1a0d1c852e072bab5d043c08ea 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 | |
rm -rf bootstrap-files/ | |
sleep 1 | |
mkdir -p bootstrap-files | |
cp install-config.yaml bootstrap-files/ | |
cp append-bootstrap.ign bootstrap-files/ | |
cd bootstrap-files | |
# create ignition files | |
openshift-install create manifests | |
sed -i 's/mastersSchedulable: true/mastersSchedulable: false/g' manifests/cluster-scheduler-02-config.yml | |
openshift-install create ignition-configs | |
# copy new ignition bootstrap file to webserver | |
ssh root@192.168.1.160 mkdir -p /var/www/html/ignition/ | |
ssh root@192.168.1.160 rm /var/www/html/ignition/bootstrap.ign | |
scp bootstrap.ign root@192.168.1.160:/var/www/html/ignition/ | |
ssh root@192.168.1.160 chmod 777 /var/www/html/ignition/bootstrap.ign | |
# base64 encode ignition files for vmware | |
for i in append-bootstrap master worker | |
do | |
base64 -w0 < $i.ign > $i.64 | |
done | |
bootstrapign=`cat append-bootstrap.64` | |
masterign=`cat master.64` | |
workerign=`cat worker.64` | |
# configure ignition tf vars | |
sed -i '/\#base64string/!b;n;c\ \ \ \ default = "'$bootstrapign'"' ../terraform/bootstrap/variables.tf | |
sed -i '/\#base64string/!b;n;c\ \ \ \ default = "'$masterign'"' ../terraform/masters/variables.tf | |
sed -i '/\#base64string/!b;n;c\ \ \ \ default = "'$workerign'"' ../terraform/workers/variables.tf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment