Setup directories and configuration files¶
The impact portal configuration file¶
The configuration file should like like the following template:
<?xml version="1.0" encoding="UTF-8" ?> <impactportal> <!-- Offline mode assumes a default user, requires no login and does not attempt to load CMS pages, useful for developing --> <offlinemode>false</offlinemode> <!-- This used ID is used during development in offline mode,for example when no internet access is available --> <defaultuseropenid>https://pcmdi9.llnl.gov/esgf-idp/openid/c4m</defaultuseropenid> <!-- The hostname of the server, using http and https--> <serverurl>http://climate4impact.eu/</serverurl> <serverurlhttps>https://climate4impact.eu/</serverurlhttps> <!-- Downscaling portal settings --> <downscaling> <credential> <username>climate4impact</username> <password>climate4impact</password> </credential> <token> <path>/home/c4m/impactspace/downscaling</path> <filename>downscaling.cred</filename> <dateformat>dd-MM-yyyy HH:mm:ss z</dateformat> </token> <dpbaseurl>http://meteo.unican.es/dp/</dpbaseurl> <dprestbaseurl>http://meteo.unican.es/dp/rest</dprestbaseurl> </downscaling> <!-- Oath2 provider settings, multiple providers can be configured--> <oauth2> <provider name="ceda"> <authloc>https://slcs.ceda.ac.uk/oauth/authorize</authloc> <tokenloc>https://slcs.ceda.ac.uk/oauth/access_token</tokenloc> <clientid><!-- ask one at ceda --></clientid> <clientsecret><!-- ask one at ceda --></clientsecret> <description>Sign in with CEDA (beta)</description> <registerlink>https://services.ceda.ac.uk/cedasite/register/info/</registerlink> <logo>/impactportal/images/this_is_NOT_the_BADC_logo.jpg</logo> <scope>https://slcs.ceda.ac.uk/oauth/certificate/</scope> </provider> <provider name="google"> <authloc>https://accounts.google.com/o/oauth2/auth</authloc> <tokenloc>https://accounts.google.com/o/oauth2/token</tokenloc> <scope>email</scope> <clientid><!-- Create one at https://console.developers.google.com/project --></clientid> <clientsecret><!-- Create one at https://console.developers.google.com/project --></clientsecret> <logo>/impactportal/images/google.png</logo> <description>Sign in with Google (beta, no ESGF support)</description> </provider> </oauth2> <!-- The CMS Drupal to harvest pages from --> <drupalconfig> <drupalhost>http://climate4impact.eu</drupalhost> <drupalbaseurl>/</drupalbaseurl> <drupaldirectory>drupal/</drupaldirectory> <username>name</username> <!-- optional basic auth username --> <password>pwd</password><!-- optional basic auth password --> </drupalconfig> <!-- The ESGF search API for searching through the ESGF --> <searchconfig> <esgfsearchurl>http://esg-datanode.jpl.nasa.gov/esg-search/search?</esgfsearchurl> </searchconfig> <!-- Local workspace, user info is stored here --> <impactworkspace>/data/dev.impactspace</impactworkspace> <loginconfig> <!-- Configure here your myproxy server to issue x509 slc certificates for x509 client authentication --> <myproxyserverhost>myproxyhost</myproxyserverhost> <myproxyserverpassword>secret</myproxyserverpassword> <myproxyserverport>7512</myproxyserverport> <!-- <myproxyserverusernameoverride> Optionally can be set to override the username, normally the openid of the current user is used </myproxyserverusernameoverride>--> <!-- Set the CA trustroots by a java truststore and separate trusted SSL certificates, obtainable from https://raw.githubusercontent.com/ESGF/esgf-dist/master/installer/certs/esg_trusted_certificates.tar --> <truststorefile>esg-truststore.ts</truststorefile> <truststorepassword>changeit</truststorepassword> <trustrootslocation>esg_trusted_certificates</trustrootslocation> </loginconfig> <!-- The email adresses used for the contact form --> <expertcontact> <mailaddresses>contactpoint@yoursite.com</mailaddresses> </expertcontact> <!-- Email where exceptions and errors are emailed --> <admin> <mailaddresses>admin@yoursite.com</mailaddresses> </admin> <!-- The download template, located in the impactportal repository --> <downloadscriptconfig> <downloadscripttemplate>webapps/impactportal/account/wgettemplate</downloadscripttemplate> </downloadscriptconfig> <!-- ADAGUC WMS configuration --> <adagucserverconfig> <adagucexecutable>/data/software/source/adagucserver-1.8.1/adagucserverEC/adagucserver</adagucexecutable> <exportenvironment>LD_LIBRARY_PATH=/data/software/install/lib</exportenvironment> <exportenvironment>PATH=/data/software/install/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin</exportenvironment> <exportenvironment>PROJ_LIB=/data/software/install/share/proj/</exportenvironment> <exportenvironment>ADAGUC_CONFIG=/data/config/adagucwms-dev.climate4impact.eu.xml</exportenvironment> <exportenvironment>ADAGUC_LOGFILE=/data/logs/server.log</exportenvironment> <exportenvironment>ADAGUC_ERRORFILE=/data/logs/server.errlog</exportenvironment> <exportenvironment>ADAGUC_DATARESTRICTION="SHOW_QUERYINFO|ALLOW_WCS|ALLOW_GFI|ALLOW_METADATA"</exportenvironment> </adagucserverconfig> <pywpsconfig> <pywpsexecutable>/data/software/pythonpackages/pywps-3.2.1/wps.py</pywpsexecutable> <exportenvironment>ADAGUC_CONFIG=/data/config/adagucwms-dev.climate4impact.eu.xml</exportenvironment> <exportenvironment>ADAGUC_LOGFILE=/data/logs/server.log</exportenvironment> <exportenvironment>ADAGUC_ERRORFILE=/data/logs/server.errlog</exportenvironment> <exportenvironment>ADAGUC_DATARESTRICTION="SHOW_QUERYINFO|ALLOW_WCS|ALLOW_GFI|ALLOW_METADATA"</exportenvironment> <exportenvironment>PROJ_LIB=/data/software/install/share/proj/</exportenvironment> <exportenvironment>PKG_CONFIG_PATH="/data/software/install/lib/pkgconfig/"</exportenvironment> <exportenvironment>VIRTUAL_ENV=/data/software/install/wpsvirtenv </exportenvironment> <exportenvironment>CPPFLAGS="-L/data/software/install/lib/ -L/data/software/install/lib/python2.7/"</exportenvironment> <exportenvironment>LDFLAGS="-I/data/software/install/include/ -I/data/software/install/include/python2.7/"</exportenvironment> <exportenvironment>HDF5_DIR="/data/software/install/"</exportenvironment> <exportenvironment>NETCDF4_DIR="/data/software/install/"</exportenvironment> <exportenvironment>LD_PRELOAD=/data/software/install/lib/libgdal.so</exportenvironment> <exportenvironment>LD_LIBRARY_PATH=/data/software/install/lib</exportenvironment> <exportenvironment>PYTHONPATH=/data/software/install/wpsvirtenv/lib/python2.7/site-packages/</exportenvironment> <exportenvironment>PATH=/data/software/source/adagucserver-1.8.1/bin:/data/software/install/wpsvirtenv/bin:/data/software/install/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin</exportenvironment> <exportenvironment>PYWPS_CFG=/data/config/pywps.cfg</exportenvironment> <exportenvironment>PYWPS_PROCESSES=/data/processes/dev/impactportalwpsscripts</exportenvironment> <exportenvironment>PYWPS_TEMPLATES=/data/software/pythonpackages/pywps-3.2.1/pywps/Templates</exportenvironment> <exportenvironment>NCARG_ROOT=/data/software/install</exportenvironment> <exportenvironment>PORTAL_OUTPUT_PATH=/data/wpsoutputs/</exportenvironment> <exportenvironment>PORTAL_OUTPUT_URL=http://climate4impact.eu/impactportal/WPS?OUTPUT=</exportenvironment> <exportenvironment>PORTAL_SCRIPTS=/data/scripts/</exportenvironment> <exportenvironment>MPLCONFIGDIR=/data/tmp/</exportenvironment> <exportenvironment>USE_FONTCONFIG=False</exportenvironment> </pywpsconfig> </impactportal>
Everything will be installed in the /data/ directory, other directories are allowed when configured properly in the configuration files. The default configuration directory is ${HOME}/impactportal. It is possible to use an alternative configuration file by setting the IMPACTPORTAL_CONFIG environment variable to the configuration file.
- /data/software/ - Libraries which need to be compiled
- /data/software/build/ - Compiled binaries directory
- /data/impactdev/ - Development environment for climate4impact
- /data/impactdev/impactportal - The impactportal source code
- /data/impactdev/eclipse - The development IDE directory
- /data/wps/processes - The directory with individual python scripts representing the available processing options
- /data/wps/wpsoutputs - Directory where the results of WPS are stored, this will change in the future, becomes user based.
- ~/impactspace/ - Place where user information like shopping baskets and processing jobs are stored, this directory can be configured in the impactportal configuration file
- ~/impactportal/ - Fixed directory, here the configuration files of climate4impact are stored
- ~/impactportal/downscaling - Downscaling portal directory. This directory contains the required token to access the REST API.
- ~/impactportal/config.xml - Configuration file of the impactportal
The following directories need to be created under /data/:¶
sudo mkdir /data sudo chown c4m /data mkdir /data/software/ mkdir /data/tmp chmod 777 /data/tmp mkdir /data/log chmod 777 /data/log mkdir /data/impactdev/
Get configuration file templates¶
cd /data/impactdev hg clone http://dev.knmi.nl/hg/impactportaltemplates