Coder Social home page Coder Social logo

article-otel-warehouse-demo's Introduction

Warehouse manager

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.

Getting started

1. Start the app

Run the following command:

dotnet run --project WarehouseManager/WarehouseManager.csproj

The app will be available at localhost:5086

2. Local development: Start needed services

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

2. Deploy app to k8s cluster

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

article-otel-warehouse-demo's People

Contributors

jannikbend avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.