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
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.
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 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:
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:
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:
```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:
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:
<div class="termy" data-termynal data-ty-macos data-ty-title="bash"><span data-ty="input" data-ty-prompt=">">arlas_cli confs describe local</span><span data-ty>allow_delete: true<br>authorization: null<br>elastic:<br> headers:<br> Content-Type: application/json<br> location: http://localhost:9200<br> login: null<br> password: null<br>persistence:<br> headers:<br> Content-Type: application/json<br> location: http://localhost/persist<br> login: null<br> password: null<br>server:<br> headers:<br> Content-Type: application/json<br> location: http://localhost/arlas<br> login: null<br> password: null<br></span></div>
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](configuration.md).
## list
### List the available configurations
The list of available configurations can be obtained with `confs list` sub command:
<div class="termy" data-termynal data-ty-macos data-ty-title="bash"><span data-ty="input" data-ty-prompt=">">arlas_cli confs list --help</span><span data-ty> <br> Usage: arlas_cli confs list [OPTIONS] <br> <br> List configurations <br> <br>╭─ Options ──────────────────────────────────────────────────────────────────╮<br>│ --help Show this message and exit. │<br>╰────────────────────────────────────────────────────────────────────────────╯<br> <br> See full arlas_cli documentation at https://gisaia.github.io/arlas_cli/ <br> <br><br></span></div>
The confs list
sub-command returns the list of available configuration names and their ARLAS server url.
For example:
| name | url |
+-------+------------------------+
| local | http://localhost/arlas |
+-------+------------------------+