Capstone project for Udacity Cloud DevOps Nanodegree
This project borrows ideas (and some bash scripts 😉)from courses in the Nanodegree program
- Create an EC2 instance
- Clone this repo because the scripts install needed packages.
- In
templates
directory, create CloudFormation stack using:aws cloudformation create-stack --stack-name eks-cluster --region us-west-2 --template-body file://aws-eks-.yml --parameters file://params.json --capabilities CAPABILITY_IAM
- Alternatively you can install and use
eksctl
, you can use thecluster.yaml
by running:eksctl create cluster -f cluster.yaml
- When the EKS Cluster is complete, in AWS EKS Dashboard add a Managed Node Group, wait for it to provision.
- Configure EKS cluster with EC2 instance using this command:
Remember the
aws eks update-kubeconfig --name zetacluster
ClusterName
variable in our CloudFormation stack?, its value is what we add there not the--stack-name
. - Copy role arn from cloudformation stack outputs into
templates/aws-auth.yml
file. - Configure
aws-auth.yml
file in order to attach worker nodes to EKS cluster by running:kubectl apply -f aws-auth.yml
- Deploy initial code to Kubernetes cluster and pods using blue deployment in the
deploy
directorykubectl apply -f blue.yml
- With
blue
deployment done, you can create the continuous pipeline. - Configure AWS and Docker globally on Jenkins using the
pipeline-aws
plugin. If AWS is not configured properly, the pipeline will fail.
- Go to Load balancer in EC2 and select specific load balancer. Copy provided DNS and open it in chrome.
- Alternatively, DNS can also be obtained by typing
kubectl get svc
in command line. kubectl get pods
let's you see the podskubectl get nodes
show you the nodes
- A notable resource is this question from StackOverflow regarding
pylint
.