https://github.com/gfechio/tiny_infra
Terraform infra
https://github.com/gfechio/tiny_infra
Last synced: 7 months ago
JSON representation
Terraform infra
- Host: GitHub
- URL: https://github.com/gfechio/tiny_infra
- Owner: gfechio
- License: apache-2.0
- Created: 2020-06-11T10:15:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-26T08:43:00.000Z (about 6 years ago)
- Last Synced: 2025-01-22T14:08:42.704Z (over 1 year ago)
- Language: HCL
- Homepage:
- Size: 285 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project
Project assignment for infra using K8S and terraform.

## Understandment
- Create an scalabe Kubernetes deploy of a given tomcat. Setup ingress and autoscale.
- Create an EC2 instance using terraform, the EC2 must be able to query Google, using curl.
# Disclaimer
This project was built using the following versions:
- Packer v1.6.0
- Terraform v0.12.16
- Kubectl v1.18.2
- EKS v1.16.8-eks-e16311
- Docker 19.03.11
# Execution Plan
- Generate an K8S cluster to deploy the tomcat application.
- Deploy Tomcat 8 app using provided resources.
- Create ingress for tomcat service.
- Open application to be queried externally ( this will also include VPC changes to allow ingress connection). Use Port 8080
- Scale solution accordingly - [here](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)
- Use multiple AZs
# Getting Started
- Have [jq](https://stedolan.github.io/jq/) installed.
- Export you credentials for AWS:
Ex:
`aws configure`
- Create Key Pair:
`aws ec2 create-key-pair --key-name project | echo "$(jq -r .KeyMaterial)" > ~/.ssh/project.pem`
`cmod 400 ~/.ssh/project.pem`
- Create a environment var file:
``` bash
cat > aws_export.env <