updated to buckete.minio.store virtual host style

This commit is contained in:
Michael Hohn
2025-03-26 09:01:27 -07:00
committed by =Michael Hohn
parent 3ca2fa62fd
commit 8fd6e25bac
7 changed files with 28 additions and 215 deletions

View File

@@ -2,11 +2,15 @@ MRVA_RABBITMQ_HOST=rabbitmq
MRVA_RABBITMQ_PORT=5672
MRVA_RABBITMQ_USER=user
MRVA_RABBITMQ_PASSWORD=password
MINIO_DOMAIN=minio.store
MINIO_ROOT_USER=user
MINIO_ROOT_PASSWORD=mmusty8432
ARTIFACT_MINIO_ENDPOINT=artifactstore:9000
# ARTIFACT_MINIO_ENDPOINT=artifactstore:9000
ARTIFACT_MINIO_ENDPOINT=minio.store:9000
ARTIFACT_MINIO_ID=${MINIO_ROOT_USER}
ARTIFACT_MINIO_SECRET=${MINIO_ROOT_PASSWORD}
QLDB_MINIO_ENDPOINT=dbstore:9000
# QLDB_MINIO_ENDPOINT=dbstore:9000
QLDB_MINIO_ENDPOINT=minio.store:9000
QLDB_MINIO_ID=${MINIO_ROOT_USER}
QLDB_MINIO_SECRET=${MINIO_ROOT_PASSWORD}

View File

@@ -481,15 +481,15 @@ grep 'docker tag' containers/*/*.org containers/*/Makefile
curl -LsSf https://astral.sh/uv/install.sh | sh
uv self update
# set up mrva-env
# set up mrva-env on mac
cd ~/work-gh/mrva/mrva-docker
uv venv mrva-env
uv venv mrva-env-mac
# activate mrva-env
source mrva-env/bin/activate
source mrva-env-mac/bin/activate
# link scripts (lazy 'install')
cd mrva-env/bin/
cd mrva-env-mac/bin/
ln -s ../../bin/* .
#+END_SRC

View File

@@ -1,86 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from plumbum import cli, local
from plumbum.cmd import find, mkdir, unzip, rm, cd
# Logging function
def log(level, message):
colors = {
"INFO": "\033[1;34m",
"WARN": "\033[1;33m",
"ERROR": "\033[1;31m",
"RESET": "\033[0m",
}
print(f"{colors[level]}[{level}] {message}{colors['RESET']}", file=sys.stderr)
# Expand environment variables in paths
def expand_path(path):
return local.env.expand(path)
# Process a single zip file
def process_zip_file(zip_path, output_base_dir):
zip_name = local.path(zip_path).stem # Remove .zip extension
output_dir = local.path(output_base_dir) / zip_name
mkdir("-p", output_dir)
try:
log("INFO", f"Processing {zip_path}")
# Extract file list to find src.zip
file_list = unzip("-l", zip_path).splitlines()
src_zip_entry = \
next((line.split()[-1]
for line in file_list if line.endswith("src.zip")), None)
if not src_zip_entry:
log("WARN", f"No src.zip found in {zip_path}")
return
# Extract src.zip to memory and write to output directory
log("INFO", f"{zip_path=} {src_zip_entry=} {output_dir=}")
unzip(zip_path, src_zip_entry, "-d", str(output_dir))
log("INFO", f"Extracted src.zip to {output_dir}")
except Exception as e:
log("ERROR", f"Error processing {zip_path}: {e}")
finally:
rm("-rf", output_dir / "__MACOSX") # Cleanup if macOS metadata exists
# Main application class
class Extractor(cli.Application):
"""
Extracts src.zip from zip archives and places them into named directories.
"""
output_base_dir = cli.SwitchAttr(
"--output_base_dir", str, mandatory=True,
help="Specify the directory where extracted src.zip files should be stored"
)
starting_path = cli.SwitchAttr(
"--starting_path", str, mandatory=True, help="Specify the directory containing zip files"
)
def main(self):
output_base_dir = expand_path(self.output_base_dir)
starting_path = expand_path(self.starting_path)
mkdir("-p", output_base_dir)
log("INFO", f"Searching for zip files in {starting_path}")
zip_files = find(starting_path, "-type", "f", "-name", "*.zip").splitlines()
if not zip_files:
log("WARN", "No zip files found in the specified directory.")
return
for zip_path in zip_files:
process_zip_file(zip_path, output_base_dir)
log("INFO", "Processing completed.")
if __name__ == "__main__":
Extractor.run()

View File

@@ -1,5 +1,7 @@
* server image setup
- build container
XX: use
: make all
#+BEGIN_SRC sh
# Build the container via
cd ~/work-gh/mrva/mrva-docker/containers/server/

View File

@@ -1,5 +1,5 @@
library: false
name: codeql-dataflow-ii-cpp
name: mrva-qldemo-cpp
version: 0.0.1
dependencies:
codeql/cpp-all: 0.5.3

View File

@@ -3,8 +3,6 @@ services:
# ./containers/dbsdata/Dockerfile
image: ghcr.io/hohn/dbsdata-container:0.1.24
command: tail -f /dev/null # Keep the container running
# volumes:
# - /qldb # Directory inside the container that contains the data
volumes:
- dbsdata:/data
container_name: mrva-dbssvc
@@ -12,26 +10,30 @@ services:
networks:
- backend
dbstore:
mrvastore:
image: minio/minio:RELEASE.2024-06-11T03-13-30Z
container_name: mrva-dbstore
hostname: dbstore
container_name: mrvastore
hostname: mrvastore
ports:
- "9000:9000"
- "9001:9001"
env_file:
- path: .env.container
required: true
command: server /data/mrvacommander/dbstore-data --console-address ":9001"
command: server /data/mrvacommander/mrvastore-data --console-address ":9001"
depends_on:
- dbssvc
# volumes_from:
# - dbsdata # Use the volumes from dbsdata container
volumes:
- dbsdata:/data/mrvacommander/dbstore-data
- dbsdata:/data/mrvacommander/mrvastore-data
networks:
- backend
backend:
aliases:
- minio.store
- mrvabucket.minio.store
- packs.minio.store
- qldb.minio.store
- results.minio.store
client-ghmrva:
# ./containers/ghmrva/Dockerfile
container_name: mrva-ghmrva
@@ -93,8 +95,7 @@ services:
stop_grace_period: 1s
depends_on:
- rabbitmq
- dbstore
- artifactstore
- mrvastore
env_file:
- path: ./.env.container
required: true
@@ -106,24 +107,6 @@ services:
networks:
- backend
artifactstore:
image: minio/minio:RELEASE.2024-06-11T03-13-30Z
container_name: mrva-artifactstore
hostname: artifactstore
ports:
- "19000:9000" # host:container
- "19001:9001"
env_file:
- path: ./.env.container
required: true
command: server /data --console-address ":9001"
volumes:
# The artifactstore is only populated at runtime so there is no need
# for Docker storage; a directory is fine.
- ./qpstore-data:/data
networks:
- backend
agent:
# ./containers/agent/Dockerfile
image: ghcr.io/hohn/mrva-agent:0.1.24
@@ -132,8 +115,7 @@ services:
hostname: agent
depends_on:
- rabbitmq
- dbstore
- artifactstore
- mrvastore
env_file:
- path: ./.env.container
required: true

View File

@@ -1,89 +0,0 @@
services:
rabbitmq:
image: rabbitmq:3-management
hostname: rabbitmq
container_name: rabbitmq
volumes:
- ./init/rabbitmq/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf:ro
- ./init/rabbitmq/definitions.json:/etc/rabbitmq/definitions.json:ro
ports:
- "5672:5672"
- "15672:15672"
networks:
- backend
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 30s
timeout: 30s
retries: 10
server:
build:
context: .
dockerfile: ./cmd/server/Dockerfile
command: [ '--mode=container', '--loglevel=debug' ]
container_name: server
stop_grace_period: 1s
ports:
# - "8081:8080" # host:container for proxy
- "8080:8080" # host:container
depends_on:
- rabbitmq
- dbstore
- artifactstore
networks:
- backend
env_file:
- path: ./.env.container
required: true
dbstore:
image: minio/minio:RELEASE.2024-06-11T03-13-30Z
container_name: dbstore
ports:
- "9000:9000"
- "9001:9001"
env_file:
- path: .env.container
required: true
command: server /data --console-address ":9001"
volumes:
- ./dbstore-data:/data
networks:
- backend
artifactstore:
image: minio/minio:RELEASE.2024-06-11T03-13-30Z
container_name: artifactstore
ports:
- "19000:9000" # host:container
- "19001:9001"
env_file:
- path: ./.env.container
required: true
command: server /data --console-address ":9001"
volumes:
- ./qpstore-data:/data
networks:
- backend
agent:
build:
context: .
dockerfile: ./cmd/agent/Dockerfile
command: [ '--loglevel=debug' ]
container_name: agent
depends_on:
- rabbitmq
- dbstore
- artifactstore
env_file:
- path: ./.env.container
required: true
networks:
- backend
networks:
backend:
driver: bridge