You will use the AWS Command Line Interface (AWS CLI) as well as kubectl
and eksctl
for these exercises. Detailed documentation on installing the AWS CLI is available on AWS Documentation as well as a Getting started with eksctl guide that details installation steps for Linux and Windows. These examples will be based on macOS. Sample code, templates, and other resources are provided in a Bitbucket repository that accompanies this workshop.
Let's make sure the AWS CLI installed correctly.
aws --version
{% hint style="info" %}
Remember that you will need to run aws configure
to setup your AWS credentials.
{% endhint %}
We are going to install eksctl
with Homebrew.
brew tap weaveworks/tap && \
brew update && \
brew install weaveworks/tap/eksctl
{% hint style="info" %}
Installing eksctl
with Homebrew will also install the kubectl
command-line utility.
{% endhint %}
The Snyk CLI authenticates your machine with your Snyk account. This tool will help you find and fix known vulnerabilities in your dependencies, both manually and also as part of your continuous integration build server.
brew tap snyk/tap && \
brew update && \
brew install snyk
To associate your Snyk account with the CLI, you must first authenticate your machine. No repository permissions are needed at this stage. Simply run the following command:
snyk auth
A web browser tab will open, redirecting you to authenticate the CLI for use with your account. Click Authenticate
. When the authentication has completed, you may return to your terminal and continue working.
Before you can push your Docker images to Amazon ECR, you must create a repository to store them in. You can create Amazon ECR repositories with the AWS Management Console, or with the AWS CLI and AWS SDKs. For this workshop, we will create the repository with the AWS Management Console:
- Open the Amazon ECR console at https://console.aws.amazon.com/ecr/repositories.
- From the navigation bar, choose the Region to create your repository in.
- In the navigation pane, choose Repositories.
- On the Repositories page, choose Create repository.
- For Repository name, enter a unique name for your repository.
- For Tag immutability, choose the tag mutability setting for the repository. Repositories configured with immutable tags will prevent image tags from being overwritten. For more information, see Image tag mutability.
- For Scan on push, choose the image scanning setting for the repository. Repositories configured to scan on push will start an image scan whenever an image is pushed, otherwise image scans need to be started manually. For more information, see Image scanning.
- Choose Create repository.
The exercises contained in this workshop will include a combination of commands or code snippets that will be shared within the specific module pages as well as templates and source code available in a public Bitbucket repository. Once your Bitbucket Cloud account is setup, you will copy these resources into your account. To do so, please follow these steps:
Click here to fork the upstream
repository into your Bitbucket account. For detailed instructions on how to fork a respository, please review Atlassian's documentation.
Once Step 1 is complete, you will need to clone
your forked repository. Please review Atlassian's documentation on how to clone a repository for detailed instructions.