Command Line Interface for the Secure Configuration Storage (SCS)¶
Notebook Connector installs the scs command line interface for managing
Secure Configuration Storage files.
The scs CLI exposes three commands:
checkconfigureshow
Help¶
Use --help on the top-level command or any subcommand to inspect the
currently available command tree and options.
scs --help
scs configure --help
scs configure onprem --help
scs configure saas --help
scs configure docker-db --help
scs show --help
scs check --help
Master Password and SCS File¶
As said in the User Guide, the SCS is secured by a master password.
To avoid the master password or any other secret to show up in the history of
your command line shell (e.g. ~/.bash_history) the CLI only allows the
following methods for entering any secret value:
Interactive typing, the typed characters will be invisible
Setting a related environment variable, which is useful for automating the SCS usage
All commands operate on an SCS file. If the file does not exist then the CLI will create it. The CLI needs the master password for creating a new encrypted file but also for accessing an existing encrypted file.
Master password and SCS file can be specified by using the following environment variables:
Name |
Value |
|---|---|
|
Path to the encrypted SCS file. |
|
Master password for creating or accessing the encrypted SCS file. |
Command configure¶
The CLI command configure requires a subcommand for specifying the variant
of Exasol database instance you want to connect to. The CLI supports 3
different variants:
onpremsaasdocker-db
Common configure options¶
These options are available on every configure subcommand:
Option |
Meaning |
|---|---|
|
Positional path to the encrypted SCS file. Can also be provided via
the |
|
Whether to overwrite a different backend already stored in the SCS. |
|
Database schema for installing UDFs of Exasol extensions. |
Command configure onprem¶
Use configure onprem for an Exasol on-premise instance.
scs configure onprem <SCS file>
Option |
Meaning |
|---|---|
|
Database connection host name. |
|
Database connection port. Default: |
|
Database user name. |
|
Database password. Secret option. Related environment variable:
|
|
Whether to encrypt communication with the database. Default:
|
|
BucketFS host name. |
|
BucketFS internal host name. Default: |
|
BucketFS port. Default: |
|
BucketFS internal port. Default: |
|
BucketFS user name. Default: |
|
BucketFS write password. Secret option. Related environment variable:
|
|
BucketFS service name, for example |
|
BucketFS bucket name, for example |
|
Whether to encrypt communication with BucketFS. Default:
|
|
Whether to validate SSL certificates. Default:
|
|
Path to a trusted CA file or directory. |
Command configure saas¶
Use configure saas for an Exasol SaaS instance.
scs configure saas <SCS file>
Option |
Meaning |
|---|---|
|
Exasol SaaS service URL. Default: |
|
Exasol SaaS account ID. |
|
Exasol SaaS database ID. Can be used instead of
|
|
Exasol SaaS database name. Can be used instead of
|
|
Exasol SaaS personal access token. Secret option. Related environment
variable: |
|
Whether to validate SSL certificates. Default:
|
|
Path to a trusted CA file or directory. |
Command configure docker-db¶
Use configure docker-db for an Exasol Docker instance managed via ITDE.
scs configure docker-db <SCS file>
Option |
Meaning |
|---|---|
|
Database memory size in GiB. Default: |
|
Database disk size in GiB. Default: |
|
Hardware acceleration. Default: |
Typical Workflows¶
On-Premise Workflow¶
The following steps show how to create an encrypted SCS file for an on-premise Exasol database, verify that all required values are present, and optionally check network reachability before opening any notebooks.
export SCS_MASTER_PASSWORD="my-strong-password"
scs configure onprem my_config.db \
--db-host-name 192.168.1.10 \
--db-port 8563 \
--db-username sys \
--db-schema MY_SCHEMA \
--bucketfs-host 192.168.1.10 \
--bucketfs-port 2580 \
--bucketfs-name bfsdefault \
--bucket default
scs check --connect my_config.db
scs show my_config.db
SaaS Workflow¶
For Exasol SaaS, the database host and credentials are derived from your account ID and personal access token (PAT). Export the PAT as an environment variable so it is never written to disk in plain text.
export SCS_MASTER_PASSWORD="my-strong-password"
export SCS_EXASOL_SAAS_TOKEN="<your-pat>"
scs configure saas my_saas_config.db \
--saas-account-id "<your-account-id>" \
--saas-database-name "my-database" \
--db-schema MY_SCHEMA
scs check --connect my_saas_config.db
scs show my_saas_config.db
Local Docker Database Workflow¶
Use configure docker-db to store the desired ITDE sizing values in the
SCS. This command prepares the local setup but does not start the Docker
database by itself. Start the container later via the Python API described
in Local Docker Database (ITDE) Examples.
scs configure docker-db my_docker_config.db \
--db-mem-size 4 \
--db-disk-size 10
Incremental Configuration¶
CLI command configure allows you to configure the database connection
partially and add more configuration items incrementally at a later point in
time.
That is, if you currently only know the host of the database, then you can save this to the SCS and add the password later on.
Command show¶
With CLI command show you can inspect the configuration items already
available in the SCS.
In the output passwords and other sensitive data are replaced by asterisks
****.
scs show <SCS file>
Here is the output for a partially configured connection to an Exasol SaaS instance:
backend: saas
use_itde: False
--saas-url: https://cloud.exasol.com
--saas-token: ****
--ssl-use-cert-validation: True
Command check¶
With command check you can check whether the configuration is complete or
whether there are still some items missing.
With option --connect the command also verifies the configuration by
connecting to the configured Exasol database instance, executing a SQL
statement and accessing the BucketFS.
Option |
Meaning |
|---|---|
|
Verify that connecting to the configured Exasol database instance
succeeds. Default: |
scs check --connect <SCS file>
Here is the output when having started configuring a connection to an Exasol SaaS instance without providing any further options, yet:
Error: 5 options are not yet configured:
--saas-account-id, --saas-database-id,
--saas-database-name, --saas-token, --db-schema.