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:
create Add a configuration
delete Delete a configuration
describe Describe a configuration
list List configurations
login Add a configuration for ARLAS Cloud
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 Name of the configuration [required]
Options:
--server TEXT ARLAS Server url [required]
--headers TEXT header (name:value)
--persistence TEXT ARLAS Persistence url
--persistence-headers TEXT header (name:value)
--elastic TEXT elasticsearch url
--elastic-login TEXT elasticsearch login
--elastic-password TEXT elasticsearch password
--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
--auth-headers TEXT header (name:value)
--auth-org TEXT ARLAS IAM Organization
--auth-login TEXT login
--auth-password TEXT password
--auth-client-id TEXT Client ID
--auth-client-secret TEXT Client secret
--auth-grant-type TEXT Grant type (e.g. password)
--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 nameELASTIC_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 ARLAS login [required]
ELASTIC_LOGIN Elasticsearch login [required]
ELASTIC Elasticsearch url [required]
Options:
--auth-org TEXT ARLAS IAM Organization, default is your
email domain name
--allow-delete / --no-allow-delete
Is delete command allowed for this
configuration? [default: allow-delete]
--auth-password TEXT ARLAS password
--elastic-password TEXT elasticsearch password
--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 Name of the configuration [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:
```shell
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 Name of the configuration [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:
<!-- termynal -->
```shell
> 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:
<!-- termynal -->
```shell
> arlas_cli confs list
+-------+------------------------+
| name | url |
+-------+------------------------+
| local | http://localhost/arlas |
+-------+------------------------+