-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add setup command for testing external apps #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Do you know if you could have accomplished what you wanted using test-data
, e.g.
- https://github.com/ome/rOMERO-gateway/blob/master/.omeroci/test-data
- https://github.com/openmicroscopy/omero-test-infra/blob/master/docker#L197
i.e. could prometheus tools follow the "lib" pattern?
Perhaps relatedly, I had a similar need recently and scratched it with:
commit 785a74261592853671e86e7874052f06ad0cbaef
Author: jmoore <josh@glencoesoftware.com>
Date: Wed Aug 15 10:41:00 2018 +0100
Add srvup and srvdown
diff --git a/docker b/docker
index c7a5f8b..23a43f6 100755
--- a/docker
+++ b/docker
@@ -42,7 +42,7 @@ fi
$VERBOSE
start_up() {
- $ACTION .omero/compose up -d --force-recreate "$@"
+ $ACTION .omero/compose up -d --build --force-recreate "$@"
if [ "$NOCLEAN" != "true" ]; then
clean_up() {
$ACTION .omero/compose down -v
@@ -213,6 +213,28 @@ for STAGE in $STAGES; do
run py update
run --user scripts build
;;
+ srvup)
+ export COMPONENT=server
+ export USER=omero-server
+ export CID="$PROJECT"_omero_1
+ export COMPOSE_FILE=${COMPOSE_FILE:-"srv-compose.yml"}
+ export OMERO_DIST="/opt/omero/server/OMERO.server"
+ export TARGET=/src
+ export NOCLEAN=true
+ start_up
+ install --nosrc
+ run py common
+ ;;
+ srvdown)
+ export COMPONENT=server
+ export USER=omero-server
+ export CID="$PROJECT"_omero_1
+ export COMPOSE_FILE=${COMPOSE_FILE:-"srv-compose.yml"}
+ export OMERO_DIST="/opt/omero/server/OMERO.server"
+ export TARGET=/src
+ export NOCLEAN=true
+ $ACTION .omero/compose down -v
+ ;;
srv)
export COMPONENT=server
export USER=omero-server
but that's more generally the testing of ../Dockerfile
(which is slow).
@@ -45,6 +45,8 @@ recommended to use | |||
where NAME is `app`, `cli`, `lib` or `scripts`. The special `srv` | |||
command will build the parent directory as a replacement for the | |||
OMERO.server container. | |||
The `setup` command can be used to setup a server for testing external applications using your own scripts. | |||
For example, run `NOCLEAN=true OMERO_SERVER_SSL=4064: .omero/docker setup` and connect to `localhost:4064`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd include the NOCLEAN=true
in the the stage itself.
start_up | ||
install | ||
wait_on_login | ||
run --user omero init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really match the rest of the naming structure. Moving this discussion to the review comment, but if srv
is the testing of ../Dockerfile
I'd be interested in a prefix other than omero-*
that could represent this stage.
No longer needed: ome/omero-prometheus-tools#4 (comment) (though more docs for this repo would be helpful) |
👍 for collecting each of the external uses into a "Usage:" section of the README. |
When testing external clients it is useful to have an OMERO server without having to integrate the full test process into omero-test-infra.
See for example ome/omero-prometheus-tools#4