- Register for a Dockerhub account
- Register for an Amazon Web Services account
- Install a text editor
- Get access to a Linux-ish terminal of some sort
- VSCode might provide Git Bash
- Could install Ubuntu on Windows from the app store
- just run linux 4Head
- Install some Cloud Computing basics:
- AWS CLI
- Docker
- Terraform
- kubectl
- What is any of this
- does
docker run nginx
work - Writing a docker file
- Building a docker container image
- Pushing a docker container image to DockerHub
- Running a dockerized service locally with docker-compose
- Setting up a Python dev environment
- Installing a version of python
virtualenv
requirements.txt
- In my opinion just use docker instead of dealing with virtualenv but it's still good to know
- Python: Hello World
- Python: Hello World+, like helloworld but with one trivial dependency to prove our build tools work
- Sample Dockerized service: Flask and trivial endpoint
- Make a single HTTP REST endpoint at
GET /
, it should return a JSON message containing the value of a few environment variables in your container - Get a trivial web service running locally
- Make a single HTTP REST endpoint at
- Docker build and push it to public Dockerhub repo so you can use it in the cloud
- Installing a version of python
- Set up AWS credentials file
- What is terraform
- Why is terraform
- How do things
- Set up Terraform AWS provider
- Use Docker to build an AWS Lambda .zip package out of your Hello World+ python script and its dependencies
- Create an AWS Lambda function in Terraform
- Use Terraform to upload your Lambda function to the cloud
- Use the AWS CLI to invoke your test lambda function and see the output
-
AWS EC2
- Create (In terraform probably. Maybe demo the AWS UI first.):
- VPC module from Terraform repo, including...
- security groups - If needed, output the ID(s) of these so we can add more rules manually
- Security group rules
- Subnet(s)
- Route table(s)
- EC2 Instance
- Create or output DNS hostname for your EC2 instance
- VPC module from Terraform repo, including...
- Install Docker on EC2 Instance
- SSH to instance, copy docker-compose.yml to EC2 instance, do docker-compose build and docker-compose up to run the service
- Change the environment variables in the docker-compose file, restart with docker-compose, check new output
- Create (In terraform probably. Maybe demo the AWS UI first.):
-
AWS ECS
- Given the previous step, create in terraform...
- A different EC2 instance running the official ECS optimized image
- Create an ECS Service Definition
- Create an ECS Task Definition that references your Docker container in DockerHub
- Create a DNS hostname for your docker task
- Given the previous step, create in terraform...
-
AWS Fargate
- Given the network resources in the previous step, create...
- An ECS Service Definition
- An ECS Task Definition
- Create a DNS hostname for your docker task
- Set up a local Kubernetes master using Docker Desktop because running Kubernetes in the cloud can be expensive or hard to set up at first
- Write Kubernetes YAML describing...
- An application Pod
- A Deployment that creates a ReplicaSet of N pods
- A Service that exposes the pods in the ReplicaSet
- Write new YAML to change some environment variables, kubectl apply, change the Deployment and watch the service change