Skip to content

Commit 6aad0a2

Browse files
tomubentkilias
andauthored
#234: Remove starter scripts (#235)
fixes #234 --------- Co-authored-by: Torsten Kilias <[email protected]>
1 parent 45c452d commit 6aad0a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+105
-1546
lines changed

.github/actions/prepare_poetry_env/action.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/check_version.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ jobs:
1414
- uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0
17-
- uses: ./.github/actions/prepare_poetry_env
17+
- name: Setup Python & Poetry Environment
18+
uses: exasol/python-toolbox/.github/actions/[email protected]
19+
with:
20+
python-version: '3.10'
21+
poetry-version: '1.8.2'
1822
- name: Check Release
19-
run: ./scripts/build/check_release.sh
23+
run: poetry run python3 scripts/build/check_release.py

.github/workflows/main.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,24 @@ on:
44
push:
55

66
jobs:
7-
test-docker-starter:
7+
test-exaslct-alias-script:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
python_version: ["3.10", "3.11", "3.12"]
812
runs-on: ubuntu-latest
913
steps:
14+
1015
- uses: actions/checkout@v4
1116

12-
- name: Test ./exaslct
13-
run: ./exaslct --help
17+
- name: Setup Python & Poetry Environment
18+
uses: exasol/python-toolbox/.github/actions/[email protected]
19+
with:
20+
python-version: '${{ matrix.python_version }}'
21+
poetry-version: '1.8.2'
22+
23+
- name: Test exaslct
24+
run: poetry run exaslct --help
1425

1526
prep-testbed:
1627
runs-on: ubuntu-latest
@@ -32,36 +43,21 @@ jobs:
3243
exasol_version:
3344
- "default"
3445
python_version:
35-
- 3.10
46+
- "3.10"
3647
test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
3748
runs-on: ubuntu-latest
3849
name: ${{ matrix.test-path.name }}
3950
steps:
4051
- uses: actions/checkout@v4
4152

42-
- uses: ./.github/actions/prepare_poetry_env
43-
44-
- name: Test exaslct_with_poetry
45-
run: ./scripts/test/exaslct_with_poetry.sh --help
53+
- name: Setup Python & Poetry Environment
54+
uses: exasol/python-toolbox/.github/actions/[email protected]
55+
with:
56+
python-version: '${{ matrix.python_version }}'
57+
poetry-version: '1.8.2'
4658

4759
- name: Run all tests
4860
run: ./scripts/test/run_test.sh ${{ matrix.test-path.path }}
4961
env: # Set the secret as an input
5062
DOCKER_USER: ${{ secrets.DOCKER_USER }}
5163
DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }}
52-
53-
publish-main:
54-
if: github.ref == 'refs/heads/main'
55-
runs-on: ubuntu-latest
56-
environment: publish
57-
steps:
58-
- uses: actions/checkout@v4
59-
- name: Build new Docker image
60-
run: "bash scripts/build/build_docker_runner_image.sh"
61-
- name: Docker login
62-
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin
63-
env: # Set the secret as an input
64-
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
65-
SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
66-
- name: Push new Docker image
67-
run: "bash scripts/build/push_docker_runner_image.sh main"

.github/workflows/release.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,10 @@ jobs:
1616
uses: actions/checkout@v4
1717

1818
- name: Setup Python & Poetry Environment
19-
uses: ./.github/actions/prepare_poetry_env
20-
21-
- name: Build Artifacts
22-
run: poetry build
23-
24-
- name: Build new Docker image
25-
run: "bash scripts/build/build_docker_runner_image.sh"
26-
27-
- name: Docker login
28-
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin
29-
env: # Set the secret as an input
30-
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }}
31-
SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
32-
33-
- name: Push new Docker images
34-
run: bash scripts/build/push_docker_runner_image.sh latest "${{ github.ref_name }}"
19+
uses: exasol/python-toolbox/.github/actions/[email protected]
20+
with:
21+
python-version: '3.10'
22+
poetry-version: '1.8.2'
3523

3624
- name: PyPi Release
3725
env:

README.md

Lines changed: 26 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
## Overview
44

