Persistent volumes¶
To define a persistent volumes that can survive service restarts and nodes replacements you can use x-omnistrate-storage
tag. Using this tag the defined volumes in the compose spec can become persistent volumes on the deployed instance. Omnistrate will take care of provisioning and managing the volumes.
You can optionally define the volume, and then define the mount path and properties for the volume.
services:
database:
image: postgres
volumes:
- source: pg_master_data
target: /var/lib/postgresql/data
type: volume
x-omnistrate-storage:
aws:
instanceStorageType: AWS::EBS_GP3
instanceStorageSizeGi: 10
instanceStorageIOPS: 3000
instanceStorageThroughputMiBps: 125
gcp:
instanceStorageType: GCP::PD_BALANCED
instanceStorageSizeGi: 100
azure:
instanceStorageType: AZURE::PREMIUM_SSD
instanceStorageSizeGi: 100
volumes:
pg_master_data:
driver: local
You can customize the following:
- Storage type from block device to blobs or both
- Size of the volume
- Storage IOPS
- Storage throughput
Note
This type of persistent volume are not shared across Resources. If you need to share the volume data across resources look a at configuring Shared File System or Blob Storage instead