Portal Installation

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

Obtaining the required data

The dataset needed can be downloaded on zenodo.

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.

#Google oauth secret and client id

# CEDA OAUTH secret and client id
CEDA_OAUTHCLIENTSECRET=<Ask matt.pryor@stfc.ac.uk >
CEDA_OAUTHCLIENTID=<Ask matt.pryor@stfc.ac.uk >

#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
#Can be obtained from zenodo..
#Run the scan_adaguc-server_datasets.sh if updated

#location of the data used for ESMValtool

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