Here we deploy a simple python application that exposes a REST endpoint that returns the following JSON payload with the current timestamp and a static message: { “message”: “Automate all the things!”, “timestamp”: 1529729125 }
- Active AWS account
- install Docker cli
- Install Terraform
- Install AWS Cli
- Install Kubectl
Docker installation steps using default repository from Ubuntu
Update local packages by executing below command:
sudo apt update
sudo apt install docker.io -y
sudo usermod -aG docker $USER
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
Iam User > Security Credentials > Create Access Keys
aws configure
Add Access key details and region
aws sts get-caller-identity
./deploy.sh