diff --git a/catalog/component/default/sonar-test-nest4/README.md b/catalog/component/default/sonar-test-nest4/README.md index 8c14006..6b17cea 100644 --- a/catalog/component/default/sonar-test-nest4/README.md +++ b/catalog/component/default/sonar-test-nest4/README.md @@ -1,7 +1,7 @@ --- title: "Sonar Test Nest4" generated_by: documentor-agent -generated_at: "2026-05-14T12:03:00+00:00" +generated_at: "2026-05-14T12:03:54+00:00" human_edited: false source_entity: "Component/default/sonar-test-nest4" source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4" @@ -9,15 +9,15 @@ source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4" # Sonar Test Nest4 -> A stateless microservice built with TypeScript and NestJS, providing API endpoints for item management and Prometheus-based observability. +> A stateless microservice built with TypeScript and NestJS, providing API endpoints for item management and integrated observability features. ## Overview -Sonar Test Nest4 is a stateless microservice scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. It is designed to manage items through a RESTful API and includes built-in observability features such as health checks and Prometheus metrics. +Sonar Test Nest4 is a stateless microservice scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. It is implemented using the `typescript-nestjs` runtime and is designed to manage items through a RESTful API. The service includes built-in observability features such as health checks and Prometheus metrics. -The service is implemented using the `typescript-nestjs` runtime and follows a structured branch model (`dev`, `staging`, `prod`, and `main`) to ensure smooth CI/CD workflows. It is deployed to Azure Kubernetes Service (AKS) via Humanitec, with container images stored in Azure Container Registry (ACR). +This service follows a structured branch model (`dev → staging → prod → main`) to ensure smooth CI/CD workflows. The `dev` branch supports active development with automatic deployments to the development environment, while `staging` and `prod` require PR-based promotions with CI gates and approvals. The `main` branch serves as the system of record for platform metadata and workflow files. -This service plays a key role in the broader system by providing item management capabilities and adhering to platform standards for observability, deployment, and runtime configuration. +Sonar Test Nest4 integrates with Azure Container Registry for image storage and Humanitec for deployment orchestration, targeting an AKS cluster. Observability is enhanced through OpenTelemetry instrumentation and Prometheus metrics, with dashboards available in Grafana. ## Repository @@ -34,15 +34,16 @@ Sonar Test Nest4 is built using the `typescript-nestjs` runtime and deployed as - **Runtime**: TypeScript with NestJS framework. - **Container Port**: `3000`. -- **Health Check Endpoint**: `/health`. -- **Metrics Endpoint**: `/metrics` (Prometheus format). -- **Image Repository**: Azure Container Registry (`bstagecjotdevacr`). +- **Endpoints**: + - `/health`: Health check endpoint returning `{"status":"UP"}`. + - `/metrics`: Prometheus metrics exposition. + - `/api/items`: RESTful API for item management. +- **Image Storage**: Azure Container Registry (`bstagecjotdevacr`). +- **Deployment Flow**: + - CI/CD pipelines (`build-push.yml` and `deploy-humanitec.yml`) handle image building, testing, and deployment. + - Humanitec orchestrates deployments to AKS using Score files. -The CI/CD pipeline is managed through Gitea Actions workflows: -- `build-push.yml`: Builds and tests the application, then pushes the container image to ACR. -- `deploy-humanitec.yml`: Deploys the service to AKS via Humanitec using Score files. - -Promotions between environments (`dev`, `staging`, `prod`) are triggered through Backstage's CI/CD tab, ensuring controlled and gated deployments. +The service is integrated with observability tools such as Grafana and Prometheus, ensuring robust monitoring and alerting capabilities. ## Configuration @@ -54,21 +55,27 @@ Promotions between environments (`dev`, `staging`, `prod`) are triggered through ## Operations -The service follows a structured branch model for development and deployment: +### Deployment Steps -- **dev**: Active development branch; commits trigger automatic builds and deployments to the dev environment. -- **staging**: Pre-production environment; changes are promoted from `dev` via PR with CI gate and approval. -- **prod**: Production environment; changes are promoted from `staging` via PR with CI gate and approval. -- **main**: System of record; receives merges from `prod` after releases. +1. Push changes to the `dev` branch for automatic deployment to the development environment. +2. Open a PR for promotion to `staging` or `prod`. Ensure CI tests pass and obtain one approval. +3. Merge PR to promote the service to the target environment. +4. Use Backstage CI/CD tab for environment promotions. -Deployment workflows are runtime-agnostic and rely on `.platform/config.yaml` for configuration. +### Branch Model + +| Branch | Purpose | +|---|---| +| dev | Active development with automatic deployments. | +| staging | Pre-production environment, promoted from `dev`. | +| prod | Production environment, promoted from `staging`. | +| main | System of record for platform metadata and workflow files. | ## Observability -- [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4): OpenTelemetry-based application observability. -- Prometheus metrics exposed at `/metrics`. -- Health check endpoint at `/health`. +- [Grafana Dashboard](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4) +- Prometheus metrics available at `/metrics`. ## Dependencies -_No declared dependencies._ \ No newline at end of file +- api:default/sonar-test-nest4-api \ No newline at end of file