-
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).
-
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
- 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
- Edit the let's encrypt script
do_get, replacing theCERTSandEMAILwith your settings.
cd /opt/docker/nginx
vi do_get
- Run the script to get your certificates.
chmod +x do_get
./do_get
-
Stop the running docker container
CTRL-Z, then remove the docker containerdocker rm -f cert -
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")
- 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.
- Edit docker-compose.yml and make sure it looks okay.
cd /opt/docker
vi docker-compose.yml
- 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
- Fire up the containers.
cd /opt/docker
docker-compose up -d
- login to the pycsw container and run
pycsw_setup:
docker exec -it pycsw bash
pycsw_setup
exit
- 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)
- Stop and restart the Docker containers
cd /opt/docker
docker-compose down
docker-compose up -d