-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
044f4ef
commit 8c96e83
Showing
9 changed files
with
748 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
# Configuration | ||
|
||
|
||
## Initial configuration | ||
`arlas_cli` uses a yaml file for storing various ARLAS and elasticsearch configurations. | ||
|
||
[One is automatically created for your convenience at the first launch](https://raw.githubusercontent.com/gisaia/arlas-cli/master/configuration.yaml). | ||
|
||
<!-- termynal --> | ||
```shell | ||
> arlas_cli --version | ||
X.X.X | ||
Warning : no configuration file found, we created an empty one for | ||
you (~/.arlas/cli/configuration.yaml). | ||
``` | ||
|
||
By default, the file is located in `~/.arlas/cli/configuration.yaml`. | ||
It contains the ARLAS demo endpoint and the local ARLAS and elasticsearch endpoints. | ||
|
||
The configuration can also contain references to collection models for creating collections. A default one is provided for ARLAS EO. A reference can be an http url or a path to a local file. | ||
It can also contain references to index mappings for creating indices. A default one is provided for ARLAS EO. | ||
|
||
## Configurations | ||
|
||
The command line uses the `${HOME}/.arlas/cli/configuration.yaml` configuration file: | ||
|
||
```yaml | ||
arlas: | ||
local: | ||
allow_delete: true | ||
elastic: | ||
headers: | ||
Content-Type: application/json | ||
location: http://localhost:9200 | ||
server: | ||
headers: | ||
Content-Type: application/json | ||
location: http://localhost:9999/arlas | ||
mappings: | ||
arlas_eo: | ||
headers: null | ||
location: https://raw.githubusercontent.com/gisaia/ARLAS-EO/master/mapping.json | ||
models: | ||
arlas_eo: | ||
headers: null | ||
location: https://raw.githubusercontent.com/gisaia/ARLAS-EO/master/collection.json | ||
``` | ||
The `arlas` section contains the different deployment configurations. The mapping section lists the mapping template that you can use. | ||
Finally, the models are the templates for the collections. A [detailed description](model/README.md) of the configuration structure is provided. | ||
|
||
### Create, describe and delete a configuration for `arlas_cli` | ||
|
||
You can edit directly the `${HOME}/.arlas/cli/configuration.yaml` configuration file to update your configurations. You can also use the command line itself. | ||
|
||
To list the configurations: | ||
<!-- termynal --> | ||
```shell | ||
> arlas_cli confs list | ||
+-----------+-----------------------------+ | ||
| name | url | | ||
+-----------+-----------------------------+ | ||
| local | http://localhost:9999/arlas | | ||
| test_conf | http://localhost:9999 | | ||
+-----------+-----------------------------+ | ||
``` | ||
|
||
To describe a configuration: | ||
|
||
<!-- termynal --> | ||
```shell | ||
arlas_cli confs describe local | ||
allow_delete: true | ||
authorization: null | ||
elastic: | ||
headers: | ||
Content-Type: application/json | ||
location: http://localhost:9200 | ||
server: | ||
headers: | ||
Content-Type: application/json | ||
location: http://localhost:9999/arlas | ||
``` | ||
|
||
To create a simple configuration: | ||
|
||
<!-- termynal --> | ||
```shell | ||
> arlas_cli confs create dev_conf \ | ||
--server http://localhost:9999 \ | ||
--headers "Content-Type:application/json" \ | ||
--elastic http://localhost:9200 \ | ||
--elastic-headers "Content-Type:application/json" \ | ||
--no-allow-delete | ||
``` | ||
|
||
For an arlas configuration with authentication: | ||
|
||
<!-- termynal --> | ||
```shell | ||
> arlas_cli --config-file /tmp/configuration.yaml confs \ | ||
create myarlas_as_user \ | ||
--server http://myserver/arlas \ | ||
--headers "arlas-org-filter:my_org_name" \ | ||
--headers "Content-Type:application/json" \ | ||
--no-allow-delete \ | ||
--auth-token-url http://myserver/arlas_iam_server/session \ | ||
--auth-login user \ | ||
--auth-password my_password \ | ||
--auth-headers "Content-Type:application/json;charset=utf-8"\ | ||
--auth-arlas-iam | ||
``` | ||
|
||
To delete the configuration: | ||
|
||
<!-- termynal --> | ||
```shell | ||
> arlas_cli confs delete dev_conf | ||
``` | ||
|
||
Also, it is possible to use a different configuration file than the one placed in your home directory (`$HOME/.arlas/cli/configuration.yaml`): | ||
|
||
<!-- termynal --> | ||
```shell | ||
> arlas_cli --config-file /tmp/config.yaml | ||
Warning : no configuration file found, we created an empty one for you (/tmp/config.yaml). | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Identity & Access Management | ||
|
||
## Manage organisations, users, permissions and groups | ||
|
||
<!-- termynal --> | ||
|
Oops, something went wrong.