Skip to content

Commit

Permalink
feat: improve helm installation process
Browse files Browse the repository at this point in the history
- add login instructions partial

Signed-off-by: Piotr Zaniewski <[email protected]>
  • Loading branch information
Piotr1215 committed Oct 7, 2024
1 parent 71c38b5 commit 9d4f9cb
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 17 deletions.
56 changes: 56 additions & 0 deletions platform/_partials/install/login-after-helm-install.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

If you haven't setup the domain in `values.yaml`, you can retrieve the domain
from the secret `loft-router-domain` in the installation namespace.

:::info
vCluster automatically provisions a random domain using the `loft-router`
component and stores the value in the `loft-router-domain` secrer
:::

Here is how to retrieve the domain name from the secret.

<Tabs
defaultValue="linux"
values={[
{ label: 'Linux and WSL', value: 'linux' },
{ label: 'macOS', value: 'macos' },
]}
>
<TabItem value="linux">

To retrieve the domain from the secret on **Linux**, run:

```bash
PLATFORM_NAMESPACE=vcluster-platform
echo "https://$(kubectl get secret loft-router-domain \
-n "$PLATFORM_NAMESPACE" \
-o jsonpath="{.data.domain}" \
| base64 --decode)"
```

</TabItem>
<TabItem value="macos">

To retrieve the domain from the secret on **macOS**, run:

```bash
PLATFORM_NAMESPACE=vcluster-platform
echo "https://$(kubectl get secret loft-router-domain \
-n "$PLATFORM_NAMESPACE" \
-o jsonpath="{.data.domain}" \
| base64 -D)"
```

</TabItem>
</Tabs>

:::info
Default credentials for testing purposes:
- Username: admin
- Password: my-password
:::

You can easily change the default `username` and `password` in the vcluster.yaml
[configuration](/platform/configure/config#changing-vcluster-platform-config).
79 changes: 62 additions & 17 deletions platform/install/helm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ sidebar_label: Using Helm
sidebar_position: 2
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import LoginToPlatformAfterHelmInstall from '../_partials/install/login-after-helm-install.mdx'

vCluster Platform can be installed directly via Helm, in fact, even when following the recommend installation
procedure in the Getting Started Guide the vCluster CLI is actually using Helm
to install vCluster Platform.
Expand All @@ -14,28 +18,58 @@ appropriate Helm values. This section outlines the basics of installing and mana
Helm, and should serve as a solid starting point for managing vCluster Platform
in a GitOps fashion as well.

## Simple Installation
## Installation

### Prerequisites

- [Helm v3](https://helm.sh/docs/helm/helm_install/) is required for installing vCluster Platform.

The most basic vCluster Platform installation via Helm looks like any other Helm install command and can be
seen below. Update `$PLATFORM_VERSION` with a valid vCluster Platform version.
vCluster Platform installation via Helm looks like any other Helm install command. Update `$RELEASE_NAME` and `$PLATFORM_VERSION` with your desired values.

If you haven't done so, add the Loft Helm repository and update the
Helm repositories.

```bash
helm upgrade [RELASE NAME] vcluster-platform --install \
--repo https://charts.loft.sh/ \
--namespace vcluster-platform \
--version $PLATFORM_VERSION
helm repo add loft https://charts.loft.sh
helm repo update
```

Typically, users will simply call the release name `vcluster-platform`. If the `vcluster-platform` namespace does not
already exist, you can add the `--create-namespace` flag as well, for a final installation
command. Update `$PLATFORM_VERSION` with a valid vCluster Platform version.
:::tip
To retrieve all available versions of the vCluster Platform Helm chart, you can
run the following command:

```bash
helm upgrade vcluster-platform vcluster-platform --install \
helm search repo loft-sh/vcluster-platform
```
:::

```bash
RELEASE_NAME=vcluster-platform
RELEASE_NAMESPACE=vcluster-platform
PLATFORM_VERSION='' # Set this to a specific version or leave empty for latest

helm upgrade $RELEASE_NAME vcluster-platform \
--install \
--repo https://charts.loft.sh/ \
--namespace vcluster-platform \
--namespace $RELEASE_NAMESPACE \
--create-namespace \
--version $PLATFORM_VERSION
${PLATFORM_VERSION:+--version $PLATFORM_VERSION}
```

You should see output similar to the following:

```bash
Release "vcluster-platform" does not exist. Installing it now.
NAME: vcluster-platform
LAST DEPLOYED: Fri Oct 4 13:10:52 2024
# highlight-start
NAMESPACE: vcluster-platform
STATUS: deployed
# highlight-end
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing vcluster-platform.
```

## vCluster Platform Values
Expand Down Expand Up @@ -64,12 +98,17 @@ ingress:
Values files can then be passed to the Helm upgrade command. Update `$PLATFORM_VERSION` with a valid vCluster Platform version.

```bash
helm upgrade vcluster-platform vcluster-platform --install \
RELEASE_NAME=vcluster-platform
RELEASE_NAMESPACE=vcluster-platform
PLATFORM_VERSION='' # Set this to a specific version or leave empty for latest
helm upgrade $RELEASE_NAME vcluster-platform \
--install \
--repo https://charts.loft.sh/ \
--namespace vcluster-platform \
--namespace $RELEASE_NAMESPACE \
--create-namespace \
--values values.yaml \
--version $PLATFORM_VERSION
${PLATFORM_VERSION:+--version $PLATFORM_VERSION}
```

You can provide multiple values files if desired by specifying additional filenames after the
Expand All @@ -78,6 +117,13 @@ You can provide multiple values files if desired by specifying additional filena
Helm has many additional flags, and other ways to pass values, as always, its a great idea to
check out the Helm [docs](https://helm.sh/docs/) to stay up to date on Helm.

## Login to vCluster Platform

<LoginToPlatformAfterHelmInstall/>

Navigate to the domain in your browser and login with the default credentials or
the credentials you set in values.yaml and complete the profile setup.

## vCluster Platform Configuration

The vCluster Platform Configuration options (as seen in the vCluster Platform UI `Admin` > `Config` section) are
Expand All @@ -88,4 +134,3 @@ in the Configuration Section of the docs [here](../configure/config.mdx).
While all configuration settings are optional, it is always recommended to deploy vCluster Platform with the
`loftHost` configuration set. This config option tells vCluster Platform what its own publicly resolvable
hostname is and is necessary for some integrations, including ArgoCD, and SSO.

0 comments on commit 9d4f9cb

Please sign in to comment.