Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4b5b056
Revamp tutorial
Reshrahim Oct 16, 2025
28b101a
Revamp tutorial
Reshrahim Oct 16, 2025
cb49055
Fix docsy error
Reshrahim Oct 16, 2025
eb463f2
Merge branch 're/tutorial' of https://github.com/radius-project/docs …
Reshrahim Oct 16, 2025
f362c1c
fix docsy
Reshrahim Oct 16, 2025
3fe4a37
Fix minor things
Reshrahim Oct 16, 2025
2717bfd
Fix minor things
Reshrahim Oct 16, 2025
7a8896a
Address feedback-part1
Reshrahim Oct 17, 2025
c0ce03a
Address feedback on tutorial page
Reshrahim Oct 17, 2025
bbcc5c4
Update Recipe
Reshrahim Oct 21, 2025
e131a76
Add deploy application and other changes
Reshrahim Oct 21, 2025
0266f3e
remove eshop
Reshrahim Oct 21, 2025
1386611
Download from contrib
Reshrahim Oct 21, 2025
e2c6dd5
Address feedback
Reshrahim Oct 22, 2025
f53e3c0
Address feedback
Reshrahim Oct 22, 2025
d46a87c
spell check
Reshrahim Oct 22, 2025
1e4f1a5
Merge branch 'edge' into re/tutorial
Reshrahim Oct 23, 2025
0a7cabb
Apply suggestions from code review
Reshrahim Oct 23, 2025
3f13686
Merge branch 'edge' into re/tutorial
Reshrahim Oct 24, 2025
5410b23
Apply suggestions from code review
Reshrahim Oct 24, 2025
2d017f1
Apply suggestions from code review
Reshrahim Oct 24, 2025
e6b0b8e
Update docs/content/tutorials/create-environment/index.md
Reshrahim Oct 24, 2025
e46b155
Apply suggestions from code review
Reshrahim Oct 24, 2025
e4e47f5
Update install-rad-cli.md
Reshrahim Oct 24, 2025
41c05f8
Apply suggestions from code review
Reshrahim Oct 24, 2025
6e60ff7
Address feedback
Reshrahim Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/config/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1328,3 +1328,8 @@ Preflight
preflight
oci
contrib
postgreSqlDatabases
OpenAPI
Gi
memoryRequest
githubusercontent
2 changes: 1 addition & 1 deletion docs/content/concepts/faq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently yes. Although Radius is architected to run on any platform, today Kube

### Can I incrementally adopt, or "try out" Radius?

Yes. The easiest way to add Radius to an existing application is through [Radius annotations]({{< ref "/tutorials/tutorial-add-radius#step-3-add-radius-to-the-guestbook-application" >}}). Simply add the annotations to your existing Helm chart or Kubernetes YAML and you can use the Radius app graph, connections, and Recipes. [Try the tutorial]({{< ref "/tutorials/tutorial-add-radius" >}}) to learn more.
Yes. The easiest way to add Radius to an existing application is through [Radius annotations]({{< ref "/reference/samples/tutorial-add-radius#step-3-add-radius-to-the-guestbook-application" >}}). Simply add the annotations to your existing Helm chart or Kubernetes YAML and you can use the Radius app graph, connections, and Recipes. [Try the tutorial]({{< ref "/reference/samples/tutorial-add-radius" >}}) to learn more.

### Do I have to self-host Radius? Is there a managed service for Radius?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ Run the following command to [delete]({{< ref "guides/deploy-apps/howto-delete"

## Further reading

- [Radius Dapr tutorial]({{< ref "tutorials/tutorial-dapr" >}})
- [Radius Dapr tutorial]({{< ref "reference/samples/tutorial-dapr" >}})
- [Dapr in Radius containers]({{< ref "guides/author-apps/containers/overview#kubernetes" >}})
- [Dapr sidecar schema]({{< ref "reference/resource-schema/dapr-schema/dapr-extension" >}})
7 changes: 7 additions & 0 deletions docs/content/reference/samples/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
type: docs
title: "Samples"
linkTitle: "Samples"
description: "Reference samples"
weight: 400
---
Original file line number Diff line number Diff line change
Expand Up @@ -321,5 +321,5 @@ This output shows that Radius has detected the three container resources in the

- To learn more about authoring Radius applications, visit the [Authoring applications guide]({{< ref "guides/author-apps" >}})
- To learn more about deploying applications using Radius, visit the [Deploying applications guide]({{< ref "guides/deploy-apps" >}})
- To learn more about using the [Radius Connections]({{< ref "guides/author-apps/containers/overview#connections" >}}) annotations to connect your containers and resources, visit the [Radius Helm tutorial]({{< ref "tutorials/helm#step-6-add-connection" >}})
- To learn more about using the [Radius Connections]({{< ref "guides/author-apps/containers/overview#connections" >}}) annotations to connect your containers and resources, visit the [Radius Helm tutorial]({{< ref "reference/samples/helm#step-6-add-connection" >}})
- To learn more about Radius Recipes, visit the [Recipes guide]({{< ref "guides/recipes" >}})
21 changes: 18 additions & 3 deletions docs/content/tutorials/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
---
type: docs
title: "Tutorials"
linkTitle: "Tutorials"
description: "Follow along with a set of tutorials to learn how to use the Radius platform"
title: "Tutorial"
linkTitle: "Tutorial"
description: "End-to-end tutorial to configure Radius and deploy an application"
weight: 30
---

This hands-on tutorial guides you through installing Radius, configuring Resource Types, Recipes, and Environments, and finally deploying the Todo List sample application. This tutorial will take approximately 30-60 minutes to complete.

## Learning Outcomes

After completing this tutorial, you will:

- Understand Radius concepts including Resource Types, Recipes, Environments, and Applications
- Know how to develop new Radius Resource Types and Recipes
- Have hands-on experience configuring Radius using the Radius CLI
- Know how to deploy an Application using Radius

## Organization

This tutorial is organized in five sequential parts. It is important to complete each part in order.
182 changes: 182 additions & 0 deletions docs/content/tutorials/create-environment/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
---
type: docs
title: "4. Create Environment"
linkTitle: "4. Create Environment"
description: "Create a Radius Environment to deploy the Application"
weight: 400
---

In part four of this tutorial, you will:

- Create a Resource Group to contain all your resources
- Create an Environment that uses the Recipe for the PostgreSQL Resource Type
- Create a Workspace to configure the local Radius CLI

## Create a Resource Group

All resources, including Environments, are created within a Resource Group.

Create a Resource Group using the `rad group create`.

```bash
rad group create my-group
```
You should see output similar to:

```
creating resource group "my-group" in workspace "my-workspace"...

resource group "my-group" created
```

## Create an Environment

Radius Environments define where to deploy resources and what Recipes to use during deployment.

Create an Environment using the `rad environment create` command.

```bash
rad environment create my-env --group my-group
```

You should see output similar to:

```
Creating Environment...
Successfully created environment "my-env" in resource group "my-group"
```

Inspect the Environment using the `rad environment show`

```bash
rad environment show my-env --output json
```

You should see output similar to:

```
{
"id": "/planes/radius/local/resourcegroups/my-group/providers/Applications.Core/environments/my-env",
"location": "global",
"name": "my-env",
"properties": {
"compute": {
"kind": "kubernetes",
"namespace": "my-env"
},
"provisioningState": "Succeeded"
}...
"type": "Applications.Core/environments"
}
```

## Create a Workspace

A Radius Workspace is a set of configurations for the local Radius CLI. It is a combination of a Kubernetes context, a Radius Environment, and a Resource Group.

Create a new Workspace using the `rad workspace create` command.

```bash
rad workspace create kubernetes my-workspace \
--context $(kubectl config current-context) \
--environment my-env \
--group my-group
```

You should see output similar to:

```
Creating workspace...
Set "my-workspace" as current workspace.
```

Show the current workspace. The `--output json` will show the details of the workspace created.

```bash
rad workspace show --output json
```

You should see output similar to:

```
{
"connection": {
"context": "k3d-k3s-default",
"kind": "kubernetes"
},
"environment": "/planes/radius/local/resourceGroups/my-group/providers/applications.core/environments/my-env",
"scope": "/planes/radius/local/resourceGroups/my-group"
}
```

You can also view the workspace by inspecting the contents of `~/.rad/config.yaml`.


## Update the Environment with the Recipe

Update the Environment with Terraform or Bicep Recipe based on your preference.

{{< tabs Terraform Bicep >}}{{% codetab %}}

```bash
rad recipe register default \
--environment my-env \
--resource-type Radius.Data/postgreSqlDatabases \
--template-kind terraform \
--template-path git::https://github.com/radius-project/resource-types-contrib.git//Data/postgreSqlDatabases/recipes/kubernetes/terraform
```

You should see output similar to:

```
Successfully linked recipe "default" to environment "my-env"
```

Verify the Recipe is registered using the `rad recipe list` command.

```bash
rad recipe list
```

You should see output similar to:

```
RECIPE TYPE TEMPLATE KIND TEMPLATE VERSION TEMPLATE
...
default Radius.Data/postgreSqlDatabases terraform git::https://github.com/radius-project/resource-types-contrib.git//Data/postgreSqlDatabases/recipes/kubernetes/terraform
```
{{% /codetab %}}
{{% codetab %}}

```bash
rad recipe register default \
--environment my-env \
--resource-type Radius.Data/postgreSqlDatabases \
--template-kind bicep \
--template-path ghcr.io/radius-project/recipes/kubernetes/postgresql:0.53.0
```

You should see output similar to:
```
Successfully linked recipe "default" to environment "my-env"
```

Verify the Recipe is registered using the `rad recipe list` command.

```bash
rad recipe list
```

You should see output similar to:

```
RECIPE TYPE TEMPLATE KIND TEMPLATE VERSION TEMPLATE
...
default Radius.Data/postgreSqlDatabases bicep ghcr.io/radius-project/recipes/kubernetes/postgresql:0.53.0
```
{{% /codetab %}}
{{< /tabs >}}

In the final part, you will deploy the Todo List application to the Environment you just created.
<br><br>
{{< button text="Next Step: Deploy Application" page="deploy-application" color="primary" >}}
145 changes: 145 additions & 0 deletions docs/content/tutorials/create-recipe/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
type: docs
title: "3. Create Recipes"
linkTitle: "3. Create Recipes"
description: "Create Bicep or Terraform Recipes that implement the Resource Type"
weight: 300
---

Recipes define how a resource is deployed. In part three of this tutorial, you will create a Terraform or Bicep Recipe for the PostgreSQL Resource Type.

## Create a Recipe for the PostgreSQL Resource Type

Recipes can be either Terraform configurations or Bicep templates. Select the tab for the IaC language you prefer.

{{< tabs Terraform Bicep >}}{{% codetab %}}

Terraform configuration are stored in a Git repository for Radius to access the Recipe. For this tutorial, the Terraform Recipe has already been created and stored in the Radius [resource-types-contrib](https://github.com/radius-project/resource-types-contrib/blob/main/Data/postgreSqlDatabases/recipes/kubernetes/terraform/main.tf) repository. Hence, there are no actual steps to complete for this section of the tutorial. What follows is a walkthrough of the Radius-specific aspects of the Terraform configuration.

1. **Radius metadata via `context` variable**

Radius automatically injects a variable called `context`. The context variable contains the Resource Type's and the Environment's properties. To use this metadata within the Terraform configuration, a variable must be defined within the `main.tf` or `variables.tf` file.

```tf
variable "context" {
description = "Radius-provided object containing information about the resource calling the Recipe."
type = any
}
```
Refer to the [context schema]({{< ref context-schema>}}) for the available properties.

1. **Variables for Recipe customization**

The `memory` variable allows customizing the memory request for the PostgreSQL container based on the `size` property defined in the Resource Type.
```tf
variable "memory" {
description = "Memory limits for the PostgreSQL container"
type = map(object({
memoryRequest = string
}))
default = {
S = {
memoryRequest = "512Mi"
},
M = {
memoryRequest = "1Gi"
}
L = {
memoryRequest = "2Gi"
}

}
```
It is then used in the Kubernetes Deployment:

```tf
resources {
requests = {
memory = var.memory[var.context.resource.properties.size].memoryRequest
}
}
```

1. **Result output**

Radius requires Terraform configuration to have a `result` output defined which provides Radius with the values for each read-only property on the Resource Type. Since the postgreSqlDatabases Resource Type has five read-only properties, each are specified within the `result`.

```tf
output "result" {
value = {
values = {
host = "${kubernetes_service.postgres.metadata[0].name}.${kubernetes_service.postgres.metadata[0].namespace}.svc.cluster.local"
port = local.port
database = "postgres_db"
username = "postgres"
password = random_password.password.result
}
}
}
```

{{% /codetab %}}
{{% codetab %}}

Bicep templates are stored in an OCI registry for Radius to access the Recipe. For this tutorial, the [Bicep Recipe](https://github.com/radius-project/resource-types-contrib/blob/main/Data/postgreSqlDatabases/recipes/kubernetes/bicep/kubernetes-postgresql.bicep) has already been created and stored in the Radius OCI registry. Hence, there are no actual steps to complete for this section of the tutorial. What follows is a walkthrough of the Radius-specific aspects of the Bicep template.

1. **Radius metadata via `context` variable**

Radius automatically injects a `context` parameter. The context parameter contains the Resource Type's and the Environment's properties. To use this metadata within the Bicep template, a `context` parameter must be defined.

```bicep
@description('Information about what resource is calling this Recipe. Generated by Radius.')
param context object
```
Refer to the [context schema]({{< ref context-schema>}}) for the available properties.

1. **Variables for Recipe customization**

The `memory` variable allows customizing the memory request for the PostgreSQL container based on the `size` property defined in the Resource Type.

```bicep
@description('Memory limits for the PostgreSQL container')
var memory ={
S: {
memoryRequest: '512Mi'
}
M: {
memoryRequest: '1Gi'
}
L: {
memoryRequest: '2Gi'
}
}
```
It is then used in the Kubernetes Deployment:

```bicep
resources: {
requests: {
memory: memory[context.resource.properties.size].memoryRequest
}
}
```

1. **Result output**

Radius requires Bicep templates to have a `result` output defined which provides Radius with the values for each read-only property on the Resource Type. Since the postgreSqlDatabases Resource Type has five read-only properties, each are specified within the `result`.

```bicep
output result object = {
values: {
host: '${svc.metadata.name}.${svc.metadata.namespace}.svc.cluster.local'
port: port
database: database
username: user
password: password
}
}
```

{{% /codetab %}}
{{< /tabs >}}

In part four, you will create an Environment which uses the new Recipe.
<br><br>
{{< button text="Next step: Create Environment" page="create-environment" color="primary" >}}
Loading
Loading