diff --git a/clean_docker_keep_data.sh b/clean_docker_keep_data.sh index 9b6375535..9c7bb884a 100644 --- a/clean_docker_keep_data.sh +++ b/clean_docker_keep_data.sh @@ -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 diff --git a/configuration.sh b/configuration.sh index 8f3c75d8d..2c608d926 100644 --- a/configuration.sh +++ b/configuration.sh @@ -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" diff --git a/create_docker_images.sh b/create_docker_images.sh index 3f6f9c2f0..9fecc3918 100755 --- a/create_docker_images.sh +++ b/create_docker_images.sh @@ -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 .. diff --git a/ims/deploy.sh b/ims/deploy.sh index 9d6d9a83d..80fde8441 100644 --- a/ims/deploy.sh +++ b/ims/deploy.sh @@ -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 @@ -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 diff --git a/nginx/deploy.sh b/nginx/deploy.sh index 2068afd95..ef387469a 100644 --- a/nginx/deploy.sh +++ b/nginx/deploy.sh @@ -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 diff --git a/nginx/nginx.conf.sample b/nginx/nginx.conf.sample index 42c764e3e..7c2206dd4 100644 --- a/nginx/nginx.conf.sample +++ b/nginx/nginx.conf.sample @@ -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; diff --git a/reporting.sh b/reporting.sh index 486ec2e74..29f10060e 100644 --- a/reporting.sh +++ b/reporting.sh @@ -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 @@ -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 diff --git a/start_deploy.sh b/start_deploy.sh index 58055580f..faa55ce82 100755 --- a/start_deploy.sh +++ b/start_deploy.sh @@ -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)) @@ -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 \ @@ -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 \ @@ -241,17 +243,15 @@ 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 \ @@ -259,12 +259,11 @@ else -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)) @@ -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 diff --git a/start_dev.sh b/start_dev.sh index 1801e748a..174757347 100755 --- a/start_dev.sh +++ b/start_dev.sh @@ -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)) @@ -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 \ @@ -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 \ @@ -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