Skip to content

Commit

Permalink
move installation content into shared folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Reshrahim committed Sep 28, 2023
1 parent cccd783 commit d20ac36
Show file tree
Hide file tree
Showing 12 changed files with 213 additions and 204 deletions.
3 changes: 3 additions & 0 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ enableGitInfo = true
[[module.mounts]]
source = "content"
target = "content"
[[module.mounts]]
source = "shared-content"
target = "content"
[[module.mounts]]
source = "static"
target = "static"
Expand Down
32 changes: 1 addition & 31 deletions docs/content/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,7 @@ kubectl config current-context

## 2. Install Radius CLI

{{< tabs MacOS "Linux/WSL" "Windows PowerShell" >}}

{{% codetab %}}
```bash
curl -fsSL "https://get.radapp.dev/tools/rad/install.sh" | /bin/bash
```
{{% /codetab %}}

{{% codetab %}}
```bash
wget -q "https://get.radapp.dev/tools/rad/install.sh" -O - | /bin/bash
```
{{% /codetab %}}

{{% codetab %}}
```powershell
iwr -useb "https://get.radapp.dev/tools/rad/install.ps1" | iex
```
{{% /codetab %}}

{{< /tabs >}}

Visit the [rad CLI]({{< ref howto-rad-cli >}}) page for troubleshooting or additional options.

Verify the rad CLI is installed correctly by running `rad version`.

Example output:
```
RELEASE VERSION BICEP COMMIT
{{< param chart_version >}} {{< param version >}} 0.11.13 2e60bfb46de73ec5cc70485d53e67f8eaa914ba7
```
{{< read file= "/shared-content/installation/rad-cli/install-rad-cli.md" >}}

## 3. Initialize Radius

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,14 @@ rad uninstall kubernetes

## Step 3: Install the rad CLI

The rad CLI is the main tool for interacting with Radius. It is used to create and manage Radius environments, and to deploy and manage Radius applications.

Visit the [rad CLI how-to guide]({{< ref howto-rad-cli >}}) for more information on how to install the rad CLI.

{{< button text="How-To: rad CLI" page="howto-rad-cli" newtab="true" >}}
{{< read file= "/shared-content/radius-installation/rad-cli/install-rad-cli.md" >}}

## Step 4: Install the Radius-Bicep VS Code extension

The Radius-Bicep VS Code extension provides a set of tools for working with Bicep files in VS Code. Visit the [VSCode how-to guide]({{< ref howto-vscode-bicep >}}) for more information on how to install the Radius-Bicep VS Code extension.

{{< button text="How-To: VS Code" page="howto-vscode-bicep" newtab="true" >}}

## Step 5: Initialize the Radius control-plane
{{< read file= "/shared-content/radius-installation/vscode-bicep/install-vscode-bicep.md" >}}

The Radius control-plane is a set of services that provide the core functionality of Radius. It is deployed as a set of containers in a Kubernetes cluster.
## Step 5: Initialize the Radius control-plane and the Radius environment

Visit the [environments how-to guide]({{< ref howto-environment >}}) for more information on how to install the Radius control-plane and create your first Radius environment.
{{< read file= "/shared-content/radius-installation/install-radius/initialize-radius.md" >}}

{{< button text="How-To: Init an environment" page="howto-environment" newtab="true" >}}
>If you are looking to upgrade Radius to the latest version, refer to [upgrade Radius on Kubernetes]({{< ref kubernetes-upgrade >}}) for more information.
86 changes: 1 addition & 85 deletions docs/content/guides/tooling/rad-cli/howto-rad-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,88 +8,4 @@ categories: "How-To"
tags: ["rad CLI", "Bicep"]
---

The `rad` CLI manages your applications, resources, and environments. You can install it on your local machine with the following installation scripts:

{{< tabs MacOS "Linux/WSL" "Windows PowerShell" "Cloud Shell" Binaries >}}

{{% codetab %}}
{{< latest >}}
```bash
curl -fsSL "https://get.radapp.dev/tools/rad/install.sh" | /bin/bash
```
{{< /latest >}}
{{< edge >}}
To install the latest edge version:

```bash
curl -fsSL "https://radiuspublic.blob.core.windows.net/tools/rad/install.sh" | /bin/bash -s edge
```
{{< /edge >}}
{{% /codetab %}}

