-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: drop support for ubuntu 18.04 and centos8 and add support for…
… almalinux8 Signed-off-by: Peter Balogh <[email protected]>
- Loading branch information
1 parent
f14b9e4
commit d98508c
Showing
9 changed files
with
109 additions
and
174 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -e | ||
|
||
# build latest pke tool | ||
GOOS=linux make pke | ||
|
||
KUBERNETES_VERSION="${1:-v1.21.0}" | ||
|
||
# upgrade first master node | ||
echo "" | ||
echo "= almalinux1 ========================================================================" | ||
vagrant ssh almalinux1 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION'" | ||
|
||
# waiting 10 seconds because of apiserver | ||
sleep 10 | ||
|
||
# upgrade second master node | ||
echo "" | ||
echo "= almalinux2 ========================================================================" | ||
vagrant ssh almalinux2 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION' --kubernetes-additional-control-plane" | ||
|
||
# upgrade third master node | ||
echo "" | ||
echo "= almalinux3 ========================================================================" | ||
vagrant ssh almalinux3 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION' --kubernetes-additional-control-plane" | ||
|
||
# upgrade worker node | ||
echo "" | ||
echo "= almalinux4 ========================================================================" | ||
vagrant ssh almalinux4 -c "sudo /banzaicloud/pke upgrade worker --kubernetes-version='$KUBERNETES_VERSION'" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash -e | ||
|
||
# prerequisitesSkipping phase due to missing Pipeline API endpoint credentials | ||
jq --version || (echo "Please install jq command line tool. https://stedolan.github.io/jq/" && exit 1) | ||
|
||
# build latest pke tool | ||
GOOS=linux make pke | ||
|
||
KUBERNETES_VERSION="${1:-v1.20.6}" | ||
|
||
# install first master node | ||
echo "" | ||
echo "= almalinux1 ========================================================================" | ||
vagrant up almalinux1 | ||
vagrant ssh almalinux1 -c "sudo sh -c 'echo -n "LANG=en_US.utf-8\nLC_ALL=en_US.utf-8" > /etc/environment'" | ||
vagrant ssh almalinux1 -c "sudo /scripts/pke-multi-master1.sh '$KUBERNETES_VERSION' '192.168.64.11:6443'" | ||
vagrant ssh almalinux1 -c 'sudo cat /etc/kubernetes/admin.conf' > pke-multi-config.yaml | ||
vagrant ssh almalinux1 -c "sudo /banzaicloud/pke token list -o json" > build/token.json | ||
|
||
|
||
TOKEN=`jq -r '.tokens[] | select(.expired == false) | .token' build/token.json` | ||
CERTHASH=`jq -r '.tokens[] | select(.expired == false) | .hash' build/token.json` | ||
|
||
echo "" | ||
echo "Using '$TOKEN' and '$CERTHASH' to join other nodes to the cluster" | ||
|
||
# install second master node | ||
echo "" | ||
echo "= almalinux2 ========================================================================" | ||
vagrant up almalinux2 | ||
vagrant ssh almalinux2 -c "sudo /scripts/pke-multi-mastern.sh '$KUBERNETES_VERSION' '192.168.64.11:6443' '$TOKEN' '$CERTHASH' 192.168.64.12" | ||
|
||
# install third master node | ||
echo "" | ||
echo "= almalinux3 ========================================================================" | ||
vagrant up almalinux3 | ||
vagrant ssh almalinux3 -c "sudo /scripts/pke-multi-mastern.sh '$KUBERNETES_VERSION' '192.168.64.11:6443' '$TOKEN' '$CERTHASH' 192.168.64.13" | ||
|
||
# install worker node | ||
echo "" | ||
echo "= almalinux4 ========================================================================" | ||
vagrant up almalinux4 | ||
vagrant ssh almalinux4 -c "sudo /scripts/pke-multi-worker.sh '$KUBERNETES_VERSION' '192.168.64.11:6443' '$TOKEN' '$CERTHASH'" | ||
|
||
export KUBECONFIG=$PWD/pke-multi-config.yaml | ||
|
||
echo "" | ||
echo "You can access your PKE cluster either:" | ||
echo "- from your host machine accessing the cluster via kubectl. Please run:" | ||
echo "export KUBECONFIG=$PWD/pke-multi-config.yaml" | ||
echo "" | ||
echo "- or starting a shell in the virtual machine. Please run:" | ||
echo "vagrant ssh almalinux1 -c 'sudo -s'" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -e | ||
|
||
# build latest pke tool | ||
GOOS=linux make pke | ||
|
||
KUBERNETES_VERSION="${1:-v1.21.0}" | ||
|
||
vagrant ssh almalinux1 -c "sudo /banzaicloud/pke upgrade master --kubernetes-version='$KUBERNETES_VERSION'" |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.