Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi CSI support summary and csi-driver-config setting #372

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions docs/advanced/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,28 @@ If you set a username and password for a private registry, the system will autom
}
```

## `csi-driver-config`

_Available as of v1.2.0_

This setting allows you to install a Container Storage Interface (CSI) in your Harvester cluster to support and use external storage as the VM's non-system data partition and leverage different drivers.

Default:
```
{
"driver.longhorn.io": {
"volumeSnapshotClassName": "longhorn-snapshot",
"backupVolumeSnapshotClassName": "longhorn"
}
}
```

1. Add the provisioner for the newly added CSI driver.
1. Configure **Volume Snapshot Class Name**, which refers to the name of the `VolumeSnapshotClass` used to create volume snapshots or VM snapshots.
1. Cofigure **Backup Volume Snapshot Class Name**, which refers to the name of the `VolumeSnapshotClass` used to create VM backups.

Select the desired StorageClass when creating an empty volume or adding a new empty volume to a virtual machine.

## `http-proxy`

This setting allows you to configure an HTTP proxy to access external services, including the download of images and backup to s3 services.
Expand Down
21 changes: 21 additions & 0 deletions docs/advanced/storageclass.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@ The `volumeBindingMode` field controls when volume binding and dynamic provision

![](/img/v1.2/storageclass/customize_tab_vol_binding_mode.png)

## Multi Container Storage Interface support

Harvester now supports installing a Container Storage Interface (CSI) in your Harvester cluster to support and use external storage as the VM's non-system data partition. For example, choose an existing storage provider (e.g., Dell PowerFlex) to create a data volume in Harvester. Leverage different drivers for specific purposes, such as performance optimization or integration with existing internal storage providers.

:::note

The system partition of the VM can still use Longhorn. Before v1.2.0, Harvester only supports the use of Longhorn to store virtual machine data, and does not support the use of external storage to store VM data.

:::

You must first manually install your CSI driver. Then create a new StorageClass and edit the `csi-driver-config` setting.

### Header Section

- **Name**: Name of the StorageClass
- **Description** (optional): Description of the StorageClass.
- **Provisioner**: Select a provisioner.

### Parameters

Edit the [`csi-driver-config`](../advanced/settings.md#csi-driver-config) setting to add the provisioner for the newly added CSI driver.

## Appendix - Use Case

Expand Down
51 changes: 51 additions & 0 deletions docs/install/harvester-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,57 @@ os:
path: /etc/crontab
```

### `os.persistent_state_paths`

#### Definition

The `os.persistent_state_paths` option allows you to configure custom paths where modifications made to files will persist across reboots. Any changes to files in these paths will not be lost after a reboot.

#### Example

Refer to the following example config for installing `rook-ceph` in Harvester:

```yaml
os:
persistent_state_paths:
- /var/lib/rook
modules:
- rbd
- nbd
```

### `os.after_install_chroot_commands`

#### Definition

You can add additional software packages with `after_install_chroot_commands`. The `after-install-chroot` stage, provided by [elemental-toolkit](https://rancher.github.io/elemental-toolkit/docs/), allows you to execute commands not restricted by file system write issues, ensuring the persistence of user-defined commands even after a system reboot. This functionality is accessible through the Harvester Configuration or the `/oem/90_custom.yaml` file.

#### Example

Refer to the following example config for installing an RPM package in Harvester:

```yaml
os:
after_install_chroot_commands:
- rpm -ivh <the url of rpm package>

```

:::note
Upgrading Harvester causes the changes to the OS in the `after-install-chroot` stage to be lost. You must also configure the `after-upgrade-chroot` to make your changes persistent across an upgrade. Refer to [Runtime persistent changes](https://rancher.github.io/elemental-toolkit/docs/customizing/runtime_persistent_changes/) before upgrading Harvester.
:::

DNS resolution is unavailable in the `after-install-chroot stage`, and the `nameserver` might not be available. If you need to access a domain name to install a package using an URL, create a temporary `/etc/resolv.conf` file first. For example:

```yaml
os:
after_install_chroot_commands:
- "rm -f /etc/resolv.conf && echo 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf"
- "mkdir /usr/local/bin"
- "curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 700 get_helm.sh && ./get_helm.sh"
- "rm -f /etc/resolv.conf && ln -s /var/run/netconfig/resolv.conf /etc/resolv.conf"
```

### `os.hostname`

#### Definition
Expand Down