Skip to content

Configurations

ARLAS configurations

An ARLAS Configuration tells arlas_cli how to contact ARLAS Server and Elasticsearch.

See more information about configuration.

It is possible, with the arlas_cli confs command lines, to manage the ARLAS configurations.

List configurations (confs) management commands

> arlas_cli confs --help

 Usage: arlas_cli confs [OPTIONS] COMMAND [ARGS]...                           

╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────╮
│ check       Check the services of a configuration                          │
│ create      Add a configuration                                            │
│ default     Display the default configuration                              │
│ delete      Delete a configuration                                         │
│ describe    Describe a configuration                                       │
│ list        List configurations                                            │
│ login       Add a configuration for ARLAS Cloud                            │
│ set         Set default configuration among existing configurations        │
╰────────────────────────────────────────────────────────────────────────────╯

create

arlas_cli is meant to communicate with a deployed ARLAS. This link is configured by creating a new configuration.

> arlas_cli confs create --help

 Usage: arlas_cli confs create [OPTIONS] NAME                                 

 Add a configuration                                                          

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    name      TEXT  Name of the configuration [default: None] [required]  │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ *  --server                                      TEXT  ARLAS Server url    │
│                                                        [default: None]     │
│                                                        [required]          │
│    --headers                                     TEXT  header (name:value) │
│    --persistence                                 TEXT  ARLAS Persistence   │
│                                                        url                 │
│                                                        [default: None]     │
│    --persistence-head…                           TEXT  header (name:value) │
│    --elastic                                     TEXT  elasticsearch url   │
│                                                        [default: None]     │
│    --elastic-login                               TEXT  elasticsearch login │
│                                                        [default: None]     │
│    --elastic-password                            TEXT  elasticsearch       │
│                                                        password            │
│                                                        [default: None]     │
│    --elastic-headers                             TEXT  header (name:value) │
│    --allow-delete         --no-allow-delete            Is delete command   │
│                                                        allowed for this    │
│                                                        configuration?      │
│                                                        [default:           │
│                                                        no-allow-delete]    │
│    --auth-token-url                              TEXT  Token URL of the    │
│                                                        authentication      │
│                                                        service             │
│                                                        [default: None]     │
│    --auth-headers                                TEXT  header (name:value) │
│    --auth-org                                    TEXT  ARLAS IAM           │
│                                                        Organization        │
│                                                        [default: None]     │
│    --auth-login                                  TEXT  login               │
│                                                        [default: None]     │
│    --auth-password                               TEXT  password            │
│                                                        [default: None]     │
│    --auth-client-id                              TEXT  Client ID           │
│                                                        [default: None]     │
│    --auth-client-secr…                           TEXT  Client secret       │
│                                                        [default: None]     │
│    --auth-grant-type                             TEXT  Grant type (e.g.    │
│                                                        password)           │
│                                                        [default: None]     │
│    --auth-arlas-iam       --no-auth-arlas-iam          Is it an ARLAS IAM  │
│                                                        service?            │
│                                                        [default:           │
│                                                        auth-arlas-iam]     │
│    --help                                              Show this message   │
│                                                        and exit.           │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

Create a new configuration

The arlas_cli confs create command has to be filled with options specific to your ARLAS deployment.

Those options can be filled as described in the following sections.

ARLAS Authentication

For ARLAS, keycloak and ARLAS IAM authentications are supported.

To create a configuration using ARLAS IAM, the following parameters have to be set with your values:

  • The IAM session url IAM_URL
  • Your IAM user ARLAS_USER
  • Your IAM password ARLAS_PWD
  • Your ARLAS organization ARLAS_ORGANIZATION

The following options are used by confs create sub-command to generate the conf:

--auth-arlas-iam
--auth-token-url {IAM_URL}
--auth-login {ARLAS_USER}
--auth-password {ARLAS_PWD}
--auth-headers "Content-Type:application/json;charset=utf-8"
--auth-org {ARLAS_ORGANIZATION}

By default, the authentication is supposed to be with ARLAS IAM. For Keycloak, use --no-auth-arlas-iam

Keycloak authentication details coming soon...

ARLAS Server and Persistence

The ARLAS server URL (ARLAS_SERVER_URL) and the ARLAS persistence server URL (ARLAS_PERSISTENCE_URL) have to be set in the configuration using the following options in the confs create sub-command:

--server {ARLAS_SERVER_URL}
--headers "Content-Type:application/json"
--persistence {ARLAS_PERSISTENCE_URL}
--persistence-headers "Content-Type:application/json"

Elasticsearch

