Skip to content

Latest commit

 

History

History
84 lines (73 loc) · 2.27 KB

README.md

File metadata and controls

84 lines (73 loc) · 2.27 KB

Running THREDDS, pycsw, ERDDAP, ncWMS and TerriaMap via Docker

  1. Setup a ubuntu or centos machine with 16GB+ RAM. I used the NSF XSEDE Jetstream Atmosphere Interface to create an Ubuntu 16_04 m1.medium instance (CPU:6, Mem: 16GB, Disk: 60GB).

  2. Get Rich Signell's Docker configuration for pycsw, thredds, erddap and nginx (with Let's Encrypt):

mkdir github
cd ~/github
git clone https://github.com/rsignell-usgs/docker-nginx-thredds-pycsw.git
sudo mkdir /opt/docker
sudo mv docker-nginx-thredds-pycsw /opt/docker
  1. Run Julien Chastang's nice script for installing Docker and Docker-compose, and also adds your username to the docker group. Note: this docker install script logs you off so that changes can take effect, so you need to log back in.
cd /opt/docker 
chmod +x docker-install.sh
./docker-install.sh -u $USER
  1. Edit the let's encrypt script do_get, replacing the CERTS and EMAIL with your settings.
cd /opt/docker/nginx
vi do_get
  1. Run the script to get your certificates.
chmod +x do_get
./do_get
  1. Stop the running docker container CTRL-Z, then remove the docker container docker rm -f cert

  2. Grep for all the places to change the domain name

cd /opt/docker
grep 'js-169-194.jetstream-cloud.org' -r *

and edit those, specifying your endpoint (e.g. "js-169-102.jetstream-cloud.org")

  1. get your user id and the docker group id:
id

and edit the thredds.env file, setting TOMCAT_USER_ID to your user id (uid), and TOMCAT_GROUP_ID to the docker group id.

  1. Edit docker-compose.yml and make sure it looks okay.
cd /opt/docker
vi docker-compose.yml
  1. Create a data directory with a sample netcdf file
sudo mkdir /data
cd /data
sudo wget http://geoport.whoi.edu/thredds/fileServer/examples/bora_feb.nc
  1. Fire up the containers.
cd /opt/docker
docker-compose up -d
  1. login to the pycsw container and run pycsw_setup:
docker exec -it pycsw bash
pycsw_setup
exit
  1. Grep for all the tomcat-user passwords to change:

cd /opt/docker
grep 'changeme' -r *

and edit the tomcat-users.xml files to enter your SHA1 passwords (can use http://www.sha1-online.com/ to generate)

  1. Stop and restart the Docker containers
cd /opt/docker
docker-compose down
docker-compose up -d