Skip to content

Commit

Permalink
Add jupyterhub-idle-culler to jupyterhub image (nebari-dev#959)
Browse files Browse the repository at this point in the history
* Add  jupyterhub-idle-culler to jupyterhub image

* jupyterhub helm_release wait=false; Azure no longer needs project field
  • Loading branch information
danlester authored Dec 8, 2021
1 parent 430ed32 commit 4c2b588
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 6 deletions.
31 changes: 27 additions & 4 deletions docs/source/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ To see available instance types refer to
google_cloud_platform:
project: test-test-test
region: us-central1
availability_zones: ["us-central1-c"]
kubernetes_version: "1.18.16-gke.502"
node_groups:
general:
Expand All @@ -378,16 +377,14 @@ google_cloud_platform:
#### Amazon Web Services (AWS)
Amazon Web Services has similar support to DigitalOcean and does not
allow auto-scaling below 1 node. Additionally, AWS requires that a
Kubernetes cluster run in two Availability Zones (AZs).
allow auto-scaling below 1 node.
Consult [AWS instance types](https://aws.amazon.com/ec2/instance-types/)
for possible options.
```yaml
amazon_web_services:
region: us-west-2
availability_zones: ["us-west-2a", "us-west-2b"]
kubernetes_version: "1.18"
node_groups:
general:
Expand All @@ -404,6 +401,32 @@ amazon_web_services:
max_nodes: 5
```
#### Azure
Microsoft Azure has similar settings for Kubernetes version, region, and instance names - using Azure's available values of course.
Azure also requires a field named `storage_account_postfix` which will have been generated by `qhub init`. This allows qhub to create a Storage Account bucket that should be globally unique.

```
azure:
region: Central US
kubernetes_version: 1.19.11
node_groups:
general:
instance: Standard_D4_v3
min_nodes: 1
max_nodes: 1
user:
instance: Standard_D2_v2
min_nodes: 0
max_nodes: 5
worker:
instance: Standard_D2_v2
min_nodes: 0
max_nodes: 5
storage_account_postfix: t65ft6q5
```
#### Local (Existing) Kubernetes Cluster
Originally designed for QHub deployments on a "local" minikube cluster,
Expand Down
1 change: 0 additions & 1 deletion qhub/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@
}

AZURE = {
"project": "PLACEHOLDER",
"region": "Central US",
"kubernetes_version": "PLACEHOLDER",
"node_groups": {
Expand Down
1 change: 0 additions & 1 deletion qhub/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ class GoogleCloudPlatformProvider(Base):


class AzureProvider(Base):
project: str
region: str
kubernetes_version: str
node_groups: typing.Dict[str, NodeGroup]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- oauthenticator==14.1.0
- escapism==1.0.1
- cdsdashboards==0.6.0
- jupyterhub-idle-culler==1.0
- pip:
- qhub-jupyterhub-theme==0.3.2
- python-keycloak==0.26.1
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ resource "helm_release" "jupyterhub" {
name = "proxy.secretToken"
value = random_password.proxy_secret_token.result
}

wait = false
}
5 changes: 5 additions & 0 deletions qhub/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ def _version_specific_upgrade(
f"Generated default random password={default_password} for Keycloak root user (Please change at /auth/ URL path).\n"
)

# project was never needed in Azure - it remained as PLACEHOLDER in earlier qhub inits!
if "azure" in config:
if "project" in config["azure"]:
del config["azure"]["project"]

return config


Expand Down

0 comments on commit 4c2b588

Please sign in to comment.