Skip to main content

Initialization

Before starting the metadata server, it is necessary to tell it where to find the administrative service and to initialize the token it will use to authenticate with it. This can be done easily using the init command. Static credentials used to authenticate with the block store can also be provided to this command.

When specifying static block store credentials:

sudo meta.flexfs init \
--adminAddr <admin-addr> --token <meta-token> \
--blockUser <block-user> --blockPass <block-pass>

When not specifying static credentials (when using IAM instance role or credentials set in the administrative service):

sudo meta.flexfs init \
--adminAddr <admin-addr> --token <meta-token>

Creds file

The init command is simply a convenience that creates a TOML-formatted credentials file in the right location and with the correct permissions. By default, this file is created at /root/.flexfs/meta/creds (this path can be changed with the --credsFile flag). When not run using sudo, this structure is created in the home directory of the user that ran the init command. The intermediate folders .flexfs and meta are created with 700 permissions and the creds file is created with 600 permissions.

info

This file can be created manually to avoid the need to run the init command. That approach is sometimes useful in various dev ops scenarios.

With all options specified, this file will look something like this:

adminAddr = "example.flexfs.io"
blockPass = "uACAoerA+TLsB/odxQtMPt9ikEvDHVydI/ZtsipO"
blockUser = "AKIAX3GSGRX3L8AZEESZ"
token = "95be1e1f-4653-4926-a7b6-571c05cbaff9"

Or, when specifying block store credentials elsewhere (e.g. IAM):

adminAddr = "example.flexfs.io"
token = "95be1e1f-4653-4926-a7b6-571c05cbaff9"