Skip to content

Commit

Permalink
Attempt On demand profile option
Browse files Browse the repository at this point in the history
  • Loading branch information
asmacdo committed Sep 9, 2024
1 parent 45ef110 commit 565313c
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
15 changes: 15 additions & 0 deletions addons.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ module "eks_blueprints_addons" {
<<-EOT
clusterName: ${module.eks.cluster_name}
karpenterRole: ${split("/", module.eks_blueprints_addons.karpenter.node_iam_role_arn)[1]}
capacityTypes: ["spot"]
EOT
]
}
karpenter-resources-cpu-on-demand = {
name = "karpenter-resources-cpu-on-demand"
description = "A Helm chart for karpenter CPU based resources"
chart = "${path.module}/helm/karpenter-resources"
values = [
<<-EOT
name: cpu-on-demand
clusterName: ${module.eks.cluster_name}
instanceSizes: ["xlarge", "2xlarge", "4xlarge", "8xlarge", "16xlarge", "24xlarge"]
karpenterRole: ${split("/", module.eks_blueprints_addons.karpenter.node_iam_role_arn)[1]}
capacityTypes: ["on-demand"]
EOT
]
}
Expand Down
24 changes: 24 additions & 0 deletions envs/dandi-staging/managed-jupyterhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,30 @@ singleuser:
kubespawner_override:
image: ${singleuser_image_repo}:${singleuser_image_tag}
display_name: Image
- default: true
description: 6 CPU / 16 GB up to 12C/32G. May take up to 15 mins to start.
display_name: Base On Demand
kubespawner_override:
cpu_guarantee: 6
cpu_limit: 12
image_pull_policy: Always
mem_guarantee: 16G
mem_limit: 32G
node_selector:
NodePool: cpu-on-demand
profile_options:
image:
choices:
matlab:
display_name: MATLAB (must provide your own license)
kubespawner_override:
image: ${singleuser_image_repo}:${singleuser_image_tag}-matlab
standard:
default: true
display_name: Standard
kubespawner_override:
image: ${singleuser_image_repo}:${singleuser_image_tag}
display_name: Image
- default: true
description: 6 CPU / 16 GB up to 12C/32G. May take up to 15 mins to start.
display_name: Base
Expand Down
2 changes: 1 addition & 1 deletion envs/dandi-staging/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "eks-hub-staging"
singleuser_image_repo = "dandiarchive/dandihub"
region = "us-east-2"
region = "us-west-2"
singleuser_image_tag = "latest"
jupyterhub_domain = "hub-staging.dandiarchive.org"
dandi_api_domain = "https://api.dandiarchive.org"
25 changes: 25 additions & 0 deletions envs/shared/jupyterhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ singleuser:
mem_guarantee: 0.5G
node_selector:
NodePool: default
- display_name: "Base On Demand"
description: "6 CPU / 16 GB up to 12C/32G. May take up to 15 mins to start."
profile_options:
image:
display_name: "Image"
choices:
standard:
display_name: "Standard"
default: true
kubespawner_override:
image: "${singleuser_image_repo}:${singleuser_image_tag}"
matlab:
display_name: "MATLAB (must provide your own license)"
kubespawner_override:
image: "${singleuser_image_repo}:${singleuser_image_tag}-matlab"
default: true
kubespawner_override:
image_pull_policy: Always
cpu_limit: 12
cpu_guarantee: 6
mem_limit: 32G
mem_guarantee: 16G
node_selector:
NodePool: cpu-on-demand
- display_name: "Base"
description: "6 CPU / 16 GB up to 12C/32G. May take up to 15 mins to start."
profile_options:
Expand All @@ -83,6 +107,7 @@ singleuser:
mem_guarantee: 16G
node_selector:
NodePool: default

- display_name: "Medium"
description: "12C/32G up to 24C/64G. May take up to 15 mins to start."
profile_options:
Expand Down
3 changes: 2 additions & 1 deletion helm/karpenter-resources/templates/node-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ spec:
values: ["amd64"]
- key: "karpenter.sh/capacity-type"
operator: In
values: ["spot"]
values:
- {{ .Values.capacityTypes }}
disruption:
consolidationPolicy: WhenEmpty
consolidateAfter: 30s
Expand Down

0 comments on commit 565313c

Please sign in to comment.