/challenge-delta

Devops (and SRE) challenge

Primary LanguageJavaScript

HU Delta Challenge

[English | Portuguese]

There will basically be 2 parts that we will focus on in this test:

  • Your ability to get the code running using specific technologies and tools.
  • Your knowledge of best practices in these same technologies.

Some steps will have vague requirements or errors. There is no right or wrong answer, we want to evaluate your attitude towards the challenge as well as how you will develop it.

Part 1 - Development

Prerequisites

  • Git
  • Github account

How to do it

The project must use version control in git and be stored/uploaded to Github in a private repository in your account.

When you finish the challenge, invite the user automator-hurb as a collaborator to your challenge repository so that we can do the evaluation.

The task

Implement the application infrastructure found in the app directory.

Requirements

  • Kubernetes(Minikube v1.32.0)
  • Docker
  • Redis
  • MySQL database
  • 100% functional application

Application

The application consists of two main components: the frontend and the backend.

Frontend

The frontend was developed using JavaScript and the Express framework, running on version 1.22 of Node.js. The main responsibility of the frontend is to make requests to the backend API and present the respective statuses.

When the API is working correctly, the message "Up and Running!" is displayed on the frontend, along with some additional information such as the current date and the request ID generated by the backend.

If there is a problem with the API, an HTTP 500 error is returned and the error details are displayed on the screen.

Backend

The backend was developed using the Go language in version 1.20. It is responsible for processing the frontend requests that come through the /api/status endpoint.

If everything is working correctly, the backend returns an HTTP 200 status, along with the current date and request ID. If there is a problem with the application dependencies, such as the database or cache not being properly configured, the backend returns an HTTP 500 status, with the error message.

Dependencies

The application has MySQL and Redis as dependencies.

Part 2 - Application Delivery

  • Your application must run on Minikube v1.32.0 + kubectl

  • You must write Kubernetes manifests to create the Ingress to expose your app, 2 containers to run your application, 1 container to run the database, and 1 container for Redis. You should use K8s Services and deployments as well as HPA setting request limits and system resource usage.

  • You must deliver a diagram with the application architecture.

  • Cluster and container security will be taken into consideration.

  • The project must run using only 1 command (assuming the person already has Minikube installed and running).

Evaluation Criteria

  • Code organization: Module separation - app and infra code.
  • Clarity: Does the README briefly explain what the problem is and how to run the application?
  • Assertiveness: Is the application doing what is expected? If something is missing, does the README explain why?
  • Code readability (including comments)
  • Security: Is there any clear vulnerability that has not been addressed?
  • Test coverage: Unit tests
  • Commit history (structure and quality, titles and description)
  • Technical choices: Are the choice of libraries, architecture, etc., the best choice for the application?
  • Communication: If you couldn't complete the entire test, does the README contain what was missing?

Questions

Any questions you may have, check the issues to see if someone has already asked it and if you can't find your answer, open a new issue yourself!

Good luck and bon voyage! ;)

Challenge accepted

"