Skip to content

Commit

Permalink
remove iipOfficial
Browse files Browse the repository at this point in the history
  • Loading branch information
urubens committed Dec 12, 2017
1 parent a8a6838 commit 44836fa
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 48 deletions.
2 changes: 0 additions & 2 deletions clean_docker_keep_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ docker stop backup_postgis
docker rm -v backup_postgis
docker stop backup_mongo
docker rm -v backup_mongo
docker stop iipOff
docker rm -v iipOff
docker stop iipCyto
docker rm -v iipCyto
docker stop iipJ2
Expand Down
5 changes: 4 additions & 1 deletion configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ IRIS_ADMIN_EMAIL="ian.admin@somewhere.edu"
# ---------------------------

IS_LOCAL=true
IIP_OFF_URL=localhost-iip-base

#IIP_OFF_URL=localhost-iip-base
IIP_CYTO_URL=localhost-iip-cyto
IIP_JP2_URL=localhost-iip-jp2000
NB_IIP_PROCESS=20

RETRIEVAL_URL=localhost-retrieval

BIOFORMAT_ENABLED="true"
Expand Down
2 changes: 1 addition & 1 deletion create_docker_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ cd ../iipJpeg2000 && docker build -t="cytomine/iipjpeg2000" .
#cd ../bioformat && docker build -t="cytomine/bioformat" .
cd ../ims && docker build -t="cytomine/ims" .
cd ../data_for_test && docker build -t="cytomine/data_test" .
#cd ../nginx && docker build -t="cytomine/nginx" .
cd ../nginx && docker build -t="cytomine/nginx" .
#cd ../mongodb && docker build -t="cytomine/mongodb" .
#cd ../auto_backup && docker build -t="cytomine/backup" .
cd ..
Expand Down
4 changes: 2 additions & 2 deletions ims/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ arr=$(echo $arr | tr "]" "\n")
if [ $IS_LOCAL = true ]; then
echo "#Custom adding" >> /etc/hosts
echo "$(route -n | awk '/UG[ \t]/{print $2}') $CORE_URL" >> /etc/hosts
echo "$(route -n | awk '/UG[ \t]/{print $2}') $IIP_OFF_URL" >> /etc/hosts
# echo "$(route -n | awk '/UG[ \t]/{print $2}') $IIP_OFF_URL" >> /etc/hosts
echo "$(route -n | awk '/UG[ \t]/{print $2}') $IIP_CYTO_URL" >> /etc/hosts
if [ ! -z "$IIP_JP2_URL" ]; then
echo "$(route -n | awk '/UG[ \t]/{print $2}') $IIP_JP2_URL" >> /etc/hosts
Expand Down Expand Up @@ -51,7 +51,7 @@ echo "cytomine.identify=identify" >> imageserverconfig.properties
echo "cytomine.tiffinfo=tiffinfo" >> imageserverconfig.properties
echo "cytomine.vipsthumbnail=/usr/local/bin/vipsthumbnail" >> imageserverconfig.properties

echo "cytomine.iipImageServerBase=http://$IIP_OFF_URL/fcgi-bin/iipsrv.fcgi" >> imageserverconfig.properties
#echo "cytomine.iipImageServerBase=http://$IIP_OFF_URL/fcgi-bin/iipsrv.fcgi" >> imageserverconfig.properties
echo "cytomine.iipImageServerCyto=http://$IIP_CYTO_URL/fcgi-bin/iipsrv.fcgi" >> imageserverconfig.properties

echo "bioformat.application.enabled=$BIOFORMAT_ENABLED" >> imageserverconfig.properties
Expand Down
2 changes: 1 addition & 1 deletion nginx/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ sed -i "s/CORE_ALIAS/core/g" /tmp/nginx.conf.sample
sed -i "s/IMS_ALIAS/ims/g" /tmp/nginx.conf.sample
sed -i "s/RETRIEVAL_URL/$RETRIEVAL_URL/g" /tmp/nginx.conf.sample

sed -i "s/IIP_OFF_URL/$IIP_OFF_URL/g" /tmp/nginx.conf.sample
#sed -i "s/IIP_OFF_URL/$IIP_OFF_URL/g" /tmp/nginx.conf.sample
sed -i "s/IIP_CYTO_URL/$IIP_CYTO_URL/g" /tmp/nginx.conf.sample
sed -i "s/IIP_JP2_URL/$IIP_JP2_URL/g" /tmp/nginx.conf.sample

Expand Down
13 changes: 0 additions & 13 deletions nginx/nginx.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,6 @@ IMS_URLS_CONFIG
}
}

server {
listen 80;
server_name IIP_OFF_URL;

location / {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://iip_official:80;
}
}

