Loading data-node/scripts/docker-entrypoint.sh 0 → 100755 +14 −0 Original line number Diff line number Diff line #!/bin/bash # Default script to start Tomcat inside a container # start Tomcat in the background (so it can be restarted without stopping the container) # note: additional startup parameters are read from bin/setenv.sh $CATALINA_HOME/bin/catalina.sh start # keep container running by printing log to standard output logfile=/usr/local/tomcat/logs/catalina.out while ! [ -f $logfile ]; do sleep 1 done tail -f $logfile idp-node/scripts/docker-entrypoint.sh 0 → 100755 +22 −0 Original line number Diff line number Diff line #!/bin/bash # Script to start ESGF IdP # Must first wait untill connection to the Postgres container is ready export PGPASSWORD=`cat /esg/config/.esg_pg_pass` while ! psql -h esgf-postgres -U dbsuper -d esgcet -c "select 1" > /dev/null 2>&1; do echo 'Waiting for connection with postgres...' sleep 1; done; echo 'Connected to postgres...' # start Tomcat in the background (so it can be restarted without stopping the container) # note: additional startup parameters are read from bin/setenv.sh $CATALINA_HOME/bin/catalina.sh start # keep container running by printing log to standard output logfile=/usr/local/tomcat/logs/catalina.out while ! [ -f $logfile ]; do sleep 1 done tail -f $logfile solr/scripts/add_shard.sh +4 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,9 @@ if ! [[ $shard_name == 'master' || $shard_name == 'slave' ]]; then shards_file="/esg/config/esgf_shards_static.xml" if ! grep -q ${shard_port} ${shards_file} ; then echo "Adding shard to ${shards_file}" # following not currently working on distributed nodes #sed -i 's/<\/shards>/ <value>localhost:'${shard_port}'\/solr<\/value>\n<\/shards>/g' ${shards_file} # note: must work around the error: "sed: cannot rename /esg/config/sedFvmijX: Device or resource busy" sed 's/<\/shards>/ <value>localhost:'${shard_port}'\/solr<\/value>\n<\/shards>/g' ${shards_file} > ${shards_file}.new # call "/bin/cp" since for root cp is aliased to "cp -i" (which asks for confirmation) /bin/cp -f ${shards_file}.new ${shards_file} fi fi solr/scripts/remove_shard.sh +4 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,10 @@ if ! [[ $shard_name == 'master' || $shard_name == 'slave' ]]; then shards_file="/esg/config/esgf_shards_static.xml" if grep -q ${shard_port} ${shards_file} ; then echo "Removing shard from ${shards_file}" #sed -i '/localhost:'${shard_port}'/d' ${shards_file} # note: must work around the error: "sed: cannot rename /esg/config/sedFvmijX: Device or resource busy" sed '/localhost:'${shard_port}'/d' ${shards_file} > ${shards_file}.new # call "/bin/cp" since for root cp is aliased to "cp -i" (which asks for confirmation) /bin/cp -f ${shards_file}.new ${shards_file} fi fi tomcat/Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ COPY conf/context.xml /usr/local/tomcat/conf/context.xml COPY certs/ /esg/config/tomcat/ # custom env variables for starting Tomcat COPY bin/setenv.sh $CATALINA_HOME/bin COPY conf/setenv.sh $CATALINA_HOME/bin # create non-privilged user to run Tomcat RUN groupadd tomcat Loading Loading
data-node/scripts/docker-entrypoint.sh 0 → 100755 +14 −0 Original line number Diff line number Diff line #!/bin/bash # Default script to start Tomcat inside a container # start Tomcat in the background (so it can be restarted without stopping the container) # note: additional startup parameters are read from bin/setenv.sh $CATALINA_HOME/bin/catalina.sh start # keep container running by printing log to standard output logfile=/usr/local/tomcat/logs/catalina.out while ! [ -f $logfile ]; do sleep 1 done tail -f $logfile
idp-node/scripts/docker-entrypoint.sh 0 → 100755 +22 −0 Original line number Diff line number Diff line #!/bin/bash # Script to start ESGF IdP # Must first wait untill connection to the Postgres container is ready export PGPASSWORD=`cat /esg/config/.esg_pg_pass` while ! psql -h esgf-postgres -U dbsuper -d esgcet -c "select 1" > /dev/null 2>&1; do echo 'Waiting for connection with postgres...' sleep 1; done; echo 'Connected to postgres...' # start Tomcat in the background (so it can be restarted without stopping the container) # note: additional startup parameters are read from bin/setenv.sh $CATALINA_HOME/bin/catalina.sh start # keep container running by printing log to standard output logfile=/usr/local/tomcat/logs/catalina.out while ! [ -f $logfile ]; do sleep 1 done tail -f $logfile
solr/scripts/add_shard.sh +4 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,9 @@ if ! [[ $shard_name == 'master' || $shard_name == 'slave' ]]; then shards_file="/esg/config/esgf_shards_static.xml" if ! grep -q ${shard_port} ${shards_file} ; then echo "Adding shard to ${shards_file}" # following not currently working on distributed nodes #sed -i 's/<\/shards>/ <value>localhost:'${shard_port}'\/solr<\/value>\n<\/shards>/g' ${shards_file} # note: must work around the error: "sed: cannot rename /esg/config/sedFvmijX: Device or resource busy" sed 's/<\/shards>/ <value>localhost:'${shard_port}'\/solr<\/value>\n<\/shards>/g' ${shards_file} > ${shards_file}.new # call "/bin/cp" since for root cp is aliased to "cp -i" (which asks for confirmation) /bin/cp -f ${shards_file}.new ${shards_file} fi fi
solr/scripts/remove_shard.sh +4 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,10 @@ if ! [[ $shard_name == 'master' || $shard_name == 'slave' ]]; then shards_file="/esg/config/esgf_shards_static.xml" if grep -q ${shard_port} ${shards_file} ; then echo "Removing shard from ${shards_file}" #sed -i '/localhost:'${shard_port}'/d' ${shards_file} # note: must work around the error: "sed: cannot rename /esg/config/sedFvmijX: Device or resource busy" sed '/localhost:'${shard_port}'/d' ${shards_file} > ${shards_file}.new # call "/bin/cp" since for root cp is aliased to "cp -i" (which asks for confirmation) /bin/cp -f ${shards_file}.new ${shards_file} fi fi
tomcat/Dockerfile +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ COPY conf/context.xml /usr/local/tomcat/conf/context.xml COPY certs/ /esg/config/tomcat/ # custom env variables for starting Tomcat COPY bin/setenv.sh $CATALINA_HOME/bin COPY conf/setenv.sh $CATALINA_HOME/bin # create non-privilged user to run Tomcat RUN groupadd tomcat Loading