Skip to main content

Configuration Overview

Become familiar with the configuration options that are available for the IonFS CLI.

S3 Repository Setup

The IonFS S3 repository makes use of the AWS S3 SDK, which can be configured using two main methods:

  • Environment variables
  • Credentials file

This list should be taken as the order of precedence.

Environment Variables

If the credentials file is not used, then environment variables can be used:

  • AWS Access Key: AWS_ACCESS_KEY_ID
  • AWS Secret Key: AWS_SECRET_ACCESS_KEY
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Credentials File

The AWS credentials file is stored within a well-known directory in the user's home folder.

  • MacOS/Linux: ~/.aws/credentials
  • Windows: %USERPROFILE%\.aws\credentials

The credentials file is INI formatted, and allows multiple sets of credentials to be used:

[example_profile]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

Ionburst Cloud Setup

IonFS makes use of the Ionburst SDK, which can be configured using two main methods:

  • Environment variables, or
  • Credentials file.

This list should be taken as the order of precedence.

Environment Variables

If the credentials file is not used, then environment variables can be used:

  • Ionburst API ID: IONBURST_ID
  • Ionburst API Key: IONBURST_KEY
export IONBURST_ID=IB******************
export IONBURST_KEY=eW91aGF2ZXRvb211Y2h0aW1lb255b3VyaGFuZHMh

Credentials File

The Ionburst credentials file is stored within a well-known directory in the user's home folder.

  • MacOS/Linux: ~/.ionburst/credentials
  • Windows: %USERPROFILE%\.ionburst\credentials

The credentials file is INI formatted, and allows multiple sets of credentials to be used:

[example_profile]
ionburst_id=IB******************
ionburst_key=eW91aGF2ZXRvb211Y2h0aW1lb255b3VyaGFuZHMh
[example_profile2]
ionburst_id=IB******************
ionburst_key=c2VyaW91c2x5Li4uZ29vdXRzaWRlYW5kcGxheSEK
ionburst_uri=https://api.example.ionburst.cloud/

IonFS Setup

IonFS Configuration File

IonFS uses its own configuration file located within a well-known directory in the user's home folder.

  • MacOS/Linux: ~/.ionfs/appsettings.json
  • Windows: %USERPROFILE%\.ionfs\appsettings.json

The following is an example of an IonFS configuration:

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"IonFS": {
"MaxSize": "50000000",
"Verbose": "false",
"DefaultClassification": "Restricted",
"Repositories": [
{
"Name": "s3-example-ionfs",
"Usage": "Data",
"Class": "Ionburst.Apps.IonFS.Repo.S3.MetadataS3",
"Assembly": "Ionburst.Apps.IonFS.Repo.S3",
"DataStore": "s3-example-ionfs"
},
{
"Name": "s3-example-ionfs-nkv",
"Usage": "Secrets",
"Class": "Ionburst.Apps.IonFS.Repo.S3.MetadataS3",
"Assembly": "Ionburst.Apps.IonFS.Repo.S3",
"DataStore": "s3-example-ionfs-nkv"
}
],
"DefaultRepository": "s3-example-ionfs",
},
"Ionburst": {
"Profile": "default",
"IonburstUri": "https://api.eu-west-1.ionburst.cloud/",
"TraceCredentialsFile": "OFF"
},
"AWS": {
"Profile": "example_profile",
"Region": "eu-west-1"
}
}

IonFS Configuration Breakdown

  • Within the Repositories section:
    • the "Name" value is the desired name for your metadata repo - that can be referenced by the ionfs CLI
    • the "Usage" value is set to either
      • Data to act as a repo for S6
      • or Secrets to act as a repo for NKV
    • the "Class" value is set to the class of the metadata repository implementation
      • Ionburst.Apps.IonFS.Repo.S3.MetadataS3 for S3
      • Ionburst.Apps.IonFS.Repo. for MongoDB
    • the "Assembly" value is set to the assembly name of the metadata repository
      • Ionburst.Apps.IonFS.Repo.S3 for S3
      • Ionburst.Apps.IonFS.Repo.MongoDB for MongoDB
    • the "DataStore" value to the name of the metadata store created to store ionfs metadata
      • for S3, this is the name of the bucket
      • for MongoDB, this is the name of the
  • "DefaultRepository" can be set to the "Name" of a configured repository, to act as the default for ionfs
  • Within the Ionburst section:
    • Change the "Profile" value to the profile created in your Ionburst credentials file
    • Change the "IonburstUri" value to your desired Ionburst Cloud API endpoint
    • Ensure "TraceCredentialsFile" is set to "OFF"
  • Within the AWS section:
    • Change the "Profile" value to the profile created in your AWS credentials file
    • Change the "Region" value to the region your S3 bucket was created in