{"id":48543937,"url":"https://github.com/lukemurraynz/azd.extensions.drasi","last_synced_at":"2026-04-13T03:29:23.881Z","repository":{"id":349870181,"uuid":"1204250156","full_name":"lukemurraynz/azd.extensions.drasi","owner":"lukemurraynz","description":"An Azure Developer CLI extension for Drasi that lets you scaffold, provision, deploy, and operate Drasi reactive data pipeline workloads using native azd workflows.","archived":false,"fork":false,"pushed_at":"2026-04-07T22:03:33.000Z","size":13092,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T00:07:02.165Z","etag":null,"topics":["azd","drasi"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukemurraynz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-07T20:46:16.000Z","updated_at":"2026-04-07T22:03:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lukemurraynz/azd.extensions.drasi","commit_stats":null,"previous_names":["lukemurraynz/azd.extensions.drasi"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lukemurraynz/azd.extensions.drasi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukemurraynz%2Fazd.extensions.drasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukemurraynz%2Fazd.extensions.drasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukemurraynz%2Fazd.extensions.drasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukemurraynz%2Fazd.extensions.drasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukemurraynz","download_url":"https://codeload.github.com/lukemurraynz/azd.extensions.drasi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukemurraynz%2Fazd.extensions.drasi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31542384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azd","drasi"],"created_at":"2026-04-08T06:01:35.059Z","updated_at":"2026-04-10T22:09:56.273Z","avatar_url":"https://github.com/lukemurraynz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Drasi azd extension\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/lukemurraynz/azd.extensions.drasi?quickstart=1)\n\n\u003e An unofficial [Azure Developer CLI](https://aka.ms/azd) extension for [Drasi](https://drasi.io) that lets you scaffold, provision, deploy, and operate Drasi reactive data pipeline workloads using native azd workflows.\n\n## Why this exists\n\nDrasi requires coordinating several Azure resources (AKS, Key Vault, managed identity, Workload Identity federation) and a specific component deployment order (sources, queries, reactions). This extension wraps that complexity in familiar azd commands so you can treat a Drasi application the same way you treat any other azd project.\n\n## Features\n\n- Scaffold new Drasi projects from built-in templates (blank, blank-terraform, event-hub-routing, query-subscription, postgresql-source)\n- Offline validation of sources, queries, reactions, and middleware before any deployment\n- Provision AKS with OIDC and Workload Identity, Key Vault, Log Analytics, and the Drasi runtime in a single command\n- Deploy components in dependency order with per-component health checks\n- Real-time status, streaming logs, and five-point health diagnostics\n- Teardown individual components or full infrastructure (force-gated)\n- Runtime upgrade command for existing clusters (force-gated)\n- Key Vault secret reference translation (no secrets stored in configuration files)\n- Environment overlays for staging and production parameter overrides\n\n## Prerequisites\n\n### Use the prebuilt extension from Releases (most users)\n\nIf you install `azure.drasi` from this repository's GitHub Releases, you do **not** need Go or build tooling.\n\n| Tool                        | Version   | Required for                                                  | Install                                   |\n| --------------------------- | --------- | ------------------------------------------------------------- | ----------------------------------------- |\n| Azure Developer CLI (`azd`) | \u003e= 1.10.0 | Installing and running the extension                          | \u003chttps://aka.ms/azd\u003e                      |\n| Drasi CLI                   | \u003e= 0.10.0 | Drasi component operations (`deploy`, `status`, `logs`, etc.) | \u003chttps://drasi.io/drasi-kubernetes/reference/command-line-interface/\u003e   |\n| Azure CLI                   | \u003e= 2.60.0 | Azure authentication and infrastructure operations            | \u003chttps://aka.ms/azcli\u003e                    |\n| kubectl                     | \u003e= 1.28   | Cluster connectivity for health/status/log operations         | \u003chttps://kubernetes.io/docs/tasks/tools/\u003e |\n\n### Build this repository from source (contributors)\n\n| Tool               | Version | Required for                     | Install                      |\n| ------------------ | ------- | -------------------------------- | ---------------------------- |\n| Go                 | \u003e= 1.22 | `go test ./...`, local build     | \u003chttps://go.dev/dl/\u003e         |\n| Bash or PowerShell | recent  | Running `build.sh` / `build.ps1` | Included on most dev systems |\n\nIf you also want to run end-to-end commands against Azure/AKS from a local source build, install the runtime tools from the section above (`azd`, Drasi CLI, Azure CLI, `kubectl`).\n\n\u003e [!TIP]\n\u003e The fastest way to get all prerequisites is to open this repository in the included Dev Container. In VS Code, run **Dev Containers: Reopen in Container** or click the Codespace badge above. All tools are pre-installed.\n\n## Installation\n\n### Install from GitHub Releases\n\nYou can also install from this repository's GitHub Releases by adding it as a custom extension source:\n\n```bash\nazd extension source add -n drasi-lukemurray-azdext -t url -l \"https://github.com/lukemurraynz/azd.extensions.drasi/releases/latest/download/registry.json\"\n```\n\nThen install from that source:\n\n```bash\nazd extension install azure.drasi -s drasi-lukemurray-azdext\n```\n\nVerify:\n\n```bash\nazd drasi --help\nazd drasi version\n```\n\n## Quick start\n\n1. Install the runtime prerequisites from **Use the prebuilt extension from Releases** and then install the extension.\n2. Scaffold a project: `azd drasi init --template postgresql-source`\n3. Validate: `azd drasi validate`\n4. Authenticate: `azd auth login`\n5. Provision infrastructure: `azd drasi provision`\n6. Deploy components: `azd drasi deploy`\n\n## Command reference\n\n### Global flags\n\nThese flags are available on every command.\n\n| Flag                | Type   | Default | Description                                                                         |\n| ------------------- | ------ | ------- | ----------------------------------------------------------------------------------- |\n| `--debug`           | bool   | `false` | Enable verbose debug logging.                                                       |\n| `-e, --environment` | string |         | Name of the azd environment to use. Controls which AKS context the command targets. |\n| `--output`          | string | `table` | Output format. Accepted values: `table`, `json`.                                    |\n\n### init\n\nScaffold a new Drasi project from a built-in template.\n\n| Flag           | Type   | Default | Description                                                                                                                              |\n| -------------- | ------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |\n| `--template`   | string | `blank` | Template name. One of: `blank`, `blank-terraform`, `event-hub-routing`, `query-subscription`, `postgresql-source`. |\n| `--output-dir` | string | `.`     | Directory to write scaffolded files into.                                                                                                |\n| `--force`      | bool   | `false` | Overwrite existing files without prompting.                                                                                              |\n\n```bash\nazd drasi init --template postgresql-source\nazd drasi init --template blank-terraform --output-dir ./my-project\n```\n\n### validate\n\nValidate the Drasi configuration offline (no cluster or network access required).\n\n| Flag       | Type   | Default            | Description                      |\n| ---------- | ------ | ------------------ | -------------------------------- |\n| `--config` | string | `drasi/drasi.yaml` | Path to the Drasi manifest file. |\n| `--strict` | bool   | `false`            | Treat warnings as errors.        |\n\n```bash\nazd drasi validate\nazd drasi validate --strict\nazd drasi validate --config path/to/drasi.yaml\n```\n\n### provision\n\nProvision Azure infrastructure (AKS, Key Vault, UAMI, Log Analytics) and install the Drasi runtime.\n\n| Flag                | Type   | Default | Description                  |\n| ------------------- | ------ | ------- | ---------------------------- |\n| `-e, --environment` | string |         | Target azd environment name. |\n\n```bash\nazd drasi provision\nazd drasi provision --environment staging\n```\n\n### deploy\n\nDeploy Drasi sources, queries, middleware, and reactions in dependency order.\n\n| Flag                | Type   | Default            | Description                                           |\n| ------------------- | ------ | ------------------ | ----------------------------------------------------- |\n| `--config`          | string | `drasi/drasi.yaml` | Path to the Drasi manifest file.                      |\n| `--dry-run`         | bool   | `false`            | Preview what would be applied without making changes. |\n| `-e, --environment` | string |                    | Target azd environment for overlay resolution.        |\n\n```bash\nazd drasi deploy\nazd drasi deploy --dry-run\nazd drasi deploy --environment prod\nazd drasi deploy --output json\n```\n\n### status\n\nShow component health and state for the active cluster.\n\n| Flag     | Type   | Default | Description                                                                              |\n| -------- | ------ | ------- | ---------------------------------------------------------------------------------------- |\n| `--kind` | string |         | Filter by component kind. One of: `source`, `continuousquery`, `middleware`, `reaction`. |\n\nUses the active kube context, or resolves `AZURE_AKS_CONTEXT` from azd environment state when `--environment` is passed as a root flag.\n\n```bash\nazd drasi status\nazd drasi status --kind source\nazd drasi --environment staging status\nazd drasi status --output json\n```\n\n### logs\n\nStream logs from Drasi components. When `--kind` and `--component` are provided for a continuous query, runs in watch mode via `drasi watch`.\n\n| Flag          | Type   | Default | Description                                                                    |\n| ------------- | ------ | ------- | ------------------------------------------------------------------------------ |\n| `--kind`      | string |         | Component kind. One of: `source`, `continuousquery`, `middleware`, `reaction`. |\n| `--component` | string |         | Component ID to stream logs for.                                               |\n\n```bash\nazd drasi logs --kind continuousquery --component order-changes\nazd drasi logs --kind source --component my-source\nazd drasi --environment dev logs --kind continuousquery --component my-query\n```\n\n### diagnose\n\nRun five health checks against a live cluster: AKS connectivity, Drasi API, Dapr runtime, Key Vault auth, and Log Analytics.\n\nNo command-specific flags. Uses global flags only.\n\n```bash\nazd drasi diagnose\nazd drasi --environment prod diagnose\nazd drasi diagnose --output json\n```\n\n### teardown\n\nRemove deployed Drasi components. With `--infrastructure`, also deletes the Azure resource group.\n\n| Flag                | Type   | Default            | Description                                                  |\n| ------------------- | ------ | ------------------ | ------------------------------------------------------------ |\n| `--config`          | string | `drasi/drasi.yaml` | Path to the Drasi manifest file.                             |\n| `--force`           | bool   | `false`            | Required. Confirms the destructive action.                   |\n| `--infrastructure`  | bool   | `false`            | Also delete the Azure resource group and all infrastructure. |\n| `-e, --environment` | string |                    | Target azd environment.                                      |\n\n```bash\n# Remove components only (keep infrastructure)\nazd drasi teardown --force\n\n# Remove components and infrastructure\nazd drasi teardown --force --infrastructure\n\n# Target a specific environment\nazd drasi teardown --force --environment staging\n```\n\n### upgrade\n\nUpgrade the Drasi runtime on an existing cluster.\n\n| Flag      | Type | Default | Description                            |\n| --------- | ---- | ------- | -------------------------------------- |\n| `--force` | bool | `false` | Required. Confirms the upgrade action. |\n\nUses the active kube context, or resolves `AZURE_AKS_CONTEXT` from azd environment state when `--environment` is passed as a root flag.\n\n```bash\nazd drasi upgrade --force\nazd drasi --environment prod upgrade --force\n```\n\n### version\n\nPrint the extension version.\n\n```bash\nazd drasi version\n```\n\n## Example scenarios\n\n### Scaffold, validate, and deploy\n\nA typical first-run workflow from an empty directory:\n\n```bash\nmkdir my-drasi-app \u0026\u0026 cd my-drasi-app\nazd init\nazd drasi init --template postgresql-source\nazd drasi validate --strict\nazd auth login\nazd drasi provision\nazd drasi deploy\nazd drasi status\n```\n\n### Dry-run before deploying\n\nPreview what components would be applied without touching the cluster:\n\n```bash\nazd drasi deploy --dry-run\n```\n\n### Multi-environment workflow\n\nUse environment overlays to target different clusters with different parameter values:\n\n```bash\n# Provision and deploy to dev\nazd drasi provision --environment dev\nazd drasi deploy --environment dev\n\n# Provision and deploy to prod with production secrets\nazd drasi provision --environment prod\nazd drasi deploy --environment prod\n```\n\n### Monitor a running deployment\n\nCheck component health, stream query output, and run diagnostics:\n\n```bash\nazd drasi status\nazd drasi status --kind continuousquery --output json\nazd drasi logs --kind continuousquery --component order-changes\nazd drasi diagnose\n```\n\n### JSON output for scripting\n\nAll commands support `--output json` for machine-readable output:\n\n```bash\nazd drasi status --output json\nazd drasi diagnose --output json\nazd drasi deploy --output json\n```\n\n### Teardown and cleanup\n\nRemove components when done, or tear down the full environment:\n\n```bash\n# Remove Drasi components only\nazd drasi teardown --force\n\n# Remove everything including Azure infrastructure\nazd drasi teardown --force --infrastructure\n\n# Upgrade the Drasi runtime on an existing cluster\nazd drasi upgrade --force\n```\n\n### Using a non-default config path\n\nPoint to a manifest in a different location:\n\n```bash\nazd drasi validate --config custom/path/drasi.yaml\nazd drasi deploy --config custom/path/drasi.yaml\n```\n\n## Configuration\n\nThe extension reads `drasi/drasi.yaml` in your project root. Key concepts:\n\n- Secret references use `kind: secret` with `vaultName` and `secretName` to pull values from Key Vault at deploy time. No secrets in source control.\n- Environment overlays let you place parameter overrides in `drasi/environments/\u003cname\u003e.yaml` and pass `--environment \u003cname\u003e` to `azd drasi deploy`.\n- Environment context routing applies to `status`, `logs`, and `diagnose`. Pass root `--environment \u003cname\u003e` to resolve `AZURE_AKS_CONTEXT` from azd env state and run against that cluster context.\n- Feature flags are controlled in the `featureFlags` section of `drasi.yaml`.\n\nSee the [configuration reference](docs/configuration-reference.md) for the full YAML schema.\n\n## Architecture\n\nThe extension binary communicates with the azd host over gRPC and shells out to the Drasi CLI for cluster operations. See the [architecture overview](docs/architecture.md) for details.\n\n## Troubleshooting\n\nCommon errors and remediation steps are in [docs/troubleshooting.md](docs/troubleshooting.md). You can also run:\n\n```bash\nazd drasi diagnose\n```\n\nto check AKS connectivity, Drasi API health, Dapr runtime, Key Vault auth, and Log Analytics in one pass.\n\n## Contributing\n\n1. Clone the repository.\n2. Open in the Dev Container (recommended) or install local build prerequisites (Go 1.22+ and Bash/PowerShell). Install runtime prerequisites (`azd`, Drasi CLI, Azure CLI, `kubectl`) only if you plan to run live Azure/AKS workflows.\n3. Run tests: `go test ./...`\n4. Build: `./build.sh` (Linux/macOS) or `./build.ps1` (Windows)\n\nPull requests should include tests for new behavior and should pass `go vet ./...` and `golangci-lint run`.\n\n### Releasing\n\nFrom a clean working tree, push a version tag to trigger the release workflow:\n\n```bash\ngit tag v1.0.1\ngit push origin v1.0.1\n```\n\nThe `.github/workflows/release.yml` workflow builds cross-platform binaries, creates a GitHub Release, and uploads the platform archives along with `registry.json`.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukemurraynz%2Fazd.extensions.drasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukemurraynz%2Fazd.extensions.drasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukemurraynz%2Fazd.extensions.drasi/lists"}