Skip to content

Instantly share code, notes, and snippets.

@robertwe
Last active May 19, 2022 14:34
Show Gist options
  • Save robertwe/194f1c6690380c995872112c7d167d81 to your computer and use it in GitHub Desktop.
Save robertwe/194f1c6690380c995872112c7d167d81 to your computer and use it in GitHub Desktop.

Task 1

Infrastructure for the web web application(simple nodejs app with access to DB)

Please prepare a Terraform code that will deploy infrastructure for some not existing web application.

Let's consider the list of the requirements like below:

  • as the example of the application please use this project
  • the application needs to have access to the DB system,
  • application nodes should be located on EC2 instances,
  • application nodes should not have public IP addresses,
  • application nodes should be located in the private networks only,
  • please consider using reverse proxy for the applicaton but is not essential,
  • applications nodes should scale up automatically based on the CPU usage (please consider ASG rule),
  • only application nodes should have access to the Database,
  • communication with the Database should only be over private IP addresses,
  • using RDS service is allowed (it should not be exposed - no public endpoint),
  • to expose application instances, please consider application load balancer,
  • how you will provision the instances is entirely up to you (Ansible, Puppet, etc),
  • OS used on instances does not matter,
  • Terraform code should contain VPC definition,
  • using external Terraform modules is not allowed,
  • please use the latest version of the Terraform,
  • please include instruction on how the Terraform code should be executed

Task 2

Please prepare deployment of the application from the previous task on the local Kubernetes cluster.

Please consider the list of the requirements like below:

  • for the application pod nginx:latest container image will be perfectly fine,
  • deployment should be automated using Terraform,
  • please describe in a few words how you set up the local K8S cluster, what tools do you use for that?
  • deployment can have a form of the Helm package (it's not required),
  • please define network policies for the pods if possible,
  • application should be exposed (accessible from the host machine),
  • any type of ingress controller is allowed,
  • please attach instruction on how to run/deploy the application,
  • in a few words, please describe how you would build a perfect CI/CD pipeline for the mentioned application.

Required output

Please add your code to a new git repo on github.com, and please share it with us (@robertwe). If some extensive description is required, please put it into a dedicated Markdown file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment