This portal can be deployed with Docker. A docker compose file is present to start and orchestrate all the services needed. An .env file is used for settings, see the example file included.
Obtaining Docker and Docker Compose¶
The MAGIC portal is normally deployed using Docker. See The Docker Documentation for more information on how to install and run docker.
In addition to docker, we also make use of Docker Compose.
This Guide assumes a working installation of docker and docker-compose, and knowledge of this software.
Obtaining the portal code¶
The MAGIC portal code is available on GitHub. The main portal repo uses submodules as references to underlying services.
$ git clone https://github.com/c3s-magic/c3s-magic-portal.git
$ cd c3s-magic-portal
$ git submodule init
$ git submodule update
Choosing a WPS location¶
Choose either the build-in wps (and supply the needed CP4CDS CMIP and OBS data), or point to the CP4CDS WPS (prefered). The location of the WPS used can be set in the .env file (see below)
Creating a docker-compose .env file¶
All settings are done via a docker environment file. The env file comes with an example (env.example). Copy this file .env and fill in the required fields. The software is currently setup for CEDA account usage only.
#This is the docker environment file.
#It should be copied to .env and filled out.
# CEDA OAUTH secret and client id
CEDA_OAUTHCLIENTSECRET=<Ask firstname.lastname@example.org >
CEDA_OAUTHCLIENTID=<Ask email@example.com >
#Email used on obtaining letsencrypt certificate
#Hostname used to run the portal. An invalid name will
#cause an invalid certificate but otherwise still works
#Location of the static datasets hosted by the portal
#Should contain a single folder "c3smagic" containing all data files
#Can be obtained from zenodo: https://doi.org/10.5281/zenodo.3367497
#Run the scan_adaguc-server_datasets.sh script if updated
#location of the data used for ESMValtool in the WPS (if build-in)
#URLs for the WPS services. By default run inside the portal
#machine, but externally deployed WPS services can also be used.
Deploying using docker-compose¶
Once the settings file is correctly filled in, the entire portal can be deployed with docker-compose like normal.
$ docker-compose build --pull
$ docker-compose up
$ docker-compose down
Updating the ADAGUC Datasets¶
If the datasets served by ADAGUC are updated, update the database of these in the following manner:
$ docker exec c3s-magic-portal_backend_1 /adaguc/adaguc-server-updatedatasets.sh