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

🚀 Deploy ollamate #7177

Merged
merged 7 commits into from
Jul 23, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,20 @@ resource "helm_release" "ui" {
)
]
}

# resource "helm_release" "ollamate" {
# /* https://github.com/ministryofjustice/analytical-platform-ollamate */
# name = "ui"
# repository = "oci://ghcr.io/ministryofjustice/analytical-platform-charts"
# version = "0.0.0-rc1"
# chart = "analytical-platform-ollamate"
# namespace = kubernetes_namespace.ollamate.metadata[0].name
# values = [
# templatefile(
# "${path.module}/src/helm/values/ollamate/values.yml.tftpl",
# {
# ollamate_hostname = "ollamate.${local.environment_configuration.route53_zone}"
# }
# )
# ]
# }
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,14 @@ resource "kubernetes_namespace" "ui" {
}
}
}

resource "kubernetes_namespace" "ollamate" {
metadata {
name = "ollamate"
labels = {
"pod-security.kubernetes.io/enforce" = "restricted"
"compute.analytical-platform.service.justice.gov.uk/workload" = "ollamate"
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ apiVersion: v2
name: karpenter-configuration
description: A Helm chart to deploy Karpenter's configuration
type: application
version: 1.0.0
version: 1.2.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
name: bottlerocket-gpu
spec:
amiFamily: Bottlerocket
role: {{ .Values.nodeRole }}
subnetSelectorTerms:
- tags:
karpenter.sh/discovery: {{ .Values.clusterName }}
securityGroupSelectorTerms:
- tags:
karpenter.sh/discovery: {{ .Values.clusterName }}
amiSelectorTerms:
- name: "bottlerocket-aws-k8s-{{ .Values.clusterVersion }}-nvidia-x86_64-v{{ .Values.nodeVersion }}"
metadataOptions:
httpEndpoint: enabled
httpPutResponseHopLimit: 1
httpTokens: required
blockDeviceMappings:
- deviceName: /dev/xvdb
ebs:
volumeSize: 100Gi
volumeType: gp3
iops: 3000
encrypted: true
kmsKeyID: {{ .Values.ebsKmsKeyId }}
deleteOnTermination: true
throughput: 125
detailedMonitoring: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: karpenter.sh/v1beta1
kind: NodePool
metadata:
name: gpu-on-demand
spec:
disruption:
consolidationPolicy: WhenUnderutilized
template:
metadata:
labels:
compute.analytical-platform.service.justice.gov.uk/karpenter-node-pool: "gpu-on-demand"
spec:
nodeClassRef:
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
name: bottlerocket-gpu
taints:
- key: compute.analytical-platform.service.justice.gov.uk/karpenter-node-pool
value: "gpu-on-demand"
effect: NoSchedule
requirements:
- key: kubernetes.io/arch
operator: In
values: ["amd64"]
- key: kubernetes.io/os
operator: In
values: ["linux"]
- key: karpenter.sh/capacity-type
operator: In
values: ["on-demand"]
- key: node.kubernetes.io/instance-type
operator: In
values: ["p3.2xlarge"]