Skip to content

Écrire et déployer un microservice avec Go, Helm, Terraform, AWS, Github Actions

Notifications You must be signed in to change notification settings

gforien/reddit-assignment

Repository files navigation

reddit-assignment ♻☸🌐

Coding assignment trouvé sur r/devops:
Écrire et déployer un microservice avec Go, Helm, Terraform, AWS, Github Actions

Table des matières

  1. Microservice en Go
    1. Tests
  2. Containerization
    1. Écrire le Dockerfile
    2. Lancer avec Docker-compose
    3. Lancer avec Docker Swarm

Sujet (légèrement modifié)

1. Using Go, write a simple counter application (http server) which serves 3 endpoints
    - /inc which increment the hits and save in redis
    - /dec which decrement the hits and save in redis
    - /count will present the number of hits.
    Containerize all code including the redis, and save it as docker-compose build.
    Remove the source code from the container.
    Save it on github repository

2. Build a helm chart of the httpserver you wrote.
    Explain which kind of k8s resource you pick and why?
    Add liveness and readiness
    Expose the service port to 3030
    Install kind to test you application and install the helm chart
    Bonus**: Serve a route with the commit SHA of the deployed app.

3. Build github action file that trigger build on specific wildcard PR (*build*) and
   on merge to master and create tags, which build your container, run unittest, save
   to the registry with the correct version.
   Bonus: Write a terraform which spins a virtual machine and sets relevant firewall
   rules and load balancer for our application. Pick (GCP or AWS).

4. Script:
    Write a script (shell) which acts like installer (curl …..| bash -c… look a like)
    Its will download and the httpserver as binary (you can include the httpserver above
    as binary in the shell script).	Add check that its install on linux os and ubuntu 20.04
    Bonus: add systemctl service start for the application.

Note: Please document all command in README.md format and save on the github repository

Gabriel Forien
5TC INSA Lyon

About

Écrire et déployer un microservice avec Go, Helm, Terraform, AWS, Github Actions

Topics

Resources

Stars

Watchers

Forks

Packages