Connecting Oxla to MinIO
This guide provides step-by-step instructions on how to connect MinIO Single-Node Single-Drive setup to an Oxla database using a Docker container.
Starting MinIO Service
If MinIO is not installed on your machine, you can download and install it by referring to the instructions provided in the MinIO Single-Node Single-Drive documentation.
Once that is done, you can start the MinIO service by running this command:
Accessing MinIO console
To access the MinIO console, navigate to the localhost:9001 URL in your web browser. Once there, use your MinIO credentials to log in.
Creating Access Keys
After logging into the MinIO console, navigate to the Access Keys > Create access key tab. Here, you have the option to either let MinIO auto-generate access and secret keys or specify custom values yourself. Once you’ve entered all the necessary details, proceed by clicking the Create button to save the changes. It’s crucial to save the generated credentials for later use.
Creating a Bucket
In the MinIO console, click Buckets > Create Bucket tab. Next, provide a unique name for your bucket, such as “oxla-bucket” and then click the Create button to finalize the creation of your new bucket.
Ensure that the object storage bucket directory is either completely empty or contains only files in the Oxla format.
Running Oxla Docker Container
- Open your terminal
- Pull and run the Oxla Docker container using the following command:
Replace the following placeholders with your actual values:
MINIO_BUCKET_NAME
: desired name for your bucket (e.g. “oxla-bucket/sample”)MINIO_ACCESS_KEY
: your MinIO access keyMINIO_SECRET_KEY
: your MinIO secret key
Example
Let’s assume that you want to create a “film” table in your Oxla database that stores metadata about films in a MinIO bucket. To query this table, you can use the psql
application, but first you’ll need to go through Oxla’s access control:
For the needs of this section, we’re going to use a simplified version of the film
table from the Pagila database, containing only the title
, length
and rating
columns. The complete schema for the film
table can be found on the Pagila database website.
Running the query above will return all rows from your film
table that are stored in your MinIO bucket:
Additional Resources
For more information on Oxla’s environment variables check out the Configuration file section.