Mesa logs service
Josiah Schwab, Philip Mocz, Kali McLennan (2024)
A Python Flask app (served with Gunicorn, with Docker image deployed on Flatiron Kubernetes) to upload and serve Mesa logs at:
https://logs.mesastar.org//<computer_name>/<test_case>/
- Clone this repo
- Create a file named .env in the src directory with contents:
FLASK_APP=uploads.py
API_KEYS='{comma separated list of keys generated with scripts/generate_api_key.sh}'
MESALOGS_TEST_API_KEY='{development API key generated with scripts/generate_api_key.sh}'
SECRET_KEY='{A long string to be used for hashing of API keys during authentication testing}'
Install requirements
pip install -r src/requirements.txt
Serve the Flask App with gunicorn
cd src && ../files/scripts/./run.sh
Go to: http://localhost:8000
Build with:
podman build -t mesa-logs .
Create a data volume with:
podman volume create mesa-logs-data
Run with:
podman run --replace --name mesa-logs --volume mesa-logs-data:/var/www/mesa-logs/uploads -p 8000:8000 localhost/mesa-logs:latest
Build with:
docker build -t mesa-logs .
Create a data volume with:
docker volume create mesa-logs-data
Run with:
docker run --replace --name mesa-logs --volume mesa-logs-data:/var/www/mesa-logs/uploads -p 8000:8000 mesa-logs:latest
docker build -t mesa-logs --platform=linux/arm64/v8,linux/amd64 .
docker tag mesa-logs pmocz/mesa-logs:v1
docker push pmocz/mesa-logs:v1
Make sure not to publish any secrets!