Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On this page, I will split Cytomine in only 4 machines and gice give the complete code for only 2 examples :

...

Be carefull,I delete memcached 3 & 4. Si I updated the "link" into the run command for the 2 iip

Voir pour la clé d'IMS... En gros, lancer core avant IMS et puis prendre la clé en DB avant de relancer IMS. 

Code Block
#get all the config values.
. ./configuration.sh
nb_docker=$(echo "$(sudo docker ps)" | wc -l)
nb_docker=$((nb_docker-1)) # remove the header line
# create memcached docker
docker run -d -e MEMCACHED_PASS="mypass" --name memcached1 cytomine/memcached
nb_docker=$((nb_docker+1))
docker run -d -e MEMCACHED_PASS="mypass" --name memcached2 cytomine/memcached
nb_docker=$((nb_docker+1))

# create IIP dockers
docker run -p 22 --privileged -d --name iipOff -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH \
--link memcached1:memcached \
-e IIP_ALIAS="iip_officiel" \
-e GLUSTER_SERVER=$GLUSTER_SERVER \
-e VOLUME=$VOLUME \
-e IMS_STORAGE_PATH=$IMS_STORAGE_PATH \
-e HAS_GLUSTER=$HAS_GLUSTER \
cytomine/iipofficiel
nb_docker=$((nb_docker+1))
docker run -p 22 --privileged -d --name iipJ2 -v $IMS_STORAGE_PATH:$IMS_STORAGE_PATH \
--link memcached2:memcached \
-e IIP_ALIAS="iip_jpeg2000" \
-e GLUSTER_SERVER=$GLUSTER_SERVER \
-e VOLUME=$VOLUME \
-e IMS_STORAGE_PATH=$IMS_STORAGE_PATH \
-e HAS_GLUSTER=$HAS_GLUSTER \
cytomine/iipjpeg2000
nb_docker=$((nb_docker+1))

# create nginx docker
	docker run -m 1g -d -p 22 -p 80:80  \
	--link iipOff:iip_officiel  \
	--link iipJ2:iip_jpeg2000 \
	--name nginx \
	-e IIP_OFF_URL=$IIP_OFF_URL \
	-e IIP_JP2_URL=$IIP_JP2_URL \
	cytomine/nginx
nb_docker=$((nb_docker+1))
# checking
running_containers=$(sudo docker ps)
nb_started_docker=$(echo "$running_containers" | wc -l)
nb_started_docker=$((nb_started_docker-1)) # remove the header line
#echo "number of started docker = $nb_started_docker"
#echo "number of asked docker = $nb_docker"
if [ $nb_started_docker -eq $nb_docker ]
then
        touch ./.cookies
else
	if ! echo "$running_containers" | grep -q -w nginx; then echo "nginx container is not running !"; fi
	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 iipOff; then echo "iipOff container is not running !"; fi
	if ! echo "$running_containers" | grep -q -w iipJ2; then echo "iipJ2 container is not running !"; fi
        echo "Please check into your docker logs."
        #echo "A problem occurs. Please check into your docker logs."
fi

echo "End of the installation."

...

Code Block
IIP_OFF_URL=localhost-iip-base
IIP_JP2_URL=localhost-iip-jp2000
HAS_GLUSTER=false
GLUSTER_SERVER=
VOLUME=aurora
IS_LOCAL=true
IMS_STORAGE_PATH=/data

# You don't to change the datas below this line instead of advanced customization
# ---------------------------
MEMCACHED_PASS="mypass"

 

nginxMettre les config actuelle de nginx sur shareview ! worker et tt le bordel !

 

nginx/nginx.conf.sample

Delete the reference to the uninstalled containers.

...