From 9270230f08658b68a8db127f85bd6939e81a0793 Mon Sep 17 00:00:00 2001 From: Michael Hohn Date: Thu, 13 Jun 2024 18:21:14 -0700 Subject: [PATCH] Set up separate minio container for query pack storage --- .gitignore | 1 + README.md | 15 ++++++++++++-- docker-compose.yml | 15 ++++++++++++++ populate-qldb-store.sh => populate-dbstore.sh | 0 populate-qpstore.sh | 20 +++++++++++++++++++ 5 files changed, 49 insertions(+), 2 deletions(-) rename populate-qldb-store.sh => populate-dbstore.sh (100%) create mode 100644 populate-qpstore.sh diff --git a/.gitignore b/.gitignore index 965545b..d93ef43 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ cmd/server/var/ cmd/server/server # host storage for container +qpstore-data/ dbstore-data/ postgres-data/ diff --git a/README.md b/README.md index 489e353..64877f7 100644 --- a/README.md +++ b/README.md @@ -159,7 +159,7 @@ The steps: -------+--------- foo | foo/bar -### Use the minio ql db +### Use the minio ql database db 1. Web access via @@ -173,4 +173,15 @@ The steps: 1. The names use `owner_repo` format for now, e.g. `google_flatbuffers_db.zip`. TODO This will be enhanced to include other data later - \ No newline at end of file +### Use the minio query pack db + +1. Web access via + + open http://localhost:19001/login + + username / password are in `docker-compose.yml` for now. The ql db listing + will be at + + http://localhost:19001/browser/qpstore + + diff --git a/docker-compose.yml b/docker-compose.yml index 392c4f9..9b8aebd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,6 +64,21 @@ services: volumes: - ./dbstore-data:/data + + qpstore: + image: minio/minio:RELEASE.2024-06-11T03-13-30Z + container_name: qpstore + ports: + - "19000:9000" # host:container + - "19001:9001" + environment: + MINIO_ROOT_USER: user + MINIO_ROOT_PASSWORD: mmusty8432 + + command: server /data --console-address ":9001" + volumes: + - ./qpstore-data:/data + # Remove named volumes to use bind mounts # volumes: # minio-data: diff --git a/populate-qldb-store.sh b/populate-dbstore.sh similarity index 100% rename from populate-qldb-store.sh rename to populate-dbstore.sh diff --git a/populate-qpstore.sh b/populate-qpstore.sh new file mode 100644 index 0000000..136bf08 --- /dev/null +++ b/populate-qpstore.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Configuration +MINIO_ALIAS="qpstore" +MINIO_URL="http://localhost:19000" +MINIO_ROOT_USER="user" +MINIO_ROOT_PASSWORD="mmusty8432" +BUCKET_NAME="qpstore" + +# Check for MinIO client +if ! command -v mc &> /dev/null +then + echo "MinIO client (mc) not found. " +fi + +# Configure MinIO client +mc alias set $MINIO_ALIAS $MINIO_URL $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD + +# Create ql db bucket +mc mb $MINIO_ALIAS/$BUCKET_NAME