Skip to content

Commit

Permalink
add variables for configuring aad and jupyterhub helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
cdkharris committed Oct 3, 2024
1 parent 4b30102 commit d6c7346
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module "ssrc-jupyter-dept" {

public_key_openssh = var.public_key_openssh

z2jupyterhub_version = "3.3.8"

aad_client_id = var.aad_client_id
aad_client_secret = var.aad_client_secret
aad_tenant_id = var.aad_tenant_id
Expand Down
4 changes: 2 additions & 2 deletions terraform/modules/jupyter/install_jupyterhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ curl https://raw.githubusercontent.com/helm/helm/HEAD/scripts/get-helm-3 | bash
helm repo add jupyterhub https://hub.jupyter.org/helm-chart/
helm repo update
helm upgrade --cleanup-on-fail \
--install demo jupyterhub/jupyterhub \
--install jupyterhub jupyterhub/jupyterhub \
--namespace jupyterhub --create-namespace \
--version=3.3.7 \
--version=${z2jupyterhub_version} \
--values jupyterhub_config.yaml

kubectl config set-context $(kubectl config current-context) --namespace jupyterhub
7 changes: 6 additions & 1 deletion terraform/modules/jupyter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ resource "harvester_cloudinit_secret" "cloud-config-jupyter" {
}
)
)
install_jupyterhub_script = indent(6, file("${path.module}/install_jupyterhub.sh"))
install_jupyterhub_script = indent(6, templatefile(
"${path.module}/install_jupyterhub.sh",
{
z2jupyterhub_version = var.z2jupyterhub_version
}
))
})
}

Expand Down
5 changes: 5 additions & 0 deletions terraform/modules/jupyter/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,9 @@ variable "aad_client_secret" {

variable "aad_tenant_id" {
type = string
}

variable "z2jupyterhub_version" {
type = string
description = "Version of the z2jupyterhub helm chart"
}
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ variable "aad_client_secret" {

variable "aad_tenant_id" {
type = string
}
}

0 comments on commit d6c7346

Please sign in to comment.