From 434828056206e9b62ab7971f7fac3101c5a0cbff Mon Sep 17 00:00:00 2001 From: Pierre Oblin Date: Fri, 7 Mar 2025 17:51:42 +0100 Subject: [PATCH] update README --- README.md | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index adc77a3..3fc526d 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,51 @@ -# Your Project Name +# MongoDb probe app ![Build Status](https://github.com/poblin-orange/mongodb-probe/actions/workflows/maven.yml/badge.svg) ## Description Sample mongodb app. -Generated with Claude Sonet 3.5 +Based on spring boot + mongodb starter + opentelemetry starter. +Packaged as: +- a cloudfoundry compatible jar +- an OCI image +- a helm chart for convenient k8s deployment of the image with adapter config (mongodb uri, otel endpoint) -references: + +## references: - https://github.com/kokuwaio/helm-maven-plugin - https://opentelemetry.io/blog/2024/spring-starter-stable/ +- https://opentelemetry.io/docs/languages/java/configuration/ + +## basic tests + +chart values.yaml: + +``` +mongodb: + uri: mongodb://databaseAdmin:yyyy.zzzz:27017,rs0-1-2e385b67-a1c9-4aa0-910d-b25dc99e9c5d.zzzz:27017,rs0-2-2e385b67-a1c9-4aa0-910d-b25dc99e9c5d.zzzz:27017/admin?replicaSet=rs0 + +otlp: + serviceName: probe-for-mongodb + tracing: + endpoint: http://jaeger-collector-303ada4c-4478-49dd-b427-8c482bfc17b8.zzzz:443 + sampling: + probability: 1.0 + +``` + +install OCI chart: +``` +helm template oci://ghcr.io/poblin-orange/mongodb-probe/mongodb-probe --version 0.0.1 -f ./mongodb-probe-values.yaml | kubectl apply -f - -./mvnw clean install -./mvnw spring-boot:build-image +``` -#docker run -d -p 8080:8080 docker run -i spring-mongo-demo:0.0.1-SNAPSHOT -docker run -i spring-mongo-demo:0.0.1-SNAPSHOT - +testing probe REST API: +``` +``` -docker tag ${project.artifactId}:${project.version} your-username/${project.artifactId}:latest -docker push your-username/${project.artifactId}:latest \ No newline at end of file