diff --git a/golang.sh b/golang.sh deleted file mode 100644 index 7156481..0000000 --- a/golang.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -#Exit on error -set -e - -sudo -v - -#INSTALL GO LANGUAGE - -sudo apt install golang-go -y - -#Download the Go language binary archive file -wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz - -#Extract the downloaded archive -sudo tar -xvf go1.9.2.linux-amd64.tar.gz - -#install it to the /usr/local directory -sudo mv go /usr/local - -#SETUP GO ENVIRONMENT - -#location where Go package is installed on your system -sudo echo "export GOROOT=/usr/local/go" | sudo tee -a ~/.profile - -#location of your work directory -sudo echo "export GOPATH=$HOME" | sudo tee -a ~/.profile - -#to access go binary system wide -sudo echo "export PATH=$PATH:/usr/local/go/bin" | sudo tee -a /.profile - -#VERIFY INSTALLATION - -echo -n "Verifying Golang installation... " -echo -GO_VERSION="$(go version)" -if [[ "$GO_VERSION" == "go version go1.9.2 linux/amd64" ]]; then - echo -e "\\033[0;32mOK" - echo - echo "Golang is successfully installed!" - echo - go version - echo -e "\\033[0m" - exit 0 -else - echo -e "\\033[0;31mFAILED" - echo - echo "$0: Lol! Something went wrong, try to fix yourself else report an issues" - echo -e "\\033[0m" - exit 1 -fi - - - diff --git a/k8s-ubuntu.sh b/k8s-ubuntu.sh new file mode 100644 index 0000000..4be674f --- /dev/null +++ b/k8s-ubuntu.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +#Exit on error +set -e + +sudo -v + +#INSTALL DEPENDENCIES + +#To allow using https as well as http in apt repository sources +sudo apt-get update && apt-get install -y apt-transport-https + +#Docker dependencies +sudo apt install docker.io -y + +#To start and enable the Docker service +sudo systemctl start docker + +sudo systemctl enable docker + +#INSTALL KUBERNETES + +#To download and add key for the Kubernetes +sudo curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add + +echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list + +#Install Kubernetes + +sudo apt update -y + +sudo apt install -y kubelet kubeadm kubectl kubernetes-cni