From 545dc65bf44d6416c43e73e1fdc15fc9693d67ed Mon Sep 17 00:00:00 2001 From: YuviPanda Date: Wed, 26 May 2021 00:33:35 +0530 Subject: [PATCH] Add hub for MOEM-IGE group - traefik tag bump was required to get LE working. It's already bumped in newer z2jh versions - NFS server was again set up manually, and needed the `insecure` flag - even though other hubs are setup the same way and didn't need this. NFS situation needs to be sorted. Ref https://github.com/2i2c-org/pilot-hubs/issues/207 --- config/hubs/meom.cluster.yaml | 88 +++++++++++++++++++++++++++++++ hub-templates/basehub/values.yaml | 2 + terraform/meom.tfvars | 15 ++++++ 3 files changed, 105 insertions(+) create mode 100644 config/hubs/meom.cluster.yaml create mode 100644 terraform/meom.tfvars diff --git a/config/hubs/meom.cluster.yaml b/config/hubs/meom.cluster.yaml new file mode 100644 index 0000000000..49810756ab --- /dev/null +++ b/config/hubs/meom.cluster.yaml @@ -0,0 +1,88 @@ +name: meom +provider: gcp +gcp: + key: secrets/meom.json + project: meom-ige-cnrs + cluster: meom-cluster + zone: us-central1-b +hubs: + - name: staging + domain: staging.meom-ige.2i2c.cloud + template: daskhub + auth0: + connection: github + config: &meomConfig + basehub: + nfsPVC: + nfs: + # from https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html + mountOptions: + - rsize=1048576 + - wsize=1048576 + - timeo=600 + - soft # We pick soft over hard, so NFS lockups don't lead to hung processes + - retrans=2 + - noresvport + serverIP: nfs-server-01 + baseShareName: /export/home-01/homes/ + jupyterhub: + custom: + homepage: + templateVars: + org: + name: "SWOT Ocean Pangeo Team" + logo_url: https://2i2c.org/media/logo.png + url: https://2i2c.org + designed_by: + name: 2i2c + url: https://2i2c.org + operated_by: + name: 2i2c + url: https://2i2c.org + funded_by: + name: SWOT Ocean Pangeo Team + url: https://2i2c.org + singleuser: + image: + name: pangeo/pangeo-notebook + tag: 2021.02.19 + scheduling: + userPlaceholder: + enabled: false + replicas: 0 + userScheduler: + enabled: false + proxy: + service: + type: LoadBalancer + https: + enabled: true + hub: + config: + Authenticator: + allowed_users: &users + - roxyboy + - lesommer + - auraoupa + - yuvipanda + - choldgraf + - GeorgianaElena + admin_users: *users + + allowNamedServers: true + networkPolicy: + # FIXME: For dask gateway + enabled: false + readinessProbe: + enabled: false + dask-gateway: + extraConfig: + idle: | + # timeout after 30 minutes of inactivity + c.KubeClusterConfig.idle_timeout = 1800 + - name: prod + domain: meom-ige.2i2c.cloud + template: daskhub + auth0: + connection: github + config: *meomConfig diff --git a/hub-templates/basehub/values.yaml b/hub-templates/basehub/values.yaml index 48c6aa509b..97a240da07 100644 --- a/hub-templates/basehub/values.yaml +++ b/hub-templates/basehub/values.yaml @@ -86,6 +86,8 @@ jupyterhub: limits: memory: 1Gi traefik: + image: + tag: v2.4.8 nodeSelector: hub.jupyter.org/node-purpose: core resources: diff --git a/terraform/meom.tfvars b/terraform/meom.tfvars new file mode 100644 index 0000000000..60bd9f85f3 --- /dev/null +++ b/terraform/meom.tfvars @@ -0,0 +1,15 @@ +prefix = "meom" +project_id = "meom-ige-cnrs" + +# Inane CPU requests mean we need at least 3 CPUs for a base node?!?! +# But, we can't have custom machine sizes with odd number of CPUs - +# only even numbers. So we go with 4. 3840 is the smallest amount +# of RAM a 4 CPU n1 instance can have. +core_node_machine_type = "n1-custom-4-3840" + +# Give each user ~4G of RAM and ~2CPU +user_node_machine_type = "n1-custom-2-4096" + + +# dask nodes are e2 since they are expected to autoscale +dask_node_machine_type = "e2-custom-2-4096"