1. Deployment of Longhorn

Installation

Longhorn v1.1.2 and above - Support Kubernetes 1.18+

Longhorn v1.0.0 to v1.1.1 - Support Kubernetes 1.14+. Default 1.16+

  1. Install using Rancher Apps & MarketPlace App (Default)

  2. Install using Helm chart from https://github.com/longhorn/longhorn/tree/master/chart

  3. Install using YAML from https://github.com/longhorn/longhorn/blob/master/deploy/longhorn.yaml

Note: Longhorn UI can scale to multiple instances for HA purposes.

Uninstallation

Make sure all the CRDs and other resources are cleaned up, following the uninstallation instruction. https://longhorn.io/docs/1.2.2/deploy/uninstall/

Customizable Default Settings

https://longhorn.io/docs/1.2.2/references/settings/

Make sure the settings are updated if it’s the fresh installation of Longhorn.

Tests

S.No Scenario Steps Expected Result
1 Deploy Longhorn using Yaml 1. Create a k8s/k3s cluster with 3 workers nodes.
2. Deploy Longhorn using the Yaml file available https://github.com/longhorn/longhorn/blob/master/deploy/longhorn.yaml
kubectl apply -f [https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml](https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml)
3. Verify the app gets deployed successfully.
kubectl get pods n longhorn system
* The below daemonset should be deployed successfully.
engine-image-ei- , longhorn-csi-plugin, longhorn-manager
* The below deployment should be deployed successfully.
    csi-attacher, csi-provisioner, csi-resizer, csi-snapshotter, longhorn-driver-deployer, longhorn-ui
* The Instance-manager-e, Instance-manager-r pods should be deployed on the each worker node.
* The below services should be deployed
    csi-attacher, csi-provisioner, csi-resizer, csi-snapshotter, longhorn-backend, longhorn-frontend
* The below crds should be deployed.
backingimagedatasources.longhorn.io
backingimagemanagers.longhorn.io
backingimages.longhorn.io
backups.longhorn.io
backuptargets.longhorn.io
backupvolumes.longhorn.io
engineimages.longhorn.io
engines.longhorn.io
instancemanagers.longhorn.io
nodes.longhorn.io
recurringjobs.longhorn.io
replicas.longhorn.io
settings.longhorn.io
sharemanagers.longhorn.io
volumes.longhorn.io
2 Deploy Longhorn using Helm chart 1. Create a k8s/k3s cluster with 3 workers nodes.
2. As per the instructions https://github.com/longhorn/longhorn/tree/master/chart deploy the Longhorn app.
* The below daemonset should be deployed successfully.
engine-image-ei- , longhorn-csi-plugin, longhorn-manager
* The below deployment should be deployed successfully.
    csi-attacher, csi-provisioner, csi-resizer, csi-snapshotter, longhorn-driver-deployer, longhorn-ui
* The Instance-manager-e, Instance-manager-r pods should be deployed on the each worker node.
* The below services should be deployed
    csi-attacher, csi-provisioner, csi-resizer, csi-snapshotter, longhorn-backend, longhorn-frontend
* The below crds should be deployed.
backingimagedatasources.longhorn.io
backingimagemanagers.longhorn.io
backingimages.longhorn.io
backups.longhorn.io
backuptargets.longhorn.io
backupvolumes.longhorn.io
engineimages.longhorn.io
engines.longhorn.io
instancemanagers.longhorn.io
nodes.longhorn.io
recurringjobs.longhorn.io
replicas.longhorn.io
settings.longhorn.io
sharemanagers.longhorn.io
volumes.longhorn.io
3 Deploy Longhorn in Rancher 1. Create a k8s/k3s cluster with 3 workers nodes on Rancher cluster.
2. Go to Apps and marketplace and deploy Longhorn with default values
* The Longhorn and Longhorn CRDs should be installed as two packages.
* The Longhorn app should start display on the cluster explorer.
* The Link to access the Longhorn UI should work properly.
* Verify all the components are available by clicking on the installed apps.
[Edit]