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 cloud provider to the dask config.json file #2266

Merged
merged 2 commits into from
Feb 20, 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
2 changes: 2 additions & 0 deletions src/_nebari/stages/kubernetes_services/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ class JupyterhubInputVars(schema.Base):
class DaskGatewayInputVars(schema.Base):
dask_worker_image: ImageNameTag = Field(alias="dask-worker-image")
dask_gateway_profiles: Dict[str, Any] = Field(alias="dask-gateway-profiles")
cloud_provider: str = Field(alias="cloud-provider")


class MonitoringInputVars(schema.Base):
Expand Down Expand Up @@ -518,6 +519,7 @@ def input_vars(self, stage_outputs: Dict[str, Dict[str, Any]]):
self.config.default_images.dask_worker
),
dask_gateway_profiles=self.config.profiles.dict()["dask_worker"],
cloud_provider=cloud_provider,
viniciusdc marked this conversation as resolved.
Show resolved Hide resolved
)

monitoring_vars = MonitoringInputVars(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ variable "dask-gateway-profiles" {
description = "Dask Gateway profiles to expose to user"
}


# =================== RESOURCES =====================
module "dask-gateway" {
source = "./modules/kubernetes/services/dask-gateway"
Expand Down Expand Up @@ -39,4 +38,6 @@ module "dask-gateway" {

# profiles
profiles = var.dask-gateway-profiles

cloud-provider = var.cloud-provider
}
5 changes: 0 additions & 5 deletions src/_nebari/stages/kubernetes_services/template/jupyterhub.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ variable "idle-culler-settings" {
type = any
}

variable "cloud-provider" {
description = "Name of cloud provider."
type = string
}

module "kubernetes-nfs-server" {
count = var.jupyterhub-shared-endpoint == null ? 1 : 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,9 @@ def list_dask_environments():

def base_node_group(options):
key = config["worker-node-group"]["key"]
if config.provider.value == "aws":
if config.get("provider", "") == "aws":
key = "dedicated"
default_node_group = {
key: config["worker-node-group"]["value"],
# config["worker-node-group"]["key"]: config["worker-node-group"]["value"],
}
default_node_group = {key: config["worker-node-group"]["value"]}

# check `worker_extra_pod_config` first
worker_node_group = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ resource "kubernetes_secret" "gateway" {
conda-store-api-token = var.conda-store-api-token
conda-store-service-name = var.conda-store-service-name
conda-store-namespace = var.namespace
provider = var.cloud-provider
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,8 @@ variable "conda-store-service-name" {
description = "internal service-name:port where conda-store can be reached"
type = string
}

variable "cloud-provider" {
description = "Name of the cloud provider to deploy to."
type = string
}
6 changes: 6 additions & 0 deletions src/_nebari/stages/kubernetes_services/template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ variable "jupyterlab-pioneer-log-format" {
description = "Logging format for JupyterLab Pioneer"
type = string
}

variable "jhub-apps-enabled" {
description = "Enable JupyterHub Apps"
type = bool
}

variable "cloud-provider" {
description = "Name of cloud provider."
type = string
}
Loading