cd ./app
Install all the requirements
pip install -r requirement.txt
Server Start command
uvicorn app:app --reload
redis
Run Unit tests
cd ./app/tests
# Run the command
pytest
docker build -t apiserver .
docker run -d -p 8000:8000 apiserver
### Run prometheus server as a docker container
docker run -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml -d prom/prometheus
### Run redis server locally in a docker container
docker run -p 6379:6379 -d redis
### Run Prometheus exporter
docker build -t exporter .
docker run -d -p 8080:8080 exporter
docker-compose up
docker-compose down
### Run Redis in Helm
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install redis bitnami/redis -f k8s/redis/redis.yaml --debug --version 16.13.2
### Apply server k8s resources
kubectl apply -f k8s/apiserver
### Apply cache exporter
kubectl apply -f k8s/cache_exporter/cache_exporter.yaml
Once the docker is up check the following endpoints,
Server: http://localhost:8000/docs
Prometheus exporter: http://localhost:8080
Prometheus: http://localhost:9090