Database
Contents
Introduction
Some software require the usage of a database which might be tricky to setup with our firewall and proxy. One solution to avoid this is to simply run the database within the cluster. We do not provide directly a service to get a database, but thanks to Singularity, it is easy to have such setup.
Mongo DB
Here you can see the available images for Mongo DB.
To run an instance, you can use the following command (don't forget to change the source path and the credentials as anyone can connect to your DB if they have the password)
singularity run --mount type=bind,source=tmp,destination=/data/db --env MONGO_INITDB_ROOT_USERNAME=USERNAME --env MONGO_INITDB_ROOT_PASSWORD=PASSWORD docker://mongo:7
MySQL
Here you can see the available images for MySQL.
To run an instance, you can use the following command (don't forget to change the source path and the credentials as anyone can connect to your DB if they have the password)
singularity run --mount type=bind,source=tmp/lib,destination=/var/lib/mysql --mount type=bind,source=tmp/run,destination=/var/run/mysqld/ --env MYSQL_DATABASE=DATABASE --env MYSQL_USER=USERNAME --env MYSQL_PASSWORD=PASSWORD --env MYSQL_ROOT_PASSWORD=PASSWORD2 docker://mysql:8.0-debian
Other
Please feel free to send us a message if you need some help for an other database: cluster-support@id.ethz.ch