Code Monkey home page Code Monkey logo

terraform-assignment's Introduction

Technical Assignment

You need to fix terraform code and/or Dockerfile.

Please

  1. Create your own free AWS account
  2. Create VPC
  3. Create ecs registry
  4. Create and push container to the registry
  5. Fix state.tf file. Create new terraform workspace, for instance in code we have dev
  6. Deploy cluster
  7. Go to ALB DNS name and check if you see succesfull code
  8. Share updated code, LB URL and your findings

Deployment

  1. Create new terraform workspace
  2. terraform deploy
terraform workspace new dev
terraform apply

Steps Performed while doing this Assignmenet and finding are below points.

  1. Created VPC, ECR repo manually in AWS account (region: us-east-1)
  2. Cloned given code https://github.com/anton-demydov-zoral/tech_assignment.git and used terraform workspace dev.
  3. Modified code/docker-entrypoint.sh --> added fi at end of file
  4. Modified Dockerfile by adding executable permissions to docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh
  5. Built image using Docker and pushed image to created ECR repository.
  6. Modified state.tf file with values (bucketname, key, region, workspace_key_prefix).
  7. Modified alb.tf - target group health check status code from 404 to 200.
  8. Modified policy document - added access permissions to pull image from ECR.
  9. Modified Security group - In ALB SG, allow http port from 81 to 80 and allowed 8080 on TCP, egress all traffic.In Container SG, ingress all traffic on ALB SG and egress all traffic.
  10. Modified variables.tf file - image tag - lab to latest and ECR repository url in repo_url.
  11. Modified main.tf file - network configuration subnets - public and enabled assign public ip's to true, modified load balancer container port from 8888 to 8080.
  12. ALB URL http://dev-assignment-613199568.us-east-1.elb.amazonaws.com/

terraform-assignment's People

Contributors

srp561 avatar

Stargazers

Anton Demydov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.