From 5e679358595c5b7a825f791ca32ce5bd0c9242d1 Mon Sep 17 00:00:00 2001 From: Mahdi Hasnat Siyam Date: Fri, 19 Jan 2024 23:08:52 +0600 Subject: [PATCH 1/3] Added docker, minikube, kubectl --- scripts/docker.sh | 21 +++++++++++++++++++++ scripts/kubectl.sh | 21 +++++++++++++++++++++ scripts/minikube.sh | 8 ++++++++ scripts/run_order.txt | 3 +++ 4 files changed, 53 insertions(+) create mode 100755 scripts/docker.sh create mode 100755 scripts/kubectl.sh create mode 100755 scripts/minikube.sh diff --git a/scripts/docker.sh b/scripts/docker.sh new file mode 100755 index 0000000..5aa3564 --- /dev/null +++ b/scripts/docker.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -eux + +echo "\nInstalling Docker ...\n" +sudo apt-get update +sudo apt-get install ca-certificates curl gnupg +sudo install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor --batch --yes -o /etc/apt/keyrings/docker.gpg +sudo chmod a+r /etc/apt/keyrings/docker.gpg + +# Add the repository to Apt sources: +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +sudo apt-get update + +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +sudo docker run hello-world \ No newline at end of file diff --git a/scripts/kubectl.sh b/scripts/kubectl.sh new file mode 100755 index 0000000..5b5e6b0 --- /dev/null +++ b/scripts/kubectl.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -eux + +echo "\nInstalling Kubectl ...\n" + +sudo apt-get update -y +sudo apt-get install -y apt-transport-https ca-certificates curl + +# If the folder `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below. +sudo mkdir -p -m 755 /etc/apt/keyrings +curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | sudo gpg --dearmor --batch --yes -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg + +# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list +echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list + +sudo apt-get update -y +sudo apt-get install -y kubectl + +kubectl --help +kubectl version diff --git a/scripts/minikube.sh b/scripts/minikube.sh new file mode 100755 index 0000000..1413051 --- /dev/null +++ b/scripts/minikube.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -eux + +echo "\nInstalling Minikube ...\n" +curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb +sudo dpkg -i minikube_latest_amd64.deb +rm minikube_latest_amd64.deb diff --git a/scripts/run_order.txt b/scripts/run_order.txt index 2bce0a0..e22d447 100644 --- a/scripts/run_order.txt +++ b/scripts/run_order.txt @@ -13,6 +13,9 @@ sublime.sh vim.sh emacs.sh geany.sh +docker.sh +minikube.sh +kubectl.sh dist_upgrade.sh copy_dots.sh add_users.sh From 2bda0f4935013e432a43da2b44dfdaf1e750d41c Mon Sep 17 00:00:00 2001 From: Mahdi Hasnat Siyam Date: Fri, 19 Jan 2024 23:15:05 +0600 Subject: [PATCH 2/3] Empty-Commit From ee7b6d868b86f082af213d1367070ed7ab6c5b1d Mon Sep 17 00:00:00 2001 From: Mahdi Hasnat Siyam Date: Fri, 19 Jan 2024 23:37:46 +0600 Subject: [PATCH 3/3] Kubectl client version only --- scripts/kubectl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kubectl.sh b/scripts/kubectl.sh index 5b5e6b0..cd37b1f 100755 --- a/scripts/kubectl.sh +++ b/scripts/kubectl.sh @@ -18,4 +18,4 @@ sudo apt-get update -y sudo apt-get install -y kubectl kubectl --help -kubectl version +kubectl version --client