a week ago
In this tutorial we are going to show you how to create a BucketFS and Buckets inside it for Exasol on Docker.
In this section, we will show you the whole process of:
$ docker exec -it <your_exasol_container_name> /bin/bash
You can find the container's name by running docker ps. Once inside the container run the following command to create a BucketFS:
$ exaconf add-bucketfs --name newbucketfs* --http-port 6932** --https-port 0*** --owner 500:500
This will create the BucketFS config required in the /exa/etc/EXAConf file.
Once the BucketFS is created run the following command to create the bucket inside the aforementioned BucketFS:
$ exaconf add-bucket --name newbucketfs-bucket* --bfs-name newbucketfs** --read-passwd $(echo -n "newread"*** | base64) --write-passwd $(echo -n "newwrite"**** | base64)
Once the bucket is created, open the /exa/etc/EXAConf file and check if you can see the newly added BucketFS/Bucket there:
$ cat /exa/etc/EXAConf
Output should be similar to:
Go to the Security Group that you used while deploying the Docker node and add the port that you used for the new BucketFS:
1 - Go to the Secuirty Group and edit the inbound rules
2 - When in the security group rules' configuration press Add Rule
3 - Select Custom TCP add the port number and the source address
4 - Save the changes
If you are using an other cloud provider please check their documentation on how to open ports for services.
Once the changes are done, run the following command inside the container:
$ sed -i '/Checksum =/c\ Checksum = COMMIT' /exa/etc/EXAConf
Once that is done, run the following command:
$ exaconf commit
Once the commit is done your new bucket should be available via the curl command.
To upload a file via curl use:
$ curl -X PUT -T testfile.jar http://w:newwrite@<docker_host_ip>:6932/newbucketfs-bucket/testfile.jar
To delete a file via curl use:
$ curl -X DELETE http://w:firstname.lastname@example.org:6932/newbucketfs-bucket/testfile.jar
To list the contents of the bucket:
$ curl http://r:newread@<docker_host_ip>:6932/newbucketfs-bucket/
Once you've done this you'll need to connect to it using Sql:
Create Or Replace Connection BUCKET_NEWBUCKETFS To 'bucketfs:newbucketfs/newbucketfs-bucket' Identified By 'newread'
If other users need access to the bucket, then you'll need to grant them permissions with
Grant Connection BUCKET_NEWBUCKETFS To user_name
Then it's time to become part of a unique family! Discover helpful tips and support other Community members with your knowledge.