Enable Ceph RGW Object Storage

Enable Ceph RGW Object Storage

Ceph controller enables you to deploy RADOS Gateway (RGW) Object Storage instances and automatically manages its resources such as users and buckets. Ceph Object Storage has an integration with OpenStack Object Storage (Swift) in Mirantis OpenStack for Kubernetes (MOS).

To enable the RGW Object Storage:

  1. Select from the following options:

    • If you do not have a management cluster yet, open kaascephcluster.yaml.template for editing.

    • If the management cluster is already deployed, open the KaasCephCluster CR for editing. Select from the following options:

      • If the Ceph cluster is placed in the management cluster:

        kubectl edit kaascephcluster
        
      • If the Ceph cluster is placed in a managed cluster:

        kubectl edit kaascephcluster -n <managedClusterProjectName>
        

        Substitute <managedClusterProjectName> with a corresponding value.

  2. Using the following table, update the rgw section specification as required:

    RADOS Gateway parameters

    Parameter

    Description

    name

    Ceph Object Storage instance name.

    dataPool

    Object storage data pool spec that should only contain replicated or erasureCoded and failureDomain parameters. The failureDomain parameter may be set to osd or host, defining the failure domain across which the data will be spread. For metadata, Mirantis recommends using an erasureCoded pool. For details, see Rook documentation: Erasure coding. For example:

    rgw:
      dataPool:
        replicated:
          size: 3
        metadataPool:
          replicated:
            size: 3
    

    where replicated.size is the number of full copies of data on multiple nodes.

    rgw:
      dataPool:
        erasureCoded:
          codingChunks: 1
          dataChunks: 2
    

    metadataPool

    Object storage metadata pool spec that should only contain replicated and failureDomain parameters. The failureDomain parameter may be set to osd or host, defining the failure domain across which the data will be spread. Can use only replicated settings.

    gateway

    The gateway settings corresponding to the rgw daemon settings. Includes the following parameters:

    • port - the port on which the Ceph RGW service will be listening on HTTP.

    • securePort - the port on which the Ceph RGW service will be listening on HTTPS.

    • instances - the number of pods in the Ceph RGW ReplicaSet. If allNodes is specified, a DaemonSet is created.

      Note

      • Starting from Container Cloud 2.5.0, Mirantis recommends using 2 instances for Ceph Object Storage.

      • Prior to Container Cloud 2.5.0, due to a limitation, only one instance can be used for Ceph Object Storage and Ceph RGW does not have HA.

    • allNodes - defines whether to start the Ceph RGW pods as a DaemonSet on all nodes.

    For example:

    gateway:
      allNodes: false
      instances: 1
      port: 80
      securePort: 8443
    

    preservePoolsOnDelete

    Defines whether to delete the data and metadata pools in the rgw section if the object storage is deleted. Set this parameter to true if you need to store data even if the object storage is deleted. However, Mirantis recommends setting this parameter to false.

    users and buckets

    Optional. To create new Ceph RGW resources, such as buckets or users, specify the following keys. Ceph controller will automatically create the specified object storage users and buckets in the Ceph cluster.

    • users - a list of strings that contain user names to create for object storage.

    • buckets - a list of strings that contain bucket names to create for object storage.

    For example:

    rgw:
      name: rgw-store
      dataPool:
        erasureCoded:
          codingChunks: 1
          dataChunks: 2
        failureDomain: host
      metadataPool:
        failureDomain: host
        replicated:
          size: 3
      gateway:
        allNodes: false
        instances: 1
        port: 80
        securePort: 8443
      preservePoolsOnDelete: false