Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
poblin-orange committed Mar 7, 2025
1 parent d6fc610 commit 4348280
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4348280

Please sign in to comment.