Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#81 Documentation update and release #82

Merged
merged 31 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
17f44ac
Add documentation build folder to .gitignore
ahsimb Mar 26, 2024
7875564
Merge remote-tracking branch 'origin/main'
ahsimb May 14, 2024
31cca39
Merge remote-tracking branch 'origin/main'
ahsimb May 16, 2024
a78e714
Merge remote-tracking branch 'origin/main'
ahsimb May 23, 2024
381181f
Merge remote-tracking branch 'origin/main'
ahsimb May 28, 2024
062aee7
Merge remote-tracking branch 'origin/main'
ahsimb Jun 7, 2024
1cb349f
Merge remote-tracking branch 'origin/main'
ahsimb Jun 11, 2024
ee5bd0e
Merge remote-tracking branch 'origin/main'
ahsimb Jun 12, 2024
8c40fad
Merge remote-tracking branch 'origin/main'
ahsimb Jun 12, 2024
4584c96
Merge remote-tracking branch 'origin/main'
ahsimb Jun 13, 2024
8e2bc62
Merge remote-tracking branch 'origin/main'
ahsimb Jun 25, 2024
0ca19e9
Merge remote-tracking branch 'origin/main'
ahsimb Jun 25, 2024
2e86c75
Merge remote-tracking branch 'origin/main'
ahsimb Jun 26, 2024
6746ead
Merge remote-tracking branch 'origin/main'
ahsimb Jun 26, 2024
a6e9e66
Merge remote-tracking branch 'origin/main'
ahsimb Aug 8, 2024
ccba19f
Merge remote-tracking branch 'origin/main'
ahsimb Aug 12, 2024
fb4107d
Merge remote-tracking branch 'origin/main'
ahsimb Aug 14, 2024
8f0bc20
Merge remote-tracking branch 'origin/main'
ahsimb Aug 14, 2024
5c7c13d
Merge remote-tracking branch 'origin/main'
ahsimb Sep 18, 2024
14bab30
Merge remote-tracking branch 'origin/main'
ahsimb Sep 19, 2024
d41ce67
Merge remote-tracking branch 'origin/main'
ahsimb Sep 20, 2024
75dd021
Merge remote-tracking branch 'origin/main'
ahsimb Sep 24, 2024
813f223
Merge remote-tracking branch 'origin/main'
ahsimb Oct 2, 2024
5f2791b
Merge remote-tracking branch 'origin/main'
ahsimb Oct 2, 2024
fb33e33
Merge remote-tracking branch 'origin/main'
ahsimb Oct 2, 2024
4ce824f
Merge remote-tracking branch 'origin/main'
ahsimb Oct 4, 2024
797cbfe
Merge remote-tracking branch 'origin/main'
ahsimb Oct 7, 2024
ee3cc30
Merge remote-tracking branch 'origin/main'
ahsimb Oct 7, 2024
e3e4e93
Merge remote-tracking branch 'origin/main'
ahsimb Oct 14, 2024
898f06c
Merge remote-tracking branch 'origin/main'
ahsimb Oct 14, 2024
d174aed
#81 Updated documentation, prepared the release
ahsimb Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/changes/changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 📝 Changes

* [unreleased](unreleased.md)
* [0.8.0](changes_0.8.0.md)
* [0.7.0](changes_0.7.0.md)
* [0.6.0](changes_0.6.0.md)
* [0.5.0](changes_0.5.0.md)
Expand All @@ -15,6 +16,7 @@
hidden:
---
unreleased
changes_0.8.0
changes_0.7.0
changes_0.6.0
changes_0.5.0
Expand Down
17 changes: 17 additions & 0 deletions doc/changes/changes_0.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# 0.8.0 - 2024-10-14

## Features

* #52: Added timeout options for SLC deployer to CLI
* #79 Added function `get_cli_arg` that makes a string CLI argument from an option and its value.
Also allowed passing an option name instead of the `StdParams` in the following two functions:
`create_std_option`, `check_params`.

## Bug fixing

* #78 Missing default value in the definition of `StdParams.path_in_bucket`.

## Documentation

* #81 Updated the documentation on the CLI commands, following the introduction of the standard
CLI parameters.
11 changes: 0 additions & 11 deletions doc/changes/unreleased.md
Original file line number Diff line number Diff line change
@@ -1,12 +1 @@
# Unreleased

