Skip to content

Commit

Permalink
update cmemc docu, extend variable docu, add variable tag
Browse files Browse the repository at this point in the history
  • Loading branch information
seebi committed Oct 5, 2023
1 parent f2965cf commit 14f7de0
Show file tree
Hide file tree
Showing 30 changed files with 336 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ tags:
# admin client Command Group
<!-- This file was generated - DO NOT CHANGE IT MANUALLY -->



List client accounts, get or generate client account secrets.

This command group is an opinionated interface to the Keycloak realm of your Corporate Memory instance. In order to be able to use the commands in this group, the configured cmemc connection account needs to be equipped with the `manage-clients` role in the used realm.
Expand All @@ -30,6 +32,8 @@ $ cmemc admin client list [OPTIONS]





Outputs a list of client accounts, which can be used to get an overview as well as a reference for the other commands of the `admin client` command group.

!!! note
Expand Down Expand Up @@ -57,6 +61,8 @@ $ cmemc admin client secret [OPTIONS] CLIENT_ID





This command retrieves or generates a new secret for a client account from a realm.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,17 @@ $ cmemc config list | parallel --ctag cmemc -c {} admin status
in the table, 'overall.healthy' with result
in UP in case all health flags are UP as
well (otherwise DOWN).

--exit-1 [never|error|always] Specify, when this command returns with exit
code 1. Available options are 'never' (exit 0
on errors and warnings), 'error' (exit 1 on
errors, exit 0 on warnings), 'always' (exit 1
on errors and warnings). [default: never]

--enforce-table A single value with --key will be returned as
plain text instead of a table with one row
and the header. This default behaviour allows
for more easy integration with scripts. This
flag enforces the use of tabular output, even
for single row tables.

--raw Outputs combined raw JSON output of the
health/info endpoints.
```
Expand Down Expand Up @@ -92,7 +89,6 @@ Please be aware that this command can reveal secrets which you might not want to
--raw Outputs raw JSON. Note that this option will always try to fetch
a new JSON token response. In case you are working with
OAUTH_GRANT_TYPE=prefetched_token, this may lead to an error.

--decode Decode the access token and outputs the raw JSON. Note that the
access token is only decoded and esp. not validated.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ A metric of a specific job is identified by a metric ID. Possible metric IDs of

--job [DP] The job from which the metrics data is fetched.
[default: DP]

--filter <TEXT TEXT>... A set of label name/value pairs in order to filter
the samples of the requested metric family. Each
metric has a different set of labels with different
Expand All @@ -46,13 +45,11 @@ A metric of a specific job is identified by a metric ID. Possible metric IDs of
option. The label names are then shown as column
headers and label values as cell values of this
column.

--enforce-table A single sample value will be returned as plain
text instead of the normal table. This allows for
more easy integration with scripts. This flag
enforces the use of tabular output, even for single
row tables.

--raw Outputs raw prometheus sample classes.
```

Expand Down Expand Up @@ -99,7 +96,6 @@ For each metric, the output table shows the metric ID, the type of the metric, a
--job [DP] The job from which the metrics data is fetched. [default: DP]
--id-only Lists metric identifier only. This is useful for piping the IDs
into other commands.

--raw Outputs (sorted) JSON dict, parsed from the metrics API output.
```

Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,14 @@ This command creates a showcase scenario of multiple graphs including integratio
--scale INTEGER The scale factor provides a way to set the target size of
the scenario. A value of 10 results in around 40k triples,
a value of 50 in around 350k triples. [default: 10]

--create Delete old showcase data if present and create new showcase
databased on the given scale factor.

--delete Delete existing showcase data if present.
```

## admin store bootstrap

Update/Import bootstrap data.
Update/Import or remove bootstrap data.

```shell-session title="Usage"
$ cmemc admin store bootstrap [OPTIONS]
Expand All @@ -57,10 +55,12 @@ $ cmemc admin store bootstrap [OPTIONS]



This command imports the bootstrap data needed for managing shapes and configuration objects.
Use ``--import`` to import the bootstrap data needed for managing shapes and configuration objects. This will remove the old data first.

Use ``--remove`` to delete bootstrap data.

!!! note
The command will first remove all existing bootstrap data (identified with the isSystemResource flag) and will then import the new data to the corresponding graphs (shape catalog, vocabulary catalog, configuration graph).
The removal of existing bootstrap data will search for resources which are flagged with the isSystemResource property.



Expand All @@ -69,7 +69,8 @@ This command imports the bootstrap data needed for managing shapes and configura
```text

