diff --git a/README.md b/README.md index d0f6a73..685e4c8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ You will need a Kubernetes cluster to deploy the workshop applications. You will * [docker](https://docs.docker.com/engine/install/) * [kubectl](https://kubernetes.io/docs/tasks/tools/) * [helm](https://helm.sh/docs/intro/install/) +* [yarn](https://classic.yarnpkg.com/en/docs/install#mac-stable) Verify your installations by running these commands in your terminal: diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..d95c43b --- /dev/null +++ b/init.sh @@ -0,0 +1,62 @@ +#!/bin/bash +#Install dependencies + +#export PATH +# +export PATH=$PATH + +echo "######################################################## Installing Kind ########################################################" + +# For Intel Macs +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.23.0/kind-darwin-amd64 +# For M1 / ARM Macs +[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.23.0/kind-darwin-arm64 +chmod +x ./kind +sudo mv ./kind /usr/local/bin/kind +echo "######################################################## Kind Install Complete ########################################################" + +echo "######################################################## Installing Helm ########################################################" +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +chmod 700 get_helm.sh +./get_helm.sh +echo "######################################################## Helm Install Complete ########################################################" + +echo "######################################################## Installing Homebrew ########################################################" + +echo "######################################################## Homebrew is required for installing Docker Desktop on Mac ########################################################" + +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + +echo "######################################################## Homebrew installation complete ########################################################" + +echo "######################################################## Installing Docker Desktop with homebrew cask ########################################################" + +brew list docker || brew install docker --cask + +echo "######################################################## Docker Desktop installation complete ########################################################" + +echo "######################################################## Starting Docker engine ########################################################" + +open -a Docker & + +echo "######################################################## Installing Kubectl ########################################################" + +# For Intel Macs +[ $(uname -m) = x86_64 ] && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl" +# For M1 / ARM Macs +[ $(uname -m) = arm64 ] && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl" +#Make executable +chmod +x ./kubectl +#Move to system PATH +sudo mv ./kubectl /usr/local/bin/kubectl +sudo chown root: /usr/local/bin/kubectl + +echo "######################################################## kubectl has been installed! ########################################################" + +echo "######################################################## Installing yarn ########################################################" + +brew list yarn || brew install yarn + +echo "######################################################## Yarn installation complete ########################################################" + +echo "######################################################## Dependency installation complete ########################################################"