Skip to content

Commit

Permalink
docs: update kusion installation instruction (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yangyang96 authored Jan 22, 2025
1 parent 4a868a2 commit 30d37fe
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 19 deletions.
2 changes: 1 addition & 1 deletion charts/kusion/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: kusion
version: 0.14.0
version: 0.14.1
type: application
appVersion: 0.14.0
description: Kusion - An Intent-Driven Platform Orchestrator
Expand Down
62 changes: 53 additions & 9 deletions charts/kusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,71 @@ Kusion - An Intent-Driven Platform Orchestrator

## Installing the Chart

First, add the Kusion chart repo to your local repository.
> Note: A valid kubeconfig configuration is required for Kusion to function properly. You must either use the installation script, provide your own kubeconfig in values.yaml, or set it through the --set parameter
To install Kusion, you have the following options:

### 1. Use the installation script (recommended)

```shell
helm repo add kusionstack https://kusionstack.github.io/charts
helm repo update
./scripts/install-kusion-server.sh <kubeconfig_key1=kubeconfig_path1> <kubeconfig_key2=kubeconfig_path2> ...
```

Then you can use the following command to install the latest version of Kusion.
**Parameters:**

- **kubeconfig_key**: The key for the kubeconfig file. It should be unique and not contain spaces.

- **kubeconfig_path**: The path to the kubeconfig file.

### 2. Manual installation with your own kubeconfig

Edit the [values file](values.yaml) to add your kubeconfig content

```yaml
# Replace the content below with your actual kubeconfig
kubeconfig:
kubeConfigs:
kubeconfig0: |
Please fill in your KubeConfig contents here.
kubeconfig1: |
Please fill in your KubeConfig contents here.
```
Then install the chart with the custom values file:
```shell
helm install kusion-release kusionstack/kusion
helm install kusion-release ./kusion
```

> Note that installing this chart directly means it will use the [default template values](./values.yaml) for Kusion.
### 3. Install with specific configurations

First, you need to base64 encode your kubeconfig files.

```shell
KUBECONFIG_CONTENT1=$(base64 -w 0 /path/to/your/kubeconfig1)
KUBECONFIG_CONTENT2=$(base64 -w 0 /path/to/your/kubeconfig2)
```

Then you can use the following command to install the latest version of Kusion.

```shell
helm install kusion-release kusionstack/kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
```

You may have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `resources`, `replicas`, `port` etc.
You may also have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `port`, `replicas`, `database` etc.

All configurable parameters of the Kusion chart are detailed [here](#chart-parameters).
> All configurable parameters of the Kusion chart are detailed [here](#chart-parameters).
```shell
helm install kusion-release kusionstack/kusion --set server.port=8080 --set mysql.enabled=true --set mysql.database=kusion
helm install kusion-release kusionstack/kusion \
--set server.port=8080 \
--set server.replicas=3 \
--set mysql.enabled=true \
--set mysql.database=kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
```

## Chart Parameters
Expand Down
62 changes: 53 additions & 9 deletions charts/kusion/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,71 @@

## Installing the Chart

First, add the Kusion chart repo to your local repository.
> Note: A valid kubeconfig configuration is required for Kusion to function properly. You must either use the installation script, provide your own kubeconfig in values.yaml, or set it through the --set parameter

To install Kusion, you have the following options:

### 1. Use the installation script (recommended)

```shell
helm repo add kusionstack https://kusionstack.github.io/charts
helm repo update
./scripts/install-kusion-server.sh <kubeconfig_key1=kubeconfig_path1> <kubeconfig_key2=kubeconfig_path2> ...
```

Then you can use the following command to install the latest version of Kusion.
**Parameters:**

- **kubeconfig_key**: The key for the kubeconfig file. It should be unique and not contain spaces.

- **kubeconfig_path**: The path to the kubeconfig file.

### 2. Manual installation with your own kubeconfig

Edit the [values file](values.yaml) to add your kubeconfig content

```yaml
# Replace the content below with your actual kubeconfig
kubeconfig:
kubeConfigs:
kubeconfig0: |
Please fill in your KubeConfig contents here.
kubeconfig1: |
Please fill in your KubeConfig contents here.
```

Then install the chart with the custom values file:

```shell
helm install kusion-release kusionstack/kusion
helm install kusion-release ./kusion
```

> Note that installing this chart directly means it will use the [default template values](./values.yaml) for Kusion.
### 3. Install with specific configurations

First, you need to base64 encode your kubeconfig files.

```shell
KUBECONFIG_CONTENT1=$(base64 -w 0 /path/to/your/kubeconfig1)
KUBECONFIG_CONTENT2=$(base64 -w 0 /path/to/your/kubeconfig2)
```

Then you can use the following command to install the latest version of Kusion.

```shell
helm install kusion-release kusionstack/kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
```

You may have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `resources`, `replicas`, `port` etc.
You may also have to set your specific configurations if it is deployed into a production cluster, or you want to customize the chart configuration, such as `port`, `replicas`, `database` etc.

All configurable parameters of the Kusion chart are detailed [here](#chart-parameters).
> All configurable parameters of the Kusion chart are detailed [here](#chart-parameters).

```shell
helm install kusion-release kusionstack/kusion --set server.port=8080 --set mysql.enabled=true --set mysql.database=kusion
helm install kusion-release kusionstack/kusion \
--set server.port=8080 \
--set server.replicas=3 \
--set mysql.enabled=true \
--set mysql.database=kusion \
--set kubeconfig.kubeConfigs.kubeconfig0="$KUBECONFIG_CONTENT1" \
--set kubeconfig.kubeConfigs.kubeconfig1="$KUBECONFIG_CONTENT2"
```

## Chart Parameters
Expand Down

0 comments on commit 30d37fe

Please sign in to comment.