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 @@ -21,6 +21,8 @@ spec:
value: "http://pyciemss-api:3040"
- name: CLIMATE-DATA-SERVICE_URL
value: "http://climate-data:8000"
- name: COSMOS-SERVICE_URL
value: "http://cosmos:4048"
- name: FUNMAN-SERVICE_URL
value: "http://funman:8190"
- name: GOOGLE-ANALYTICS-ID
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/overlays/prod/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
- ../../../base/hmi/documentation
- ../../../base/hmi/server
- ../../../base/services/climate-data
- ../../../base/services/cosmos
- ../../../base/services/beaker
- ../../../base/services/data-service
- ../../../base/services/funman
Expand All @@ -29,6 +30,7 @@ patches:
- 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 @@ -31,6 +31,7 @@ patches:
- path: services/funman/funman-deployment.yaml
- path: services/climate-data/climate-data-deployment.yaml
- path: services/climate-data/climate-data-worker-deployment.yaml
- path: services/cosmos/cosmos-service.yaml
- path: services/gollm-taskrunner/gollm-taskrunner-deployment.yaml
- path: services/pyciemss-service/pyciemss-api-deployment.yaml
- path: services/pyciemss-service/pyciemss-worker-deployment.yaml
Expand Down Expand Up @@ -131,3 +132,7 @@ images:
- name: mira-taskrunner-image
newName: ghcr.io/darpa-askem/mira-taskrunner
newTag: 'latest'

- name: cosmos-image
newName: ghcr.io/darpa-askem/cosmos-service
newTag: 'cpu-2024_04_19'
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,21 @@ spec:
port:
number: 8000

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

tls:
- hosts:
- "app.staging.terarium.ai"
- "cosmos.staging.terarium.ai"
- "server.staging.terarium.ai"
- "graphdb.staging.terarium.ai"
- "documentation.staging.terarium.ai"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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/funman/funman-deployment.yaml
- path: services/gollm-taskrunner/gollm-taskrunner-deployment.yaml
Expand Down Expand Up @@ -133,3 +134,8 @@ images:
- name: mira-taskrunner-image
newName: ghcr.io/darpa-askem/mira-taskrunner
newTag: 'latest'

# mira taskrunner
bigglesandginger marked this conversation as resolved.
Show resolved Hide resolved
- name: cosmos-image
newName: ghcr.io/darpa-askem/cosmos-service
newTag: 'cpu-2024_04_19'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Service
metadata:
name: cosmos
spec:
type: NodePort