exasol / bucketfs-python

BucketFS utilities for the Python programming language
https://exasol.github.io/bucketfs-python
MIT License
1 stars 1 forks source link

Add minimal CLI #33

Closed ckunki closed 1 year ago

ckunki commented 1 year ago

In the past numerous attempts have been made to mitigate interaction with Exasol's BucketFS:

function bucketfs-password() {
    if [ -z "$1" ]; then
       echo "usage: bucketfs-password <container>"
       return 1
    fi
    BUCKETFS_PASSWORD=$(
    docker exec -it $1 \
           grep WritePass /exa/etc/EXAConf \
        | sed -e "s/.* = //" \
        | tr -d '\r' \
        | base64 -d)
}

function bucketfs-upload() {
    if [ -z "$1" ]; then
       echo "usage: bucketfs-upload <file> [path/in/bucket-fs]"
       return 1
    fi
    if [ -z "$BUCKETFS_PASSWORD" ]; then
       echo "Please set environment variable BUCKETFS_PASSWORD"
       return 1
    fi
    A=2580 # port
    B=$(echo default/$2 | sed -e 's/\/$//') # path
    curl -v -X PUT -T $1 http://w:$BUCKETFS_PASSWORD@localhost:$A/$B/$1
}

Still users struggle and need help from time to time. The current ticket therefore requests to create a minimal CLI solution

In summary bucketfs-python seems to be the best candidate. It is used anyway for test automation of various python projects. Currently issue #4 requires to enhance bucketfs-python to list the contents of a folder in BucketFS which could be another building block in order to provide a minimal CLI with very limited effort.

ckunki commented 1 year ago

Closed in favor of https://github.com/exasol/bucketfs-client/issues/13