GuidesAPI ReferenceChangelogDiscussions
GuidesAPIAPI (old)Log In
Guides

Manually Adding Buckets

Generally this optional section is not needed, as the bucket creation process for FiFo is handled automatically in the last step of the Installing FiFo Guide with the sniffle-admin init-leofs command.

For most people there are 4 probable reasons you would want to read this guide.

  1. You are changing your FiFo LeoFS setup and need to manually add FiFo Buckets.
  2. You are interested in better understanding how FiFo interacts with LeoFS.
  3. You want to swap back-and-forth between the Release and Development versions of FiFo and want to make use of a common LeoFS cluster with separate buckets for each.
  4. You have additional data you want to store in your LeoFS Storage Cluster and require separate buckets to store it in.

📘

Prerequisite assumptions

This guide assumes you already have a working LeoFS Storage Cluster up and running as per the Installing LeoFS Guide and that your DNS is working.

1. FiFo Buckets - the manual way

In this section we will be setting up a fictitious endpoint s3.onyxit.netthat is using ip address 10.44.0.240 this is our LEoFS Gateway IP. Once we have added the endpoint we will proceed with bucket creation with the LeoFS Zone. FiFo requires 3 buckets:

Bucket NameBucket Purpose
fifoGeneral Storage
fifo-imagesDataset Storage
fifo-backupsMachine Backup Storage

LeoFS Zone Steps

We start off by generating a random password with openssl which we will use to seed key creation. Do NOT lose your access-key-id and secret-access-key as you will need them later to complete your setup.

$ leofs-adm add-endpoint s3.onyxit.net
$ openssl rand -base64 32 | cut -c-16
qypdpQ47e/E4oKH3
$ leofs-adm create-user fifo qypdpQ47e/E4oKH3

  access-key-id: ed4528b19bc043770c12
  secret-access-key: 18b35c2dc5b0819e31d7c2fece24add0ef9ec221
$

Next we create our 3 buckets using our access-key-id.

leofs-adm add-bucket fifo ed4528b19bc043770c12
leofs-adm add-bucket fifo-images ed4528b19bc043770c12
leofs-adm add-bucket fifo-backups ed4528b19bc043770c12

FiFo Zone Steps

We now edit /data/sniffle/etc/sniffle.conf and change the following entry to point at the LeoFS endpoint.

s3.host = 10.44.0.240:8443

Then restart the service with svcadm restart sniffle

svcadm restart sniffle

We are almost done. All that is left, is to tell sniffle to use our S3 LeoFS storage buckets and to grant access by specifying which access_key and secret_key to connect with the following commands.

sniffle-admin config set storage.s3.port 8443
sniffle-admin config set storage.s3.host s3.onyxit.net
sniffle-admin config set storage.s3.access_key ed4528b19bc043770c12
sniffle-admin config set storage.s3.secret_key 18b35c2dc5b0819e31d7c2fece24add0ef9ec221
sniffle-admin config set storage.s3.image_bucket fifo-images
sniffle-admin config set storage.s3.general_bucket fifo
sniffle-admin config set storage.s3.snapshot_bucket fifo-backups

Verify you can see all your settings correctly reflected when you run the command:

sniffle-admin config show