docs: documentation for validate/petclinic-argo-doc #28
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: "Petclinic Service"
|
||||
generated_by: documentor-agent
|
||||
generated_at: "2026-06-08T16:14:03+00:00"
|
||||
generated_at: "2026-06-08T16:23:20+00:00"
|
||||
human_edited: false
|
||||
source_entity: "Component/default/petclinic"
|
||||
source_repo: "https://gitea.kyndemo.live/validate/petclinic"
|
||||
@@ -9,11 +9,9 @@ source_repo: "https://gitea.kyndemo.live/validate/petclinic"
|
||||
|
||||
## Overview
|
||||
|
||||
The Petclinic service is a Spring Boot application designed to manage veterinary clinic operations, including scheduling appointments, managing pet records, and handling customer information. It serves as a foundational component of the broader Petclinic system, providing essential functionality for veterinary platforms.
|
||||
The Petclinic service is a Spring Boot application designed to manage veterinary clinic operations, including scheduling appointments, managing pet records, and handling customer information. It serves as a foundational component of the broader Petclinic system, providing essential business logic and data management capabilities.
|
||||
|
||||
This service is built using Java 17 and leverages Spring Boot for rapid development and deployment. It supports multiple database configurations, including in-memory H2, MySQL, and PostgreSQL, making it adaptable to various environments. Observability is integrated via OpenTelemetry, enabling detailed monitoring and performance analysis.
|
||||
|
||||
Petclinic plays a critical role in the system by ensuring reliable and scalable management of veterinary clinic data, while also serving as a demonstration of modern application development practices.
|
||||
This service is deployed in the `demo-apps` namespace and managed via ArgoCD. It integrates with OpenTelemetry for observability, supports load testing via k6, and includes chaos engineering capabilities through Chaos Mesh. The application is built using Java 17 and can be run locally or deployed in containerized environments.
|
||||
|
||||
## Repository
|
||||
|
||||
@@ -26,25 +24,25 @@ Petclinic plays a critical role in the system by ensuring reliable and scalable
|
||||
|
||||
## Architecture
|
||||
|
||||
The Petclinic service is a Spring Boot application deployed via ArgoCD in the `demo-apps` namespace. It integrates OpenTelemetry for observability and supports multiple database configurations, including H2, MySQL, and PostgreSQL. The deployment process involves continuous synchronization from the `main` branch of the source repository.
|
||||
The Petclinic service is a Spring Boot application that communicates with an in-memory H2 database by default. It supports integration with MySQL and PostgreSQL for persistent storage, configurable via Spring profiles. The service is instrumented with OpenTelemetry for tracing and metrics, and its deployment is managed by ArgoCD, ensuring continuous synchronization with the source repository.
|
||||
|
||||
Key architectural components:
|
||||
- **Spring Boot Framework**: Provides the core application structure and dependency management.
|
||||
- **Database Configurations**: Supports H2 (default), MySQL, and PostgreSQL, with profiles for switching between them.
|
||||
- **OpenTelemetry Integration**: Enables tracing, metrics, and logging for detailed observability.
|
||||
- **ArgoCD Deployment**: Ensures continuous delivery and synchronization of application updates.
|
||||
- **Spring Boot Framework**: Provides the application runtime and dependency management.
|
||||
- **Database Options**: Default H2 database, with optional MySQL or PostgreSQL configurations.
|
||||
- **Observability**: OpenTelemetry instrumentation for metrics, traces, and logs.
|
||||
- **Deployment**: Managed via ArgoCD in the `demo-apps` namespace.
|
||||
|
||||
<!-- TODO: FILL IN -->
|
||||
|
||||
## Configuration
|
||||
|
||||
| Configuration Option | Description |
|
||||
|-------------------------------|-------------------------------------------------------------------------------------------------|
|
||||
| `spring.profiles.active` | Sets the active profile for database configuration (`mysql`, `postgres`, or default `h2`). |
|
||||
| `MYSQL_USER` | MySQL username for database authentication. |
|
||||
| `MYSQL_PASSWORD` | MySQL password for database authentication. |
|
||||
| `POSTGRES_USER` | PostgreSQL username for database authentication. |
|
||||
| `POSTGRES_PASSWORD` | PostgreSQL password for database authentication. |
|
||||
|----------------------------|-------------------------------------------------------------------------------------------------|
|
||||
| `spring.profiles.active` | Sets the active Spring profile (`mysql`, `postgres`, or default for H2). |
|
||||
| `MYSQL_USER` | MySQL username for database connection. |
|
||||
| `MYSQL_PASSWORD` | MySQL password for database connection. |
|
||||
| `POSTGRES_USER` | PostgreSQL username for database connection. |
|
||||
| `POSTGRES_PASSWORD` | PostgreSQL password for database connection. |
|
||||
|
||||
## Operations
|
||||
|
||||
@@ -75,21 +73,23 @@ Key architectural components:
|
||||
docker run -p 8080:8080 docker.io/library/spring-petclinic:latest
|
||||
```
|
||||
|
||||
### Rollback
|
||||
1. Open the [ArgoCD UI](https://argocd.kyndemo.live/applications/petclinic).
|
||||
2. Click **History and Rollback**.
|
||||
3. Select the desired revision and click **Rollback**.
|
||||
|
||||
Alternatively, revert the commit in Git and push — ArgoCD will auto-sync the rollback.
|
||||
### Database Configuration
|
||||
- Default: In-memory H2 database.
|
||||
- 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
|
||||
```
|
||||
- PostgreSQL:
|
||||
```bash
|
||||
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.3
|
||||
```
|
||||
|
||||
## Observability
|
||||
|
||||
This service is configured with OpenTelemetry instrumentation. Metrics, traces, and logs are exported to the OTel Collector and visualized in Grafana.
|
||||
The Petclinic service is fully instrumented with OpenTelemetry for observability. Metrics, traces, and logs are exported to the OTel Collector and visualized in Grafana.
|
||||
|
||||
- **Grafana Dashboard**: [Petclinic Observability](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-service=petclinic)
|
||||
- **Alerting**: Alerts are configured via Grafana and can be filtered by `app=petclinic`.
|
||||
|
||||
_Additional observability details are available in the platform observability documentation._
|
||||
- **Alerting**: Configured via Grafana with label selector `app=petclinic`.
|
||||
|
||||
## Dependencies
|
||||
|
||||
|
||||
Reference in New Issue
Block a user