Files
platform-docs/catalog/component/default/petclinic

title, generated_by, generated_at, human_edited, source_entity, source_repo
title generated_by generated_at human_edited source_entity source_repo
Petclinic Service documentor-agent 2026-05-05T10:41:37+00:00 false Component/default/petclinic https://gitea.kyndemo.live/validate/petclinic-demo-jonathan-scaf-2

Petclinic Service

A Spring Bootbased application for managing veterinary clinic operations, including scheduling, customer management, and pet records.

Overview

The Petclinic service is a Java-based application built using Spring Boot. It provides a comprehensive solution for managing veterinary clinic operations, including scheduling appointments, managing customer and pet records, and handling clinic workflows. Originally developed as a sample application by the Spring community, this service has been adapted and deployed as part of the petclinic-demo-jonathan-scaf-2 system.

The application supports multiple database configurations, including in-memory H2, MySQL, and PostgreSQL, and is designed to be easily deployable in containerized environments. It includes OpenTelemetry instrumentation for observability and integrates with ArgoCD for continuous deployment. The service plays a critical role in the broader veterinary platform, serving as the primary interface for clinic management.

Repository

Field Value
Source Repo Petclinic Repository
Branch main
ArgoCD App petclinic-demo-jonathan-scaf-2
Namespace demo-apps

Architecture

  • The Petclinic service is scaffolded using the Application Migration Factory Backstage template.
  • Deployment flow:
    1. Source code cloned from the original Spring Petclinic repository.
    2. Backstage overlays applied for catalog entity creation and CI workflows.
    3. OpenTelemetry auto-instrumentation injected via Kustomize overlays.
    4. ArgoCD Application created targeting the demo-apps namespace.
    5. Continuous sync from the main branch via ArgoCD.
  • Observability is enabled through OpenTelemetry, with metrics and traces visualized in Grafana.

Configuration

Configuration Description
spring.profiles.active Sets the active Spring profile (mysql, postgres, or default h2).
Database URL For H2: jdbc:h2:mem:<uuid> (printed at startup).
MySQL Docker 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 Docker docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:18.3

Operations

  • Local Development:

    1. Clone the repository: git clone https://gitea.kyndemo.live/validate/petclinic-demo-jonathan-scaf-2.git.
    2. Start the application using Maven: ./mvnw spring-boot:run or Gradle: ./gradlew bootRun.
    3. Access the application at http://localhost:8080.
  • Container Build: Use the Spring Boot build plugin: ./mvnw spring-boot:build-image.

  • Rollback:

    1. Open the ArgoCD UI.
    2. Use the "History and Rollback" feature to revert to a previous version.

Observability

  • Grafana Dashboard: OpenTelemetry Application Observability.
  • OTel Collector Endpoint: http://otel-collector.monitoring.svc.cluster.local:4318.
  • Alerts: Configured via Grafana with label selector app=petclinic.

Dependencies

  • component:default/argocd-service
  • resource:default/k6-operator
  • resource:default/otel-collector
  • resource:default/veterinary-platform