From b4e380cf1a8bb4c3c8e19f2487d1569feb8c469a Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Mon, 1 Jan 2018 21:10:16 +0530 Subject: [PATCH 1/6] Docker on Ubuntu Script to install Docker on Ubuntu --- docker-ubuntu.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docker-ubuntu.sh diff --git a/docker-ubuntu.sh b/docker-ubuntu.sh new file mode 100644 index 0000000..0466d76 --- /dev/null +++ b/docker-ubuntu.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +#Exit on error +set -e + +sudo -v + +#Add the GPG key for the official Docker repository to the system +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + +#Add the Docker repository to APT sources +sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + +#Update the package database with Docker packages from the newly added repo +sudo apt update -y + +#To install from the Docker repo instead of the default Ubuntu16.04 repo +apt-cache policy docker-ce + +#Install Docker +sudo apt-get install -y docker-ce + +#To check the docker version +docker version From 0dfcc4c6916404d4c4ed9ecc1f48fd5dbd2e4fa6 Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Mon, 1 Jan 2018 21:53:25 +0530 Subject: [PATCH 2/6] Kubernetes on Ubuntu Script to quickly install Kubernetes on Ubuntu --- k8s-ubuntu.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 k8s-ubuntu.sh 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 From 6cacbdc2fedbdef46fde2036b4bb8c86bfe84b72 Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Mon, 1 Jan 2018 21:56:52 +0530 Subject: [PATCH 3/6] Update golang.sh --- golang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/golang.sh b/golang.sh index 7156481..d401b18 100644 --- a/golang.sh +++ b/golang.sh @@ -27,7 +27,7 @@ sudo echo "export GOROOT=/usr/local/go" | sudo tee -a ~/.profile 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 +sudo echo "export PATH=$PATH:/usr/local/go/bin" | sudo tee -a ~/.profile #VERIFY INSTALLATION From 1eede3b475277ea0be1537056301a9cbbe032011 Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Fri, 5 Jan 2018 17:20:52 +0530 Subject: [PATCH 4/6] Kubernetes on Ubuntu From e971f2af50fb813e57a0f099df14cca134173136 Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Sat, 6 Jan 2018 12:20:48 +0530 Subject: [PATCH 5/6] Delete docker-ubuntu.sh --- docker-ubuntu.sh | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 docker-ubuntu.sh diff --git a/docker-ubuntu.sh b/docker-ubuntu.sh deleted file mode 100644 index 0466d76..0000000 --- a/docker-ubuntu.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -#Exit on error -set -e - -sudo -v - -#Add the GPG key for the official Docker repository to the system -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - -#Add the Docker repository to APT sources -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - -#Update the package database with Docker packages from the newly added repo -sudo apt update -y - -#To install from the Docker repo instead of the default Ubuntu16.04 repo -apt-cache policy docker-ce - -#Install Docker -sudo apt-get install -y docker-ce - -#To check the docker version -docker version From 4b5fcf551d0d926252d9e1154ac6923004ce18f1 Mon Sep 17 00:00:00 2001 From: Stan Forever Date: Sat, 6 Jan 2018 12:21:05 +0530 Subject: [PATCH 6/6] Delete golang.sh --- golang.sh | 54 ------------------------------------------------------ 1 file changed, 54 deletions(-) delete mode 100644 golang.sh diff --git a/golang.sh b/golang.sh deleted file mode 100644 index d401b18..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 - - -