Workshop tools

In order for us to continue with the exercises, there are several tools that our needed to be installed on our Cloud9 instance.

Download these two repos with git

git clone https://github.com/strongjz/devsecopspipeline

git clone https://github.com/strongjz/aws-container-devsecops

Next will be installing the tools needed for the labs

The script will install

  • docker
  • kind
  • terraform
  • eksctl
  • kubectl
  • helm
  • golang
  • cosign

Install

Navigate to where you downloaded the installation script from the git repo.

cd ~/environment/aws-container-devsecops/content/setup/tools.files/

Start the installation with this command sudo bash ./tools-install.sh

Expand here is what it looks like in its entirety

Now since EKS takes about 20 minutes to create a cluster we need to start that now so it’s ready when we need it.

Kubernetes Cluster Creation

cd ~/environment/devsecopspipeline

Start the cluster creation with make cluster

Output should look like this:

eksctl create cluster -f eks-config.yml
2021-09-11 21:58:05 []  eksctl version 0.61.0
2021-09-11 21:58:05 []  using region us-west-2
2021-09-11 21:58:05 []  setting availability zones to [us-west-2d us-west-2c us-west-2a]
2021-09-11 21:58:05 []  subnets for us-west-2d - public:192.168.0.0/19 private:192.168.96.0/19
2021-09-11 21:58:05 []  subnets for us-west-2c - public:192.168.32.0/19 private:192.168.128.0/19
2021-09-11 21:58:05 []  subnets for us-west-2a - public:192.168.64.0/19 private:192.168.160.0/19
2021-09-11 21:58:05 []  nodegroup "node-group-1" will use "ami-0bb07d9c8d6ca41e8" [AmazonLinux2/1.21]
2021-09-11 21:58:05 []  using Kubernetes version 1.21
2021-09-11 21:58:05 []  creating EKS cluster "devsecops" in "us-west-2" region with un-managed nodes
2021-09-11 21:58:05 []  1 nodegroup (node-group-1) was included (based on the include/exclude rules)
2021-09-11 21:58:05 []  will create a CloudFormation stack for cluster itself and 1 nodegroup stack(s)
2021-09-11 21:58:05 []  will create a CloudFormation stack for cluster itself and 0 managed nodegroup stack(s)
2021-09-11 21:58:05 []  if you encounter any issues, check CloudFormation console or try 'eksctl utils describe-stacks --region=us-west-2 --cluster=devsecops'
2021-09-11 21:58:05 []  CloudWatch logging will not be enabled for cluster "devsecops" in "us-west-2"
2021-09-11 21:58:05 []  you can enable it with 'eksctl utils update-cluster-logging --enable-types={SPECIFY-YOUR-LOG-TYPES-HERE (e.g. all)} --region=us-west-2 --cluster=devsecops'
2021-09-11 21:58:05 []  Kubernetes API endpoint access will use default of {publicAccess=true, privateAccess=false} for cluster "devsecops" in "us-west-2"
2021-09-11 21:58:05 []  2 sequential tasks: { create cluster control plane "devsecops", 3 sequential sub-tasks: { wait for control plane to become ready, 1 task: { create addons }, create nodegroup "node-group-1" } }
2021-09-11 21:58:05 []  building cluster stack "eksctl-devsecops-cluster"
2021-09-11 21:58:06 []  deploying stack "eksctl-devsecops-cluster"
2021-09-11 21:58:07 []  waiting for CloudFormation stack "eksctl-devsecops-cluster"

Let it run and deploy while we move onto to the next steps