--import Delete existing bootstrap data if present and import bootstrap
data which was delivered
data which was delivered with Corporate Memory.
--remove Delete existing bootstrap data if present.
```

## admin store export
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ tags:
# admin user Command Group
<!-- This file was generated - DO NOT CHANGE IT MANUALLY -->



List, create, delete and modify user accounts.

This command group is an opinionated interface to the Keycloak realm of your Corporate Memory instance. In order to be able to manage user data, the configured cmemc connection account needs to be equipped with the `manage-users` role in the used realm.
Expand All @@ -30,6 +32,8 @@ $ cmemc admin user list [OPTIONS]





Outputs a list of user accounts, which can be used to get an overview as well as a reference for the other commands of the `admin user` command group.


Expand All @@ -53,6 +57,8 @@ $ cmemc admin user create USERNAME





This command creates a new user account.

!!! note
Expand All @@ -72,6 +78,8 @@ $ cmemc admin user update [OPTIONS] USERNAME





This command updates metadata and group assignments of a user account.

For each data value, a separate option needs to be used. All options can be combined in a single execution.
Expand Down Expand Up @@ -103,6 +111,8 @@ $ cmemc admin user delete USERNAME





This command deletes a user account from a realm.

!!! note
Expand All @@ -122,6 +132,8 @@ $ cmemc admin user password [OPTIONS] USERNAME





With this command, the password of a user account can be changed. The default execution mode of this command is an interactive prompt which asks for the password (twice). In order automate password changes, you can use the ``--value`` option.

!!! warning
Expand All @@ -135,10 +147,8 @@ With this command, the password of a user account can be changed. The default ex

--value TEXT With this option, the new password can be set in a non-
interactive way.

--temporary If enabled, the user must change the password on next
login.

--request-change If enabled, will send a email to user to reset the
password.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ The file name is optional and will be generated with by the template if absent.

-o, --overwrite Overwrite existing files. This is a dangerous
option, so use it with care.

--type TEXT Type of the exported workspace file.
[default: xmlZip]

-t, --filename-template TEXT Template for the export file name. Possible
placeholders are (Jinja2): {{connection}}
(from the --connection option) and {{date}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ You can install a package by uploading a source distribution .tar.gz file, by up

## admin workspace python uninstall

Uninstall a python package from the workspace.
Uninstall a python packages from the workspace.

```shell-session title="Usage"
$ cmemc admin workspace python uninstall PACKAGE_NAME
$ cmemc admin workspace python uninstall [OPTIONS] [PACKAGE_NAME]...
```


Expand All @@ -50,6 +50,14 @@ This command is essentially a `pip uninstall` in the remote python environment.



??? info "Options"
```text

-a, --all This option removes all installed packages from the system,
leaving only the pre-installed mandatory packages in the
environment.
```

## admin workspace python list

List installed python packages.
Expand All @@ -70,9 +78,13 @@ It outputs a table of python package identifiers with version information.
??? info "Options"
```text

--raw Outputs raw JSON.
--id-only Lists only package identifier. This is useful for piping the IDs
into other commands.
--raw Outputs raw JSON.
--id-only Lists only package identifier. This is useful for piping the
IDs into other commands.
--available Instead of listing installed packages, this option lists
installable packages from pypi.org, which are prefixed with
'cmem-plugin-' and so are most likely Corporate Memory plugin
packages.
```

## admin workspace python list-plugins
Expand Down Expand Up @@ -102,3 +114,18 @@ This commands lists all discovered plugins.
--package-id-only Lists only plugin package identifier.
```

## admin workspace python open

Open a package pypi.org page in the browser.

```shell-session title="Usage"
$ cmemc admin workspace python open PACKAGE
```




With this command, you can open the pypi.org page of a published package in your browser. From there, you can follow links, review the version history as well as the origin of the package, and read the provided documentation.



Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,51 @@ tags:
```text
List and edit configs as well as get config values.
Configurations are identified by the section identifier in the
config file. Each configuration represent a Corporate Memory deployment
with its specific access method as well as credentials.
A minimal configuration which uses client credentials has the following
entries:

[example.org]
CMEM_BASE_URI=https://cmem.example.org/
OAUTH_GRANT_TYPE=client_credentials
OAUTH_CLIENT_ID=cmem-service-account
OAUTH_CLIENT_SECRET=my-secret-account-pass
Note that OAUTH_GRANT_TYPE can be either client_credentials, password or
prefetched_token.
In addition to that, the following config parameters can be used as well:

SSL_VERIFY=False - for ignoring certificate issues (not recommended)
DP_API_ENDPOINT=URL - to point to a non-standard DataPlatform location
DI_API_ENDPOINT=URL - to point to a non-standard DataIntegration location
OAUTH_TOKEN_URI=URL - to point to an external IdentityProvider location
OAUTH_USER=username - only if OAUTH_GRANT_TYPE=password
OAUTH_PASSWORD=password - only if OAUTH_GRANT_TYPE=password
OAUTH_ACCESS_TOKEN=token - only if OAUTH_GRANT_TYPE=prefetched_token
In order to get credential information from an external process, you can
use the parameter OAUTH_PASSWORD_PROCESS, OAUTH_CLIENT_SECRET_PROCESS and
OAUTH_ACCESS_TOKEN_PROCESS to setup an external executable.

OAUTH_CLIENT_SECRET_PROCESS=/path/to/getpass.sh
OAUTH_PASSWORD_PROCESS=["getpass.sh", "parameter1", "parameter2"]
The credential executable can use the cmemc environment for fetching the
credential (e.g. CMEM_BASE_URI and OAUTH_USER).
If the credential executable is not given with a full path, cmemc
will look into your environment PATH for something which can be executed.
The configured process needs to return the credential on the first line
of stdout. In addition to that, the process needs to exit with exit
code 0 (without failure). There are examples available in the online
manual.
Configurations are identified by the section identifier in the
config file. Each configuration represent a Corporate Memory deployment
with its specific access method as well as credentials.
A minimal configuration which uses client credentials has the following
entries:

[example.org]
CMEM_BASE_URI=https://cmem.example.org/
OAUTH_GRANT_TYPE=client_credentials
OAUTH_CLIENT_ID=cmem-service-account
OAUTH_CLIENT_SECRET=my-secret-account-pass
Note that OAUTH_GRANT_TYPE can be either client_credentials, password or
prefetched_token.
In addition to that, the following config parameters can be used as well:

SSL_VERIFY=False - for ignoring certificate issues (not recommended)
DP_API_ENDPOINT=URL - to point to a non-standard DataPlatform location
DI_API_ENDPOINT=URL - to point to a non-standard DataIntegration location
OAUTH_TOKEN_URI=URL - to point to an external IdentityProvider location
OAUTH_USER=username - only if OAUTH_GRANT_TYPE=password
OAUTH_PASSWORD=password - only if OAUTH_GRANT_TYPE=password
OAUTH_ACCESS_TOKEN=token - only if OAUTH_GRANT_TYPE=prefetched_token
In order to get credential information from an external process, you can
use the parameter OAUTH_PASSWORD_PROCESS, OAUTH_CLIENT_SECRET_PROCESS and
OAUTH_ACCESS_TOKEN_PROCESS to setup an external executable.

OAUTH_CLIENT_SECRET_PROCESS=/path/to/getpass.sh
OAUTH_PASSWORD_PROCESS=["getpass.sh", "parameter1", "parameter2"]
The credential executable can use the cmemc environment for fetching the
credential (e.g. CMEM_BASE_URI and OAUTH_USER).
If the credential executable is not given with a full path, cmemc
will look into your environment PATH for something which can be executed.
The configured process needs to return the credential on the first line
of stdout. In addition to that, the process needs to exit with exit
code 0 (without failure). There are examples available in the online
manual.
```

## config list
Expand Down Expand Up @@ -104,10 +105,10 @@ $ cmemc config edit
Get the value of a known cmemc configuration key.

```shell-session title="Usage"
$ cmemc config get [CMEM_BASE_URI|SSL_VERIFY|REQUESTS_CA_BUNDLE|DP_API_END
$ cmemc config get {CMEM_BASE_URI|SSL_VERIFY|REQUESTS_CA_BUNDLE|DP_API_END
POINT|DI_API_ENDPOINT|KEYCLOAK_BASE_URI|KEYCLOAK_REALM_ID|OAUTH_T
OKEN_URI|OAUTH_GRANT_TYPE|OAUTH_USER|OAUTH_PASSWORD|OAUTH_CLIENT_
ID|OAUTH_CLIENT_SECRET|OAUTH_ACCESS_TOKEN]
ID|OAUTH_CLIENT_SECRET|OAUTH_ACCESS_TOKEN}
```


Expand Down
Loading

0 comments on commit 14f7de0

Please sign in to comment.