Commit d3014839 authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Merge branch 'devel'

parents c6c4dad6 099ace90
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ services:
      - "8080"
      - "8443"
    ports:
      - "8081:8080"
      - "8444:8443"
      - "8080:8080"
      - "8443:8443"
    depends_on:
      - esgf-solr
    volumes_from:
+91 −0
Original line number Diff line number Diff line
# docker-compose file for setting up an ESGF Solr Cloud

version: '2'

services:

  # data container holding site-specific ESGF configuration
  esgf-config:
    image: centos:centos6.7
    container_name: esgf-config
    volumes:
     # esgf.properties
     - $ESGF_CONFIG/esg/config/:/esg/config/
     # apache httpd certificates and configuration
     - $ESGF_CONFIG/httpd/certs/:/etc/certs/
     - $ESGF_CONFIG/httpd/conf/esgf-httpd.conf:/etc/httpd/conf.d/esgf-httpd.conf
     # Tomcat configuration
     - $ESGF_CONFIG/esg/config/tomcat/esg-truststore.ts:/usr/java/latest/jre/lib/security/jssecacerts

  # node with 3 Solr instances + embedded ZooKeeper
  # note: use service name='esgf-solr' to match value of property used by esgf-search to connect to solr:
  # esg.search.solr.query.url=http://esgf-solr:8983/solr
  esgf-solr:
    image: esgfhub/esgf-solr-cloud
    container_name: esgf-solr
    ports:
      - "8983:8983"
      - "9983:9983"
      - "8984:8984"
      - "8985:8985"
    networks:
      - default
    entrypoint: /usr/local/bin/docker-entrypoint.sh
    volumes:
      - solr_cloud_data1:/esg/solr-cloud-home

  # other node with 3 Solr instances
  esgf-solr2:
    image: esgfhub/esgf-solr-cloud
    container_name: esgf-solr2
    expose:
      - "8983"
      - "8984"
      - "8985"
    networks:
      - default
    entrypoint: /usr/local/bin/docker-entrypoint.sh esgf-solr-cloud1
    volumes:
      - solr_cloud_data2:/esg/solr-cloud-home
    # dependency garantees that this node does not start untill ZK is up
    depends_on:
      - esgf-solr

  # ESGF search web application
  esgf-index-node:
    image: esgfhub/esgf-index-node
    container_name: index-node
    expose:
      - "8080"
      - "8443"
    ports:
      - "8080:8080"
      - "8443:8443"
    depends_on:
      - esgf-solr
      - esgf-solr2
    networks:
      - default
    volumes_from:
      - esgf-config

  # apache httpd front-end
  esgf-httpd:
   image: esgfhub/esgf-httpd
   container_name: httpd
   entrypoint: /usr/local/bin/docker-entrypoint.sh
   volumes_from:
     - esgf-config
   ports:
     - "80:80"
     - "443:443"
   # httpd URLs must use hostname=$ESGF_HOSTNAME
   networks:
     default:
       aliases:
         - "${ESGF_HOSTNAME}"

# persistent volumes containing Solr index data and configuration (one for each container)
volumes:
  solr_cloud_data1:
  solr_cloud_data2:
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ pushit=${1:-false}
wrkdir=`pwd`

# loop over ordered list of ESGF images
subdirs=('node' 'postgres' 'tomcat' 'solr' 'httpd' 'cog' 'data-node' 'idp-node' 'index-node', 'vsftp')
subdirs=('node' 'postgres' 'tomcat' 'solr' 'httpd' 'cog' 'data-node' 'idp-node' 'index-node' 'vsftp' 'solr-cloud')

for subdir in ${subdirs[*]}; do
   # cd to parallel directory

solr-cloud/Dockerfile

0 → 100644
+41 −0
Original line number Diff line number Diff line
# Solr-Cloud installation configured for ESGF data

FROM esgfhub/esgf-node

MAINTAINER Luca Cinquini <luca.cinquini@jpl.nasa.gov>

# Maven
ENV MAVEN_VERSION 3.3.9
RUN mkdir -p /usr/share/maven \
    && curl -fsSL http://mirrors.sonic.net/apache/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz \
       | tar -xzC /usr/share/maven --strip-components=1 \
    && ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
ENV MAVEN_HOME /usr/share/maven
VOLUME /root/.m2

# create installation and data directories
ENV SOLR_CLOUD_INSTALL /usr/local/solr-cloud-install
RUN mkdir -p $SOLR_CLOUD_INSTALL
ENV SOLR_CLOUD_HOME /esg/solr-cloud-home
RUN mkdir -p $SOLR_CLOUD_HOME

# mvn: install 3 Solr instances configured for ESGF
ENV SRC_DIR /usr/local/src
RUN mkdir  -p $SRC_DIR
RUN cd $SRC_DIR && \
    git clone https://github.com/ESGF/esg-search.git && \
    cd esg-search && \
    git checkout -b devel origin/devel && \
    cd etc/solr-cloud && \    
    mvn install

# Python software for harvesting/migrating Solr catalogs
# and dependencies
RUN pip install solrpy
RUN cd $SRC_DIR && \
    git clone https://github.com/EarthSystemCoG/esgfpy-publish.git

# scripts
COPY scripts/ /usr/local/bin/

EXPOSE 8983 8984 8985
+10 −0
Original line number Diff line number Diff line
#!/bin/bash
# script to start all Solr instances om this node
# and keep the Docker container running

# optional FQDN for ZooKeeper host
zkhost=$1

/usr/local/bin/solr_cloud_start.sh $zkhost

tail -f $SOLR_CLOUD_INSTALL/solr/server/logs/solr.log
Loading