forked from ome/docker-example-omero-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
omero-grid now builds separate master and slave images only
This is based on ome/omero-server-docker#1
- Loading branch information
Showing
11 changed files
with
124 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
TARGET="${1}" | ||
if [ -z "$TARGET" ]; then | ||
echo "ERROR: Slave-name required" | ||
exit 2 | ||
fi | ||
|
||
omero=/opt/omero/server/OMERO.server/bin/omero | ||
cd /opt/omero/server | ||
|
||
CONFIG_omero_master_host=${CONFIG_omero_master_host:-} | ||
if [ -n "$CONFIG_omero_master_host" ]; then | ||
MASTER_ADDR="$CONFIG_omero_master_host" | ||
else | ||
MASTER_ADDR=master | ||
$omero config set omero.master.host "$MASTER_ADDR" | ||
fi | ||
|
||
SLAVE_ADDR=$(hostname -i) | ||
|
||
# Is this needed on a slave? | ||
#if stat -t /config/* > /dev/null 2>&1; then | ||
# for f in /config/*; do | ||
# echo "Loading $f" | ||
# $omero load "$f" | ||
# done | ||
#fi | ||
|
||
echo "Master addr: $MASTER_ADDR Slave addr: $SLAVE_ADDR" | ||
sed -e "s/@omero.slave.host@/$SLAVE_ADDR/" -e "s/@slave.name@/$TARGET/" \ | ||
slave.cfg > OMERO.server/etc/$TARGET.cfg | ||
grep '^Ice.Default.Router=' OMERO.server/etc/ice.config || \ | ||
echo Ice.Default.Router= >> OMERO.server/etc/ice.config | ||
sed -i -r "s|^(Ice.Default.Router=).*|\1OMERO.Glacier2/router:tcp -p 4063 -h $MASTER_ADDR|" \ | ||
OMERO.server/etc/ice.config | ||
|
||
echo "Starting node $TARGET" | ||
exec $omero node $TARGET start --foreground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 slave.cfg /opt/omero/server/ | ||
# Don't configure database in a slave | ||
RUN rm /startup/60-database.sh | ||
# Replace existing 99-run.sh | ||
ADD 99-run.sh /startup/ | ||
|
||
USER omero-server | ||
|
||
# TODO: Not needed? | ||
EXPOSE 4063 4064 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters