CloudBees Core uses the default storage class to provision storage. Use this guide to assist you in setting up a network file system (NFS) as the default storage class for an elastic file system (EFS) with CloudBees Core.

Create an EFS filesystem from the AWS console

Step 1 - Configure file system access

Using the wizard configure the following according to your organization.

  • VPC

  • Availability Zones

Step 2 - Choose optional settings

  1. Choose the performance mode. It is recommended that you use General Purpose to achieve best performance with CloudBees Core.

  2. Choose the throughput mode. It is recommended that you use the following settings to achieve best performance with CloudBees Core:

    • Provisioned

    • Throughput (MiB/s) 160

Step 3 - Review and create

It is recommended that you choose the Create File System setting for CloudBees Core.

Configure NFS as your desired storage for Kubernetes

Refer to these Kubernetes NFS-Client Provisioner instructions to configure NFS as your desired storage for Kubernetes.

Configure NFS storageclass in cloudbees-core.yml

There are two sections in the yaml file that will need to be updated to define the nfs storageClass in the example below, where the storage class name is defined as nfs1

Edit the cloudbees-core.yml file and modify the section cjoc StatefulSet resource definition

Add the following to this section to define the storage class used by CloudBees Core Operations Center and masters.

value: >-
  -Dcom.cloudbees.jce.masterprovisioning.DockerImageDefinitionConfiguration.masterImageName="CloudBees Core - Managed Master"

Update the section defined as volumeClaimTemplates as well and set the storageClassName

  - metadata:
      name: jenkins-home
      accessModes: [ "ReadWriteOnce" ]
          storage: 20Gi
      storageClassName: nfs1

Once the modifications have been made to utilize nfs as the storageClass, deploy CloudBees Core to your Kubernetes Cluster

kubectl apply -f cloudbees-core.yml