Skip to content

Conversation

Smeds
Copy link
Contributor

@Smeds Smeds commented Feb 21, 2025

Hi!

I’ve been experimenting with running Planemo on the TACC server using SLURM, and I ran into an issue where more complex workflows would fail due to the SQLite database being locked.

Since I don’t have the ability to launch a Docker container for database access on TACC, nor access to an external database, I developed a solution: running a PostgreSQL database within a Singularity container. However, I wanted to avoid manually starting the Singularity container each time. This pull request introduces functionality that allows Planemo to automatically launch a Singularity instance for the PostgreSQL database and stop it once the workflow completes (or fails).

While I’m unsure if this feature will be useful to others, it was extremely helpful during my testing with Planemo.

@bgruening
Copy link
Member

Uh, that is cool! Nice to see planemo used in this way.

@mvdbeek
Copy link
Member

mvdbeek commented Feb 26, 2025

Can you fix the linting failures ?

@Smeds
Copy link
Contributor Author

Smeds commented Feb 26, 2025

Can you fix the linting failures ?

absolutely!

@Smeds Smeds force-pushed the add-postgres_singularity-option branch 3 times, most recently from 1eac873 to 408ba7c Compare February 26, 2025 21:59
@Smeds Smeds force-pushed the add-postgres_singularity-option branch from 408ba7c to 985e237 Compare February 27, 2025 13:44
@Smeds
Copy link
Contributor Author

Smeds commented Feb 27, 2025

@mvdbeek I think I managed to fix the linting errors.

@mvdbeek mvdbeek merged commit ed35920 into galaxyproject:master Mar 5, 2025
9 of 14 checks passed
@mvdbeek
Copy link
Member

mvdbeek commented Mar 5, 2025

Thanks @Smeds!

self.database_user,
self.database_password,
self.database_host,
self.database_port,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Smeds It looks like we never expose the port from the container ... how does this actually work ? In my hands I see the container run and the data directory gets created and all, but then it tries to connect to localhost and fails:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants