Go to file
2023-06-25 22:08:30 +02:00
kubernetes Update matchlabels in both deployments 2023-06-25 22:08:30 +02:00
Dockerfile Add Dockerfile 2023-06-25 20:19:40 +02:00
go.mod Initial commit 2023-06-25 19:29:56 +02:00
go.sum Initial commit 2023-06-25 19:29:56 +02:00
main_test.go Initial commit 2023-06-25 19:29:56 +02:00
main.go Add new vehicle to list 2023-06-25 22:08:30 +02:00
README.md Initial commit 2023-06-25 19:29:56 +02:00
SOLUTION.md Add SOLUTION.md explanation document 2023-06-25 22:08:30 +02:00

DevOps Release

You are part of a development team maintaining HTTP services. Some of your colleagues have developed a new Vehicle API in Go, and you should help them to deploy it to production.

Project Setup

  1. Install Go.

  2. From the project's root folder, install its dependencies:

    $ go get -t gitlab.com/enervalis-public/devops-release
    
  3. Run the test suite as follows:

    $ go test -v ./...
    
  4. Start the service:

    $ go run .
    
  5. Now, you should be able to query the service in the port 8080:

    $ curl localhost:8080/vehicles
    [
        {
            "id": "1",
            "model": "Tesla Model Y",
            "maker": "Tesla"
        },
        {
            "id": "2",
            "model": "Tesla Model 3",
            "maker": "Tesla"
        },
        {
            "id": "3",
            "model": "Fiat 500e",
            "maker": "Fiat"
        },
        {
            "id": "4",
            "model": "Peugeot e-208",
            "maker": "Peugeot"
        },
        {
            "id": "5",
            "model": "Volkswagen ID.4",
            "maker": "Volkswagen"
        }
    ]
    

Your Task

Your goal is to deploy it to a Kubernetes cluster following the blue-green deployment strategy.

We would like to run the outcome of your work, so we ask you to document how to set it up using either Minikube or Docker for Desktop.

  • If you make any changes to the application code, ensure the test suite continues to pass.
  • Document how to configure and deploy the application to a local cluster.
  • Keep a clean Git history.