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

Add cosmos to kube #411

Merged
merged 13 commits into from
Jul 3, 2024
49 changes: 49 additions & 0 deletions kubernetes/base/services/cosmos/cosmos-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cosmos
labels:
software.uncharted.terarium/name: cosmos
software.uncharted.terarium/component: cosmos
software.uncharted.terarium/service: cosmos
software.uncharted.terarium/part-of: services
spec:
replicas: 1
selector:
matchLabels:
software.uncharted.terarium/name: cosmos
strategy:
type: Recreate
template:
metadata:
labels:
software.uncharted.terarium/name: cosmos
spec:
containers:
- name: cosmos
image: cosmos-image
imagePullPolicy: Always
ports:
- containerPort: 8089
readinessProbe:
httpGet:
path: /
port: 8089
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /
port: 8089
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
resources: {}
imagePullSecrets:
- name: ghcr-cred
restartPolicy: Always
status: {}
22 changes: 22 additions & 0 deletions kubernetes/base/services/cosmos/cosmos-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
apiVersion: v1
kind: Service
metadata:
name: cosmos
labels:
software.uncharted.terarium/name: cosmos
software.uncharted.terarium/component: cosmos
software.uncharted.terarium/service: cosmos
software.uncharted.terarium/part-of: services
annotations:
alb.ingress.kubernetes.io/healthcheck-path: '/ping'
spec:
ports:
- name: 4048-tcp
port: 4048
protocol: TCP
targetPort: 8089
selector:
software.uncharted.terarium/name: cosmos
status:
loadBalancer: {}
7 changes: 7 additions & 0 deletions kubernetes/base/services/cosmos/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: terarium
resources:
- cosmos-deployment.yaml
- cosmos-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ spec:
- name: CIEMSS-SERVICE_URL
value: 'http://pyciemss-api:3040'
- name: CLIMATE-DATA-SERVICE_URL
value: 'http://climate-data:8000'
value: "http://climate-data:8000"
- name: COSMOS-SERVICE_URL
value: "http://cosmos:4048"
- name: GOOGLE-ANALYTICS-ID
valueFrom:
secretKeyRef:
Expand Down
4 changes: 4 additions & 0 deletions kubernetes/overlays/prod/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resources:
- ../../../base/hmi/documentation
- ../../../base/hmi/server
- ../../../base/services/climate-data
- ../../../base/services/cosmos
- ../../../base/services/beaker
- ../../../base/services/data-service
- ../../../base/services/gollm-taskrunner
Expand All @@ -27,6 +28,9 @@ patches:
- path: hmi/server/hmi-server-service.yaml
- path: hmi/server/spicedb-deployment.yaml
- path: hmi/server/spicedb-service.yaml
- path: keycloak/keycloak-deployment.yaml
- path: keycloak/keycloak-service.yaml
- path: services/cosmos/cosmos-deployment.yaml
- path: services/beaker/beaker-deployment.yaml
- path: services/data-service/data-service-graphdb-deployment.yaml
- path: services/climate-data/climate-data-deployment.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cosmos
spec:
strategy:
type: RollingUpdate
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,23 @@ spec:
port:
number: 8000

- host: 'cosmos.dev.terarium.ai'
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: cosmos
port:
number: 4048

tls:
- hosts:
- 'app.dev.terarium.ai'
- 'beaker.dev.terarium.ai'
- 'climate-data.dev.terarium.ai'
- 'cosmos.dev.terarium.ai'
- 'documentation.dev.terarium.ai'
- 'funman.dev.terarium.ai'
- 'graphdb.dev.terarium.ai'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ patches:
- path: services/climate-data/climate-data-deployment.yaml
- path: services/climate-data/climate-data-service.yaml
- path: services/climate-data/climate-data-worker-deployment.yaml
- path: services/cosmos/cosmos-service.yaml
- path: services/data-service/data-service-graphdb-service.yaml
- path: services/mit/mit-tr-service.yaml
- path: services/pyciemss-service/pyciemss-api-deployment.yaml
Expand Down Expand Up @@ -129,6 +130,11 @@ images:
newName: ghcr.io/darpa-askem/mira-taskrunner
newTag: 'latest'

# cosmos (xdd)
- name: cosmos-image
newName: ghcr.io/darpa-askem/cosmos-service
newTag: 'cpu-2024_04_19'

# funman taskrunner
- name: funman-taskrunner-image
newName: ghcr.io/darpa-askem/funman-taskrunner
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Service
metadata:
name: cosmos
spec:
type: ClusterIP
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ images:
newName: ghcr.io/darpa-askem/mira-taskrunner
newTag: '2.14.1'

# cosmos (xdd)
- name: cosmos-image
newName: ghcr.io/darpa-askem/cosmos-service
newTag: 'cpu-2024_04_19'

# funman taskrunner
- name: funman-taskrunner-image
newName: ghcr.io/darpa-askem/funman-taskrunner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,29 @@ spec:
port:
number: 3050

- host: 'cosmos.staging.terarium.ai'
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ssl-redirect
port:
name: use-annotation
- path: /
pathType: Prefix
backend:
service:
name: cosmos
port:
number: 4048

tls:
- hosts:
- 'beaker.staging.terarium.ai'
- 'climate-data.staging.terarium.ai'
- 'cosmos.staging.terarium.ai'
- 'funman.staging.terarium.ai'
- 'graphdb.staging.terarium.ai'
- 'mit-proxy.staging.terarium.ai'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ patches:
- path: services/climate-data/climate-data-deployment.yaml
- path: services/climate-data/climate-data-service.yaml
- path: services/climate-data/climate-data-worker-deployment.yaml
- path: services/cosmos/cosmos-service.yaml
- path: services/data-service/data-service-graphdb-service.yaml
- path: services/gollm-taskrunner/gollm-taskrunner-deployment.yaml
- path: services/mit/mit-tr-service.yaml
Expand Down Expand Up @@ -114,6 +115,11 @@ images:
newName: ghcr.io/darpa-askem/mira-taskrunner
newTag: 'latest'

# cosmos (xdd)
- name: cosmos-image
newName: ghcr.io/darpa-askem/cosmos-service
newTag: 'cpu-2024_04_19'

# funman taskrunner
- name: funman-taskrunner-image
newName: ghcr.io/darpa-askem/funman-taskrunner
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Service
metadata:
name: cosmos
spec:
type: NodePort
Loading