Skip to content

Commit 6b40aa2

Browse files
authored
Modify bootstrap script to install latest (#108)
Automatically use latest stable ocp release
1 parent 7715da8 commit 6b40aa2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

config/vagrant/scripts/bootstrap-cluster.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
sudo curl -Lo /usr/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-linux-amd64
55
sudo chmod +x /usr/bin/kind
66

7-
# download openshift client
8-
OPENSHIFT_VERSION="4.9.9"
7+
# download the latest openshift client at a certain release level
8+
RELEASE_LEVEL="4.10"
9+
VERSIONS=($(sudo curl -sH 'Accept: application/json' "https://api.openshift.com/api/upgrades_info/v1/graph?channel=stable-${RELEASE_LEVEL}&arch=amd64" | jq -r '.nodes[].version' | sort))
10+
OPENSHIFT_VERSION=${VERSIONS[${#VERSIONS[@]} - 1]}
11+
912
OC_BIN_TAR="openshift-client-linux.tar.gz"
1013
OC_DL_URL="https://mirror.openshift.com/pub/openshift-v4/clients/ocp"/${OPENSHIFT_VERSION}/${OC_BIN_TAR}
1114

config/vagrant/scripts/bootstrap-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sudo dnf remove docker \
2121

2222
# Install docker
2323
sudo dnf -y install dnf-plugins-core
24-
sudo dnf -y install docker-ce docker-ce-cli containerd.io
24+
sudo dnf -y install docker-ce docker-ce-cli containerd.io jq
2525

2626
# Configure IPv6 in docker ( https://docs.docker.com/config/daemon/ipv6/ )
2727
sudo mkdir /etc/docker

0 commit comments

Comments
 (0)