Skip to content

Docker and SSH Tunnels

Felix Gabler edited this page Jun 23, 2019 · 15 revisions

At the moment there are three possible ways to work from outside the MPI.

Docker (does not always work 100%)

Our docker containers are supposed to allow for a comfortable way of working remotely.
Currently only KAlign, Clustal Omega and PSIBlast are available inside the containers (but no database yet).
There are basically two ways how to run our containers.

Production

  • run docker-compose up from inside the root folder to launch all container with logging available from each of them.

Development

During development, it makes sense to run frontend and backend in different shells. This way it won't be necessary to restart all containers on failure.
Backend container with sbt shell:

  • run docker-compose run --service-ports backend from inside the root folder. This will launch the backend and the database containers with a sbt shell opened on the backend container. You will only be able to see logging from the backend.
  • on the sbt shell use 'run 1234' to start the toolkit.

To start the frontend with bash access:

  • run docker-compose run --service-ports frontend from inside the root folder
  • on the bash run 'yarn install' to install necessary frontend dependencies.
  • on the bash run 'yarn run serve' to start the frontend.

Working via ssh tunnel

If you have CGW access to the MPI servers, you can tunnel via ssh.

e.g.

ssh -fN -L 5556:olt.eb.local:22 -L 7500:olt.eb.local:7500 snam@cgw.tuebingen.mpg.de

where 5556 is a custom binding to map 22 to a local port and 7500 is the port on which the toolkit instance runs (for the new frontend, you also have to forward the corresponding port).

If you work with IntelliJ IDEA, you can set it up to automatically upload your changes to a remote server via SFTP (Tools -> Deployment). This way you can edit files on your local machine but also test your changes live on the MPI servers.

Working with local mongodb instance

Set the MONGODB_URI environment variable before running the toolkit, or you can use the application-ext.conf to set mongodb.uri.

e.g. "mongodb://localhost:27017/tkplay_dev"

You also need to download a file from http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz

and set MAXMIND_DB environment variable to its path

e.g. "/home/zin/GeoLite2-City.mmdb"

Clone this wiki locally