Creating Cost and Asset Management persistent volumes

Creating Cost and Asset Management persistent volumes

Create one persistent volume for Cloud Management Platform couchdb database and create five persistent volumes for Cost and Asset Management databases and message queue.

While Cloud Management Platform and Cost and Asset Management supports all of the persistent volume types that IBM Cloud Private supports, the two recommended storage configurations for Cost and Asset Management are NFS and GlusterFS. If you choose GlusterFS, you can dynamically provision the storage volumes during the installation of Cost and Asset Management. If you choose NFS, you need to pre-create the persistent volumes in the IBM Cloud Private cluster before installing Cost and Asset Management.

As an example, these are our best practices for NFS mount settings. To ensure these guidelines meet the requirements in your environment, see NFS /etc/exports settings sample for reference section.

Create persistent volumes with GlusterFS

For the procedure to use GlusterFS, see Creating Cost and Asset Management persistent volumes using GlusterFS.

Create persistent volumes with NFS from the user interface of IBM Cloud Private

  1. Log in to IBM Cloud Private user interface.
  2. From the navigation menu, select Platform > Storage > PersistentVolume and click Create PersistentVolume.
  3. Enter the storage details for Cloud Management Platform database .

    • Storage details format for couchdb database:

       General Tab
         Name: core-couchdb-pv0
         Storage class name: standard
         Capacity: 20
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: core-couchdb
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/core_couchdb
      
  4. Repeat the procedure to create the volume for Cost and Asset Management databases by specifying the storage details.

    • Storage details format for data database:

       General Tab
         Name: cam-data-pv0
         Storage class name: standard
         Capacity: 1000
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: cam-data
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/cam_data
      
    • Storage details format for rabbit mq message queue:

       General Tab
         Name: cam-rabbitmq-pv0
         Storage class name: standard
         Capacity: 20
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: cam-rabbitmq
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/cam_rabbitmq
      
    • Storage details format for mariadb data database:

       General Tab
         Name: mariadb-data-pv0
         Storage class name: standard
         Capacity: 500
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: mariadb-data
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/mariadb_data
      
    • Storage details format for mariadb backup database:

       General Tab
         Name: mariadb-backup-pv0
         Storage class name: standard
         Capacity: 100
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: mariadb-backup
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/mariadb_backup_data
      
    • Storage details format for mariadb tmp database:

       General Tab
         Name: mariadb-tmp-pv0
         Storage class name: standard
         Capacity: 250
         Unit: Gi (default)
         Access Mode: ReadWriteMany
       Labels Tab (in the format Label: Value)
         type: mariadb-tmp
       Parameters Tab (in the format Key: Value)
         server: <your PV ip>
         For example, the master node IP if the volume is on your master node.
         path: <your PV path>
         For example, /export/mariadb_tmp_data
      

Creating PersistentVolumes by using the "Create resource" window

  1. In the dashboard of IBM Cloud Private, click Create resource menu. It is available on the top right next to Catalog menu.
  2. Copy and paste a YAML or JSON file into the Create resource dialog box. For more information about creating a resource by using a YAML file, see IBM Cloud Private Knowledge Center.
  3. Click Create.

Note: In each of the following yaml examples, replace mycluster.icp with your NFS server IP and /export/xxx with the path on the NFS server for the volume. Create folders inside the folder which is mentioned in NFS settings file /etc/exports, which will be a value for xxx for each volume.

NFS /etc/exports settings sample for reference

A sample reference for NFS /etc/exports settings. You can customize it to suit your environment.

# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/export  *(rw,sync,no_root_squash,no_subtree_check)