Skip to content
Luca Cinquini edited this page Nov 8, 2016 · 37 revisions

Description

This repository contains Docker images for running ESGF services in various node configurations.

Pre-Requisites

A host system with the latest version of Docker Engine installed (at this time, Docker 1.12+). Tested on MacOSX and Linux CentOS.

Quick Start

The following instructions explain how to run an ESGF node as a set of interacting Docker containers on your host system. Docker Engine must be up and running before proceeding.

  • Clone the current repository, cd to the top-level directory:

  • Define your environment:

    • ESGF_HOSTNAME must reference the Fully Qualified Domain Name of the host where the containers will be running:
      • on linux:
        • export ESGF_HOSTNAME=`hostname`
      • on mac:
        • export ESGF_HOSTNAME=my-node.esgf.org
        • edit /private/etc/hosts and map my-node.esgf.org to the IP of the Docker machine you are using, for example: 192.168.99.100 my-node.esgf.org
    • ESGF_CONFIG must reference a directory on the host system that will store all the site-specific configuration:
      • for example: export ESGF_CONFIG=~/esgf_config
      • mkdir -p $ESGF_CONFIG
    • ESGF_DATA must reference the root of the data directory on your host
      • for example: export ESGF_DATA=~/esgf_data
      • mkdir -p $ESGF_DATA
  • Initialize your node configuration: create a self-signed certificate for $ESGF_HOSTNAME and populate the $ESGF_CONFIG directory with initial content.

    • from the scripts/ directory: ./esgf_node_init.sh
  • Optional: pre-download the latest version of all ESGF Docker images. If not done now, the images will be pulled down automatically one by one when each service is started.

    • from the scripts/ directory: ./docker_pull_all.sh
  • Start all ESGF services in daemon mode, then look at the combined logs:

    • from the top-level esgf/ directory: docker-compose up -d
    • docker-compose logs -f
  • Do some testing:

    • In a browser, access the top-level CoG page for the node: https://$ESGF_HOSTNAME/
    • Login with the rootAdmin openid: https://$ESGF_HOSTNAME/esgf-idp/openid/rootAdmin (password: changeit)
    • Access the top-level TDS catalog: http://$ESGF_HOSTNAME/thredds
    • Download one of the test files. You will have to log onto the ORP with the same openid as above.
  • Change the ESGF root password. You must first stop the containers, then run a script that picks up the new password from an environment variable. This must be done after the containers have been started at least once, because the initial default password is hard-coded into the postgres image.

    • from the top-level esgf/ directory: docker-compose stop
    • for example, export ESGF_PASSWORD=abc123
    • from the scripts/ directory: ./change_password.sh
    • restart the ESGF services to make sure everything still works: docker-compose up -d
    • Note that the above operation will change the ESGF password for all modules, except for the password used by the rootAdmin openid to log onto the web (this is by design, so that the two passwords can be different). This last password can be changed through the CoG interface once rootAdmin is logged in.
  • Stop all services, and optionally remove all containers and associated data volumes:

    • docker-compose stop
    • optional: docker-compose down
    • optional: docker volume ls -qf dangling=true | xargs docker volume rm
Clone this wiki locally