55
The Script-Languages-Container-Tool (exaslct) is the build tool for the script language container.
6-
You can build, export and upload script-language container from so-called flavors
7-
which are description how to build the script language container. You can find pre-defined flavors
8-
in the [script-languages-release](https://github.com/exasol/script-languages-release) repository.
6+
You can build, export and upload script-language container from so-called flavors
7+
which are description how to build the script language container. You can find pre-defined flavors
8+
in the [script-languages-release](https://github.com/exasol/script-languages-release) repository.
99
There we also described how you could customize these flavors to your needs.
1010
<h1 align="center">Exasol Toolbox</h1>
1111

@@ -37,22 +37,15 @@ Building script-language container for extending Exasol UDFs.
3737

3838
### Prerequisites
3939

40+
**Note**: Since version 1.0.0 the "starter scripts" shipped with previous version, which pulled the `exaslct` docker container runtime, were removed. If you can't use Python3, you still can use our [AI-lab](https://github.com/exasol/ai-lab) which provides VM images, AMI images and a Docker images, all capable of building script-language-container.
41+
4042
#### For installation
4143

42-
In order to install this tool, your system needs to provide
44+
In order to install this tool, your system needs to provide
4345
the following prerequisites:
4446

4547
* Software
46-
* Linux
47-
* [bash](https://www.gnu.org/software/bash/) >= 4.2
48-
* MacOsX
49-
* [bash](https://www.gnu.org/software/bash/) > 3.2
50-
* [coreutils](https://www.gnu.org/software/coreutils/)
51-
* sha512sum
52-
* sed
53-
* [curl](https://curl.se/)
54-
* Python 3 (>=3.10)
55-
* Pip
48+
See [Dependencies](doc/dependencies.md)
5649

5750

5851
#### For running
@@ -61,24 +54,14 @@ In order to use this tool, your system needs to fulfill the following prerequisi
6154

6255
* Software
6356
* Linux
64-
* [bash](https://www.gnu.org/software/bash/) >= 4.2
65-
* [coreutils](https://www.gnu.org/software/coreutils/)
66-
* readlink with -f option
67-
* realpath
68-
* dirname
69-
* MacOsX (Please see limitations on [MacOsX](#macosx-limitations))
70-
* [bash](https://www.gnu.org/software/bash/) >= 3.2
71-
* [coreutils](https://www.gnu.org/software/coreutils/)
72-
* greadlink with -f option
73-
* realpath
74-
* dirname
75-
* [Docker](https://docs.docker.com/) >= 17.05
57+
* Python3 >= 3.10
58+
* [Docker](https://docs.docker.com/) >= 17.05
7659
* with support for [multi-stage builds required](https://docs.docker.com/develop/develop-images/multistage-build/)
7760
* host volume mounts need to be allowed
7861

79-
* System Setup
80-
* We recommend at least 50 GB free disk space on the partition
81-
where Docker stores its images, on linux Docker typically stores
62+
* System Setup
63+
* We recommend at least 50 GB free disk space on the partition
64+
where Docker stores its images, on linux Docker typically stores
8265
the images at /var/lib/docker.
8366
* For the partition where the output directory (default: ./.build_output)
8467
is located we recommend additionally at least 10 GB free disk space.
@@ -87,41 +70,39 @@ Further, prerequisites might be necessary for specific tasks. These are listed u
8770

8871
### Installation
8972

90-
You have two options to use this project:
91-
- as a pure Python project
92-
- using the _start scripts_ which pull the correct container image from Dockerhub and execute it within the Docker container
93-
94-
#### Pure Python
73+
In general, it's good practice to install the package in a virtual environment, using `venv` or `Poetry`.
9574

96-
Find the wheel package for a specific [release](https://github.com/exasol/script-languages-container-tool/releases) under assets.
75+
#### Pip via PyPi
9776

98-
Install the python package with `python3 -m pip install https://github.com/exasol/script-languages-container-tool/releases/download/$VERSION/exasol_script_languages_container_tool-$VERSION-py3-none-any.whl`. Replace $VERSION with the latest version or the specific version you are interested in.
77+
```commandline
78+
python3 -m pip install exasol-script-languages-container-tool
79+
```
9980

100-
#### Starter scripts
81+
#### Pipx via Pypi
10182

102-
You need to install the Python package only once to install the starter scripts (see the [previous section](#installation)).
83+
If you plan to use `exasol-script-languages-container-tool` on the command line only via the `exaslct` script, we suggest the installation via `pipx`:
10384

104-
Install the starter scripts which allow to run exaslct within a docker image:
105-
`python3 -m exasol_script_languages_container_tool.main install-starter-scripts --install-path $YOUR_INSTALL_PATH`
85+
```commandline
86+
pipx install exasol-script-languages-container-tool
87+
```
10688

107-
This will create a subfolder with the scripts itself and a symlink `exaslct` in $YOUR_INSTALL_PATH, which can be used as entry point.
10889

10990
### Usage
11091

111-
For simplicity the following examples use the starter script version (`exaslct`). If you want to use the pure Python package, simply replace `exaslct` with `python3 -m exasol_script_languages_container_tool.main` in all examples.
92+
For simplicity the following examples use the script version (`exaslct`), which will be installed together with the Python package. The script is just an alias for `python3 -m exasol_script_languages_container_tool.main`.
11293

11394
#### How to build an existing flavor?
11495

11596
Create the language container and export it to the local file system
11697

11798
```bash
118-
./exaslct export --flavor-path=flavors/<flavor-name> --export-path <export-path>
99+
exaslct export --flavor-path=flavors/<flavor-name> --export-path <export-path>
119100
```
120101

121102
or upload it directly into the BucketFS (currently http only, https follows soon)
122103

123104
```bash
124-
./exaslct upload --flavor-path=flavors/<flavor-name> --database-host <hostname-or-ip> --bucketfs-port <port> \
105+
exaslct upload --flavor-path=flavors/<flavor-name> --database-host <hostname-or-ip> --bucketfs-port <port> \
125106
--bucketfs-username w --bucketfs-password <password> --bucketfs-name <bucketfs-name> \
126107
--bucket-name <bucket-name> --path-in-bucket <path/in/bucket>
127108
```
@@ -134,7 +115,7 @@ that can be used to activate the script language container in the database.
134115
If you uploaded a container manually, you can generate the language activation statement with
135116

136117
```bash
137-
./exaslct generate-language-activation --flavor-path=flavors/<flavor-name> --bucketfs-name <bucketfs-name> \
118+
exaslct generate-language-activation --flavor-path=flavors/<flavor-name> --bucketfs-name <bucketfs-name> \
138119
--bucket-name <bucket-name> --path-in-bucket <path/in/bucket> --container-name <container-name>
139120
```
140121

@@ -158,23 +139,6 @@ ALTER SESSION SET SCRIPT_LANGUAGES='<LANGUAGE_ALIAS>=localzmq+protobuf:///<bucke
158139
* Can push Docker images to Docker registries
159140
* Run tests for you container against an Exasol DB (docker-db or external db)
160141

161-
## Limitations
162-
163-
* Caution with symbolic links:
164-
If you use symbolic links inside any directory of the command line arguments
165-
they must not point to files or directories outside the root of the path of the
166-
command line argument (i.e. --flavor-path ./flavors/my_flavor/ => There must be no symbolic
167-
link inside ./flavors/my_flavor point to anywhere outside of ./flavors/my_flavor).
168-
Background: Local directories paths must be mounted manually to the docker container.
169-
We currently support only the mounting of the given command line arguments, but we do not analyze
170-
the content of those directories.
171-
Plan is to fix this limitation with [#35](https://github.com/exasol/script-languages-container-tool/issues/35)
172-
173-
174-
### MacOsX Limitations
175-
176-
* On MacOsX all arguments (flavors path, output directory, etc.) must point to locations within the current directory (background is that the MacOsX version does not support mount binding additional directories).
177-
178142
## Table of Contents
179143

180144
### Information for Users

doc/changes/changes_1.0.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ t.b.d.
1515
#219: Replaced deprecated bucketfs API by new API
1616
#171: Improved api generate_language_activation
1717
#230: Created new method `deploy` with similar parameters as in python-extension-common
18+
#234: Removed starter scripts

doc/dependencies.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
| Package | Version |
77
|---------|---------|
8-
| poetry | 1.1.11 |
8+
| poetry | 1.8.2 |
9+
| Python | 3.10 |
910

1011
## Runtime Dependencies
1112

0 commit comments

Comments
 (0)