Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

misternobody/hello-world-api

Repository files navigation

Test API application

Notes

CI&CD process is missed for the project. It should contain the following steps:

  • code linting
  • build Docker image
  • run unit tests
  • push Docker image
  • create and push Helm chart
  • deploy Helm chart to different environments
  • creation of required resources in AWS can be a part of the pipeline as well
  • etc.

AWS system diagram

Local development & deployment

Prerequisites

  • Docker
  • Docker Compose

To start the application, run the following command:

docker-compose up

Once the application is running, it will be accessible at: http://localhost:8888

Local testing

  1. Deploy the application using Docker Compose.
  2. Set up the environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-tests.txt
  1. Run unit tests:
python tests/unit.py

Kubernetes deployment

  1. Go to the directory with the Helm chart.
  2. Set required variables in values.yaml.
  3. Run Helm installation for the required namespace of K8s cluster in dry-run mode:
helm upgrade --install -n my-api --dry-run -f values.yaml helm-api .
  1. Analyse outputs and run the deployment if all good:
helm upgrade --install -n my-api -f values.yaml helm-api .

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published