Skip to content

Commit

Permalink
resolving merge conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Vishwanath Hiremath <[email protected]>
  • Loading branch information
vishwahiremat committed Aug 15, 2024
2 parents 0d2ffb8 + 081669f commit bc77f63
Show file tree
Hide file tree
Showing 135 changed files with 339 additions and 213 deletions.
4 changes: 4 additions & 0 deletions .github/config/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ tcp
BucketName
roadmap
Balancer
balancer
vHost
URI
uri
Expand Down Expand Up @@ -1260,8 +1261,11 @@ postgresenvSecrets
RecipeConfigPropertiesEnvSecrets
SecretReference
ProviderConfigPropertiesSecrets
upstreamed
irsa
roleARN
bicepconfig
Bicepconfig
postgres
ReadOnly
DeployTimeConstant
5 changes: 5 additions & 0 deletions .github/scripts/validate_bicep.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ def validate_file(f):
)
stderr = result.stderr.decode("utf-8")
exitcode = result.returncode

warning_prefix = "WARNING: The following experimental Bicep features"
if stderr.startswith(warning_prefix) and "Error" not in stderr:
stderr = ""
exitcode = 0

if exitcode != 0:
failures.append(f)
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/validate-bicep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ on:
branches:
- edge
- v*
push:
branches:
- edge
- v*
jobs:
build:
name: Validate Bicep Code
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Parse release version and set environment variables
run: python ./.github/scripts/get_docs_version.py
- name: Download rad-bicep
- name: Setup and verify bicep CLI
run: |
oras pull ghcr.io/radius-project/radius/bicep/rad-bicep/linux-x64:latest
chmod +x rad-bicep
curl -Lo rad-bicep https://github.com/Azure/bicep/releases/latest/download/bicep-linux-x64
chmod +x ./rad-bicep
./rad-bicep --version
- name: Check out repo
uses: actions/checkout@v4
- name: Verify Bicep files
run: python ./.github/scripts/validate_bicep.py
12 changes: 12 additions & 0 deletions bicepconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// The bicepconfig.json file is needed so the bicep files in the repo can be compiled with the correct setup
{
"experimentalFeaturesEnabled": {
"extensibility": true,
"extensionRegistry": true,
"dynamicTypeLoading": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
}
}
2 changes: 1 addition & 1 deletion docs/content/concepts/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Teams looking to leverage existing Helm charts can use the [Radius annotations a

Similar to how you can define Azure resources in Bicep, you can define Radius resources in Bicep.

Radius currently uses a temporary fork of Bicep to add support for the Radius resources, but work is underway to merge extensibility support into the main Bicep repo and eliminate the need for a fork.
Radius uses Bicep to add support for Radius resources. We previously used a temporary fork of Bicep, but have since deprecated it in favor of the main Bicep repo.

Teams building or migrating applications on Radius can use Bicep to model their application and deploy to Kubernetes today, as well as future platforms, including serverless platforms.

Expand Down
1 change: 0 additions & 1 deletion docs/content/contributing/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ Check out the following table to learn where and how you can contribute:
| **Radius** | Main repository that contains source code for [`rad` CLI](https://github.com/radius-project/radius/blob/main/docs/contributing/contributing-code/contributing-code-cli/README.md), [control plane](https://github.com/radius-project/radius/blob/main/docs/contributing/contributing-code/contributing-code-control-plane/README.md) and other components of Radius | [radius-project/radius](https://github.com/radius-project/radius/blob/main/CONTRIBUTING.md)|
| **Recipes** | Commonly used [Recipe]({{< ref "guides/recipes/overview">}}) templates for Radius Environments | [radius-project/recipes](https://github.com/radius-project/recipes/blob/main/CONTRIBUTING.md) |
| **Dashboard** | The frontend experience for Radius |[radius-project/dashboard](https://github.com/radius-project/dashboard/blob/main/CONTRIBUTING.md) |
| **Bicep** | Temporary fork of the [Bicep repo](https://github.com/azure/bicep) used to inject the Radius types into the Bicep language. Contains both the Bicep CLI and the Bicep VS Code extension. | [radius-project/bicep](https://github.com/radius-project/bicep/blob/radius-compiler/CONTRIBUTING.md) |
2 changes: 1 addition & 1 deletion docs/content/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Initializing Radius...
Initialization complete! Have a RAD time 😎
```

In addition to starting Radius services in your Kubernetes cluster, this initialization command creates a default application (`app.bicep`) as your starting point. It contains a single container definition (`demo`).
In addition to starting Radius services in your Kubernetes cluster, this initialization command creates a default application (`app.bicep`) as your starting point. It contains a single container definition (`demo`). `rad init` also creates a [`bicepconfig.json`]({{< ref "/guides/tooling/bicepconfig/overview" >}}) file in your application's directory that has the necessary setup to use Radius with the official Bicep compiler.

{{< rad file="snippets/app.bicep" embed=true markdownConfig="{linenos=table,linenostart=1}" >}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius
extension radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/snippets/app-with-redis.bicep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius
extension radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string
Expand Down
2 changes: 1 addition & 1 deletion docs/content/getting-started/snippets/app.bicep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius
extension radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

@description('The environment ID of your Radius Application. Set automatically by the rad CLI.')
param environment string
Expand Down
18 changes: 13 additions & 5 deletions docs/content/guides/author-apps/aws/howto-aws-resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This how-to guide will show you:
- [eksctl CLI](https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html)
- [kubectl CLI](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-radius-bicep-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})

## Step 1: Create an EKS Cluster

Expand Down Expand Up @@ -52,15 +52,23 @@ Follow the prompts to install the [control plane services]({{< ref "/concepts/te
- **Add AWS provider** - An [AWS cloud provider]({{< ref "/guides/operations/providers/aws-provider" >}}) allows you to deploy and manage AWS resources as part of your application. Follow the how-to guides to [configure the AWS provider]({{< ref "/guides/operations/providers/aws-provider/howto-aws-provider-access-key" >}}) with the preferred identity.
- **Environment name** - The name of the environment to create. You can specify any name with lowercase letters, such as `myawsenv`.

## Step 3: Create a Bicep file to model AWS Simple Storage Service (S3)
Select 'No' when asked to setup application in the current directory.

## Step 3: Create a `bicepconfig.json` in your application's directory

{{< read file= "/shared-content/installation/bicepconfig/manual.md" >}}

More information on how to setup a `bicepconfig.json` can be found [here]({{< ref "/guides/tooling/bicepconfig/overview" >}})

## Step 4: Create a Bicep file to model AWS Simple Storage Service (S3)

Create a new file called `app.bicep` and add the following bicep code to model an AWS S3 Bucket:

{{< rad file="snippets/s3.bicep" embed=true >}}

Radius uses the [AWS Cloud Control API](https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/what-is-cloudcontrolapi.html) to interact with AWS resources. This means that you can model your AWS resources in Bicep and Radius will be able to deploy and manage them. You can find the list of supported AWS resources in the [AWS resource library]({{< ref "guides/author-apps/aws/overview#resource-library" >}}).

## Step 4: Add a Radius container to interact with the AWS S3 Bucket
## Step 5: Add a Radius container to interact with the AWS S3 Bucket

Open the `app.bicep` and append the following Radius resources:

Expand All @@ -72,7 +80,7 @@ Your final `app.bicep` file should look like this

This creates a container that will be deployed to your Kubernetes cluster. This container will interact with the AWS S3 Bucket you created in the previous step.

## Step 5: Deploy the application
## Step 6: Deploy the application

1. Deploy your application to your environment:

Expand All @@ -95,7 +103,7 @@ This creates a container that will be deployed to your Kubernetes cluster. This

{{< image src="s3app.png" alt="Screenshot of the sample application to interact with s3 bucket " width=900 >}}

## Step 6: Cleanup
## Step 7: Cleanup

1. When you're done with testing, you can use the rad CLI to [delete an environment]({{< ref rad_env_delete.md >}}) to delete all Radius resources running on the EKS Cluster.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import aws as aws
extension aws

import radius as radius
extension radius

@description('The name of your S3 bucket.The AWS S3 Bucket name must follow the [following naming conventions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).')
param bucket string ='mys3bucket'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import aws as aws
extension aws

@description('The name of your S3 bucket.The AWS S3 Bucket name must follow the naming conventions described at https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html')
param bucket string ='mys3bucket-${uniqueString(resourceGroup().id)}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import aws as aws
extension aws

import radius as radius
extension radius

@description('The name of your S3 bucket.The AWS S3 Bucket name must follow the [following naming conventions](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).')
param bucket string ='mys3bucket'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import aws as aws
extension aws

import radius as radius
extension radius

param environment string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The steps below will showcase a "rad-ified" version of the existing [Azure AD wo
## Prerequisites

- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Setup a supported Kubernetes cluster]({{< ref "/guides/operations/kubernetes/overview#supported-clusters" >}})
- [Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/installation.html) installed in your cluster, including the [Mutating Admission Webhook](https://azure.github.io/azure-workload-identity/docs/installation/mutating-admission-webhook.html)

Expand All @@ -32,27 +32,35 @@ Begin by running [`rad init --full`]({{< ref rad_init >}}). Make sure to configu
rad init --full
```

## Step 2: Define a Radius Environment
Select 'No' when asked to setup application in the current directory.

## Step 2: Create a `bicepconfig.json` in your application's directory

{{< read file= "/shared-content/installation/bicepconfig/manual.md" >}}

More information on how to setup a `bicepconfig.json` can be found [here]({{< ref "/guides/tooling/bicepconfig/overview" >}})

## Step 3: Define a Radius Environment

Create a file named `app.bicep` and define a Radius Environment with [identity property]({{< ref "/guides/deploy-apps/environments/overview" >}}) set. This configures your environment to use your Azure AD workload identity installation with your cluster's OIDC endpoint:

{{< rad file="snippets/container-wi.bicep" embed=true marker="//ENVIRONMENT">}}

## Step 3: Define an app and a container
## Step 4: Define an app and a container

Add a Radius Application, a Radius [container]({{< ref "guides/author-apps/containers" >}}), and an Azure Key Vault to your `app.bicep` file. Note the connection from the container to the Key Vault, with an iam property set for the Azure AD RBAC role:

{{< rad file="snippets/container-wi.bicep" embed=true marker="//CONTAINER" >}}

## Step 4: Deploy the app and container
## Step 5: Deploy the app and container

Deploy your app by specifying the OIDC issuer URL. To retrieve the OIDC issuer URL, follow the [Azure Workload Identity installation guide](https://azure.github.io/azure-workload-identity/docs/installation.html).

```bash
rad deploy ./app.bicep -p oidcIssuer=<OIDC_ISSUER_URL>
```

## Step 5: Verify access to the Key Vault
## Step 6: Verify access to the Key Vault

1. Once deployment completes, read the logs from your running container resource:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//ENVIRONMENT
import radius as radius
extension radius

@description('The Azure region to deploy Azure resource(s) into. Defaults to the region of the target Azure resource group.')
param azLocation string = resourceGroup().location
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as radius
extension radius

param environment string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This how-to guide will teach how to connect to your dependencies via [connection
## Prerequisites

- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Radius environment]({{< ref "installation#step-3-initialize-radius" >}})

## Step 1: View the container definition
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import the set of Radius resources (Applications.*) into Bicep
import radius as radius
extension radius

@description('The app ID of your Radius Application. Set automatically by the rad CLI.')
param application string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

@description('The app ID of your Radius application. Set automatically by the rad CLI.')
param application string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This how-to guide will provide an overview of how to:
## Prerequisites

- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Supported Kubernetes cluster]({{< ref "guides/operations/kubernetes" >}})
- [Azure AD Workload Identity](https://azure.github.io/azure-workload-identity/docs/installation.html) installed on your cluster
- [Azure Keyvault Provider](https://azure.github.io/secrets-store-csi-driver-provider-azure/docs/getting-started/installation/)
Expand All @@ -33,33 +33,41 @@ Begin by running [`rad init --full`]({{< ref rad_init >}}). Make sure to configu
rad init --full
```

## Step 2: Define a Radius Environment
Select 'No' when asked to setup application in the current directory.

## Step 2: Create a `bicepconfig.json` in your application's directory

{{< read file= "/shared-content/installation/bicepconfig/manual.md" >}}

More information on how to setup a `bicepconfig.json` can be found [here]({{< ref "/guides/tooling/bicepconfig/overview" >}})

## Step 3: Define a Radius Environment

Create a file named `app.bicep` and define a Radius Environment with the identity property set:

{{< rad file="snippets/keyvault-wi.bicep" embed=true marker="//ENVIRONMENT">}}

## Step 3: Define an app, Key Vault, and volume
## Step 4: Define an app, Key Vault, and volume

Add a Radius Application, an Azure Key Vault, and a Radius volume which uses the Key Vault to your `app.bicep` file:

{{< rad file="snippets/keyvault-wi.bicep" embed=true marker="//APP" >}}

## Step 4: Define an app, Key Vault, and volume
## Step 5: Define an app, Key Vault, and volume

Now add a Radius [container]({{< ref "guides/author-apps/containers" >}}) with a volume mount for the Radius volume:

{{< rad file="snippets/keyvault-wi.bicep" embed=true marker="//CONTAINER" >}}

## Step 5: Deploy the app
## Step 6: Deploy the app

Deploy your app, specifying the OIDC issuer URL. To retrieve the OIDC issuer URL, follow the [Azure Workload Identity installation guide](https://azure.github.io/azure-workload-identity/docs/installation.html).

```bash
rad deploy ./app.bicep -p oidcIssuer=<OIDC_ISSUER_URL>
```

## Step 5: Verify access to the mounted Azure Key Vault
## Step 7: Verify access to the mounted Azure Key Vault

1. Once deployment completes, read the logs from your running container resource:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//ENVIRONMENT
import radius as rad
extension radius

@description('The Azure region to deploy Azure resource(s) into. Defaults to the region of the target Azure resource group.')
param azLocation string = resourceGroup().location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This how-to guide will provide an overview of how to:
## Prerequisites

- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Radius environment]({{< ref "installation#step-3-initialize-radius" >}})

## Step 1: Define an app and a container
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

param environment string

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import radius as rad
extension radius

param environment string

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide will walk you through how to use an [extender]({{< ref "/guides/autho
## Prerequisites

- [rad CLI]({{< ref "installation#step-1-install-the-rad-cli" >}})
- [Radius Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Bicep VSCode extension]({{< ref "installation#step-2-install-the-vs-code-extension" >}})
- [Radius environment]({{< ref "installation#step-3-initialize-radius" >}})

## Step 1: Register an extender Recipe
Expand Down
Loading

0 comments on commit bc77f63

Please sign in to comment.