docs: documentation for validate/jonathan-demo-test #27
106
catalog/component/default/jonathan-demo-test/README.md
Normal file
106
catalog/component/default/jonathan-demo-test/README.md
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
---
|
||||||
|
title: "Jonathan Demo Test"
|
||||||
|
generated_by: documentor-agent
|
||||||
|
generated_at: "2026-06-08T16:18:10+00:00"
|
||||||
|
human_edited: false
|
||||||
|
source_entity: "Component/default/jonathan-demo-test"
|
||||||
|
source_repo: "https://gitea.kyndemo.live/validate/jonathan-demo-test"
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Jonathan Demo Test is a modernized microservice built with Java Spring Boot, following cloud-native architecture patterns. It serves as a demonstration of platform orchestration capabilities using Humanitec v2. The service is designed for containerized deployment and integrates seamlessly with observability tools like Prometheus and Grafana. Key features include production-ready configurations, health check endpoints, Prometheus metrics exposure, and security scanning integrated into the CI/CD pipeline.
|
||||||
|
|
||||||
|
This service plays a critical role in showcasing the modernization of legacy applications into scalable, cloud-native solutions. It leverages the Humanitec Platform Orchestrator for deployment and lifecycle management, ensuring streamlined operations and enhanced developer productivity.
|
||||||
|
|
||||||
|
## Repository
|
||||||
|
|
||||||
|
| Field | Value |
|
||||||
|
|------------------|-----------------------------------------------------------------------------------------------------------------|
|
||||||
|
| Source Repo | [Jonathan Demo Test](https://gitea.kyndemo.live/validate/jonathan-demo-test) |
|
||||||
|
| Branch | main |
|
||||||
|
| ArgoCD App | — |
|
||||||
|
| Namespace | dev |
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
Jonathan Demo Test is a microservice designed with the following architecture:
|
||||||
|
|
||||||
|
- **Runtime**: Java Spring Boot
|
||||||
|
- **Deployment**: Humanitec Platform Orchestrator
|
||||||
|
- **CI/CD Pipeline**: Gitea Actions → Azure Container Registry (ACR) → Humanitec
|
||||||
|
- **Observability**: Prometheus metrics and Grafana dashboards for monitoring and alerting.
|
||||||
|
|
||||||
|
The service communicates with external resources defined in `score.yaml`, including database configurations for H2, MySQL, and PostgreSQL. It supports health check endpoints (`/health`) and metrics endpoints (`/metrics`) for operational insights.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
| Configuration Option | Description |
|
||||||
|
|-----------------------------|-----------------------------------------------------------------------------|
|
||||||
|
| `spring.profiles.active` | Specifies the active profile (`mysql`, `postgres`, or default `h2`). |
|
||||||
|
| `jdbc:h2:mem:<uuid>` | URL for accessing the in-memory H2 database. |
|
||||||
|
| `MYSQL_USER`, `MYSQL_PASSWORD`, `MYSQL_DATABASE` | Environment variables for MySQL configuration. |
|
||||||
|
| `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` | Environment variables for PostgreSQL configuration.|
|
||||||
|
|
||||||
|
## Operations
|
||||||
|
|
||||||
|
### Running Locally
|
||||||
|
|
||||||
|
1. Clone the repository:
|
||||||
|
```bash
|
||||||
|
git clone https://gitea.kyndemo.live/validate/jonathan-demo-test
|
||||||
|
cd jonathan-demo-test
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Start the application:
|
||||||
|
- Using Maven:
|
||||||
|
```bash
|
||||||
|
./mvnw spring-boot:run
|
||||||
|
```
|
||||||
|
- Using Gradle:
|
||||||
|
```bash
|
||||||
|
./gradlew bootRun
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Access the application at [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
||||||
|
### Container Deployment
|
||||||
|
|
||||||
|
1. Build the container image:
|
||||||
|
```bash
|
||||||
|
./mvnw spring-boot:build-image
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the container:
|
||||||
|
```bash
|
||||||
|
docker run -p 8080:8080 docker.io/library/spring-petclinic:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### Database Setup
|
||||||
|
|
||||||
|
- For MySQL:
|
||||||
|
```bash
|
||||||
|
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.6
|
||||||
|
```
|
||||||
|
|
||||||
|
- For PostgreSQL:
|
||||||
|
```bash
|
||||||
|
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.3
|
||||||
|
```
|
||||||
|
|
||||||
|
## Observability
|
||||||
|
|
||||||
|
- **Grafana Dashboard**: [View Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=jonathan-demo-test)
|
||||||
|
- **Prometheus Metrics**: Exposed at `/metrics`.
|
||||||
|
- **Health Check**: Available at `/health`.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- `resource:default/cjot-aks`
|
||||||
|
|
||||||
|
## Links
|
||||||
|
|
||||||
|
- [Humanitec Console](https://console.humanitec.dev/orgs/skillful-wild-chicken-2617/projects/jonathan-demo-test)
|
||||||
|
- [Source Repository](https://gitea.kyndemo.live/validate/jonathan-demo-test)
|
||||||
|
- [CI/CD Pipelines](https://gitea.kyndemo.live/validate/jonathan-demo-test/actions)
|
||||||
|
- [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=jonathan-demo-test)
|
||||||
Reference in New Issue
Block a user