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

Fixing the problem with running CoG standalone.

parent fb3199c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ COPY conf/supervisord.cog.conf /etc/supervisor/conf.d/supervisord.cog.conf
#COPY  scripts/wait_for_postgres.sh /usr/local/bin/wait_for_postgres.sh
#COPY  scripts/process_esgf_config_archive.sh /usr/local/bin/process_esgf_config_archive.sh

# wait for Postgred connection to be ready
# wait for Postgres connection to be ready
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
# will override these CMD options at run time
CMD ["localhost", "false", "true"]
+10 −8
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ echo "ESGF_FLAG=$ESGF_FLAG"
export RUNSERVER=$3
echo "RUNSERVER=$RUNSERVER"

if [ $ESGF_FLAG == "true" ]; then
   echo "untar grid certificates"
   mkdir /etc/grid-security
   tar --same-owner -pxaf /root/archives/grid_security_certs.tar.xz -C /etc/grid-security
@@ -24,6 +25,7 @@ chmod -R 664 /etc/grid-security/certificates

   # wait for Postgred connection to be ready
   /usr/local/bin/wait_for_postgres.sh
fi

# execute CoG initialization
if [ $INIT == "true" ]; then
+84 −0
Original line number Diff line number Diff line
apiVersion: v1
kind: Service
metadata:
  name: esgf-data-node
  labels:
    stack: esgf
    app: data-node
spec:
  type: NodePort
  ports:
  - port: 8080 # host port
    targetPort: 8080 # container port
    protocol: TCP
    name: tomcat-http
  - port: 8443
    targetPort: 8443
    protocol: TCP
    name: tomcat-https
  selector:
    stack: esgf
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: esgf-data-node
spec:
  replicas: 1
  template:
    metadata:
      labels:
        stack: esgf
        app: data-node
    spec:
      containers:
      - name: esgf-tds
        image: esgfhub/esgf-tds:devel
        ports:
        - containerPort: 8080
        - containerPort: 8443
        volumeMounts:
        - name: tds-data
          mountPath: /esg/content/thredds
        - name: esgf-config-archive
          mountPath: /root/archives/esgf_config.tar.xz
        - name: tds-web-xml
          mountPath: /usr/local/tomcat/webapps/thredds/WEB-INF/web.xml
        - name: tomcat-esg-truststore
          mountPath: /usr/java/latest/jre/lib/security/jssecacerts
        #readinessProbe:
        #  httpGet:
        #    path: /thredds
        #    port: 8080
        #  initialDelaySeconds: 5
        #  periodSeconds: 10
      - name: esgf-orp
        image: esgfhub/esgf-orp:devel
        ports:
        - containerPort: 8080
        - containerPort: 8443
        volumeMounts:
        - name: esgf-config-archive
          mountPath: /root/archives/esgf_config.tar.xz
        - name: tomcat-esg-truststore
          mountPath: /usr/java/latest/jre/lib/security/jssecacerts
        #readinessProbe:
        #  httpGet:
        #    path: /esg-orp/home.htm
        #    scheme: HTTPS
        #    port: 8443
        #  initialDelaySeconds: 10
        #  periodSeconds: 10
        #  timeoutSeconds: 2
      volumes:
      - name: tds-data
        emptyDir: {}
      - name: esgf-config-archive
        hostPath:
          path: /Users/cinquini/ESGF_CONFIG/archives/esgf_config.tar.xz
      - name: tds-web-xml
        hostPath:
          path: /Users/cinquini/ESGF_CONFIG/webapps/thredds/WEB-INF/web.xml
      - name: tomcat-esg-truststore
        hostPath:
          path: /Users/cinquini/ESGF_CONFIG/esg/config/tomcat/esg-truststore.ts
+9 −0
Original line number Diff line number Diff line
apiVersion: v1
data:
  tls.crt: /Users/cinquini/ESGF_CONFIG/httpd/certs/hostcert.pem
  tls.key: /Users/cinquini/ESGF_CONFIG/httpd/certs/hostcert.key
kind: Secret
metadata:
  name: esgf-secret
  namespace: default
type: Opaque
+42 −0
Original line number Diff line number Diff line
apiVersion: v1
kind: Pod
metadata:
  name: esgf-tds
  labels:
    stack: esgf
    app: tds
spec:
  containers:
  - name: esgf-tds
    image: esgfhub/esgf-tds:devel
    ports:
    - containerPort: 8080
    - containerPort: 8443
    volumeMounts:
    - name: tds-data
      mountPath: /esg/content/thredds
    - name: esgf-config-archive
      # if using hostPath
      mountPath: /root/archives/esgf_config.tar.xz
      # if using configMap
      #mountPath: /root/archives
    - name: thredds-web-xml
      mountPath: /usr/local/web.xml
    #readinessProbe:
    #  httpGet:
    #    path: /thredds
    #    port: 8080
    #  initialDelaySeconds: 10
    #  periodSeconds: 10

  volumes:
  - name: tds-data
    emptyDir: {}
  - name: esgf-config-archive
    hostPath:
      path: /Users/cinquini/ESGF_CONFIG/archives/esgf_config.tar.xz
    #configMap:
    #  name: esgf-config-files
  - name: thredds-web-xml
    configMap:
      name: tds-web-xml