# My Application v2 1 Application deployed via Humanitec Platform Orchestrator v2 ## Humanitec Platform Orchestrator v2 This application deploys to [Humanitec Platform Orchestrator v2](https://humanitec.com) on Azure AKS via [Score](https://score.dev). ### Configuration | Field | Value | |---|---| | Organization | `skillful-wild-chicken-2617` | | Project | `demo-apps-1` | | Default Environment | `dev` | | Humanitec Console | [Open](https://console.humanitec.dev/orgs/skillful-wild-chicken-2617/projects/demo-apps-1) | ### Environments | Environment | Namespace | Trigger | |---|---|---| | `dev` | `dev` | Every push to `main` (when default env is dev) | | `staging` | `staging` | Manual `workflow_dispatch` → select staging | | `prod` | `prod` | Manual `workflow_dispatch` → select prod | To promote to staging or prod, use the **Run workflow** button in the Gitea Actions UI and select the target environment. ### Score Manifest (`score.yaml`) Defines the workload — containers, ports, and external resource dependencies. Resources are resolved by the Humanitec platform at deploy time: ```yaml resources: env: # type: environment — injects env vars # blob: # type: azure-blob — Azure Blob Storage container # config: # type: azure-keyvault-secret — Key Vault secret # db: # type: postgres — Azure PostgreSQL database ``` ### CI/CD Workflow Deployments are automated via Gitea Actions (`.gitea/workflows/deploy.yml`): 1. **Install hctl** — downloads the Humanitec v2 CLI from `humanitec/hctl` 2. **Deploy** — runs `hctl score deploy score.yaml` 3. **Humanitec runner** applies the Terraform module on AKS, creating/updating K8s Deployment + Service The `HUMANITEC_TOKEN` secret must be set in the Gitea repository (done automatically by the Backstage template). ### Local Development ```bash # Run locally with Docker docker run -p 8080:80 nginx:alpine ``` ### Manual Deployment To deploy manually using `hctl`: ```bash # Authenticate export HUMANITEC_TOKEN="your-service-user-token" # Deploy to dev environment hctl score deploy demo-apps-1 dev \\ --file score.yaml \\ --message "Manual deployment" \\ --token "$HUMANITEC_TOKEN" ``` ### View Deployment Access the Humanitec v2 console: - [Project Overview](https://console.humanitec.dev/orgs/skillful-wild-chicken-2617/projects/demo-apps-1) - [Environment: dev](https://console.humanitec.dev/orgs/skillful-wild-chicken-2617/projects/demo-apps-1/environments/dev) ### Resources - [Humanitec Platform Orchestrator v2 Docs](https://developer.humanitec.com/platform-orchestrator/docs/) - [Score Specification](https://score.dev) - [hctl CLI Reference](https://developer.humanitec.com/platform-orchestrator/docs/integrations/cli/)