Skip to content

catho/infra_devops_exam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Welcome to Catho Challenge

Please read these instructions carefully.

Purpose

There are 3 challenges in this project:

1. Development Skills

We have an API Application called devopsExam, it based in Python3.7 and it has 2 main routes /users, /user/{id}. The route /users has 2 methods (GET and POST), the method GET return all users on database (in this application, database is a ElastiCache Redis) and the method POST create a new user. The route /user/{id} has only 1 method (GET), this method returns a specific user based on id.

The main objective in this challenge, is solve a problem in application code (really basic problem).

OBS: It is not necessary has advanced knowledge in development, our expectations are about your development skills;

2. Terraform

The main objective here, is create an AWS Environment using Terraform, where the application devopsExam must be deployed, ensuring High Availability, Scalability and Resilience.

The architecture must have the following resources:

  • VPC
    • Network: 10.253.0.0/16;
  • 2 Private Subnets Multi A-Z (Only LAN Traffic)
    • Networks: 10.253.0.0/24 and 10.253.1.0/24;
  • 2 Public Subnets Multi A-Z (Only WAN Traffic)
    • Networks: 10.253.2.0/24 and 10.253.3.0/24;
  • SecurityGroup
    • Granting access to the application (Only HTTP);
  • ElastiCache Redis Cluster
    • Application's Database;
  • Lambda Function
    • To host application devopsExam;
  • API Gateway
    • Integrated with Lambda function (According routes described on challenge 1).

3. CICD

The main objective here, is create a pipeline (Jenkins [Preferred], Code Pipeline or Github Actions) to deploy all AWS Environment (Terraform) and Application devopsExam.

Expectations

Our expectations about all challenges are:

  1. Perform the pipeline to create entire AWS environment, including deploy the Application devopsExam ;
  2. If there isn't pipeline, the repository must have a README.md with the procedure to run terraform and deploy application;
  3. We'll perform a curl in the API Gateway DNS and the returns must be:
    • In Route /users with method POST Return 201 HTTP Code and create a user;

    • In Route /users with method GET Return 200 HTTP Code and all users saved in database (Redis);

    • In Route /user/{id} with method GET Return 200 HTTP Code and specific user saved in database (Redis);

Submissions

You should send us a git patch file with your solution. To do so follow these steps:

Clone (do NOT fork) this repository to your machine: $ git clone https://github.com/catho/infra_devops_exam.git

Implement your solution

Take a look at your changes: $ git status

Add some new file/dir: $ git add -N terraform/main.tf

Take a new look at your changes and confirm if it's everything ok: $ git status

check the diff: $ git diff

Make sure that it looks like your solution, otherwise repeat the steps above. If everything looks ok, move to the next step.

Commit your changes locally: $ git commit -am "My solution"

Create a patch file containing your changes: $ git format-patch origin/master --stdout > result.patch

Check result.patch, it should look like git diff output. To check the diff after committing, use git diff origin/master HEAD. If something looks wrong, run git reset origin/master and go to step 2. If everything looks right Email us the result.patch file.

Please do not fork this repository and do not publish your solution online!

About

DevOps Exam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages