forked from bvennam/kube-code-camp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_bx.sh
executable file
·27 lines (21 loc) · 1.02 KB
/
install_bx.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
echo "Download IBM Cloud CLI"
wget --quiet --output-document=/tmp/Bluemix_CLI_amd64.tar.gz http://public.dhe.ibm.com/cloud/bluemix/cli/bluemix-cli/latest/Bluemix_CLI_amd64.tar.gz
tar -xf /tmp/Bluemix_CLI_amd64.tar.gz --directory=/tmp
# Create bx alias
echo "#!/bin/sh" >/tmp/Bluemix_CLI/bin/bx
echo "/tmp/Bluemix_CLI/bin/bluemix \"\$@\" " >>/tmp/Bluemix_CLI/bin/bx
chmod +x /tmp/Bluemix_CLI/bin/*
chmod +x /tmp/Bluemix_CLI/bin/cfcli/*
export PATH="/tmp/Bluemix_CLI/bin:$PATH"
# Install IBM Cloud CS plugin
echo "Install the IBM Cloud Kubernetes Service plugin"
ibmcloud plugin install container-service -r Bluemix
ibmcloud plugin install container-registry -r Bluemix
echo "Install kubectl"
wget --quiet --output-document=/tmp/Bluemix_CLI/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x /tmp/Bluemix_CLI/bin/kubectl
if [ -n "$DEBUG" ]; then
ibmcloud --version
ibmcloud plugin list
fi