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

docs: NFS-provisioner updated docs #3581

Merged
merged 2 commits into from
Jul 1, 2024
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
64 changes: 64 additions & 0 deletions docs/installing-lagoon/bulk-storage-provisioner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Bulk Storage Provisioner


## AWS-specific instructions
!!! Info
The EFS info here is only applicable to AWS installations, but the basic process should be similar for all NFS volumes.

In order to create the necessary `Bulk` StorageClass, you will need to have an RWX-capable storage backend.

In this example, we will provide documentation to configure EFS as a NFS server, and configure that for use with Lagoon

### Requirements
1. Provision and configure an EFS, taking note of any security group requirements (https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html)
2. The DNS name for the mount target of the EFS volume - usually `file-system-id.efs.aws-region.amazonaws.com`
3. Familiarity with the NFS CSI driver for Kubernetes - https://github.com/kubernetes-csi/csi-driver-nfs

### Steps

1. Add Helm repository for the NFS CSI driver
```bash title="Add Helm repo"
helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts
```
2. Configure the `bulk` StorageClass EFS NFS mount target in a values file. Note that this step also installs a secret into the namespace to handle deleting volumes, as per [here](https://github.com/kubernetes-csi/csi-driver-nfs/issues/260)

```yaml title="csi-driver-nfs-storageclass.yaml" hl_lines="7"
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: bulk
provisioner: nfs.csi.k8s.io
parameters:
server: file-system-id.efs.aws-region.amazonaws.com
share: /
csi.storage.k8s.io/provisioner-secret-name: "mount-options"
csi.storage.k8s.io/provisioner-secret-namespace: "csi-driver-nfs"
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- nfsvers=4.1
- rsize=1048576
- wsize=1048576
- hard
- timeo=600
- retrans=2
- noresvport
---
apiVersion: v1
kind: Secret
metadata:
name: mount-options
namespace: csi-driver-nfs
stringData:
mountOptions: "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport"
```
3. Install the NFS CSI driver
```bash title="Install NFS CSI Driver"
helm upgrade --install --create-namespace \
--namespace csi-driver-nfs --wait \
csi-driver-nfs csi-driver-nfs/csi-driver-nfs
```
4. Install the StorageClass and secret
```bash title="Install bulk StorageClass and Secret"
kubectl apply -f csi-driver-nfs-storageclass.yaml
```
37 changes: 0 additions & 37 deletions docs/installing-lagoon/efs-provisioner.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/installing-lagoon/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Lagoon utilizes a default 'standard' `StorageClass` for most workloads, and the

Lagoon also requires a `StorageClass` called 'bulk' to be available to support persistant pod replicas (across nodes). This `StorageClass` should support `ReadWriteMany` (RWX) access mode and should be configured to be dynamic provisioning and expandable where possible. See https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes for more information, and the [production drivers list](https://kubernetes-csi.github.io/docs/drivers.html) for a complete list of compatible drivers.

We have curently only included the instructions for (the now deprecated) [EFS Provisioner](./efs-provisioner.md). The production [EFS CSI driver](https://github.com/kubernetes-sigs/aws-efs-csi-driver) has issues with provisioning more than 120 PVCs. We are awaiting upstream possible fixes [here](https://github.com/kubernetes-sigs/aws-efs-csi-driver/pull/761) and [here](https://github.com/kubernetes-sigs/aws-efs-csi-driver/pull/732) - but most other providers CSI drivers should also work, as will configurations with an NFS-compatible server and provisioner.
We have curently only included the instructions a generic Bulk Storage provisioner using NFS [Bulk Storage Provisioner](./bulk-storage-provisioner.md). In AWS the production [EFS CSI driver](https://github.com/kubernetes-sigs/aws-efs-csi-driver) is limited to provisioning no more than 1000 PVCs. We are awaiting an upstream possible fix [here](https://github.com/kubernetes-sigs/aws-efs-csi-driver/pull/732) - but most other providers CSI drivers should also work, as will configurations with an NFS-compatible server and provisioner.

## How much Kubernetes experience/knowledge is required?

Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ nav:
- Kibana Examples: logging/kibana-examples.md
- Installing Lagoon:
- Requirements: installing-lagoon/requirements.md
- EFS Provisioner: installing-lagoon/efs-provisioner.md
- Bulk storage Provisioner: installing-lagoon/bulk-storage-provisioner.md
- Install Harbor: installing-lagoon/install-harbor.md
- Install Lagoon Core: installing-lagoon/lagoon-core.md
- Install Lagoon Remote: installing-lagoon/install-lagoon-remote.md
Expand Down Expand Up @@ -495,3 +495,4 @@ plugins:
'drupal/services/php-cli-drupal.md': 'applications/drupal/services/php-cli.md'
'drupal/services/solr-drupal.md': 'applications/drupal/services/solr.md'
'drupal/services/varnish-drupal.md': 'applications/drupal/services/varnish.md'
'installing-lagoon/efs-provisioner.md': 'installing-lagoon/bulk-storage-provisioner.md'