Skip to content

Instantly share code, notes, and snippets.

@StevenACoffman
Last active June 25, 2019 18:56
Show Gist options
  • Save StevenACoffman/a91e2bc4af91dfc063b1440875eee559 to your computer and use it in GitHub Desktop.
Save StevenACoffman/a91e2bc4af91dfc063b1440875eee559 to your computer and use it in GitHub Desktop.
Prerequisites

Automated Infrastructure

This workshop will provide hands on experience on setting up and running an AWS Kubernetes cluster using EKS. We will use gitops, and explore kubernetes tools to make the cluster self-driving, with automated management and remedy of common cluster level problems. To achieve this, we will use eksctl, cluster-autoscaler, kube-prometheus (prometheus operator), node-problem-detector, draino, and node-local-dns-cache.

Intended audience

This workshop is intended to appeal primarily to four types of people:

  1. Application developers looking to get an AWS kubernetes cluster to experiment without a lot of infrastructure knowledge
  2. AWS DevOps people without a lot of kubernetes experience
  3. Kubernetes DevOps people without a lot of AWS experience
  4. Full-stack, Full-cycle developers in small or large teams.

Prerequisites

  1. An AWS Account ($25 credit code will be given on day of the workshop)
  2. aws cli installed and configured to access account
  3. kubectl installed
  4. aws-iam-authenticator installed
  5. eksctl installed
  6. docker installed

This workshop expects you to create your own AWS account, but participants will be given a $25 cost code to cover any costs incurred during the workshop. A pre-existing VPC is not required. Participants should create their accounts ASAP. A small percentage of account may be pulled into a manual verification workflow. Also if any users have accounts that have been deactivated for non-payment it will take some time for them to reactive once a credit card is added.

πŸ’‘ Tip: Your account must have the ability to create new IAM roles and scope other IAM permissions.
  1. If you don't already have an AWS account with Administrator access: create one now by clicking here

  2. Create a billing alarm - Super important!

πŸ’‘ Tip: After you have the AWS CLI installed (as below), You will need to have AWS API credentials configured. You can use ~/.aws/credentials file or environment variables. For more information read AWS documentation.

MacOS users can use Homebrew:

brew install awscli

and Windows users can use chocolatey:

chocolatey install awscli

If you already have pip and a supported version of Python, and ideally you know how to set up a virtual environment. You can install the AWS CLI by using the following command. If you have Python version 3+ installed, we recommend that you use the pip3 command.

pip3 install awscli --upgrade --user

Although it might provide an outdated version, Linux users can also use the default package managers for installing AWS CLI, e.g.:

$ sudo apt-get update awscli                       
$ sudo yum install awscli

Linux or Mac:

sudo curl --silent --location -o /usr/local/bin/kubectl curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl

sudo chmod +x /usr/local/bin/kubectl

Or Download the Windows executable

If you have golang installed and your $PATH includes $GOPATH/bin:

go get -u -v github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator

Otherwise, download the Amazon EKS-vended aws-iam-authenticator binary from Github Releases:

To download the latest release, run:

curl --silent --location "https://github.com/weaveworks/eksctl/releases/download/latest_release/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin

Alternatively, macOS users can use Homebrew:

brew tap weaveworks/tap
brew install weaveworks/tap/eksctl

and Windows users can use chocolatey:

chocolatey install eksctl

MacOS:

πŸ’‘ Tip: Avoid Docker Toolbox and boot2docker. These are older packages that have been ceded by Docker for Mac.

brew cask install docker       # Install Docker
open /Applications/Docker.app  # Start Docker

Ubuntu

docker.io is available from the Ubuntu repositories (as of Xenial).

# Install Docker
sudo apt install docker.io
sudo apt install docker-compose

# Start it
sudo systemctl start docker
πŸ’‘ Tip: If the `docker.io` package isn't available for you, see [Get Docker CE for Ubuntu](https://docs.docker.com/install/linux/docker-ce/ubuntu/) for an alternative.

Windows

Install Windows Subsystem for Linux and choose Ubuntu as your guest OS. Install Docker as you normally would on Ubuntu (see above). After that, see these instructions for info on how to get it running.

πŸ’‘ Tip: Avoid _Docker for Windows_. While it works in most cases, you'll still face NTFS limitations without WSL (eg, lack of symlinks, which is needed for Yarn/npm to work).

Other OS's

For other operating systems, see: https://www.docker.com/community-edition#download

Verify the binaries are in the path and executable

for command in docker kubectl aws-iam-authenticator eksctl
  do
    which $command &>/dev/null && echo "$command in path" || echo "$command NOT FOUND"
  done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment