Skip to content

Commit

Permalink
Update section pages
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronCrawfis committed Jul 7, 2023
1 parent 397d2f8 commit 0be1b07
Show file tree
Hide file tree
Showing 23 changed files with 245 additions and 235 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Radius development environments enable you to quickly get started with Radius an

## How-to: Initialize a new dev environment

1. Initialize a new [Radius environment]{{(< ref "operations/environments">)}} with `rad init --dev` command:
1. Initialize a new [Radius environment]{{(< ref "operations/environments/overview">)}} with `rad init --dev` command:
```bash
rad init --dev
```
Expand Down
68 changes: 0 additions & 68 deletions docs/content/author-apps/networking/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,3 @@ weight: 400
categories: "Concept"
tags: ["routes","gateways"]
---

Radius networking resources allow you to model:

- Communication between a user and a service
- Communication between services

## HTTP Routes

An `HttpRoute` resources defines HTTP communication between two [services]({{< ref container >}}). They can be used to define both one-way communication, as well as cycles of communication between services.

<img src="networking-cycles.png" style="width:400px" alt="Diagram of Radius service-to-service networking with cycles" /><br />

Refer to the [HTTP Route schema]({{< ref httproute >}}) for more information on how to model HTTP routes.

A gateway can optionally be added for external users to access the Route.

## Gateways

`Gateway` defines how requests are routed to different resources, and also provides the ability to expose traffic to the internet. Conceptually, gateways allow you to have a single point of entry for traffic in your application, whether it be internal or external traffic.

`Gateway` in Radius are split into two main pieces; the `Gateway` resource itself, which defines which port and protocol to listen on, and Route(s) which define the rules for routing traffic to different resources.

<img src="networking-gateways.png" style="width:400px" alt="Diagram of Radius gateways" /><br />

Refer to the [Gateway schema]({{< ref gateway >}}) for more information on how to model gateways.

### TLS Termination

Gateways support TLS termination. This allows incoming encrypted traffic to be decrypted with a user-specific certificate and then routed, unencrypted, to the specified routes. TLS certificates can be stored or referenced via a [Radius secret store]({{< ref secretstore >}}).

### SSL Passthrough

A gateway can be configured to passthrough encrypted SSL traffic to an HTTP route and container. This is useful for applications that already have SSL termination configured, and do not want to terminate SSL at the gateway.

To set up SSL passthrough, set `tls.sslPassthrough` to `true` on the gateway, and set a single route with no `path` defined (just `destination`).

## Example

### Path-based HTTP routing

{{< tabs Bicep >}}

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

{{< /tabs >}}

### TLS termination

{{< tabs Bicep >}}

{{< codetab >}}
{{< rad file="snippets/networking-tlstermination.bicep" embed=true marker="//GATEWAY" >}}
{{< /codetab >}}

{{< /tabs >}}


### SSL Passthrough

{{< tabs Bicep >}}

{{< codetab >}}
{{< rad file="snippets/networking-sslpassthrough.bicep" embed=true marker="//GATEWAY" >}}
{{< /codetab >}}

{{< /tabs >}}
77 changes: 77 additions & 0 deletions docs/content/author-apps/networking/overview/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
type: docs
title: "Overview: Application networking"
linkTitle: "Network communication"
description: "Learn how to add networking to your Radius application"
weight: 100
categories: "Overview"
tags: ["routes","gateways"]
---

Radius networking resources allow you to model:

- Communication between a user and a service
- Communication between services

## HTTP Routes

An `HttpRoute` resources defines HTTP communication between two [services]({{< ref container >}}). They can be used to define both one-way communication, as well as cycles of communication between services.

<img src="networking-cycles.png" style="width:400px" alt="Diagram of Radius service-to-service networking with cycles" /><br />

Refer to the [HTTP Route schema]({{< ref httproute >}}) for more information on how to model HTTP routes.

A gateway can optionally be added for external users to access the Route.

## Gateways

`Gateway` defines how requests are routed to different resources, and also provides the ability to expose traffic to the internet. Conceptually, gateways allow you to have a single point of entry for traffic in your application, whether it be internal or external traffic.

`Gateway` in Radius are split into two main pieces; the `Gateway` resource itself, which defines which port and protocol to listen on, and Route(s) which define the rules for routing traffic to different resources.

<img src="networking-gateways.png" style="width:400px" alt="Diagram of Radius gateways" /><br />

Refer to the [Gateway schema]({{< ref gateway >}}) for more information on how to model gateways.

### TLS Termination

Gateways support TLS termination. This allows incoming encrypted traffic to be decrypted with a user-specific certificate and then routed, unencrypted, to the specified routes. TLS certificates can be stored or referenced via a [Radius secret store]({{< ref secretstore >}}).

### SSL Passthrough

A gateway can be configured to passthrough encrypted SSL traffic to an HTTP route and container. This is useful for applications that already have SSL termination configured, and do not want to terminate SSL at the gateway.

To set up SSL passthrough, set `tls.sslPassthrough` to `true` on the gateway, and set a single route with no `path` defined (just `destination`).

## Example

### Path-based HTTP routing

{{< tabs Bicep >}}

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

{{< /tabs >}}

### TLS termination

{{< tabs Bicep >}}

{{< codetab >}}
{{< rad file="snippets/networking-tlstermination.bicep" embed=true marker="//GATEWAY" >}}
{{< /codetab >}}

{{< /tabs >}}


### SSL Passthrough

{{< tabs Bicep >}}

{{< codetab >}}
{{< rad file="snippets/networking-sslpassthrough.bicep" embed=true marker="//GATEWAY" >}}
{{< /codetab >}}

{{< /tabs >}}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ eksctl create cluster --name my-cluster --region=us-west-2 --zones=us-west-2a,us
## Step 2: Create a Radius environment with the AWS cloud provider

Create a [Radius environment]({{< ref "operations/environments" >}}) where you will deploy your application.
Create a [Radius environment]({{< ref "operations/environments/overview" >}}) where you will deploy your application.

1. You can view the current context for kubectl by running:

Expand All @@ -49,7 +49,7 @@ Create a [Radius environment]({{< ref "operations/environments" >}}) where you w
rad init
```

Follow the prompts to install Radius, create an [environment resource]({{< ref "operations/environments" >}}), and create a [local workspace]({{< ref workspaces >}}). You will be asked for:
Follow the prompts to install Radius, create an [environment resource]({{< ref "operations/environments/overview" >}}), and create a [local workspace]({{< ref workspaces >}}). You will be asked for:

- **Namespace** - When an application is deployed, this is the namespace where your containers and other Kubernetes resources will be run. By default, this will be in the `default` namespace.
{{% alert title="💡 About namespaces" color="success" %}} When you initialize a Radius Kubernetes environment, Radius installs the control plane resources within the `radius-system` namespace in your cluster, separate from your applications. The namespace specified in this step will be used for your application deployments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rad init

## Step 2: Define a Radius environment

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This quickstart will teach you:
## Prerequisites

- [Radius CLI]({{< ref "getting-started" >}})
- [Radius environment]({{< ref "operations/environments" >}})
- [Radius environment]({{< ref "operations/environments/overview" >}})

## Step 1: Model an app and container

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This quickstart will provide an overview of how to:
## Prerequisites

- [rad CLI]({{< ref getting-started >}})
- [Radius environment]({{< ref "operations/environments" >}})
- [Radius environment]({{< ref "operations/environments/overview" >}})

## Step 1: Define an app and a container

Expand Down
8 changes: 0 additions & 8 deletions docs/content/getting-started/supported-languages/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ weight: 900
categories: "How-To"
tags: ["infrastructure-as-code"]
---

Radius supports a variety of infrastructure-as-code (IaC) languages.

{{% alert title="Other languages" color="info" %}}
Currently, Radius supports Bicep. Terraform support is underway as our next priority IaC language.
{{% /alert %}}

## Languages
146 changes: 0 additions & 146 deletions docs/content/operations/environments/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,152 +4,6 @@ title: "Radius environments"
linkTitle: "Environments"
description: "Learn about Radius environments and how to interact with them"
weight: 200
categories: "How-To"
tags: ["environments"]
---

Radius environments are prepared "landing zones" for Radius applications. Applications deployed to an environment will inherit the container runtime, configuration, and other settings from the environment. Stay tuned for additional environment capabilities coming soon.

## Configuration

The following configuration options are available for environments:

### Container runtime

Radius environments can be configured with a container runtime, where Radius [containers]({{< ref container >}}) will be run, along with [gateways and routes]({{< ref networking >}}).

A Kubernetes namespace is specified on the environment to tell Radius where to render application resources at deploy time.

<img src=environments.png alt="Diagram showing a Radius environment mapping to a Kubernetes cluster and namespace" width=800px />

### Cloud Provider

You can optionally configure cloud providers allow you to deploy and connect to cloud resources across various cloud platforms. For example, you can use the Radius Azure provider to run your application's services in your Kubernetes cluster, while deploying Azure resources to a specified Azure subscription and resource group. More information on setting up a cloud provider can be found in the [providers]({{< ref providers >}}) section.

#### Supported cloud providers

| Provider | Description |
|----------|-------------|
| [Microsoft Azure]({{< ref "providers#azure-provider" >}}) | Deploy and connect to Azure resources |
| [Amazon Web Services]({{< ref "providers#aws-provider" >}}) | Deploy and connect to AWS resources |

### External identity provider

You can optionally specify an external identity provider for your environment. This allows you to add to a Radius container an external identity such as an Azure user-assigned managed identity, and then specify role-based access control (RBAC) policies for that identity on Azure resources.

Supported identity providers:

- [Azure AD workload identity](https://azure.github.io/azure-workload-identity/docs/introduction.html)

Visit the Azure direct connection quickstart for more information. (coming soon)

## CLI commands

The following commands let you interact with Radius environments:

{{< tabs init list show delete switch >}}

{{% codetab %}}
`rad init` initializes a new Kubernetes environment:

```bash
rad init
```
{{% /codetab %}}

{{% codetab %}}
[rad env list]({{< ref rad_env_list >}}) lists all of the environments in your [workspace]({{< ref workspaces >}}):

```bash
rad env list
```
{{% /codetab %}}

{{% codetab %}}
[rad env show]({{< ref rad_env_show >}}) prints information on the default or specified environment:

```bash
rad env show
```
{{% /codetab %}}

{{% codetab %}}
[rad env delete]({{< ref rad_env_delete >}}) deletes the specified environment:

```bash
rad env delete -e myenv
```
{{% /codetab %}}

{{% codetab %}}
[rad env switch]({{< ref rad_env_switch >}}) switches the default environment:

```bash
rad env switch -e myenv
```
{{% /codetab %}}

{{< /tabs >}}

## Schema

Visit the [environment schema page]({{< ref environment-schema >}}) to learn more about environment properties and values.

{{< button page="environment-schema" text="Schema" >}}

## Example

The following example shows an environment configured with Kubernetes as the target runtime. The `default` namespace designates where to render application resources.

{{< rad file="snippets/environment.bicep" embed=true marker="//ENV" >}}

## How-to: Initialize a new environment

1. Begin by deploying a compatible [Kubernetes cluster]({{< ref "/operations/platforms/kubernetes" >}})

*Visit the [Kubernetes platform docs]({{< ref "/operations/platforms/kubernetes" >}}) for a list of supported clusters and specific cluster requirements.*

1. Ensure your target kubectl context is set as the default:
```bash
kubectl config current-context
```
1. Initialize a new environment with `rad init` command:
```bash
rad init
```
1. Follow the prompts, specifying:
- **Namespace** - The Kubernetes namespace where your application containers and networking resources will be deployed (different than the Radius control-plane namespace, `radius-system`)
- **Azure provider** (optional) - Allows you to [deploy and manage Azure resources]({{< ref "providers#azure-provider" >}})
- **AWS provider** (optional) - Allows you to [deploy and manage AWS resources]({{< ref "providers#aws-provider" >}})
- **Environment name** - The name of the environment to create
1. Let the rad CLI run the following tasks:
1. **Install Radius** - Radius installs the [control plane services]({{< ref architecture-concept >}}) in the `radius-system` namespace
2. **Create the environment** - An environment resource is created in the Radius control plane. It maps to a Kubernetes namespace.
3. **Add the Azure Cloud Provider** - The Azure cloud provider configuration is saved in the Radius control plane
4. **Add the AWS Cloud Provider** - The AWS cloud provider configuration is saved in the Radius control plane
5. **Create a workspace** - [Workspaces]({{< ref workspaces >}}) are local pointers to a cluster running Radius, and an environment. Workspaces are saved to the Radius config file (`~/.rad/config.yaml` on Linux and macOS, `%USERPROFILE%\.rad\config.yaml` on Windows)
2. Verify the initialization by running:
```bash
kubectl get deployments -n radius-system
```

You should see:

```
NAME READY UP-TO-DATE AVAILABLE AGE
ucp 1/1 1 1 53s
appcore-rp 1/1 1 1 53s
bicep-de 1/1 1 1 53s
contour-contour 1/1 1 1 46s
dapr-dashboard 1/1 1 1 35s
dapr-sidecar-injector 1/1 1 1 35s
dapr-sentry 1/1 1 1 35s
dapr-operator 1/1 1 1 35s
```

You can also use [`rad env list`]({{< ref rad_env_list.md >}}) to see if the created environment gets listed:

```bash
rad env list
```

Loading

0 comments on commit 0be1b07

Please sign in to comment.