Project

General

Profile

Adaguc-services

Adaguc-services is a spring boot application to run adaguc-server without traditional Apache HTTP and CGI modules. It can run standalone or it can be deployed within an existing apache tomcat server. Adaguc-services will be the platform for easy deployable Web Processing Services with a built in OpenDAP server and built in per user security system compatible with the Earth System Grid Federation and climate4impact.

Repository

https://github.com/KNMI/adaguc-services

Environment variables

Configuration file is located at environment variable ADAGUC_SERVICES_CONFIG

export ADAGUC_SERVICES_CONFIG=/src/config/adaguc-services-config-tomcat.xml

Configuration file:

The configuration file allows for environment variable substitution. {ENV.ENVVARNAME} will be replaced with the environment variable ENVVARNAME.

<?xml version="1.0" encoding="UTF-8"?>
<adaguc-services>
  <external-home-url>http://localhost:8080/adaguc-services/</external-home-url>
  <basedir>/data/adaguc-services-base</basedir>
  <userworkspace>/data/adaguc-services-space</userworkspace>
  <server>
    <port>8080</port>
  </server>
  <security>
    <keystore>/src/keystore.jks</keystore>
    <keystorepassword>password</keystorepassword>
    <keystoretype>JKS</keystoretype>
    <keyalias>tomcat</keyalias>
  </security>
  <adaguc-server>
    <adagucexecutable>/src/KNMI/adaguc-server/bin/adagucserver</adagucexecutable>
    <export>ADAGUC_PATH=/src/KNMI/adaguc-server/</export>
    <export>ADAGUC_CONFIG=/src/KNMI/adaguc-server/data/config/adaguc.vm.xml</export>
    <export>ADAGUC_DATARESTRICTION=FALSE</export>
    <export>ADAGUC_FONT=/src/KNMI/adaguc-server/data/fonts/FreeSans.ttf</export>
    <export>ADAGUC_LOGFILE=/src/log/adaguc-server.log</export>
  </adaguc-server>
  <autowms>
    <enabled>true</enabled>
    <autowmspath>/data/adaguc-autowms/</autowmspath>
    <datasetpath>/data/adaguc-datasets/</datasetpath>
  </autowms>
</adaguc-services>

With PyWPS:

When using PyWPS, best is to run adaguc-services as a spring boot application, e.g. without tomcat. This enables by default the Java Key Store for runing the services over HTTPS, including two way SSL / x509 client authentication.

  • Build with mvn package
  • Start this with java -jar <nameofbuiltpackage>.jar
  • Configure with:
<?xml version="1.0" encoding="UTF-8"?>
<adaguc-services>

  <external-home-url>https://compute-test.c3s-magic.eu:9000</external-home-url>

  <basedir>{ENV.HOME}/adaguc-services-base</basedir>

  <userworkspace>{ENV.HOME}/adaguc-services-space</userworkspace>

  <server>
    <port>9000</port>
  </server>

  <security>
    <truststorepassword>changeit</truststorepassword>
    <truststore>{ENV.HOME}/config/esg-truststore.ts</truststore>
    <trustrootscadirectory>{ENV.HOME}/.globus/certificates/</trustrootscadirectory>
    <keystore>{ENV.HOME}/impactportal/c4i_keystore.jks</keystore>
    <keystorepassword>password</keystorepassword>
    <keystoretype>JKS</keystoretype>
    <keyalias>tomcat</keyalias>
  </security>

  <adaguc-server>
    <adagucexecutable>{ENV.HOME}/src/adaguc-server/bin/adagucserver</adagucexecutable>
    <export>ADAGUC_PATH={ENV.HOME}/src/adaguc-server/</export>
    <export>ADAGUC_CONFIG={ENV.HOME}/src/adaguc-server/data/config/adaguc.docker.xml</export>
    <export>ADAGUC_DATARESTRICTION=FALSE</export>
    <export>ADAGUC_LOGFILE={ENV.HOME}/adaguc-services-tmp/adaguc.autoresource.log</export>
    <export>ADAGUC_FONT={ENV.HOME}/src/adaguc-server/data/fonts/FreeSans.ttf</export>
  </adaguc-server>

  <pywps-server>
    <pywpsexecutable>{ENV.HOME}/src/pywps-pywps-3.2.5/wps.py</pywpsexecutable>
    <pywpsconfigtemplate>{ENV.HOME}/impactportal/pywps.cfg</pywpsconfigtemplate>
    <pywpsoutputdir>{ENV.HOME}/wpsoutputs</pywpsoutputdir>
    <pywpsprocessesdir>{ENV.HOME}/wpsprocesses/impactwps</pywpsprocessesdir>
    <tmp>{ENV.HOME}/adaguc-services-tmp</tmp>
    <export>ADAGUC_CONFIG={ENV.HOME}/impactportal/adagucserver.xml</export>
    <export>ADAGUC_PATH={ENV.HOME}/src/adagucserver/</export>
    <export>ADAGUC_TMP={ENV.HOME}/adaguc-services-tmp/</export>
    <export>ADAGUC_LOGFILE={ENV.HOME}/adaguc-services-tmp/adagucserver-wps.log</export>
    <export>ADAGUC_DATARESTRICTION=FALSE</export>
    <!--<export>PATH={ENV.HOME}/src/adagucserver/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/bin:{ENV.HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</export>-->
    <!--<export>PATH=/home/c3smagic/code/KNMI/wps_prov/climexp:/home/c3smagic/code/KNMI/adagucserver/bin/:/home/c3smagic/conda/bin/:/home/c3smagic/conda/bin/:/home/c3smagic/conda/bin/:/home/c3smagic/bin:/home/c3smagic/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</export>-->
    <export>PATH=/home/c3smagic/code/maartenplieger/adaguc-server/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/conda/bin/:{ENV.HOME}/bin:{ENV.HOME}/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin</export>
    <export>PYWPS_TEMPLATES={ENV.HOME}/src/pywps-pywps-3.2.5/pywps/Templates</export>
    <export>PORTAL_OUTPUT_PATH={ENV.HOME}/wpsoutputs/</export>
    <export>USE_FONTCONFIG=False</export>
  </pywps-server>

</adaguc-services>