## Features

* #52: Added timeout options for SLC deployer to CLI
* #79 Added function `get_cli_arg` that makes a string CLI argument from an option and its value.
Also allowed passing an option name instead of the `StdParams` in the following two functions:
`create_std_option`, `check_params`.

## Bug fixing

* #78 Missing default value in the definition of `StdParams.path_in_bucket`.
86 changes: 49 additions & 37 deletions doc/user_guide/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@

An extension would typically use [UDF scripts](https://docs.exasol.com/db/latest/database_concepts/udf_scripts.htm)
to enable certain custom functionality within a database. In most cases, UDF scripts must be backed by a
[Script Language Container (SLC)](https://github.com/exasol/script-languages-release/), that must be installed in the
[Script Language Container (SLC)](https://github.com/exasol/script-languages-release/), that needs to be installed in the
Exasol Database. An SLC allows the installation of the chosen programming language and necessary dependencies in the
Exasol Database.

The language container for a particular Extension gets downloaded and installed by executing a deployment script
similar to the one below.
The deployment of the language container is typically included in the installation of the Extension. It should also
be possible to install the SLC separately using the same or a different CLI command. Please check the user guide of
a particular extension for details. Below is an example of an extension installation command.

```buildoutcfg
python -m <exasol_extension>.deploy language-container <options>
python -m <exasol_extension>.deploy <options>
```

The name of the script (```<exasol_extension>.deploy``` in the above command) and the command name
(e.g. ```language-container```) can vary from one extension to another. Please check the user guide of a particular
extension. The rest of the command line will have a common format. It will include some of the options defined below.
The choice of options is primarily determined by the storage backend being used - On-Prem or SaaS.
The name of the script (```<exasol_extension>.deploy``` in the above command) can vary from one extension to another.
The rest of the command line will have a common format. It will include some of the options defined below. The choice
of options is primarily determined by the storage backend being used - On-Prem or SaaS.

### List of options

Expand All @@ -32,36 +32,38 @@ an option in the command line, without providing its value. In this case, the co
interactively. For long values, such as the SaaS account id, it is more practical to copy/paste the value from
another source.

| Option name | On-Prem | SaaS | Comment |
|:-----------------------------|:-------:|:----:|:--------------------------------------------------------|
| dsn | [x] | | i.e. <db_host:db_port> |
| db-user | [x] | | |
| db-pass | [x] | | Env. [DB_PASSWORD] |
| bucketfs-name | [x] | | |
| bucketfs-host | [x] | | |
| bucketfs-port | [x] | | |
| bucketfs-user | [x] | | |
| bucketfs-password | [x] | | Env. [BUCKETFS_PASSWORD] |
| bucketfs-use-https | [x] | | Optional boolean, defaults to False |
| bucket | [x] | | |
| saas-url | | [x] | Env. [SAAS_HOST] |
| saas-account-id | | [x] | Env. [SAAS_ACCOUNT_ID] |
| saas-database-id | | [x] | Optional, Env. [SAAS_DATABASE_ID] |
| saas-database-name | | [x] | Optional, provide if the database_id is unknown |
| saas-token | | [x] | Env. [SAAS_TOKEN] |
| path-in-bucket | [x] | [x] | |
| language-alias | [x] | [x] | |
| Option name | On-Prem | SaaS | Comment |
|:-----------------------------|:-------:|:----:|:-------------------------------------------------------------------|
| dsn | [x] | | i.e. <db_host:db_port> |
| db-user | [x] | | |
| db-pass | [x] | | Env. [DB_PASSWORD] |
| bucketfs-name | [x] | | |
| bucketfs-host | [x] | | |
| bucketfs-port | [x] | | |
| bucketfs-user | [x] | | |
| bucketfs-password | [x] | | Env. [BUCKETFS_PASSWORD] |
| bucketfs-use-https | [x] | | Optional boolean, defaults to False |
| bucket | [x] | | |
| saas-url | | [x] | Env. [SAAS_HOST] |
| saas-account-id | | [x] | Env. [SAAS_ACCOUNT_ID] |
| saas-database-id | | [x] | Optional, Env. [SAAS_DATABASE_ID] |
| saas-database-name | | [x] | Optional, provide if the database_id is unknown |
| saas-token | | [x] | Env. [SAAS_TOKEN] |
| path-in-bucket | [x] | [x] | |
| language-alias | [x] | [x] | |
| schema | [x] | [x] | Required if the user has no permission to create a database schema |
| version | [x] | [x] | Optional, provide for downloading SLC from GitHub |
| container-file | [x] | [x] | Optional, provide for uploading SLC file |
| ssl-cert-path | [x] | [x] | Optional |
| [no-]use-ssl-cert-validation | [x] | [x] | Optional boolean, defaults to True |
| ssl-client-cert-path | [x] | | Optional |
| ssl-client-private-key | [x] | | Optional |
| [no-]upload-container | [x] | [x] | Optional boolean, defaults to True |
| [no-]alter-system | [x] | [x] | Optional boolean, defaults to True |
| [no-]allow-override | [x] | [x] | Optional boolean, defaults to False |
| [no-]wait_for_completion | [x] | [x] | Optional boolean, defaults to True |
| version | [x] | [x] | Optional, provide for downloading SLC from GitHub |
| container-file | [x] | [x] | Optional, provide for uploading SLC file |
| ssl-cert-path | [x] | [x] | Optional |
| [no-]use-ssl-cert-validation | [x] | [x] | Optional boolean, defaults to True |
| ssl-client-cert-path | [x] | | Optional |
| ssl-client-private-key | [x] | | Optional |
| [no-]upload-container | [x] | [x] | Optional boolean, defaults to True |
| [no-]alter-system | [x] | [x] | Optional boolean, defaults to True |
| [no-]allow-override | [x] | [x] | Optional boolean, defaults to False |
| [no-]wait-for-completion | [x] | [x] | Optional boolean, defaults to True |
| deploy-timeout-minutes | [x] | [x] | Defaults to 10 minutes. |
| [no-]display-progress | [x] | [x] | Optional boolean, defaults to True |

### Container selection

Expand Down Expand Up @@ -109,3 +111,13 @@ has already been uploaded one can use the `--no-upload-container` option to skip
By default, overriding language activation is not permitted. If a language with the same alias has already
been activated the command will result in an error. The activation can be overridden with the use of
the `--allow-override` option.

## BucketFS connection object

Some extensions require the user to create a BucketFS connection object encapsulating the BucketFS credentials.
The creation of such an object in the database would also be a part of the extension installation. Like the
language container, the connection object can be created separately, using the same or a different command.
Please check the documentation of a particular extension for details.

Most of the options listed above in the Language Container Deployer sections are also relevant for the creation
of the connection object, should it be performed in a separate command.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we append a customization section here?
For developers using the PEC to create a custom SLC deployer.
E.g. AAF or TE?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the document for an end user.

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from pathlib import Path
from datetime import timedelta

from exasol.python_extension_common.deployment.language_container_deployer import LanguageContainerDeployer
from exasol.python_extension_common.deployment.language_container_deployer import (
LanguageContainerDeployer, display_extract_progress, ExtractValidator)
from exasol.python_extension_common.connections.pyexasol_connection import open_pyexasol_connection
from exasol.python_extension_common.connections.bucketfs_location import create_bucketfs_location
from exasol.python_extension_common.cli.std_options import StdParams
Expand Down Expand Up @@ -35,10 +37,17 @@ def __call__(self, **kwargs):
alter_system = kwargs[StdParams.alter_system.name]
allow_override = kwargs[StdParams.allow_override.name]
wait_for_completion = kwargs[StdParams.wait_for_completion.name]
deploy_timeout_minutes = kwargs[StdParams.deploy_timeout_minutes.name]
display_progress = kwargs[StdParams.display_progress.name]

display_callback = display_extract_progress if display_progress else None
extract_validator = ExtractValidator(pyexasol_connection,
timedelta(minutes=deploy_timeout_minutes),
callback=display_callback)
deployer = LanguageContainerDeployer(pyexasol_connection,
language_alias,
bucketfs_location)
bucketfs_location,
extract_validator)
if not upload_container:
deployer.run(alter_system=alter_system,
allow_override=allow_override,
Expand Down
Loading
Loading