Configuring S3-Compatible Storage

    You can set up Couchbase Operational Insights to use an S3-Compatible storage solution. While AWS S3 is fully supported, third-party storage systems that implement the S3 API may also work with Operational Insights. However, compatibility is not guaranteed for all S3-compatible solutions, as they must properly implement all required S3 operations.

    To be compatible with Operational Insights, S3-compatible object storage must have strong and global consistency for bucket updates and support the following operations:

    Cluster Setup

    Use the Couchbase UI or REST API to configure Operational Insights to use an S3-compatible storage service as its object storage. Before you start, configure the S3 access credentials on each node, as described in Configuring AWS S3 Storage. When you verify the credentials, use the --endpoint-url option of the AWS CLI to point to your storage service.

    You can only configure the blob storage settings during the initial cluster setup.

    Set Up a Cluster Using the UI

    To set up Operational Insights to use S3-compatible storage from the UI:

    1. Choose S3-Compatible Storage as the Storage Scheme.

    2. Provide the following details:

      • Enter the Storage Endpoint URL of your S3-compatible storage service.

      • Enter the Bucket Name for the bucket where Operational Insights stores all of its data.

      • Enter the Bucket Region of the bucket.

      • Enter the Bucket Path Prefix (optional) within that bucket where Operational Insights stores all of its data.

    3. Click Use Path-Style Addressing if your storage service requires path-style addressing.

    Set Up a Cluster Using the REST API

    To configure Operational Insights to use S3-compatible storage from the REST API:

    1. Configure the object storage using the /settings/operationalInsights endpoint and the POST method:

      curl --request POST \
        --url http://localhost:8091/settings/operationalInsights \
        --header 'Content-Type: application/x-www-form-urlencoded' \
        --data blobStorageScheme=s3 \
        --data blobStorageEndpoint=$BLOB_STORAGE_ENDPOINT \
        --data blobStorageBucket=$BLOB_STORAGE_BUCKET \
        --data blobStorageRegion=$BLOB_STORAGE_REGION \
        --data blobStoragePrefix=$BLOB_STORAGE_PREFIX \
        --data blobStoragePathStyleAddressing=true

      You must include the following --data parameters in your request:

      • blobStorageScheme=s3: specifies S3 or S3-compatible storage.

      • blobStorageEndpoint: the endpoint URL of your S3-compatible storage service.

      • blobStorageBucket: the name of the bucket.

      • blobStorageRegion: the region of the bucket.

      • blobStoragePrefix: the prefix within the bucket (optional).

      • blobStoragePathStyleAddressing: set to true if your storage service requires path-style addressing (optional).

        If your storage service uses a certificate signed by a private certificate authority, supply it with the blobStorageCertificates parameter.

    2. Initialize the cluster using the POST method on the /clusterInit endpoint. For example:

      curl -X POST http://localhost:8091/clusterInit \
      -d 'username=$ADMIN_USERNAME' \
      -d 'password=$ADMIN_PASSWORD' \
      -d 'memoryQuota=100' \
      -d 'cbasMemoryQuota=$CBAS_MEMORY_QUOTA' \
      -d 'port=SAME'

      You must include the following parameters as part of your request:

      • username and password: Credentials for the cluster administrator.

      • memoryQuota: A memory quota, in MiB. Operational Insights fixes this quota at 100 MiB, so always set it to 100. If you omit it, the node uses a quota based on its total memory instead.

      • cbasMemoryQuota: Memory allocation for the Analytics Service, in MiB.

      • port: Specifies the port configuration.

    Next Steps