From 5c169c064a670fd463930ac6b862ec75acc4ea40 Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Wed, 10 Oct 2018 17:04:34 -0700 Subject: [PATCH 1/5] Seems the docker image name has changed. --- postgres-esgcet/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-esgcet/deployment.yaml b/postgres-esgcet/deployment.yaml index 51c3abc..eb2ee3a 100644 --- a/postgres-esgcet/deployment.yaml +++ b/postgres-esgcet/deployment.yaml @@ -19,7 +19,7 @@ spec: spec: containers: - name: postgres-esgcet - image: esgfhub/postgres-esgcet:latest + image: esgfhub/postgres:latest ports: - name: postgres containerPort: 5432 From 8bf4c52dfb5ca8b51d4fcc7dec850385e011c4d2 Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Wed, 10 Oct 2018 17:05:04 -0700 Subject: [PATCH 2/5] My minikube IP was different so had to change this. --- proxy/ingress.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/proxy/ingress.yaml b/proxy/ingress.yaml index f993153..4e85272 100644 --- a/proxy/ingress.yaml +++ b/proxy/ingress.yaml @@ -22,11 +22,11 @@ metadata: spec: tls: # FIXME: minikube ip - - hosts: - - esgf.192.168.64.66.xip.io + - hosts: + - esgf.192.168.99.105.xip.io secretName: esgf-hostcert rules: - - host: esgf.192.168.64.66.xip.io + - host: esgf.192.168.99.105.xip.io http: paths: - path: /thredds @@ -60,4 +60,4 @@ spec: - path: / backend: serviceName: esgf-cog - servicePort: 8000 \ No newline at end of file + servicePort: 8000 From 2ae3c5ef298d50ec306a26dfcd6fb7b5beeaf5ab Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Wed, 10 Oct 2018 17:05:28 -0700 Subject: [PATCH 3/5] enabled ingress because I was deploying to minikube --- scripts/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 66c81d0..5486be1 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -50,7 +50,7 @@ kubectl create -f slcs/service.yaml sleep 5 # minikube: expose stack via Ingress -# kubectl create -f proxy/ingress.yaml +kubectl create -f proxy/ingress.yaml # GKE: expose stack via Service of type LoadBalancer tied to a static IP address # kubectl create -f proxy/deployment.yaml From 39c79991f3b4dd5fac6e02cbf624098460cf1726 Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Wed, 10 Oct 2018 17:06:11 -0700 Subject: [PATCH 4/5] A bunch of the environment variable names seemed to have changed. --- slcs/deployment.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/slcs/deployment.yaml b/slcs/deployment.yaml index 7f63bd4..58aa7d7 100644 --- a/slcs/deployment.yaml +++ b/slcs/deployment.yaml @@ -162,8 +162,8 @@ spec: key: root-admin-email # Other SLCS-specific settings - name: ESGF_SLCS_URL - valueFrom: - configMapKeyRef: + valueFrom: + configMapKeyRef: name: esgf-config key: slcs-url - name: ESGF_SLCS_BASIC_AUTH_REALM @@ -171,11 +171,11 @@ spec: configMapKeyRef: name: esgf-config key: esgf-hostname - - name: ONLINECA_CERT_SUBJECT_TEMPLATE + - name: ONLINECA_SUBJECT_NAME_TEMPLATE value: /DC=esgf/CN=$$OPENID - - name: ONLINECA_CERT_FILEPATH + - name: ONLINECA_CERT_PATH value: /esg/certificates/slcsca/ca.crt - - name: ONLINECA_KEY_FILEPATH + - name: ONLINECA_KEY_PATH value: /esg/certificates/slcsca/ca.key - name: ONLINECA_TRUSTROOTS_DIR value: /esg/certificates/slcsca/trustroots From 0e568cee839597fe26e3b0ede5da5d6ec5336545 Mon Sep 17 00:00:00 2001 From: Frank Greguska Date: Wed, 10 Oct 2018 17:06:53 -0700 Subject: [PATCH 5/5] New visus deployment service and ingress --- visus/deployment.yaml | 70 +++++++++++++++++++++++++++++++++++++++++++ visus/ingress.yaml | 22 ++++++++++++++ visus/service.yaml | 15 ++++++++++ 3 files changed, 107 insertions(+) create mode 100644 visus/deployment.yaml create mode 100644 visus/ingress.yaml create mode 100644 visus/service.yaml diff --git a/visus/deployment.yaml b/visus/deployment.yaml new file mode 100644 index 0000000..56c5066 --- /dev/null +++ b/visus/deployment.yaml @@ -0,0 +1,70 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: esgf-visus-config-js +data: + config.js: | + // Settings for your webviewer installation + + // Server module URL + DEFAULT_SERVER='http://esgf.192.168.99.105.xip.io/esgf-visus/mod_visus?'; + +--- + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: "esgf-visus" + labels: + stack: esgf + component: visus +spec: + replicas: 1 + # Select pods on release and component only, rather than all labels + # This means that the selector will match all pods from all versions of the chart when upgrading + selector: + matchLabels: + stack: esgf + component: visus + template: + metadata: + labels: + stack: esgf + component: visus + spec: + # Setting fsGroup for the pod allows some provisioners to chown mounted volumes to the given group + # The publish group is 1001 inside the container + securityContext: + fsGroup: 1001 + containers: + - name: visus + image: visus/ondemand:latest + imagePullPolicy: Always + ports: + - name: http + containerPort: 80 + # The readiness and liveness probes run the same thing, but the liveness + # probe just waits a while before kicking in whereas the readiness probe + # starts straight away + readinessProbe: &probe + httpGet: + path: / + port: 80 + initialDelaySeconds: 10 + periodSeconds: 10 + livenessProbe: + <<: *probe + initialDelaySeconds: 600 + volumeMounts: + - mountPath: /data/xml + name: tds-data + - mountPath: /home/visus/webviewer/config.js + subPath: config.js + name: config-js + volumes: + - name: tds-data + persistentVolumeClaim: + claimName: esgf-tds-data + - name: config-js + configMap: + name: esgf-visus-config-js diff --git a/visus/ingress.yaml b/visus/ingress.yaml new file mode 100644 index 0000000..22efd3f --- /dev/null +++ b/visus/ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: visus-ingress + annotations: + kubernetes.io/ingress.class: "nginx" + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/add-base-url: "true" + nginx.ingress.kubernetes.io/ssl-redirect: "false" +spec: + rules: + - host: esgf.192.168.99.105.xip.io + http: + paths: + - path: /esgf-visus/ + backend: + serviceName: esgf-visus + servicePort: 8000 + - path: /esgf-visus + backend: + serviceName: esgf-visus + servicePort: 8000 diff --git a/visus/service.yaml b/visus/service.yaml new file mode 100644 index 0000000..e63c535 --- /dev/null +++ b/visus/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: esgf-visus + labels: + stack: esgf + component: visus +spec: + ports: + - name: http + port: 8000 + targetPort: 80 + selector: + stack: esgf + component: visus