The used Elasticsearch instance and your credentials has to be set in the configuration:

  • ELASTIC_ENDPOINT: The used Elasticsearch endpoint (eg: http://localhost:9200)
  • ELASTIC_USER: Your ES user name
  • ELASTIC_PWD: Your ES user password

The link to the ES instance is configured by using the following options in the confs create sub-command:

--elastic {ELASTIC_ENDPOINT}
--elastic-headers "Content-Type:application/json"
--elastic-login {ELASTIC_USER}
--elastic-password {ELASTIC_PWD}

Allow data deletion

By default, it is not possible to run the indices delete command on an elasticsearch with arlas_cli. This is to prevent accidental data loss.

--allow-delete

In order to allow to delete on a configuration, use the --allow-delete option.

login

Create configuration for ARLAS Cloud

The confs longin allows to create a configuration linked to an ARLAS Cloud account:

> arlas_cli confs login --help

 Usage: arlas_cli confs login [OPTIONS] AUTH_LOGIN ELASTIC_LOGIN ELASTIC      

 Add a configuration for ARLAS Cloud                                          

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    auth_login         TEXT  ARLAS login [default: None] [required]       │
│ *    elastic_login      TEXT  Elasticsearch login [default: None]          │
│                               [required]                                   │
│ *    elastic            TEXT  Elasticsearch url [default: None] [required] │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --auth-org                                 TEXT  ARLAS IAM Organization,   │
│                                                  default is your email     │
│                                                  domain name               │
│                                                  [default: None]           │
│ --allow-delete        --no-allow-delete          Is delete command allowed │
│                                                  for this configuration?   │
│                                                  [default: allow-delete]   │
│ --auth-password                            TEXT  ARLAS password            │
│                                                  [default: None]           │
│ --elastic-password                         TEXT  elasticsearch password    │
│                                                  [default: None]           │
│ --help                                           Show this message and     │
│                                                  exit.                     │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

Only your own ES and ARLAS credentials have to be set, the configuration is directly linked to the ARLAS Cloud instance.

It creates a configuration based on your username (extracted from your ARLAS login) : cloud.arlas.io.{USER_NAME}

Note

This created configuration is used as default.

You no longer need to declare the --config in the arlas_cli commands

See the ARLAS Cloud configuration guide.

delete

Delete an existing configuration

An existing configuration can be deleted with the confs delete sub command:

> arlas_cli confs delete --help

 Usage: arlas_cli confs delete [OPTIONS] CONFIG                               

 Delete a configuration                                                       

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    config      TEXT  Name of the configuration [default: None]           │
│                        [required]                                          │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

To remove an existing configuration from the default configuration file, simply run the following command:

arlas_cli confs delete {conf_name}

The configuration will no longer appear in the configuration file.

Warning

Once deleted, the configuration cannot be retrieved.

describe

Describe the content of a configuration

The content of a configuration can be detailed with confs describe sub command:

> arlas_cli confs describe --help

 Usage: arlas_cli confs describe [OPTIONS] CONFIG                             

 Describe a configuration                                                     

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    config      TEXT  Name of the configuration [default: None]           │
│                        [required]                                          │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

For example, the default local configuration looks like:

> arlas_cli confs describe local
allow_delete: true
authorization: null
elastic:
  headers:
    Content-Type: application/json
  location: http://localhost:9200
  login: null
  password: null
persistence:
  headers:
    Content-Type: application/json
  location: http://localhost/persist
  login: null
  password: null
server:
  headers:
    Content-Type: application/json
  location: http://localhost/arlas
  login: null
  password: null

We get the different elements of the configurations:

  • authorization: The authentication system configuration
  • elastic: The link to Elasticsearch cluster
  • persistence: The link to ARLAS persistence
  • server: The link to ARLAS server

See more about the configuration.

list

List the available configurations

The list of available configurations can be obtained with confs list sub command:

> arlas_cli confs list --help

 Usage: arlas_cli confs list [OPTIONS]                                        

 List configurations                                                          

╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

The confs list sub-command returns the list of available configuration names and their ARLAS server url.

For example:

> arlas_cli confs list
+-------+------------------------+
| name  | url                    |
+-------+------------------------+
| local | http://localhost/arlas |
+-------+------------------------+

default

Get the current default configuration

The default arlas_cli configuration can be obtained with the confs default subcommand:

> arlas_cli confs default --help

 Usage: arlas_cli confs default [OPTIONS]                                     

 Display the default configuration                                            

╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

Note

When a configuration is set as default, you do not need to specify --config option in arlas_cli commands.

To identify which configuration is currently set as the default, run:

arlas_cli confs default

set

Set the default configuration

The default arlas_cli configuration can be set with the confs set subcommand:

> arlas_cli confs set --help

 Usage: arlas_cli confs set [OPTIONS] NAME                                    

 Set default configuration among existing configurations                      

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    name      TEXT  Name of the configuration to become default           │
│                      [default: None]                                       │
│                      [required]                                            │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

Note

When a configuration is set as default, you do not need to specify --config option in arlas_cli commands.

To set a configuration conf_name as the default, run:

arlas_cli confs set {conf_name}

check

Check the services of a configuration

You can verify the services accessible through a specific configuration using the confs check subcommand:

> arlas_cli confs check --help

 Usage: arlas_cli confs check [OPTIONS] NAME                                  

 Check the services of a configuration                                        

╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ *    name      TEXT  Configuration to be checked [default: None]           │
│                      [required]                                            │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                │
╰────────────────────────────────────────────────────────────────────────────╯

 See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/      

This command validates that the addresses and credentials defined in the configuration are correct and ensures successful access to the services.

The following services are validated:

  • ARLAS Server
  • ARLAS Persistence
  • ARLAS IAM
  • Elasticsearch

Success

Example:

> arlas_cli confs check cloud.arlas.io.user
ARLAS Server: ...  ok
ARLAS Persistence: ...  ok
ARLAS IAM: ...  ok
Elasticsearch: ...  ok
All services are up and running, and the configuration is correctly set up.