Storage¶
Object Storage (S3 compatible)¶
Naming Convention for buckets¶
S3 Buckets are created in a single tenant namespace at Exoscale. Therefore we have to rely on bucket names to be able to 'remember' which bucket was created for which application.
Create Buckets that follow the following naming convention: <project-name>-s3-bucket-<purpose>.
So hugo-s3-bucket-postgresql-backup would be a valid name for a bucket used for PostgreSQL backups for the 'hugo' project.
Choosing a zone for your bucket¶
The zone the bucket is created in is up to you to choose. You can find the list of available datacenters at https://www.exoscale.com/datacenters/
Depending on your application it can be beneficial to pick at-vie-1, the zone the ARI&Snet cluster is located in.
However, if your use case is creating backups, we strongly recommend picking a zone that is NOT at-vie-1. If you want to store your backup in Austria for some reason, pick at-vie-2.
Create the Bucket¶
Create a YAML resource definition s3-bucket.yml:
apiVersion: appcat.vshn.io/v1
kind: ObjectBucket
metadata:
name: <S3-BACKUP-BUCKET-NAME>
namespace: aris-XXX
spec:
parameters:
bucketName: <S3-BACKUP-BUCKET-NAME>
region: at-vie-2
writeConnectionSecretToRef:
name: <S3-BACKUP-BUCKET-NAME>
and apply it:
oc apply -f s3-bucket.yml
Use the Bucket¶
When the YAML manifest is applied a secret is created that contains all the information necessary to connect to the bucket. Depending on the application that will connect to the bucket that secret can be used directly. In some cases at least some of the information will have to be duplicated to a ConfigMap or Environment variable.