diff --git a/.github/scripts/publish-bicep-recipe.sh b/.github/scripts/publish-bicep-recipe.sh index 97ee4d0e..a5553a35 100755 --- a/.github/scripts/publish-bicep-recipe.sh +++ b/.github/scripts/publish-bicep-recipe.sh @@ -17,7 +17,7 @@ # ------------------------------------------------------------ # ============================================================================= -# Publish one Kubernetes Bicep recipe to a container registry under every tag in +# Publish one Bicep recipe to a container registry under every tag in # $TAGS. Called once per recipe by the publish-bicep-recipes workflow, which # runs the invocations as parallel steps in a single job. # diff --git a/.github/scripts/release/build-recipe-pack-bundle.sh b/.github/scripts/release/build-recipe-pack-bundle.sh index 0b2da6e3..029551d0 100755 --- a/.github/scripts/release/build-recipe-pack-bundle.sh +++ b/.github/scripts/release/build-recipe-pack-bundle.sh @@ -21,7 +21,7 @@ # ----------------------------------------------------------------------------- # Package a recipe pack into a release bundle plus a checksums file. The bundle # contains the pack's Bicep templates and its README.md, laid out under the -# repo-relative path (e.g. `recipe-packs/kubernetes/default-recipepack.bicep`) so +# repo-relative path (e.g. `recipe-packs/kubernetes/default.bicep`) so # it extracts back into the same tree. This is the recipe pack counterpart of # build-namespace-bundle.sh and shares its bundling helpers. # diff --git a/.github/workflows/publish-bicep-recipes.yaml b/.github/workflows/publish-bicep-recipes.yaml index daedc809..be02510f 100644 --- a/.github/workflows/publish-bicep-recipes.yaml +++ b/.github/workflows/publish-bicep-recipes.yaml @@ -2,7 +2,7 @@ --- name: Publish Bicep Recipes -# Publishes the Kubernetes Bicep recipes to GHCR as OCI artifacts. +# Publishes the repository's Bicep recipes to GHCR as OCI artifacts. # # Every publish is tagged with the commit SHA it was built from, and that SHA # tag is what makes the recipes addressable from Radius. A released `rad` @@ -134,11 +134,19 @@ jobs: run: ./.github/scripts/publish-bicep-recipe.sh rediscaches Data/redisCaches/recipes/kubernetes/bicep/kubernetes-redis.bicep - name: Publish rabbitmq run: ./.github/scripts/publish-bicep-recipe.sh rabbitmq Messaging/rabbitMQ/recipes/kubernetes/bicep/kubernetes-rabbitmq.bicep + # Azure ACI recipes wired by the azure-aci recipe pack. These are not + # Kubernetes recipes, so they publish to their own GHCR namespace. + - name: Publish azure-aci containers + run: REGISTRY=ghcr.io/radius-project/azure-aci-recipes ./.github/scripts/publish-bicep-recipe.sh containers Compute/containers/recipes/azure/bicep/azure-aci-containers.bicep + - name: Publish azure-aci persistentvolumes + run: REGISTRY=ghcr.io/radius-project/azure-aci-recipes ./.github/scripts/publish-bicep-recipe.sh persistentvolumes Compute/persistentVolumes/recipes/azure/bicep/azure-file-volumes.bicep + - name: Publish azure-aci secrets + run: REGISTRY=ghcr.io/radius-project/azure-aci-recipes ./.github/scripts/publish-bicep-recipe.sh secrets Security/secrets/recipes/azure/bicep/azure-keyvault-secrets.bicep - name: Summarize run: | { - echo "Published the Kubernetes Bicep recipes to \`$REGISTRY\` with tags \`$TAGS\`." + echo "Published the Bicep recipes to GHCR with tags \`$TAGS\`." echo "" echo "Radius pins these recipes by commit SHA, so \`$GITHUB_SHA\` is now a resolvable tag for every recipe above." } >>"$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/release-recipe-pack.yaml b/.github/workflows/release-recipe-pack.yaml index 5dc94e06..f0eebb80 100644 --- a/.github/workflows/release-recipe-pack.yaml +++ b/.github/workflows/release-recipe-pack.yaml @@ -51,7 +51,8 @@ on: type: choice required: true options: - - azure + - azure-aks + - azure-aci - kubernetes bump: description: Semantic version bump diff --git a/AI/models/README.md b/AI/models/README.md index fe99216a..ed9a925b 100644 --- a/AI/models/README.md +++ b/AI/models/README.md @@ -22,7 +22,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/cognitive-services/account:0.15.0` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/cognitive-services/account:0.15.0` | ## Using the resource type diff --git a/AI/search/README.md b/AI/search/README.md index 56d24a1e..2dc48925 100644 --- a/AI/search/README.md +++ b/AI/search/README.md @@ -21,7 +21,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/search/search-service:0.12.2` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/search/search-service:0.12.2` | ## Using the resource type diff --git a/Data/mongoDatabases/README.md b/Data/mongoDatabases/README.md index 7ec091ca..a4ceb58c 100644 --- a/Data/mongoDatabases/README.md +++ b/Data/mongoDatabases/README.md @@ -22,7 +22,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `avm/res/document-db/database-account` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `avm/res/document-db/database-account` | ## Using the resource type diff --git a/Data/mySqlDatabases/README.md b/Data/mySqlDatabases/README.md index 1d49f143..c99ed671 100644 --- a/Data/mySqlDatabases/README.md +++ b/Data/mySqlDatabases/README.md @@ -25,7 +25,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `avm/res/db-for-my-sql/flexible-server` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `avm/res/db-for-my-sql/flexible-server` | ## Using the resource type diff --git a/Data/postgreSqlDatabases/README.md b/Data/postgreSqlDatabases/README.md index 12bb488c..bb6059c1 100644 --- a/Data/postgreSqlDatabases/README.md +++ b/Data/postgreSqlDatabases/README.md @@ -26,7 +26,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/aks-recipepack.bicep`](../../recipe-packs/azure/aks-recipepack.bicep) | Direct module — Azure Verified Module `avm/res/db-for-postgre-sql/flexible-server` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `avm/res/db-for-postgre-sql/flexible-server` | ## Using the resource type diff --git a/Data/redisCaches/README.md b/Data/redisCaches/README.md index 38a50f30..7427b004 100644 --- a/Data/redisCaches/README.md +++ b/Data/redisCaches/README.md @@ -23,8 +23,8 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `avm/res/cache/redis-enterprise` | -| Kubernetes | [`recipe-packs/kubernetes/default-recipepack.bicep`](../../recipe-packs/kubernetes/default-recipepack.bicep) | In-cluster Redis `Deployment` + `Service` [`recipes/kubernetes`](recipes/kubernetes) | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `avm/res/cache/redis-enterprise` | +| Kubernetes | [`recipe-packs/kubernetes/default.bicep`](../../recipe-packs/kubernetes/default.bicep) | In-cluster Redis `Deployment` + `Service` [`recipes/kubernetes`](recipes/kubernetes) | ## Using the resource type diff --git a/Data/sqlServerDatabases/README.md b/Data/sqlServerDatabases/README.md index fdf0138a..91e18eac 100644 --- a/Data/sqlServerDatabases/README.md +++ b/Data/sqlServerDatabases/README.md @@ -24,7 +24,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/sql/server:0.21.4` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/sql/server:0.21.4` | ## Using the resource type diff --git a/Messaging/kafka/README.md b/Messaging/kafka/README.md index e527d58a..171d6464 100644 --- a/Messaging/kafka/README.md +++ b/Messaging/kafka/README.md @@ -22,7 +22,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `avm/res/event-hub/namespace` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `avm/res/event-hub/namespace` | ## Using the resource type diff --git a/Messaging/rabbitMQ/README.md b/Messaging/rabbitMQ/README.md index 38853541..58847902 100644 --- a/Messaging/rabbitMQ/README.md +++ b/Messaging/rabbitMQ/README.md @@ -25,8 +25,8 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/aks-recipepack.bicep`](../../recipe-packs/azure/aks-recipepack.bicep) | In-cluster RabbitMQ `Deployment` + `Service` on AKS [`recipes/kubernetes`](recipes/kubernetes) | -| Kubernetes | [`recipe-packs/kubernetes/default-recipepack.bicep`](../../recipe-packs/kubernetes/default-recipepack.bicep) | In-cluster RabbitMQ `Deployment` + `Service` [`recipes/kubernetes`](recipes/kubernetes) | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | In-cluster RabbitMQ `Deployment` + `Service` on AKS [`recipes/kubernetes`](recipes/kubernetes) | +| Kubernetes | [`recipe-packs/kubernetes/default.bicep`](../../recipe-packs/kubernetes/default.bicep) | In-cluster RabbitMQ `Deployment` + `Service` [`recipes/kubernetes`](recipes/kubernetes) | ## Using the resource type diff --git a/README.md b/README.md index 11fcb2aa..d1d06ceb 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,18 @@ resource-types-contrib/ │ └── test/ │ └── app.bicep # Developer-facing test application └── recipe-packs/ # Recipe packs cover recipe definitions for all types in the repo - ├── azure/ # Azure recipe pack (recipes for all types + environment) - │ ├── README.md # Documentation for the Azure recipe pack - │ └── aks-recipepack.bicep # Recipe pack wiring Bicep and Terraform recipes - ├── aws/ # AWS recipe pack + ├── azure-aks/ # Azure AKS recipe pack (Azure services; containers on AKS) + │ ├── README.md # Documentation for the Azure AKS recipe pack + │ └── azure-aks.bicep # Recipe pack wiring the Bicep recipes + ├── azure-aci/ # Azure ACI recipe pack (containers on ACI; Azure Files + Key Vault) + │ ├── README.md # Documentation for the Azure ACI recipe pack + │ └── azure-aci.bicep # Recipe pack wiring the Bicep recipes + ├── aws-eks/ # AWS recipe pack (planned; containers on EKS, with aws-ecs for ECS to follow) │ ├── README.md - │ └── eks-recipepack.bicep - ├── kubernetes/ # Default recipe pack (zero-config, in-cluster) + │ └── aws-eks.bicep + ├── kubernetes/ # Kubernetes recipe pack (zero-config, in-cluster) ├── README.md - └── default-recipepack.bicep + └── default.bicep ``` @@ -47,7 +50,7 @@ resource-types-contrib/ Developers can discover the Resource Types in this repository and use them in a Radius application, and platform engineers can use the Recipe Packs to configure how those types are provisioned in an Environment. For a step-by-step guide on discovering, registering, and using Resource Types and Recipe Packs, see [Discovering and Using Resource Types and Recipe Packs](docs/using-resource-types.md). -Every Resource Type in this repository can be registered via `rad resource-type create`. A subset is also registered as defaults in Radius, so they are available out of the box without any user action. The default resource types are paired with the default Recipe Pack under `recipe-packs/default-kubernetes/`, a zero-config, in-cluster Kubernetes pack that ships out of the box, so they can be deployed without any cloud provider configuration. The list of default resource types is managed in the [Radius repository](https://github.com/radius-project/radius) via [`deploy/manifest/defaults.yaml`](https://github.com/radius-project/radius/blob/main/deploy/manifest/defaults.yaml). +Every Resource Type in this repository can be registered via `rad resource-type create`. A subset is also registered as defaults in Radius, so they are available out of the box without any user action. The default resource types are paired with the default Recipe Pack under `recipe-packs/kubernetes/`, a zero-config, in-cluster Kubernetes pack that ships out of the box, so they can be deployed without any cloud provider configuration. The list of default resource types is managed in the [Radius repository](https://github.com/radius-project/radius) via [`deploy/manifest/defaults.yaml`](https://github.com/radius-project/radius/blob/main/deploy/manifest/defaults.yaml). ## Contributing diff --git a/Storage/objectStorage/README.md b/Storage/objectStorage/README.md index ab3205e8..e2e58efa 100644 --- a/Storage/objectStorage/README.md +++ b/Storage/objectStorage/README.md @@ -25,7 +25,7 @@ Recipes for this resource type are provided through the platform Recipe Packs at | Platform | Recipe Pack | Recipe source | | --- | --- | --- | -| Azure | [`recipe-packs/azure/bicep-recipepack.bicep`](../../recipe-packs/azure/bicep-recipepack.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/storage/storage-account:0.32.1` | +| Azure | [`recipe-packs/azure-aks/azure-aks.bicep`](../../recipe-packs/azure-aks/azure-aks.bicep) | Direct module — Azure Verified Module `mcr.microsoft.com/bicep/avm/res/storage/storage-account:0.32.1` | ## Using the resource type diff --git a/docs/contributing/contributing-resource-types-recipes.md b/docs/contributing/contributing-resource-types-recipes.md index 4cf1e56e..26b581cd 100644 --- a/docs/contributing/contributing-resource-types-recipes.md +++ b/docs/contributing/contributing-resource-types-recipes.md @@ -46,15 +46,18 @@ resource-types-contrib/ │ └── test/ │ └── app.bicep # Developer-facing test application └── recipe-packs/ # Recipe Packs cover recipes for all types in the repo - ├── azure/ # Azure recipe pack (recipes for all types + environment) - │ ├── README.md # Documentation for the Azure recipe pack - │ └── aks-recipepack.bicep # Recipe pack wiring Bicep and Terraform recipes - ├── aws/ # AWS recipe pack + ├── azure-aks/ # Azure AKS recipe pack (Azure services; containers on AKS) + │ ├── README.md # Documentation for the Azure AKS recipe pack + │ └── azure-aks.bicep # Recipe pack wiring the Bicep recipes + ├── azure-aci/ # Azure ACI recipe pack (containers on ACI; Azure Files + Key Vault) + │ ├── README.md # Documentation for the Azure ACI recipe pack + │ └── azure-aci.bicep # Recipe pack wiring the Bicep recipes + ├── aws-eks/ # AWS recipe pack (planned; containers on EKS, with aws-ecs for ECS to follow) │ ├── README.md - │ └──eks-recipepack.bicep - └── kubernetes/ # Default recipe pack (zero-config, in-cluster) + │ └── aws-eks.bicep + └── kubernetes/ # Kubernetes recipe pack (zero-config, in-cluster) ├── README.md - └── default-recipepack.bicep + └── default.bicep ``` ### 4. Define Your Resource Type Definition @@ -233,9 +236,9 @@ A list of the Recipes provided for this Resource Type, including the platform Re | Platform | Recipe Pack | Module Source | |---|---|---| -| Azure | recipe-packs/azure/aks-recipepack.bicep | mcr.microsoft.com/bicep/avm/res/cache/redis-enterprise | -| AWS | recipe-packs/aws/eks-recipepack.bicep | ... | -| Kubernetes | recipe-packs/kubernetes/default-recipepack.bicep | ghcr.io/radius-project/kube-recipes/... | +| Azure | recipe-packs/azure-aks/azure-aks.bicep | mcr.microsoft.com/bicep/avm/res/cache/redis-enterprise | +| AWS (planned) | recipe-packs/aws-eks/aws-eks.bicep | ... | +| Kubernetes | recipe-packs/kubernetes/default.bicep | ghcr.io/radius-project/kube-recipes/... | ## Recipe Input Properties @@ -266,7 +269,7 @@ A brief description of what the Recipe does and how to use it. ## Recipes and Recipe Packs -Recipes for a Resource Type are added to the platform Recipe Packs under `recipe-packs/` at the repository root. Each platform has its own folder (`azure/`, `aws/` , and `kubernetes/`) containing a single Recipe Pack (`default-recipepack.bicep`) that wires both Bicep and Terraform recipes. Each Recipe Pack declares a single `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for every Resource Type, plus a `Radius.Core/environments` resource that references the pack. +Recipes for a Resource Type are added to the platform Recipe Packs under `recipe-packs/` at the repository root. Each pack has its own folder (`azure-aks/`, `azure-aci/`, and `kubernetes/` today, with `aws-eks/` and `aws-ecs/` planned) containing a Bicep file named after the pack (for example `azure-aks.bicep`) that wires its recipes. A Recipe Pack declares a `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for each Resource Type it covers. Today Radius supports Bicep and Terraform Recipe drivers, so a Recipe can be a Bicep template or a Terraform configuration. It can also point to well-maintained community modules like the [Azure Verified Modules](https://azure.github.io/Azure-Verified-Modules/) or the [AWS Terraform modules](https://registry.terraform.io/namespaces/terraform-aws-modules). When pointing at a standard module, Radius resolves any `{{context.*}}` expressions in the Recipe's `parameters` against the resource being deployed and maps the module's outputs onto the resource's read-only properties via the `outputs` field, so no Radius-specific wrapping is required. @@ -278,7 +281,7 @@ For Azure resources whose names must be globally unique, `{{context.azure.resour ### Example Recipe Pack -The example below shows an Azure Recipe Pack (`recipe-packs/azure/default-recipepack.bicep`) that registers a Recipe for `Radius.Data/redisCaches` pointing at a standard Azure Verified Module, and a Recipe for `Radius.Compute/containers` using a published Kubernetes container recipe. The developer-authored `size` property is mapped onto a concrete SKU, and the module's outputs are mapped back onto the resource's `host`, `port`, and `url` properties. +The example below shows an Azure Recipe Pack (`recipe-packs/azure-aks/azure-aks.bicep`) that registers a Recipe for `Radius.Data/redisCaches` pointing at a standard Azure Verified Module, and a Recipe for `Radius.Compute/containers` using a published Kubernetes container recipe. The developer-authored `size` property is mapped onto a concrete SKU, and the module's outputs are mapped back onto the resource's `host`, `port`, and `url` properties. ```bicep extension radius @@ -351,7 +354,7 @@ resource env 'Radius.Core/environments@2025-08-01-preview' = { - Map developer-authored properties (such as `size`) onto concrete infrastructure settings using `{{context.*}}` parameter expressions rather than exposing platform-specific properties on the Resource Type. - Map every read-only property of the Resource Type from a module output via the `outputs` field so consumers can connect to the provisioned resource. - Handle secrets securely: mark sensitive properties `x-radius-sensitive: true` on the Resource Type and never log or expose credentials. -- The Kubernetes Recipe Pack should be self-contained (in-cluster, no cloud provider configuration) so it can serve as the zero-config `default-kubernetes/` pack. +- The Kubernetes Recipe Pack should be self-contained (in-cluster, no cloud provider configuration) so it can serve as the zero-config `kubernetes/` pack. ## Testing Your Contribution @@ -374,7 +377,7 @@ After creating your Resource Type and Recipes, test them locally using the provi 3. **Deploy the Recipe Pack to configure your Environment**: - A Recipe Pack declares the `Radius.Core/recipePacks` and `Radius.Core/environments` resources, so deploying it registers the Recipes for every Resource Type it covers in the Environment. Add your Resource Type's Recipe to the pack for your target platform, then deploy that pack. For example, the Azure pack (`recipe-packs/azure/aks-recipepack.bicep`) holds the Recipe definitions for all Azure-provisioned types and is deployed with the `rad` CLI, supplying the pack's parameters: + A Recipe Pack declares a `Radius.Core/recipePacks` resource, so deploying it registers the Recipes for every Resource Type it covers. Add your Resource Type's Recipe to the pack for your target platform, then deploy that pack. For example, the Azure AKS pack (`recipe-packs/azure-aks/azure-aks.bicep`) holds the Recipe definitions for all Azure-provisioned types and is deployed with the `rad` CLI, supplying the pack's parameters: ```bash # Configure the Radius Azure provider credentials (requires AZURE_* env vars: @@ -382,7 +385,7 @@ After creating your Resource Type and Recipes, test them locally using the provi make configure-azure-provider # Deploy the Recipe Pack, supplying its parameters - rad deploy recipe-packs/azure/aks-recipepack.bicep \ + rad deploy recipe-packs/azure-aks/azure-aks.bicep \ --parameters azureSubscriptionId= \ --parameters azureResourceGroup= ``` @@ -409,7 +412,7 @@ Automated test coverage in the repository's CI/CD pipeline is required for Resou ## Making a Resource Type a default in Radius -Every Resource Type in this repository can be registered on demand via `rad resource-type create`. A subset are also registered as defaults in Radius, so they are available out of the box without any user action, paired with the zero-config `default-kubernetes/` Recipe Pack. The list of default Resource Types is managed in the [Radius repository](https://github.com/radius-project/radius) via [`deploy/manifest/defaults.yaml`](https://github.com/radius-project/radius/blob/main/deploy/manifest/defaults.yaml). +Every Resource Type in this repository can be registered on demand via `rad resource-type create`. A subset are also registered as defaults in Radius, so they are available out of the box without any user action, paired with the zero-config `kubernetes/` Recipe Pack. The list of default Resource Types is managed in the [Radius repository](https://github.com/radius-project/radius) via [`deploy/manifest/defaults.yaml`](https://github.com/radius-project/radius/blob/main/deploy/manifest/defaults.yaml). To make a Resource Type available out of the box as a default: diff --git a/docs/using-resource-types.md b/docs/using-resource-types.md index 2492f5ab..944139aa 100644 --- a/docs/using-resource-types.md +++ b/docs/using-resource-types.md @@ -34,22 +34,21 @@ Registering the type also makes it available in Bicep through the generated exte ## Discovering and using Recipe Packs -Recipe Packs live at the repository root under [`recipe-packs/`](../recipe-packs/). Each platform has its own folder containing a default Recipe Pack that can wire both Bicep and Terraform recipes: +Recipe Packs live at the repository root under [`recipe-packs/`](../recipe-packs/). Each pack is a folder containing a Bicep file that wires recipes for the Resource Types it covers: -- `azure/` — recipes for all types provisioned on Azure. -- `aws/` — recipes for all types provisioned on AWS. -- `kubernetes/` — recipes for all types provisioned in-cluster on Kubernetes. - -Each Recipe Pack bundles the Recipes for every Resource Type on that platform together with an Environment definition, so a platform engineer configures an Environment by deploying a single Recipe Pack instead of registering Recipes one type at a time. Cloud packs (under `azure/` and `aws/`) accept parameters for the provider configuration, such as the subscription or account the Environment provisions into. +- `azure-aks/`: Azure services with application containers on AKS. +- `azure-aci/`: application containers on Azure Container Instances, plus Azure Files volumes and Key Vault secrets. Container-focused; data, messaging, storage, and AI types are not included. +- `kubernetes/`: all types provisioned in-cluster on Kubernetes (the zero-config default). +- `aws-eks/` (planned): application containers on AWS EKS. An `aws-ecs/` pack for ECS is also planned. Deploy a Recipe Pack to create and configure the Environment: ```bash -# Configure an Environment with the Azure recipe pack -rad deploy recipe-packs/azure/aks-recipepack.bicep +# Configure an Environment with the Azure AKS recipe pack +rad deploy recipe-packs/azure-aks/azure-aks.bicep # Or start with the zero-config Kubernetes default -rad deploy recipe-packs/default-kubernetes/aks-recipepack.bicep +rad deploy recipe-packs/kubernetes/default.bicep ``` After a Recipe Pack is deployed, every Resource Type it covers can be used in an application deployed to that Environment. diff --git a/recipe-packs/README.md b/recipe-packs/README.md new file mode 100644 index 00000000..eefb936f --- /dev/null +++ b/recipe-packs/README.md @@ -0,0 +1,29 @@ +# Recipe Packs + +A **Recipe Pack** is a manifest of recipes by Resource Type referenced in a Radius Environment. Each pack is a directory under `recipe-packs/` containing: + +- a `.bicep` file named after the pack (for example `azure-aks.bicep`; the default Kubernetes pack is `default.bicep`): declares one `Radius.Core/recipePacks` resource whose `recipes` map has an entry per Resource Type. +- `README.md`: documents the pack, its parameters, and the recipes it includes. + +## Available Recipe Packs + +| Pack | Directory | Container platform | Other resource types | +| --- | --- | --- | --- | +| Kubernetes (default) | [`kubernetes/`](kubernetes/) | Kubernetes | Kubernetes | +| Azure AKS | [`azure-aks/`](azure-aks/) | Kubernetes | Azure managed services | +| Azure ACI | [`azure-aci/`](azure-aci/) | Azure Container Instances | Azure Files and Key Vault only | + +## The default Recipe Pack + +`rad init` installs the **Kubernetes Recipe Pack** ([`kubernetes/default.bicep`](kubernetes/default.bicep)) as the `default` pack (it embeds its own copy, kept in sync with this file), so a fresh Radius installation needs no extra configuration. + +## How to create a new Recipe Pack + +1. **Create the folder and files.** Add `recipe-packs//` with a `.bicep` file and a `README.md`. Use a folder name that identifies the platform and, where a cloud offers more than one compute target, the compute runtime (for example `azure-aks`, `azure-aci`, `kubernetes`). Name the Bicep file after the pack (for example `azure-aci.bicep`). +2. **Declare the pack.** In the Bicep file, declare a single `Radius.Core/recipePacks` resource whose `recipes` map has an entry keyed by each Resource Type (for example `Radius.Data/redisCaches`). +3. **Wire each Recipe.** Point each entry at its module `source` and map `parameters` (using `{{context.*}}` expressions) and `outputs`. Reuse published modules such as Azure Verified Modules where possible, and reference in-repo Bicep recipes by their published OCI image. +4. **Publish any in-repo Bicep recipes** the pack references by adding them to [`.github/workflows/publish-bicep-recipes.yaml`](../.github/workflows/publish-bicep-recipes.yaml) so the `source` images exist. +5. **Enable releases.** Add the new folder name to the `recipe_pack` choice list in [`.github/workflows/release-recipe-pack.yaml`](../.github/workflows/release-recipe-pack.yaml). Packs are otherwise discovered automatically: any folder under `recipe-packs/` that holds at least one `.bicep` file is treated as a releasable pack. +6. **Document it.** Give the pack a `README.md` following the existing packs, listing its parameters and the Recipes it wires. + +For guidance on authoring the Recipes themselves, see [Contributing Resource Types and Radius Recipes](../docs/contributing/contributing-resource-types-recipes.md#recipes-and-recipe-packs). diff --git a/recipe-packs/azure-aci/README.md b/recipe-packs/azure-aci/README.md new file mode 100644 index 00000000..b1644094 --- /dev/null +++ b/recipe-packs/azure-aci/README.md @@ -0,0 +1,35 @@ +# Azure ACI Recipe Pack + +This directory contains the **Azure ACI Recipe Pack**, a collection of Recipes that provision Radius Containers on Azure Container Instances (ACI), together with the Azure-backed volume and secret stores those workloads use. + +| File | Description | +| --- | --- | +| `azure-aci.bicep` | Recipe Pack wiring the Bicep recipes for the ACI-provisioned Resource Types. | + +The pack declares a single `Radius.Core/recipePacks` resource whose `recipes` map contains an entry per Resource Type. It does not define an Environment; reference the pack from an Environment configured with the Azure provider to make its Recipes available. + +## Recipes in this pack + +| Resource Type | Kind | Source | +| --- | --- | --- | +| `Radius.Compute/containers` | Bicep | `ghcr.io/radius-project/azure-aci-recipes/containers` | +| `Radius.Compute/persistentVolumes` | Bicep | `ghcr.io/radius-project/azure-aci-recipes/persistentvolumes` | +| `Radius.Security/secrets` | Bicep | `ghcr.io/radius-project/azure-aci-recipes/secrets` | + +`Radius.Compute/routes` and `Radius.Compute/containerImages` are not yet supported on ACI and are omitted. Data, messaging, storage, and AI Resource Types are not part of this pack. + +## Deploying + +Deploy the pack with the `rad` CLI to create the `Radius.Core/recipePacks` resource: + +```bash +rad deploy recipe-packs/azure-aci/azure-aci.bicep +``` + +Because this pack does not define an Environment, reference it from an Environment configured with the Azure provider. For example, add the `azure-aci` pack to an existing Environment: + +```bash +rad env update --recipe-packs azure-aci +``` + +Once referenced, every Resource Type it covers can be used in an application deployed to that Environment. diff --git a/recipe-packs/azure-aci/azure-aci.bicep b/recipe-packs/azure-aci/azure-aci.bicep new file mode 100644 index 00000000..d166ccd7 --- /dev/null +++ b/recipe-packs/azure-aci/azure-aci.bicep @@ -0,0 +1,21 @@ +extension radius + +resource azureAciRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'azure-aci' + properties: { + recipes: { + 'Radius.Compute/containers': { + kind: 'bicep' + source: 'ghcr.io/radius-project/azure-aci-recipes/containers:latest' + } + 'Radius.Compute/persistentVolumes': { + kind: 'bicep' + source: 'ghcr.io/radius-project/azure-aci-recipes/persistentvolumes:latest' + } + 'Radius.Security/secrets': { + kind: 'bicep' + source: 'ghcr.io/radius-project/azure-aci-recipes/secrets:latest' + } + } + } +} diff --git a/recipe-packs/azure/README.md b/recipe-packs/azure-aks/README.md similarity index 86% rename from recipe-packs/azure/README.md rename to recipe-packs/azure-aks/README.md index cfb4fa3c..1a6944ba 100644 --- a/recipe-packs/azure/README.md +++ b/recipe-packs/azure-aks/README.md @@ -1,12 +1,12 @@ -# Azure Recipe Pack +# Azure AKS Recipe Pack -This folder contains the **Azure Recipe Pack** — a collection of Recipes that provision Radius Resource Types on Azure, bundled with an Environment definition. Deploying the pack configures a Radius Environment to use the Azure provider and registers the Recipes for every Resource Type it covers. +This folder contains the **Azure AKS Recipe Pack** — a collection of Recipes that provision Radius Resource Types on Azure, running containers on Azure Kubernetes Service (AKS). | File | Description | | --- | --- | -| `aks-recipepack.bicep` | Recipe Pack wiring the Bicep recipes for all Azure-provisioned types, plus the Environment definition. | +| `azure-aks.bicep` | Recipe Pack wiring the Bicep recipes for all Azure-provisioned types. | -Each pack declares a `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for every Resource Type, and a `Radius.Core/environments` resource that references the pack and configures the Azure provider. +The pack declares a `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for every Resource Type. ## Azure resource naming @@ -52,10 +52,10 @@ The Azure pack accepts the provider configuration it needs to provision into you ## Deploying -Deploy the pack with the `rad` CLI, supplying the parameters it requires. Deploying the file creates the `Radius.Core/recipePacks` resource and configures the `default` Environment to use it: +Deploy the pack with the `rad` CLI, supplying the parameters it requires. Deploying the file creates the `Radius.Core/recipePacks` resource: ```bash -rad deploy recipe-packs/azure/aks-recipepack.bicep \ +rad deploy recipe-packs/azure-aks/azure-aks.bicep \ --parameters azureSubscriptionId= \ --parameters azureResourceGroup= \ --parameters routesGatewayName= \ diff --git a/recipe-packs/azure/aks-recipepack.bicep b/recipe-packs/azure-aks/azure-aks.bicep similarity index 98% rename from recipe-packs/azure/aks-recipepack.bicep rename to recipe-packs/azure-aks/azure-aks.bicep index 8c97622b..8fbe6d6f 100644 --- a/recipe-packs/azure/aks-recipepack.bicep +++ b/recipe-packs/azure-aks/azure-aks.bicep @@ -24,11 +24,11 @@ param containerImagesRegistry string @description('Name of the Kubernetes Secret holding registry credentials for Radius.Compute/containerImages. Leave empty for an unauthenticated registry.') param containerImagesRegistrySecretName string = '' -@description('Server parameters forwarded verbatim to the AVM PostgreSQL flexible server configurations array for Radius.Data/postgreSqlDatabases, using the AVM item shape with name, source, and value fields. Commonly used to allow-list extensions via the azure.extensions parameter (for example to enable pgvector). See recipe-packs/azure/README.md for an example and a link to the supported extensions. Defaults to an empty array (no extra server configuration).') +@description('Server parameters forwarded verbatim to the AVM PostgreSQL flexible server configurations array for Radius.Data/postgreSqlDatabases, using the AVM item shape with name, source, and value fields. Commonly used to allow-list extensions via the azure.extensions parameter (for example to enable pgvector). See recipe-packs/azure-aks/README.md for an example and a link to the supported extensions. Defaults to an empty array (no extra server configuration).') param postgreSqlServerConfigurations array = [] -resource recipes 'Radius.Core/recipePacks@2025-08-01-preview' = { - name: 'azure-avm' +resource azureAksRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'azure-aks' properties: { // Globally unique Azure names use the Cloud Adoption Framework resource abbreviation as a prefix, plus a stable hash. recipes: { diff --git a/recipe-packs/kubernetes/README.md b/recipe-packs/kubernetes/README.md index 64849256..a0d716de 100644 --- a/recipe-packs/kubernetes/README.md +++ b/recipe-packs/kubernetes/README.md @@ -1,12 +1,12 @@ # Kubernetes Recipe Pack -This folder contains the **Kubernetes Recipe Pack** — a collection of Recipes that provision Radius Resource Types on Kubernetes, bundled with an Environment definition. Deploying the pack configures a Radius Environment to use the Kubernetes provider and registers the Recipes for every Resource Type it covers. +This folder contains the **Kubernetes Recipe Pack** — a collection of Recipes that provision Radius Resource Types on Kubernetes. | File | Description | | --- | --- | -| `default-recipepack.bicep` | Recipe Pack wiring the Bicep recipes for all Kubernetes-provisioned types, plus the Environment definition. | +| `default.bicep` | Recipe Pack wiring the Bicep recipes for all Kubernetes-provisioned types. | -Each pack declares a `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for every Resource Type, and a `Radius.Core/environments` resource that references the pack. +The pack declares a `Radius.Core/recipePacks` resource whose `recipes` map contains an entry for every Resource Type. ## Recipes in this pack @@ -24,10 +24,10 @@ Kube-recipes tagged `:edge` are rebuilt on every push to `main`; `:latest` and t ## Deploying -Deploy the pack with the `rad` CLI. Deploying the file creates the `Radius.Core/recipePacks` resource and configures the `default` Environment to use it: +Deploy the pack with the `rad` CLI. Deploying the file creates the `Radius.Core/recipePacks` resource: ```bash -rad deploy recipe-packs/kubernetes/default-recipepack.bicep +rad deploy recipe-packs/kubernetes/default.bicep ``` After the pack is deployed, every Resource Type it covers can be used in an application deployed to that Environment. diff --git a/recipe-packs/kubernetes/default-recipepack.bicep b/recipe-packs/kubernetes/default.bicep similarity index 91% rename from recipe-packs/kubernetes/default-recipepack.bicep rename to recipe-packs/kubernetes/default.bicep index 04508123..9cbe7790 100644 --- a/recipe-packs/kubernetes/default-recipepack.bicep +++ b/recipe-packs/kubernetes/default.bicep @@ -1,7 +1,7 @@ // Default Radius recipe pack // // Deploy with: -// rad deploy recipe-packs/kubernetes/default-recipepack.bicep +// rad deploy recipe-packs/kubernetes/default.bicep // // This mirrors /planes/radius/local/resourceGroups/default/providers/Radius.Core/recipePacks/default @@ -13,7 +13,7 @@ param environmentName string = 'default' @description('Kubernetes namespace the Radius environment deploys resources into.') param environmentNamespace string = 'default' -resource defaultRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' = { +resource kubernetesRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' = { name: 'default' properties: { recipes: { @@ -62,7 +62,7 @@ resource env 'Radius.Core/environments@2025-08-01-preview' = { } } recipePacks: [ - defaultRecipePack.id + kubernetesRecipePack.id ] } }