docs: documentation for validate/sonar-test-nest4 #18

Merged
demo-bot merged 2 commits from documentor-validate-sonar-test-nest4-dbb31bba into main 2026-05-18 09:32:06 +00:00
2 changed files with 25 additions and 30 deletions

View File

@@ -1,7 +1,7 @@
---
title: "sonar-test-nest4"
generated_by: documentor-agent
generated_at: "2026-05-15T15:21:00+00:00"
generated_at: "2026-05-18T09:31:41+00:00"
human_edited: false
source_entity: "Component/default/sonar-test-nest4"
source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
@@ -9,38 +9,34 @@ source_repo: "https://gitea.kyndemo.live/validate/sonar-test-nest4"
## Overview
`sonar-test-nest4` is a stateless microservice built using the `typescript-nestjs` runtime. It was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. The service provides a REST API for managing items, including endpoints for CRUD operations. It is designed to be lightweight, scalable, and observable, with integrated OpenTelemetry instrumentation and Prometheus metrics.
`sonar-test-nest4` is a stateless microservice built using the `typescript-nestjs` runtime. It was scaffolded from the **Create Microservice** golden-path template on the Kyndryl Platform. The service provides a REST API for managing items, exposing endpoints for CRUD operations. It is designed to be lightweight, scalable, and integrates seamlessly with the platform's CI/CD pipeline and observability stack.
This service plays a key role in the broader system by offering item management capabilities. It is deployed on Azure Kubernetes Service (AKS) via Humanitec's Score-based deployment model, with container images stored in Azure Container Registry (ACR). The CI/CD pipeline is managed through Gitea Actions, ensuring automated builds, tests, and deployments across development, staging, and production environments.
The service plays a critical role in the demo-apps domain, serving as a foundational component for showcasing platform capabilities such as OpenTelemetry instrumentation, Prometheus metrics, and automated load testing with k6. It is managed by the platform engineering group and follows a strict branch promotion model to ensure stability across environments.
## Repository
| Field | Value |
|----------------|------------------------------------------------------------------------------------------------------------------------------------|
| Source Repo | [validate/sonar-test-nest4](https://gitea.kyndemo.live/validate/sonar-test-nest4) |
|----------------|-----------------------------------------------------------------------------------------------------------------------------|
| Source Repo | [sonar-test-nest4](https://gitea.kyndemo.live/validate/sonar-test-nest4) |
| Branch | `dev` |
| ArgoCD App | — |
| Namespace | `dev` |
## Architecture
`sonar-test-nest4` follows a stateless architecture and is deployed as a containerized service. Key components include:
`sonar-test-nest4` is deployed as a containerized service on Azure Kubernetes Service (AKS) via Humanitec's Score-based deployment. The CI/CD pipeline is powered by Gitea Actions, which automates the build, test, and deployment processes. The service communicates with other components through its REST API and exposes Prometheus metrics for monitoring.
Key architectural details:
- **Runtime**: `typescript-nestjs`
- **Container Port**: `3000`
- **Endpoints**:
- `/api/items` for CRUD operations
- `/health` for health checks
- `/metrics` for Prometheus metrics
- **Image Registry**: Azure Container Registry (`bstagecjotdevacr`)
- **Deployment Flow**:
- Push to `dev`, `staging`, or `prod` triggers CI/CD workflows:
- `build-push.yml`: Builds and tests the application, then pushes the container image to Azure Container Registry.
- `deploy-humanitec.yml`: Deploys the service to AKS using Humanitec's API.
- **Branch Model**:
- `dev`: Active development, auto-deploys to the dev environment.
- `staging`: Pre-production, promoted from `dev` via PR.
- `prod`: Production, promoted from `staging` via PR.
- `main`: System of record, receives merges from `prod`.
- Push to `dev` triggers automatic build and deployment to the dev environment.
- Promotion to `staging` and `prod` requires PR approval and passing CI gates.
## Configuration
@@ -53,22 +49,21 @@ This service plays a key role in the broader system by offering item management
## Operations
### Deployment Steps
1. Push changes to the `dev` branch for automatic deployment to the dev environment.
2. Open a PR to promote changes from `dev` to `staging`. Ensure CI tests pass and obtain one approval.
3. Open a PR to promote changes from `staging` to `prod`. Ensure CI tests pass and obtain one approval.
4. Merge changes from `prod` to `main` for system-of-record updates.
2. Open a PR for promotion to `staging` or `prod`. Ensure CI tests pass and obtain one approval.
3. Merge the PR to trigger deployment to the target environment.
### Runbook Notes
- Monitor `/health` for service status.
- Use `/metrics` for Prometheus-based observability.
- For load testing, refer to the K6 configuration in the `dev` namespace.
- Monitor the `/health` endpoint for service status.
- Use the `/metrics` endpoint for Prometheus-based observability.
- Refer to `.platform/config.yaml` for runtime-specific configurations.
## Observability
- **Grafana Dashboard**: [Opentelemetry Application Observability](https://grafana.kyndemo.live/d/otel-app-observability-v2/opentelemetry-application-observability?orgId=1&var-app=sonar-test-nest4)
- **Prometheus Metrics**: Enabled at `/metrics` on port `3000`.
- **Prometheus Metrics**: Enabled (`/metrics` endpoint)
- **Chaos Mesh**: Enabled for resilience testing
- **k6 Load Testing**: Configured (`k6-test-sonar-test-nest4` in `dev` namespace)
## Dependencies

View File

@@ -2,12 +2,12 @@
"sourceShas": {
"catalog-info.yaml": "5c2be634ddfec05ec6fed8c7b85cb2c8b9ab3c13",
".platform/initialized.md": "24a574f77ac17059b313a824398b9bb19263232e",
"README.md": "b1f5c8dec0bf22d85c71f5049fb595bf1faa891c",
"README.md": "4b5a7f83a6729688266ef621748367cbd556ddfe",
"docs/api.md": "86776bdd5e2fbe634709920102282ed589927c5b",
"docs/architecture.md": "6d022a6fee34ee24f7274bb18396d1c107be0c17",
"docs/index.md": "81f0ec2243665ad41daf93202c872cfc023eb21a"
},
"promptVersion": "1.0",
"generatedAt": "2026-05-15T15:21:17+00:00",
"contentHash": "c8f2f45262bf333754d6cb5a5e1e036b7ad2ceb7ec42d6618d086454aca34cad"
"generatedAt": "2026-05-18T09:31:57+00:00",
"contentHash": "2d6860fb20532f67f7eb90613079f2b89ae234dc7b7593245c284ea8ff736676"
}