diff --git a/README.md b/README.md index 63cb149..0a77902 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,30 @@ -# Galaxy Show and Tell +# MCFE Galaxy -This repository serves as an example for RSEs to self host Galaxy. The repository contains a `docker-compose.yml` file that can be used to start a Galaxy instance with a few tools pre-installed. +## Triggering events -Some guides are given below to help you get started! +Randall includes services which listen for events on a MQTT broker. +These events cause further events to be triggered which may include: +- updating the metadata in Fuseki +- running workflows on Galaxy -If you are interested in some context for this repo some slides [are available](https://uomresearchit.github.io/Galaxy-Show-And-Tell/). +To see an example of this in action you can run the following command: -## Tutorials +```bash +mosquitto_pub -u {{YOUR_USER}} -P {{YOUR_PASS}} -t '/parameter/update/01234' -m '{"MajorRadius": "8.5"} +``` -[Tutorial: From bootstrap to workflows! Getting started with Galaxy](docs/getting-started.md) +If you want to see the logs of the Crater service, you can do so by running: -## How to guides +```bash +mosquitto_sub -u {{YOUR_USER}} -P {{YOUR_PASS}} -t '/#' -v +``` -[How to: Add tools to your Galaxy](docs/add-tools.md) +## Useful web interfaces -[How to: Add public workflows your Galaxy](docs/add-workflows.md) - -## Useful resources - -The best introductions to Galaxy are given by the Galaxy project itself. You may choose to start your Galaxy journey by reading the following: -[Introduction to Galaxy Analyses](https://training.galaxyproject.org/training-material/topics/introduction/) - -If you are an RSE looking to develop tooling for Galaxy then generic documentation can be found at: [Developing Galaxy Tools](https://training.galaxyproject.org/training-material/topics/dev/#st-tooldev) - -You could also explore the Galaxy training material for coaching Galaxy administrators, however, this is not necessary to get started and the techniques may not necessarily apply to a self-hosted instance (the Galaxy Training Network assume deployment through Ansible, we use Docker Compose). -https://training.galaxyproject.org/training-material/topics/admin/ - -## Technical reference - -The `.env` file is self documented via the `env.template` file. +Randall is made of serveral tools which provide web interfaces. These include: +- Fuseki: http://fuseki.localhost (default username: `admin`, default password: `admin`) + * This is a triplestore which stores the metadata +- Galaxy: http://galaxy.localhost (username and password from .env file) + * This is a workflow manager which runs workflows +- Traefik: http://localhost:8888 (no authentication) + * This is a reverse proxy which routes traffic to the appropriate service diff --git a/docker-compose.yml b/compose.yaml similarity index 91% rename from docker-compose.yml rename to compose.yaml index 1f6803e..5593228 100644 --- a/docker-compose.yml +++ b/compose.yaml @@ -26,10 +26,11 @@ services: USER root RUN apt update && apt -y install docker.io USER galaxy - COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + COPY --from=ghcr.io/astral-sh/uv:0.8.15 /uv /uvx /bin/ ENV HOME=/tmp ENV UV_CACHE=/tmp/uv_cache - RUN uv add boto3 + RUN sed -i '/wheels.galaxyproject.org/d' pyproject.toml + RUN uv add boto3 --index https://pypi.org/simple restart: unless-stopped group_add: - ${DOCKER_GID} @@ -49,8 +50,9 @@ services: - ./galaxy/tusd:/usr/local/sbin/tusd # Populate the instance - ./galaxy/tools:/galaxy/server/tools/ + - ./galaxy/lib/mcfe_datatypes.py:/galaxy/server/lib/galaxy/datatypes/mcfe_datatypes.py # Add custom configuration files - - ./galaxy/config/tool_conf.xml:/galaxy/server/config/tool_conf.xml.sample + - ./galaxy/config/tool_conf.xml:/galaxy/server/config/tool_conf.xml - ./galaxy/config/datatypes_conf.xml:/galaxy/server/config/datatypes_conf.xml # Provide docker-in-docker - /var/run/docker.sock:/var/run/docker.sock:ro @@ -86,11 +88,13 @@ services: build: context: . dockerfile_inline: | - FROM alpine:3.22 - RUN apk update && apk add gettext bash + FROM ubuntu:22.04 + RUN apt update && apt install -y gettext COPY ./galaxy/init/template.sh /template.sh container_name: ${PROJECT_NAME}-galaxy-template-eval env_file: .env + environment: + REPO_PATH: ${PWD} volumes: - ./galaxy/config/:/work - galaxy-store:/galaxy/server/ @@ -146,7 +150,6 @@ services: minio: condition: service_healthy volumes: - - ./minio/init/bootstrap.sh:/bootstrap.sh - ./minio/data:/data:ro networks: - galaxy diff --git a/env.template b/env.template index f3d4597..0f4c78d 100644 --- a/env.template +++ b/env.template @@ -6,9 +6,6 @@ # ------------------------------------------------------------------------------ # Parameters to configure the Galaxy instance -# The path to this repo -REPO_PATH=/home/owool/Projects/2025/RSE-Galaxy - # The group ID of the docker group on the host machine, to allow the Galaxy # container to access the docker socket. @@ -23,7 +20,8 @@ GALAXY_ADMIN_PASS={{adminadmin}} GALAXY_API_KEY={{iamanadminyouknow}} # Galaxy config -GALAXY_VERSION=25.0.2 +GALAXY_VERSION={{25.0.2}} +GALAXY_URL={{https://mygalaxy.org}} # ------------------------------------------------------------------------------ # General configuration parameters diff --git a/galaxy/config/datatypes_conf.xml b/galaxy/config/datatypes_conf.xml index 20fc503..65cadfe 100644 --- a/galaxy/config/datatypes_conf.xml +++ b/galaxy/config/datatypes_conf.xml @@ -694,6 +694,10 @@ + + + + diff --git a/galaxy/config/galaxy.yml.template b/galaxy/config/galaxy.yml.template index b049069..da96a3c 100644 --- a/galaxy/config/galaxy.yml.template +++ b/galaxy/config/galaxy.yml.template @@ -2,17 +2,16 @@ gravity: gunicorn: bind: 0.0.0.0:8080 workers: 2 - extra_ars: '--forwarded-allow-ips="*"' + extra_args: '--forwarded-allow-ips="*"' preload: true celery: concurrency: 2 loglevel: WARNING tusd: enable: true - host: 0.0.0.0 - port: 1080 tusd_path: /usr/local/sbin/tusd upload_dir: /galaxy/server/data/tus/ + extra_args: '-verbose' # handlers: # handler: # processes: 2 @@ -28,12 +27,15 @@ gravity: galaxy: # Main config - admin_users: - - admin@example.org + admin_users: admin@example.org bootstrap_admin_api_key: '$GALAXY_API_KEY' id_secret: 'morestufftoreplace' log_level: WARNING + # Use remote users + use_remote_user: true + remote_user_maildomain: example.org + # Watch file changes watch_tools: 'true' watch_job_rules: 'true' @@ -61,7 +63,7 @@ galaxy: new_user_dataset_access_role_default_private: true # TUS - galaxy_infrastructure_url: "http://localhost:8080" + galaxy_infrastructure_url: "$GALAXY_URL" tus_upload_store: /galaxy/server/data/tus/ # SQL Performance @@ -75,7 +77,6 @@ galaxy: retry_job_output_collection: 3 # Debugging - cleanup_job: onsuccess allow_user_impersonation: true # Object Store @@ -117,7 +118,7 @@ galaxy: shed_data_manager_config_file: /galaxy/server/config/shed_data_manager_conf.xml shed_tool_config_file: /galaxy/server/config/shed_tool_conf.xml shed_tool_data_table_config: /galaxy/server/config/shed_tool_data_table_conf.xml - tool_config_file: /galaxy/server/config/tool_conf.xml.sample + tool_config_file: /galaxy/server/config/tool_conf.xml job_config_file: /galaxy/server/config/job_conf.xml tool_data_path: /galaxy/server/database/tool_data tool_data_table_config_path: /galaxy/server/config/tool_data_table_conf.xml.sample diff --git a/galaxy/config/job_conf.xml.template b/galaxy/config/job_conf.xml.template index 0a76d4e..1ce78b7 100644 --- a/galaxy/config/job_conf.xml.template +++ b/galaxy/config/job_conf.xml.template @@ -20,11 +20,16 @@ true - galaxy-store:/galaxy/server - true + galaxy-store:/galaxy/server,$REPO_PATH/galaxy/tools:/galaxy/server/tools + false + 0 true + --entrypoint '' --env PATH=/opt/openmpi/bin:/opt/rh/gcc-toolset-12/root/usr/bin:$PATH + + + diff --git a/galaxy/config/tool_conf.xml b/galaxy/config/tool_conf.xml index 7b891d5..e2429dc 100644 --- a/galaxy/config/tool_conf.xml +++ b/galaxy/config/tool_conf.xml @@ -60,4 +60,80 @@