Skip to content

Blob storage

The blob storage feature allows you to define blob storage(s) and their mount paths across service components. Omnistrate will manage the lifecycle of such storage volumes (e.g: creation and deletion together with instance) as well as mounting them as a local volume according to the configuration.

This feature is not available for the Omnistrate hosted model and currently only supports GCP GCS buckets as the underlying storage (support for AWS S3 is coming soon).

Defining blob storage

You can define blob storage(s) in the compose specification as follows:

volumes:
  bucket_metadata:
    driver: blob
  bucket_additional_resources:
    driver: blob

Above compose will provision two buckets per instance. Each bucket will be named based on the service component name (i.e. either bucket_metadata / bucket_additional_resources) and the instance ID it belongs to.

Mounting blob storage

Each bucket can be mounted to 0, 1, or multiple service components. On the pod itself, it will appear just like any other volume. The underlying storage driver does not restrict or synchronize access, so your application itself needs to make sure it doesn't end up overriding data.

The following example mounts the above buckets to a service component:

    volumes:
      - source: bucket_metadata
        target: /mnt/blob-metadata
        type: volume
        x-omnistrate-storage:
          gcp:
            clusterStorageType: GCP::GCS
      - source: bucket_additional_resources
        target: /mnt/blob-additional-resources
        type: volume
        x-omnistrate-storage:
          gcp:
            clusterStorageType: GCP::GCS

Blob storage doesn't support any additional configuration options at the moment.

API

Alternatively, you can achieve the same result by invoking Omnistrate APIs. Here are steps:

  • Create a blob storage service component component using the CreateResource API.
  • Create a storage volume for the blob storage using the CreateStorageVolumeConfig API. Make sure the storageResourceID points to the service component created above. ClusterStorageType should be set to GCP::GCS.
  • Attach the storage volume to your service component using the AddStorageVolumeConfig API.

Storage volume and attachment steps can be repeated multiple times for a single blob storage service component (if the same bucket is intended to be shared across multiple service components).