7.2. Upgrading your Independent Mode Setup

Follow the steps in the sections ahead to upgrade your independent mode Setup.

7.2.1. Upgrading the Red Hat Gluster Storage Cluster

To upgrade the Red Hat Gluster Storage cluster, see In-Service Software Upgrade.

7.2.2. Upgrading Heketi in RHGS node

Note

If Heketi is in an Openshift node, then skip this section and see Section 7.2.3, “Upgrading Heketi in Openshift node” instead.
Upgrade Heketi by executing the following commands on the Red Hat Gluster Storage node where Heketi is running:
  1. Backup the Heketi database file
    # cp -a /var/lib/heketi/heketi.db /var/lib/heketi/heketi.db.`date +%s`.`heketi --version | awk '{print $2}'`
  2. Update Heketi by executing the following command in one of the Red Hat Gluster Storage nodes where Heketi is running:
    # yum update heketi
  3. Restart the Heketi service:
    # systemctl restart heketi

7.2.3. Upgrading Heketi in Openshift node

The following commands must be executed on the client machine.
  1. Execute the following command to update the heketi client and cns-deploy packages:

    Note

    "yum update cns-deploy -y" is not required to be executed if CNS 3.9 was deployed via Ansible.
    # yum update cns-deploy -y
    # yum update heketi-client -y
  2. Backup the Heketi database file
    # oc rsh <heketi_pod_name>
    # cp -a /var/lib/heketi/heketi.db /var/lib/heketi/heketi.db.`date +%s`.`heketi --version | awk '{print $2}'`
    # exit
  3. Execute the following steps if CNS 3.9 is deployed via cns-deploy:
    1. Execute the following command to delete the heketi template.
      # oc delete templates heketi
    2. Execute the following command to install the heketi template.
      # oc create -f /usr/share/heketi/templates/heketi-template.yaml
      template "heketi" created
    3. Execute the following command to grant the heketi Service Account the necessary privileges.
      # oc policy add-role-to-user edit system:serviceaccount:<project_name>:heketi-service-account
      # oc adm policy add-scc-to-user privileged -z heketi-service-account
      For example,
      # oc policy add-role-to-user edit system:serviceaccount:storage-project:heketi-service-account
      # oc adm policy add-scc-to-user privileged -z heketi-service-account
    4. Execute the following command to generate a new heketi configuration file.
      # sed -e "s/\${HEKETI_EXECUTOR}/kubernetes/" -e "s#\${HEKETI_FSTAB}#/var/lib/heketi/fstab#" -e "s/\${SSH_PORT}/22/" -e "s/\${SSH_USER}/root/" -e "s/\${SSH_SUDO}/false/" -e "s/\${BLOCK_HOST_CREATE}/true/" -e "s/\${BLOCK_HOST_SIZE}/500/" "/usr/share/heketi/templates/heketi.json.template" > heketi.json
      • The BLOCK_HOST_SIZE parameter controls the size (in GB) of the automatically created Red Hat Gluster Storage volumes hosting the gluster-block volumes (For more information, see https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.10/html-single/operations_guide/#Block_Storage). This default configuration will dynamically create block-hosting volumes of 500GB in size as more space is required.
      • Alternatively, copy the file /usr/share/heketi/templates/heketi.json.template to heketi.json in the current directory and edit the new file directly, replacing each "${VARIABLE}" string with the required parameter.

        Note

        JSON formatting is strictly required (e.g. no trailing spaces, booleans in all lowercase).
    5. Note

      If the heketi-config-secret file already exists, then delete the file and run the following command.
      Execute the following command to create a secret to hold the configuration file.
      # oc create secret generic heketi-config-secret --from-file=heketi.json
  4. Execute the following step if CNS 3.9 is installed via Ansible:
    Depending on the OCP version, edit the heketi template to change the IMAGE_NAME, IMAGE_VERSION, CLUSTER_NAME, HEKETI_FSTAB and HEKETI_ROUTE.
    	# oc get templates
    	NAME			  DESCRIPTION		     PARAMETERS		OBJECTS
    	glusterblock-provisioner  glusterblock provisioner   3 (2 blank)	4
    				  template
    	glusterfs		  GlusterFS DaemonSet 	     5 (1 blank)	1
    				  template
    	heketi			  Heketi service deployment  7 (3 blank)	3
    				  template
    • For OCP 3.10:
      # oc edit template heketi
      …………………………..
          - description: Set the executor type, kubernetes or ssh
            displayName: heketi executor type
            name: HEKETI_EXECUTOR
            value: ssh
          - description: Set the fstab path, file that is populated with bricks that heketi
              creates
            displayName: heketi fstab path
            name: HEKETI_FSTAB
            value: /etc/fstab
          - description: Set the hostname for the route URL
            displayName: heketi route name
            name: HEKETI_ROUTE
            value: heketi-storage
          - displayName: heketi container image name
            name: IMAGE_NAME
            required: true
            value: rhgs3/rhgs-volmanager-rhel7
          - description: A unique name to identify this heketi service, useful for running multiple
              heketi instances
            displayName: GlusterFS cluster name
            name: CLUSTER_NAME
            value: storage
    • For OCP 3.9:
      # oc edit template heketi
      …………………………..
          - description: Set the executor type, kubernetes or ssh
            displayName: heketi executor type
            name: HEKETI_EXECUTOR
            value: ssh
          - description: Set the fstab path, file that is populated with bricks that heketi
              creates
            displayName: heketi fstab path
            name: HEKETI_FSTAB
            value: /etc/fstab
          - description: Set the hostname for the route URL
            displayName: heketi route name
            name: HEKETI_ROUTE
            value: heketi-storage
          - displayName: heketi container image name
            name: IMAGE_NAME
            required: true
            value: rhgs3/rhgs-volmanager-rhel7
          - displayName: heketi container image version
            name: IMAGE_VERSION
            required: true
            value: v3.10
          - description: A unique name to identify this heketi service, useful for running multiple
              heketi instances
            displayName: GlusterFS cluster name
            name: CLUSTER_NAME
            value: storage
  5. Execute the following command to delete the deployment configuration, service, and route for heketi:
    • For cns-deploy:
      # oc delete deploymentconfig,service,route heketi-storage
    • For Ansible:
      # oc delete deploymentconfig,service,route heketi
  6. Execute the following command to deploy the Heketi service which will be used to create persistent volumes for OpenShift:
    # oc process heketi | oc create -f -
    For example:
    # oc process heketi | oc create -f -
    
    service "heketi" created
    route "heketi" created
    deploymentconfig "heketi" created
  7. Execute the following command to verify that the containers are running:
    # oc get pods
    For example:
    # oc get pods
    NAME                             READY     STATUS    RESTARTS   AGE
    glusterfs-0h68l                  1/1       Running   0          3d
    glusterfs-0vcf3                  1/1       Running   0          3d
    glusterfs-gr9gh                  1/1       Running   0          3d
    heketi-1-zpw4d                   1/1       Running   0          3h
    storage-project-router-2-db2wl   1/1       Running   0          4d
    

7.2.4. Upgrading Gluster Block

Execute the following steps to upgrade gluster block.
  1. Execute the following command to install gluster block:
    # yum install gluster-block
  2. Enable and start the gluster block service:
    # systemctl enable gluster-blockd
    # systemctl start gluster-blockd
  3. Execute the following command to update the heketi client and cns-deploy packages
    # yum install cns-deploy -y
    # yum update cns-deploy -y
    # yum update heketi-client -y

    Note

    Do not update the cns-deploy package if CNS is deployed via Ansible.
  4. To use gluster block, add the following two parameters to the glusterfs section in the heketi configuration file at /etc/heketi/heketi.JSON:
    auto_create_block_hosting_volume
    block_hosting_volume_size
    Where:
    auto_create_block_hosting_volume: Creates Block Hosting volumes automatically if not found or if the existing volume is exhausted. To enable this, set the value to true.
    block_hosting_volume_size: New block hosting volume will be created in the size mentioned. This is considered only if auto_create_block_hosting_volume is set to true. Recommended size is 500G.
    For example:
    .....
    .....
    "glusterfs" : {
    
    
                    "executor" : "ssh",
    
                    "db" : "/var/lib/heketi/heketi.db",
    
                    "sshexec" : {
                    "rebalance_on_expansion": true,
                    "keyfile" : "/etc/heketi/private_key"
                    },
    
                    "auto_create_block_hosting_volume": true,
    
                    "block_hosting_volume_size": 500G
            },
    .....
    .....
    
    

    Note

    This step is not applicable if CNS is deployed via Ansible.
  5. Restart the Heketi service:
    # systemctl restart heketi

    Note

    This step is not applicable if heketi is running as a pod.
  6. If a gluster-block-provisoner-pod already exists then delete it by executing the following commands:
    # oc delete dc <gluster-block-dc>
    For example:
    # oc delete dc glusterblock-provisioner-dc
  7. If CNS 3.9 is deployed via cns-deploy, then execute the following commands to deploy the gluster-block provisioner:
    # sed -e 's/\\\${NAMESPACE}/<NAMESPACE>/' /usr/share/heketi/templates/glusterblock-provisioner.yaml | oc create -f -
    # oc adm policy add-cluster-role-to-user glusterblock-provisioner-runner system:serviceaccount:<NAMESPACE>:glusterblock-provisioner
    For example:
    # sed -e 's/\\\${NAMESPACE}/storage-project/' /usr/share/heketi/templates/glusterblock-provisioner.yaml | oc create -f -
    # oc adm policy add-cluster-role-to-user glusterblock-provisioner-runner system:serviceaccount:storage-project:glusterblock-provisioner
  8. If CNS 3.9 is deployed via Ansible, depending on the OCP version, edit the glusterblock-provisioner template to change the IMAGE_NAME, IMAGE_VERSION and NAMESPACE.
    # oc get templates
    NAME			  DESCRIPTION		     PARAMETERS		OBJECTS
    glusterblock-provisioner  glusterblock provisioner   3 (2 blank)	4
    				  template
    	
    heketi			  Heketi service deployment  7 (3 blank)	3
    				  template
    • For OCP 3.10:
      # oc edit template glusterblock-provisioner
      - displayName: glusterblock provisioner container image name
        name: IMAGE_NAME
        required: true
        value: rhgs3/rhgs-gluster-block-prov-rhel7:v3.10
      - description: The namespace in which these resources are being created
        displayName: glusterblock provisioner namespace
        name: NAMESPACE
        required: true
        value: glusterfs
    • For OCP 3.9:
      # oc edit template glusterblock-provisioner
      - displayName: glusterblock provisioner container image name
        name: IMAGE_NAME
        required: true
        value: rhgs3/rhgs-gluster-block-prov-rhel7
      - displayName: glusterblock provisioner container image version
        name: IMAGE_VERSION
        required: true
        value: v3.10
      - description: The namespace in which these resources are being created
        displayName: glusterblock provisioner namespace
        name: NAMESPACE
        required: true
        value: glusterfs
  9. Execute the following command to create a glusterblock-provisioner.
    # oc process <gluster_block_provisioner_template> | oc create -f -

7.2.5. Enabling S3 Compatible Object store

Support for S3 compatible Object Store is under technology preview. To enable S3 compatible object store, see https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.10/html-single/operations_guide/#S3_Object_Store.