Created
December 17, 2018 21:52
-
-
Save himlohiya/8e45cc41acb4b9743da3e9378b10a254 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python3-pip | |
sudo pip3 install awscli | |
function install_kops { | |
if [ -z $(which kops) ] | |
then | |
curl -LO https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 | |
chmod +x kops-linux-amd64 | |
mv kops-linux-amd64 /usr/local/bin/kops | |
else | |
echo "kops is most likely installed" | |
fi | |
} | |
install_kops | |
TERRAFORM_ZIP_FILE=terraform_0.11.7_linux_amd64.zip | |
TERRAFORM=https://releases.hashicorp.com/terraform/0.11.7 | |
TERRAFORM_BIN=terraform | |
function install_terraform { | |
if [ -z $(which $TERRAFORM_BIN) ] | |
then | |
wget ${TERRAFORM}/${TERRAFORM_ZIP_FILE} | |
unzip ${TERRAFORM_ZIP_FILE} | |
sudo mv ${TERRAFORM_BIN} /usr/local/bin/${TERRAFORM_BIN} | |
rm -rf ${TERRAFORM_ZIP_FILE} | |
else | |
echo "Terraform is most likely installed" | |
fi | |
} | |
install_terraform | |
KUBECTL_BIN=kubectl | |
function install_kubectl { | |
if [ -z $(which $KUBECTL_BIN) ] | |
then | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/$KUBECTL_BIN | |
chmod +x ${KUBECTL_BIN} | |
sudo mv ${KUBECTL_BIN} /usr/local/bin/${KUBECTL_BIN} | |
else | |
echo "Kubectl is most likely installed" | |
fi | |
} | |
install_kubectl | |
HELM_TAR_FILE=helm-v2.9.1-linux-amd64.tar.gz | |
HELM_URL=https://storage.googleapis.com/kubernetes-helm | |
HELM_BIN=helm | |
function install_helm { | |
if [ -z $(which $HELM_BIN) ] | |
then | |
wget ${HELM_URL}/${HELM_TAR_FILE} | |
tar -xvzf ${HELM_TAR_FILE} | |
chmod +x linux-amd64/${HELM_BIN} | |
sudo cp linux-amd64/${HELM_BIN} /usr/local/bin/${HELM_BIN} | |
rm -rf ${HELM_TAR_FILE} linux-amd64 | |
echo -e "\nwhich ${HELM_BIN}" | |
which ${HELM_BIN} | |
else | |
echo "Helm is most likely installed" | |
fi | |
} | |
install_helm | |
HELMFILE_VERSION=v0.20.0 | |
HELMFILE_DOWNLOADED_FILENAME=helmfile_linux_amd64 | |
HURL=https://github.com/roboll/helmfile/releases/download | |
HELMFILE_URL=${HURL}/${HELMFILE_VERSION}/${HELMFILE_DOWNLOADED_FILENAME} | |
HELMFILE_BIN=helmfile | |
function install_helmfile { | |
if [ -z $(which $HELMFILE_BIN) ] | |
then | |
wget ${HELMFILE_URL} | |
chmod +x ${HELMFILE_DOWNLOADED_FILENAME} | |
sudo mv ${HELMFILE_DOWNLOADED_FILENAME} /usr/local/bin/${HELMFILE_BIN} | |
echo -e "\nexecuting: which ${HELMFILE_BIN}" | |
which ${HELMFILE_BIN} | |
else | |
echo "Helmfile is most likely installed" | |
fi | |
} | |
install_helmfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment