Random name service consists of two microservices which are backend service and frontend service. Backend service used to fetch random user information based on https://api.randomuser.me public API, and the result will be displayed through the frontend service.
refresh your browser to get the new name
- Backend: Get the user information from the https://api.randomuser.me and return the user information via REST API
- Backend: Will remain private. Inaccessible by the public and only accessible from the frontend, it doesn't have a public domain and/or IP
- Backend: Written in Go language
- Frontend: Request the user information to the backend and it will display the name information
- Frontend: Written using React Framework
- Frontend: It can be configured to be accessible through a public domain
- Both of the services are containerized
- Microservices deployment to Kubernetes cluster can be done using Helm chart
- The Helm chart can accommodate auto-scaling and easily toggled on and off in a specific environment, the case here is that it needs auto-scaling in production but certainly do not in staging and development
- Makefile that will simplify the building, containerizing, and deployment in various environments (production, staging, etc)
Environment used during development are as follow:
- Go version 1.14.1
Refer to this link on how to setup Go - Node.js version v12.17.0
Refer to this link for how to get Node.js - Docker version 19.03.8
Refer to this link for how to get Docker up and running - Kubernetes version 1.18.0
Refer to this link for setting up the kubernetes installation (while we are using Minikube during development, and please letingress-controllerandmetrics-serveraddons enabled as we need that addons to get these apps up and running) - Helm version 3.2.1
Refer to this link for how to install helm - GNU Make 4.2.1
Refer to this link to get more informations about GNU Make - Docker-compose version 1.25.5
Refer to this link to get more informations about docker-compose.
ℹ️ Please be noted, when using Minikube, build the image using the minikube docker env, and this project doesn't push any Docker images to any Docker repository. It assumes your kubernetes cluster have an access to the services Docker image. Or you could push the images to the repository and do the necessary configuration.
To get these apps ready, you can directly build the containers from the root directory of this repository.
Run make to get details information about its target
Choose a target to run:
build Build the image with specified target. Accepted value `backend`
and `frontend`
build-all Build all the images
compose-up Run docker compose and shows the services log.
compose-daemon Run docker compose in a background.
chart-review Review the chart manifest using 'less'.
You will be prompted wether you want to enable auto scale or not
chart-deploy Deploy the chart to the Kubernetes cluster. You will be prompted where
you want deploy the chart and wether you want to enable auto scale or not
ℹ️ Applications are exposed by default on port
8081, you access this application in your browserhttp://localhost:8081after you runmake compose-upormake compose-daemon.
Helm chart used to simplify the deployment of the services. For more informations about randomname-chart, please refer to chart README.
Backend microservice will allow frontend service to fetch random name based on https://randomuser.me. For a detailed explanation, please refer to the service README.
Frontend microservice will allow user to get random name fetched from backend service. For a detailed explanation, please refer to the service README.
This project is licensed under the MIT License - see the License.md file for details