server {
listen 80;
server_name IIP_CYTO_URL;
Expand Down
6 changes: 3 additions & 3 deletions reporting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ docker cp core:/var/lib/tomcat7/logs/catalina.out ./reporting/catalinaCore.out
docker cp ims:/usr/share/tomcat7/.grails/imageserverconfig.properties ./reporting/configurationIMS.properties
docker cp ims:/var/lib/tomcat7/logs/catalina.out ./reporting/catalinaIMS.out
docker cp retrieval:/tmp/retrieval.log ./reporting/catalinaRetrieval.out
docker cp iipOff:/tmp/iip-openslide.out ./reporting/logIIPOff.out
#docker cp iipOff:/tmp/iip-openslide.out ./reporting/logIIPOff.out
#docker cp iipJ2:/tmp/iip-openslide.out ./reporting/logIIPJ2.out
docker cp iipCyto:/tmp/iip-openslide.out ./reporting/logIIPCyto.out

Expand All @@ -35,8 +35,8 @@ mv ./reporting/catalinaIMSTail.out ./reporting/catalinaIMS.out
tail -n 200 ./reporting/catalinaRetrieval.out > ./reporting/catalinaRetrievalTail.out
mv ./reporting/catalinaRetrievalTail.out ./reporting/catalinaRetrieval.out

tail -n 200 ./reporting/logIIPOff.out > ./reporting/logIIPOffTail.out
mv ./reporting/logIIPOffTail.out ./reporting/logIIPOff.out
#tail -n 200 ./reporting/logIIPOff.out > ./reporting/logIIPOffTail.out
#mv ./reporting/logIIPOffTail.out ./reporting/logIIPOff.out
#tail -n 200 ./reporting/logIIPJ2.out > ./reporting/logIIPJ2Tail.out
#mv ./reporting/logIIPJ2Tail.out ./reporting/logIIPJ2.out
tail -n 200 ./reporting/logIIPCyto.out > ./reporting/logIIPCytoTail.out
Expand Down
27 changes: 13 additions & 14 deletions start_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ fi

# create IIP dockers
# privileged for somaxconn
docker run -p 22 --privileged -d --name iipOff -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH --restart=unless-stopped \
--link memcached1:memcached \
-e NB_IIP_PROCESS=10 \
cytomine/iipofficial > /dev/null
nb_docker=$((nb_docker+1))
#docker run -p 22 --privileged -d --name iipOff -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH --restart=unless-stopped \
#--link memcached1:memcached \
#-e NB_IIP_PROCESS=$NB_IIP_PROCESS \
#cytomine/iipofficial > /dev/null
#nb_docker=$((nb_docker+1))

docker run -p 22 --privileged -d --name iipCyto -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH --restart=unless-stopped \
--link memcached2:memcached \
-e NB_IIP_PROCESS=10 \
-e NB_IIP_PROCESS=$NB_IIP_PROCESS \
cytomine/iipcyto > /dev/null
nb_docker=$((nb_docker+1))

Expand All @@ -136,9 +136,9 @@ IMS_PUB_KEY=$(cat /proc/sys/kernel/random/uuid)
IMS_PRIV_KEY=$(cat /proc/sys/kernel/random/uuid)

# create IMS docker
#-e IIP_OFF_URL=$IIP_OFF_URL \
docker run -p 22 -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH -m 8g -d --name ims --restart=unless-stopped \
-v /tmp/uploaded/ \
-e IIP_OFF_URL=$IIP_OFF_URL \
-e IIP_CYTO_URL=$IIP_CYTO_URL \
-e IIP_JP2_URL=$IIP_JP2_URL \
-e IMS_URLS=$IMS_URLS \
Expand Down Expand Up @@ -228,11 +228,13 @@ fi

# create nginx docker
#if iris is not linked, nginx doesn't start. No other way for a condition. :/

# --link iipOff:iip_official \
# -e IIP_OFF_URL=$IIP_OFF_URL \
if [ $IRIS_ENABLED = true ]
then
docker run -m 1g -d -p 22 -p 80:80 --link core:core --link ims:ims \
--volumes-from ims --link retrieval:retrieval \
--link iipOff:iip_official \
--link iipCyto:iip_cyto \
--link iipJ2:iip_jpeg2000 \
--link iris:iris \
Expand All @@ -241,30 +243,27 @@ then
-e CORE_URL=$CORE_URL \
-e IMS_URLS="$IMS_URLS" \
-e RETRIEVAL_URL=$RETRIEVAL_URL \
-e IIP_OFF_URL=$IIP_OFF_URL \
-e IIP_CYTO_URL=$IIP_CYTO_URL \
-e IIP_JP2_URL=$IIP_JP2_URL \
-e UPLOAD_URL=$UPLOAD_URL \
-e IRIS_URL=$IRIS_URL \
-e IRIS_ENABLED=$IRIS_ENABLED \
cytomine/nginx:v1.1 > /dev/null
cytomine/nginx > /dev/null
else
docker run -m 1g -d -p 22 -p 80:80 --link core:core --link ims:ims \
--volumes-from ims --link retrieval:retrieval \
--link iipOff:iip_official \
--link iipCyto:iip_cyto \
--link iipJ2:iip_jpeg2000 \
--name nginx \
--restart=unless-stopped \
-e CORE_URL=$CORE_URL \
-e IMS_URLS="$IMS_URLS" \
-e RETRIEVAL_URL=$RETRIEVAL_URL \
-e IIP_OFF_URL=$IIP_OFF_URL \
-e IIP_CYTO_URL=$IIP_CYTO_URL \
-e IIP_JP2_URL=$IIP_JP2_URL \
-e UPLOAD_URL=$UPLOAD_URL \
-e IRIS_ENABLED=$IRIS_ENABLED \
cytomine/nginx:v1.1 > /dev/null
cytomine/nginx > /dev/null
fi
nb_docker=$((nb_docker+1))

Expand Down Expand Up @@ -360,7 +359,7 @@ then
if ! echo "$running_containers" | grep -q -w memcached1; then echo "memcached1 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w memcached2; then echo "memcached2 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w rabbitmq; then echo "rabbitmq container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipOff; then echo "iipOff container is not running !"; fi
# if ! echo "$running_containers" | grep -q -w iipOff; then echo "iipOff container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipCyto; then echo "iipCyto container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipJ2; then echo "iipJ2 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w retrieval; then echo "retrieval container is not running !"; fi
Expand Down
17 changes: 6 additions & 11 deletions start_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ then
fi

# create IIP dockers
docker run -p 22 --privileged -d --name iipOff -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH \
--link memcached1:memcached \
-e NB_IIP_PROCESS=10 \
cytomine/iipofficial
nb_docker=$((nb_docker+1))
#docker run -p 22 --privileged -d --name iipOff -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH \
#--link memcached1:memcached \
#-e NB_IIP_PROCESS=10 \
#cytomine/iipofficial
#nb_docker=$((nb_docker+1))

docker run -p 22 --privileged -d --name iipCyto -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH \
--link memcached2:memcached \
-e NB_IIP_PROCESS=10 \
-e NB_IIP_PROCESS=$NB_IIP_PROCESS \
cytomine/iipcyto
nb_docker=$((nb_docker+1))

Expand Down Expand Up @@ -149,14 +149,12 @@ if [ $IRIS_ENABLED = true ]
then
docker run -m 1g -d -p 22 -p 80:80 \
-v /tmp/uploaded/:/tmp/uploaded/ --link retrieval:retrieval \
--link iipOff:iip_official \
--link iipCyto:iip_cyto --link iipJ2:iip_jpeg2000 \
--link iris:iris \
--name nginx \
-e CORE_URL=$CORE_URL \
-e IMS_URLS="$IMS_URLS" \
-e RETRIEVAL_URL=$RETRIEVAL_URL \
-e IIP_OFF_URL=$IIP_OFF_URL \
-e IIP_CYTO_URL=$IIP_CYTO_URL \
-e IIP_JP2_URL=$IIP_JP2_URL \
-e UPLOAD_URL=$UPLOAD_URL \
Expand All @@ -166,13 +164,11 @@ then
else
docker run -m 1g -d -p 22 -p 80:80 \
-v /tmp/uploaded/:/tmp/uploaded/ --link retrieval:retrieval \
--link iipOff:iip_official \
--link iipCyto:iip_cyto --link iipJ2:iip_jpeg2000 \
--name nginx \
-e CORE_URL=$CORE_URL \
-e IMS_URLS="$IMS_URLS" \
-e RETRIEVAL_URL=$RETRIEVAL_URL \
-e IIP_OFF_URL=$IIP_OFF_URL \
-e IIP_CYTO_URL=$IIP_CYTO_URL \
-e IIP_JP2_URL=$IIP_JP2_URL \
-e UPLOAD_URL=$UPLOAD_URL \
Expand Down Expand Up @@ -221,7 +217,6 @@ else
if ! echo "$running_containers" | grep -q -w memcached2; then echo "memcached2 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w memcached3; then echo "memcached3 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w rabbitmq; then echo "rabbitmq container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipOff; then echo "iipOff container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipCyto; then echo "iipCyto container is not running !"; fi
if ! echo "$running_containers" | grep -q -w iipJ2; then echo "iipJ2 container is not running !"; fi
if ! echo "$running_containers" | grep -q -w retrieval; then echo "retrieval container is not running !"; fi
Expand Down

0 comments on commit 44836fa

Please sign in to comment.