An open API service indexing awesome lists of open source software.

https://github.com/manonworldrepository/capgemini

Capgemini Senior Software Engineer Task Solution
https://github.com/manonworldrepository/capgemini

docker github-actions hibernate jpa kubernetes maven proxy proxysql query sentinel spring-boot sql

Last synced: 3 months ago
JSON representation

Capgemini Senior Software Engineer Task Solution

Awesome Lists containing this project

README

          

# Capgemini Twilight Project Test Assessment

For the Twilight project we are looking for new developers. Because this project is high in both complexity and pressure,
the requirement is that new developers are already familiar with the Spring framework and Java version 17.

*If at any time you have questions, feel free to ask! We would not expect you to work on the project alone without asking if you are blocked by something.*

You have _four_ hours to complete the test:

1) Make all tests from AssessmentApplicationTests pass.
2) Write good, clean, readable code.
3) Think about how you structure your code.
4) When done, zip your project and mail it back to the person you got it from.

You are free to use the internet to look up things. That's how all good coders work. However, make sure you understand what you copy ;)

# Solution:

## Start the application on kubernetes:

``` docker build -t proxysql-custom:k8s-local -f Dockerfile.proxysql . ```

``` docker build -t book-author-api:k8s-local -f Dockerfile.native . ```

``` minikube start --memory 8192 --cpus 4 ```

``` eval $(minikube -p minikube docker-env) ```

``` minikube image load proxysql-custom:k8s-local ```

``` minikube image load book-author-api:k8s-local ```

``` kubectl apply -f k8s-pvc.yml ```

``` kubectl create configmap proxysql-config --from-file=proxysql.cnf ```

``` kubectl apply -f k8s-deployment.yml ```

## Stop the application on kubernetes:

``` minikube delete ```

## Start the application on docker:

``` docker compose up -d --build ```

## Stop the application on docker:

``` docker compose down ```

## Browse the application:

Point your browser to: ``` http://localhost:8080/swagger-ui.html ```

# Architecture:

![arch.png](arch.png)