This repository contains a WarehouseManager demo application written in dotnet 8 and c#. It provides a HTTP Api to add/remove/update and query warehouse items from a local sqlite database.
Besides the WarehouseManager contained in ./WarehouseManager
it contains kubernetes definition to deploy the app on a local Kubernetes Cluster.
These can be found in the ./deployment
folder.
Run the following command:
dotnet run --project WarehouseManager/WarehouseManager.csproj
The app will be available at localhost:5086
Even though the app is working without any dependencies to other services, it does not send any telemetry that we can analyze later.
To do that a few services must be up and running:
- OTel Collector
- Prometheus (for metrics)
- Grafana
This can be archived using the following command:
docker compose up -d
Make sure you have the following tools installed:
- k3d Theoretically any k8s cluster should work, but this one is tested
- kubectl The k8s cli
- helm The package manager for k8s
Now simply run the following command to build the WarehouseManager image and deploy it to the cluster:
cd deployment
./deploy.sh
Forward ports to access services in the cluster:
kubectl port-forward services/kube-prometheus-stack-grafana 3000:80 -n monitoring
kubectl port-forward service/warehousemanager 5086:5086 -n warehousemanager