-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstaller.sh
executable file
·86 lines (76 loc) · 2.5 KB
/
installer.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash
#install minikube
#install virtualbox
#install kubectl
#install docker
osType=$(uname)
install_minikube(){
if [ "$osType" == "Darwin" ]; then
echo "Installing on mac"
brew cask install minikube
else
echo "Installing on linux"
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& chmod +x minikube && sudo install minikube /usr/local/bin
fi
}
install_virtualbox(){
echo "Installing virtual box"
if [ "$osType" == "Darwin" ] ; then
echo "Installing on mac"
echo "Execute the downloaded binary to install virtualbox ##TODO Script to Install "
wget https://download.virtualbox.org/virtualbox/6.0.12/VirtualBox-6.0.12-133076-OSX.dmg
else
echo "Download binaries from https://www.virtualbox.org/wiki/Linux_Downloads"
fi
}
install_kubectl(){
echo "Installing Kubectl"
if [ "$osType" == "Darwin" ]; then
echo "Installing on mac"
brew install kubernetes-cli
else
echo "Installing on linux"
latestVersion=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
curl -LO https://storage.googleapis.com/kubernetes-release/release/${latestVersion}/bin/linux/amd64/kubectl \
&& chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl
fi
}
install_docker (){
if [ "$osType" == "Darwin" ]; then
echo "Installing on mac"
brew cask install docker
else
echo "Downloading script from https://gist.github.com/wdullaer/f1af16bd7e970389bad3"
echo "thanks to https://github.com/wdullaer"
wget -O - https://gist.githubusercontent.com/wdullaer/f1af16bd7e970389bad3/raw/install.sh | bash
fi
}
#check kubectl
if ! [ -x "$(command -v kubectl)" ]; then
echo "kubectl not installed installing...."
install_kubectl
else
echo "kubectl already installed exiting"
fi
#check and install virtualbox
if ! [ -x "$(command -v virtualbox)" ]; then
echo "virtualbox not installed installing...."
install_virtualbox
else
echo "virtualbox already installed exiting"
fi
#check and install minikube
if ! [ -x "$(command -v minikube)" ]; then
echo "minikube not installed installing...."
install_minikube
else
echo "Minikube already installed exiting"
fi
#check and install docker
if ! [ -x "$(command -v docker)" ]; then
echo "docker not installed installing...."
install_docker
else
echo "docker already installed exiting"
fi