Skip to content

Commit 697fe7c

Browse files
authored
update README.md & installers.toml
1 parent a0cfa99 commit 697fe7c

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This will install Git on your machine!
2323
| Tool |Apt|Yum|Packman|APK|DNF|CURL| URL |
2424
|--------|---|---|-------|---|---|----|----------------------------|
2525
|NodeJS |Yes|Yes|No |Yes|Yes|No |https://installer.to/node |
26-
|Kubectl |Yes|Yes|No |No |No |No |https://installer.to/kubectl|
26+
|Kubectl |Yes|Yes|No |No |No |Yes |https://installer.to/kubectl|
2727
|Git |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/git |
2828
|gCloud |No |No |No |No |No |Yes |https://installer.to/gcloud |
2929
|Nginx |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/nginx |

installers.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ installers = "apt,yum,dnf,apk"
33
name = "NodeJS"
44

55
[kubectl]
6-
installers = "yum,apt"
6+
installers = "apt,yum,curl"
77
name = "Kubectl"
88
description = "kubectl controls the Kubernetes cluster manager"
99

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
;CURL_CMD=$(which curl);YUM_CMD=$(which yum);DNF_CMD=$(which dnf);APT_GET_CMD=$(which apt-get);PACMAN_CMD=$(which pacman);APK_CMD=$(which apk);GIT_CMD=$(which git);SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='';RED='';GREEN='';YELLOW='';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;if [ ! -z $YUM_CMD ]; then;cat <<EOF > /etc/yum.repos.d/kubernetes.repo;[kubernetes];name=Kubernetes;baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64;enabled=1;gpgcheck=1;repo_gpgcheck=1;gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg;EOF;yum install -y kubectl;;elif [ ! -z $APT_GET_CMD ]; then;$SUDO apt-get update && $SUDO apt-get install -y apt-transport-https gnupg2;curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | $SUDO apt-key add -;echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | $SUDO tee -a /etc/apt/sources.list.d/kubernetes.list;$SUDO apt-get update;$SUDO apt-get install kubectl;;else echo "Couldn't install package";exit 1;;fi;
2+
;CURL_CMD=$(which curl);YUM_CMD=$(which yum);DNF_CMD=$(which dnf);APT_GET_CMD=$(which apt-get);PACMAN_CMD=$(which pacman);APK_CMD=$(which apk);GIT_CMD=$(which git);SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='';RED='';GREEN='';YELLOW='';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;if [ ! -z $APT_GET_CMD ]; then;$SUDO apt-get update && $SUDO apt-get install -y apt-transport-https gnupg2;curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | $SUDO apt-key add -;echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | $SUDO tee -a /etc/apt/sources.list.d/kubernetes.list;$SUDO apt-get update;$SUDO apt-get install kubectl;;elif [ ! -z $YUM_CMD ]; then;cat <<EOF > /etc/yum.repos.d/kubernetes.repo;[kubernetes];name=Kubernetes;baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64;enabled=1;gpgcheck=1;repo_gpgcheck=1;gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg;EOF;yum install -y kubectl;;elif [ ! -z $CURL_CMD ]; then;info "Downloading Helm";$SUDO curl -sSL https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl;$SUDO chmod +x /usr/local/bin/kubectl;;else echo "Couldn't install package";exit 1;;fi;

installers/kubectl/installer.sh

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,14 @@ error () {
4040
log "$RED ERROR$RESET $1"
4141
}
4242

43-
if [ ! -z $YUM_CMD ]; then
43+
if [ ! -z $APT_GET_CMD ]; then
44+
$SUDO apt-get update && $SUDO apt-get install -y apt-transport-https gnupg2
45+
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | $SUDO apt-key add -
46+
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | $SUDO tee -a /etc/apt/sources.list.d/kubernetes.list
47+
$SUDO apt-get update
48+
$SUDO apt-get install kubectl
49+
50+
elif [ ! -z $YUM_CMD ]; then
4451
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
4552
[kubernetes]
4653
name=Kubernetes
@@ -52,12 +59,10 @@ if [ ! -z $YUM_CMD ]; then
5259
EOF
5360
yum install -y kubectl
5461
55-
elif [ ! -z $APT_GET_CMD ]; then
56-
$SUDO apt-get update && $SUDO apt-get install -y apt-transport-https gnupg2
57-
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | $SUDO apt-key add -
58-
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | $SUDO tee -a /etc/apt/sources.list.d/kubernetes.list
59-
$SUDO apt-get update
60-
$SUDO apt-get install kubectl
62+
elif [ ! -z $CURL_CMD ]; then
63+
info "Downloading Helm"
64+
$SUDO curl -sSL https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl
65+
$SUDO chmod +x /usr/local/bin/kubectl
6166
6267
else
6368
echo "Couldn't install package"

0 commit comments

Comments
 (0)