forked from ome/docker-example-omero-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·52 lines (40 loc) · 1.21 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -e
set -u
set -x
PREFIX=omero-grid-test
IMAGE=omero-grid:$PREFIX
IMAGEWEB=omero-grid-web:$PREFIX
BUILD=${BUILD:-}
CLEAN=${CLEAN:-y}
# Script must be run from omero-grid/
cd "$(dirname $0)"
cleanup() {
docker rm -f -v $PREFIX-db $PREFIX-master $PREFIX-slave-1 $PREFIX-web
}
if [ "$CLEAN" = y ]; then
trap cleanup ERR EXIT
fi
cleanup || true
# From the README
./build.py --tag $IMAGE $BUILD omero-grid
./build.py --tag $IMAGEWEB $BUILD omero-grid-web
docker run -d --name $PREFIX-db -e POSTGRES_PASSWORD=postgres postgres
docker run -d --name $PREFIX-master --link $PREFIX-db:db \
-e DBUSER=postgres -e DBPASS=postgres -e DBNAME=postgres $IMAGE master \
master:Blitz-0,Indexer-0,DropBox,MonitorServer,FileServer,Storm,PixelData-0,Tables-0 \
slave-1:Processor-0
docker run -d --name $PREFIX-slave-1 --link $PREFIX-master:master $IMAGE slave-1
docker run -d --name $PREFIX-web --link $PREFIX-master:master -P $IMAGEWEB
echo "Exposed web port:"
docker port $PREFIX-web
# Smoke tests
export OMERO_USER=root
export OMERO_PASS=omero
export PREFIX
# Login to web
bash test_login.sh
# Now that we know the server is up, test Dropbox
bash test_dropbox.sh
# And Processor (slave-1)
bash test_processor.sh