Skip to content

Remove web. Rewrite to use openmicroscopy/omero-server #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 23 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,7 @@ OMERO.grid Docker
=================

This is an example of using OMERO on multiple nodes (such as running the Processor service on a separate node from the main OMERO.server), based on
http://www.openmicroscopy.org/site/support/omero5/sysadmins/grid.html#nodes-on-multiple-hosts


Building the images
-------------------

./build.py omero-grid
./build.py omero-grid-web

This will automatically build and tag the images as `openmicroscopy/omero-grid:latest` and `openmicroscopy/omero-grid-web:latest`.
http://www.openmicroscopy.org/site/support/omero/sysadmins/grid.html#nodes-on-multiple-hosts


Running the images
Expand All @@ -23,91 +14,31 @@ To run the Docker images start a postgres DB:

Then either run a single all-in-one master:

docker run -d --name omero-master --link postgres:db -e DBUSER=postgres \
-e DBPASS=postgres -e DBNAME=postgres -p 4063:4063 -p 4064:4064 \
openmicroscopy/omero-grid master
docker run -d --name omero-server --link postgres:db
-e CONFIG_omero_db_user=postgres \
-e CONFIG_omero_db_pass=postgres \
-e CONFIG_omero_db_name=postgres \
-e ROOTPASS=omero-root-password \
-p 4063:4063 -p 4064:4064 \
-e ROOTPASS=omero openmicroscopy/omero-server
-p 4063:4063 -p 4064:4064 \
openmicroscopy/omero-grid-master master

Or run a master and one or more slaves
- the configuration must be provided to the master node
- slave modes must be passed a parameter matching the a slave defined in the master configuration

Or run a master and one or more slaves, the configuration must be provided to the master node.
For example, to run two Processors on separate slaves and all other servers on master:

docker run -d --name omero-master --link postgres:db -e DBUSER=postgres \
-e DBPASS=postgres -e DBNAME=postgres -p 4063:4063 -p 4064:4064 \
openmicroscopy/omero-grid master \
master:Blitz-0,Indexer-0,DropBox,MonitorServer,FileServer,Storm,PixelData-0,Tables-0 \
docker run -d --name omero-server --link postgres:db
...
openmicroscopy/omero-grid-master
master:Blitz-0,Indexer-0,DropBox,MonitorServer,FileServer,Storm,PixelData-0,Tables-0
slave-1:Processor-0 slave-2:Processor-1
docker run -d --name omero-slave-1 --link omero-master:master \
openmicroscopy/omero-grid slave-1
docker run -d --name omero-slave-2 --link omero-master:master \
openmicroscopy/omero-grid slave-2

Finally run the web client:

docker run -d --name omero-web --link omero-master:master -p 8080:8080 \
openmicroscopy/omero-grid-web


Configuration files
-------------------

Additional configuration files for OMERO can be provided by mounting a directory `/config` inside any of the containers.
Files will be loaded with `omero load`.
For example:

docker run -d --link omero-master:master -v /config/master:/config:ro \
openmicroscopy/omero-grid master

The OMERO.web nginx config file will be autogenerated at runtime if `/etc/nginx/conf.d/omero-web.conf` does not exist, so for example you can set a custom prefix in a file under `/config` and the template will be generated correctly.

If you want to manage the full nginx configuration outside Docker than mount `/etc/nginx`.


Default volumes
---------------

- `/home/omero/OMERO.server/var`: The OMERO.server `var` directory, including logs
- `/OMERO`: The OMERO data directory (`omero-grid` only)
- `/home/omero/nginx`: Nginx `var` directory, including logs and cache files (`omero-grid-web` only)


Exposed ports
-------------

- `omero-grid`: 4061, 4063, 4064
- `omero-grid-web`: 8080


Example with named volumes
--------------------------

docker volume create --name omero-db
docker volume create --name omero-data

docker run -d --name postgres -e POSTGRES_PASSWORD=postgres \
-v omero-db:/var/lib/postgresql/data postgres
docker run -d --name omero-master --link postgres:db -e DBUSER=postgres \
-e DBPASS=postgres -e DBNAME=postgres -v omero-data:/OMERO \
-p 4063:4063 -p 4064:4064 openmicroscopy/omero-grid master
docker run -d --name omero-web --link omero-master:master -p 8080:8080 \
openmicroscopy/omero-grid-web


Running without links
---------------------

As an alternative to running with `--link` the addresses of the database and master can be specified using the variables `DBHOST` and `MASTER_ADDR`.
This may be useful when running containers across multiple hosts.
For example:

docker run -d -e DBHOST=10.0.1.1 openmicroscopy/omero-grid master
docker run -d -e MASTER_ADDR=10.0.2.1 openmicroscopy/omero-grid-web


Custom OMERO builds
-------------------

These images default to using the latest release build of OMERO.
You can override the version/branch, and/or the continuous integration server, see `./build.py --help` for details.
docker run -d --name omero-slave-1 --link omero-server:master
openmicroscopy/omero-grid-slave slave-1
docker run -d --name omero-slave-2 --link omero-server:master
openmicroscopy/omero-grid-slave slave-2

The images will be tagged (`<user>/<image>:<tag>`) with a different user (based on the CI server if not the default) and tag (the release version or branch name) to indicate they are using a non-standard version of OMERO.

In addition `omego` args can also be passed, if this is done the image name will be prefixed with `x-`.
See the parent [openmicroscopy/omero-server README.md](https://github.com/openmicroscopy/omero-server-docker/blob/master/README.md) for additional information.
63 changes: 0 additions & 63 deletions build.py

This file was deleted.

13 changes: 13 additions & 0 deletions master/70-grid-xml.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -eu

omero=/opt/omero/server/OMERO.server/bin/omero
cd /opt/omero/server

# Args are the servers to run, default (no args) is to run all
./process_defaultxml.py OMERO.server/etc/templates/grid/default.xml.orig \
"$@" > OMERO.server/etc/templates/grid/default.xml

MASTER_IP=$(hostname -i)
$omero config set omero.master.host "$MASTER_IP"
15 changes: 15 additions & 0 deletions master/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TODO: Switch to openmicroscopy/omero-server when it's merged
FROM test-omero-server
MAINTAINER [email protected]

USER root
ADD process_defaultxml.py /opt/omero/server/
ADD 70-grid-xml.sh /startup/

USER omero-server

# default.xml may be modified at runtime for a multinode configuration
RUN cp /opt/omero/server/OMERO.server/etc/templates/grid/default.xml /opt/omero/server/OMERO.server/etc/templates/grid/default.xml.orig

# TODO: Don't expose 4061 (internal links only)
EXPOSE 4061 4063 4064
File renamed without changes.
57 changes: 0 additions & 57 deletions omero-grid-web/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions omero-grid-web/omero-grid-web-deps.yml

This file was deleted.

19 changes: 0 additions & 19 deletions omero-grid-web/requirements.yml

This file was deleted.

40 changes: 0 additions & 40 deletions omero-grid-web/run.sh

This file was deleted.

44 changes: 0 additions & 44 deletions omero-grid/Dockerfile

This file was deleted.

Loading