Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/40/visus deployment #1

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion postgres-esgcet/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: postgres-esgcet
image: esgfhub/postgres-esgcet:latest
image: esgfhub/postgres:latest
ports:
- name: postgres
containerPort: 5432
Expand Down
8 changes: 4 additions & 4 deletions proxy/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -60,4 +60,4 @@ spec:
- path: /
backend:
serviceName: esgf-cog
servicePort: 8000
servicePort: 8000
2 changes: 1 addition & 1 deletion scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions slcs/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,20 @@ 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
valueFrom:
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
Expand Down
70 changes: 70 additions & 0 deletions visus/deployment.yaml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions visus/ingress.yaml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions visus/service.yaml
Original file line number Diff line number Diff line change
@@ -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