| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| main_test.go | ||
| main.go | ||
| README.md | ||
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
-
From the project's root folder, install its dependencies:
$ go get -t gitlab.com/enervalis-public/devops-release -
Run the test suite as follows:
$ go test -v ./... -
Start the service:
$ go run . -
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.