{{% codetab %}}
{{< latest >}}
```bash
wget -q "https://get.radapp.dev/tools/rad/install.sh" -O - | /bin/bash
```
{{< /latest >}}
{{< edge >}}
To install the latest edge version:

```bash
wget -q "https://radiuspublic.blob.core.windows.net/tools/rad/install.sh" -O - | /bin/bash -s edge
```
{{< /edge >}}
{{% /codetab %}}

{{% codetab %}}
{{< latest >}}
Run the following in a PowerShell window:

```powershell
iwr -useb "https://get.radapp.dev/tools/rad/install.ps1" | iex
```

You may need to refresh your $PATH environment variable to access `rad`:
```powershell
$Env:Path = [System.Environment]::GetEnvironmentVariable("Path","User")
```
{{< /latest >}}
{{< edge >}}
To install the latest edge version:

```powershell
$script=iwr -useb https://radiuspublic.blob.core.windows.net/tools/rad/install.ps1; $block=[ScriptBlock]::Create($script); invoke-command -ScriptBlock $block -ArgumentList edge
```
{{< /edge >}}
{{% /codetab %}}

{{% codetab %}}
[Azure Cloud Shell](https://docs.microsoft.com/en-us/azure/cloud-shell/overview) is an interactive, authenticated, browser-accessible shell for managing Azure resources.

Azure Cloud Shell for bash doesn't have a sudo command, so users are unable to install Radius to the default `/usr/local/bin` installation path. To install the rad CLI to the home directory, run the following commands:

```bash
export RADIUS_INSTALL_DIR=./
wget -q "https://get.radapp.dev/tools/rad/install.sh" -O - | /bin/bash
```

You can now run the rad CLI with `./rad`.

PowerShell for Cloud Shell is currently not supported.
{{% /codetab %}}

{{% codetab %}}
1. Download the `rad` CLI from one of these URLs:
- MacOS x64: https://get.radapp.dev/tools/rad/{{< param version >}}/macos-x64/rad
- MacOS arm64: https://get.radapp.dev/tools/rad/{{< param version >}}/macos-arm64/rad
- Linux x64: https://get.radapp.dev/tools/rad/{{< param version >}}/linux-x64/rad
- Windows x64: https://get.radapp.dev/tools/rad/{{< param version >}}/windows-x64/rad.exe
1. Ensure the user has permission to execute the binary and place it somewhere on your PATH so it can be invoked easily.
{{% /codetab %}}

{{< /tabs >}}

> You may be prompted for your sudo password during installation, as the installer places the `rad` binary under `/usr/local/bin`. If you are unable to sudo you can install the rad CLI to another directory by setting the `RADIUS_INSTALL_DIR` environment variable with your intended install path. Make sure you add this to your path ([Unix](https://www.howtogeek.com/658904/how-to-add-a-directory-to-your-path-in-linux/), [Windows](https://windowsloop.com/how-to-add-to-windows-path/)) if you wish to reference it via `rad`, like in the docs.
Verify the rad CLI is installed correctly by running `rad`.
{{< read file= "/shared-content/installation/rad-cli/install-rad-cli.md" >}}
62 changes: 1 addition & 61 deletions docs/content/guides/tooling/vscode/howto-vscode-bicep/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,4 @@ categories: "How-To"
tags: ["Bicep", "VSCode"]
---

Visual Studio Code offers the best authoring experience for Radius and Bicep. Download and install the Radius Bicep extension to easily author and validate Bicep templates:

1. Download the latest extensions

{{< tabs Links Terminal >}}

{{% codetab %}}
{{< button link="https://get.radapp.dev/tools/vscode-extensibility/stable/rad-vscode-bicep.vsix" text="Download Bicep extension" >}}

{{< edge >}}
{{< button link="https://get.radapp.dev/tools/vscode-extensibility/edge/rad-vscode-bicep.vsix" text="Download Bicep extension (edge)" >}}
{{< /edge >}}
{{% /codetab %}}

{{% codetab %}}

Stable Version

```bash
curl https://get.radapp.dev/tools/vscode-extensibility/stable/rad-vscode-bicep.vsix --output rad-vscode-bicep.vsix
```

Edge Version

```bash
curl https://get.radapp.dev/tools/vscode-extensibility/edge/rad-vscode-bicep.vsix --output rad-vscode-bicep.vsix
```

{{% /codetab %}}

{{< /tabs >}}

2. Install the `.vsix` file:

{{< tabs UI Terminal >}}

{{% codetab %}}
In VSCode, manually install the extension using the *Install from VSIX* command in the Extensions view command drop-down.

<img src="./vsix-install.png" alt="Screenshot of installing a vsix extension" width=400>

{{% /codetab %}}

{{% codetab %}}
You can also import this extension on the [command-line](https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix) with:

```bash
code --install-extension rad-vscode-bicep.vsix
```

If you're on macOS, make sure to [setup the `code` alias](https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line).

{{% /codetab %}}

{{< /tabs >}}

3. **Disable the official Bicep extension** if you have it installed. Do not install it if prompted, our custom extension needs to be responsible for handling `.bicep` files and you cannot have both extensions enabled at once.

4. If running on Windows Subsystem for Linux (WSL), make sure to install the extension in WSL as well:

<img src="./wsl-extension.png" alt="Screenshot of installing a vsix extension in WSL" width=400>
{{< read file= "/shared-content/installation/vscode-bicep/install-vscode-bicep.md" >}}
18 changes: 4 additions & 14 deletions docs/content/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,14 @@ Radius consists of a set of tools and services that together form the Radius pla

## Step 1: Install the rad CLI

The rad CLI is the main tool for interacting with Radius. It is used to create and manage Radius environments, and to deploy and manage Radius applications.

Visit the [rad CLI how-to guide]({{< ref howto-rad-cli >}}) for more information on how to install the rad CLI.

{{< button text="How-To: rad CLI" page="howto-rad-cli" newtab="true" >}}
{{< read file= "/shared-content/installation/rad-cli/install-rad-cli.md" >}}

## Step 2: Install the Radius-Bicep VS Code extension

The Radius-Bicep VS Code extension provides a set of tools for working with Bicep files in VS Code. Visit the [VSCode how-to guide]({{< ref howto-vscode-bicep >}}) for more information on how to install the Radius-Bicep VS Code extension.

{{< button text="How-To: VS Code" page="howto-vscode-bicep" newtab="true" >}}

## Step 3: Initialize the Radius control-plane

The Radius control-plane is a set of services that provide the core functionality of Radius. It is deployed as a set of containers in a Kubernetes cluster.
{{< read file= "/shared-content/installation/vscode-bicep/install-vscode-bicep.md" >}}

Visit the [environments how-to guide]({{< ref howto-environment >}}) for more information on how to install the Radius control-plane and create your first Radius environment.
## Step 3: Initialize the Radius control-plane and the Radius environment

{{< button text="How-To: Init an environment" page="howto-environment" newtab="true" >}}
{{< read file= "/shared-content/installation/install-radius/initialize-radius.md" >}}

>If you are looking to upgrade Radius to the latest version, refer to [upgrade Radius on Kubernetes]({{< ref kubernetes-upgrade >}}) for more information.
3 changes: 3 additions & 0 deletions docs/layouts/shortcodes/read.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{ $file := .Get "file" }}
{{ $fileContents := $file | readFile }}
{{ (print "\n" $fileContents "\n") | markdownify }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
The Radius control-plane is a set of services that provide the core functionality of Radius. It is deployed as a set of containers in a Kubernetes cluster.

1. Initialize a new [Radius environment]({{< ref "/guides/deploy-apps/environments/overview">}}) with [`rad init`]({{< ref rad_init >}}):
```bash
rad init
```

Select `Yes` to setup the app.bicep in the current directory

```
Initializing Radius...
🕔 Install Radius {{< param version >}}
- Kubernetes cluster: kind
- Kubernetes namespace: radius-system
⏳ Create new environment default
- Kubernetes namespace: default
- Recipe pack: local-dev
⏳ Scaffold application
⏳ Update local configuration
```

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
```

You can also use [`rad env list`]({{< ref rad_env_list.md >}}) to view your environment:

```bash
rad env list
```
Loading

0 comments on commit d20ac36

Please sign in to comment.