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 Notebook Culling Feature Doc #490

Merged
merged 34 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
03a6d7d
update cognito-rds-s3 config map; update guideline ref link
jsitu777 Oct 10, 2022
d1cce0b
add load Balancer Scheme config option
jsitu777 Oct 11, 2022
01283d6
doc fix
jsitu777 Oct 11, 2022
cb90f49
Merge branch 'main' into load-balancer-scheme
jsitu777 Oct 11, 2022
d529332
uninstall ingress only if chart exists
jsitu777 Oct 11, 2022
a6d0e57
Merge branch 'main' of https://github.com/awslabs/kubeflow-manifests …
jsitu777 Oct 11, 2022
cb9eef9
Merge branch 'load-balancer-scheme' of https://github.com/awslabs/kub…
jsitu777 Oct 11, 2022
0c88ac4
kubectl delete ingress only if chart exists
jsitu777 Oct 11, 2022
1bdc867
Merge branch 'main' of https://github.com/awslabs/kubeflow-manifests …
jsitu777 Oct 13, 2022
624794b
set internet-facing as default for load balancer scheme
jsitu777 Oct 13, 2022
af7f9bd
minor change
jsitu777 Oct 13, 2022
21c87a6
typo fix. website minor format change. set default load balancer sche…
jsitu777 Oct 13, 2022
a8e7658
undo helmify and kubeflow_uninstallation script
jsitu777 Oct 13, 2022
9533022
add back line for uninstallation script
jsitu777 Oct 13, 2022
3210270
merge doc change
jsitu777 Oct 14, 2022
cec3fa0
fix load balancer scheme doc issues.
jsitu777 Oct 14, 2022
ba29153
Merge branch 'main' of https://github.com/awslabs/kubeflow-manifests …
jsitu777 Oct 14, 2022
1dfab82
fix ingress uninstall error; delete ack-sagemaker crds
jsitu777 Oct 14, 2022
51d4e03
add helm config instruction for rds-s3 mannual guide in website
jsitu777 Oct 14, 2022
aca9332
Merge branch 'main' of https://github.com/awslabs/kubeflow-manifests …
jsitu777 Oct 21, 2022
b98b77c
notebook culling doc
jsitu777 Oct 21, 2022
e3f4767
move notebook-culling doc to a new page
jsitu777 Nov 9, 2022
99d6a12
remove notebook culling from notebook component guide
jsitu777 Nov 9, 2022
5fff558
remove extra line
jsitu777 Nov 9, 2022
c925d14
Merge branch 'main' of github.com:awslabs/kubeflow-manifests into not…
jsitu777 Nov 14, 2022
602faf7
modify notebook culling documentation.
jsitu777 Nov 18, 2022
6d51460
minor fix
jsitu777 Nov 18, 2022
6980488
minor fix
jsitu777 Nov 18, 2022
d89a8d3
change terraform notebook var edit command
jsitu777 Nov 19, 2022
b56f4df
add post deployment notebook configuration steps
jsitu777 Nov 21, 2022
33c653f
rename file
jsitu777 Nov 21, 2022
a3a27d3
change wording in configuring culling pointer for each deployment opt…
jsitu777 Nov 21, 2022
6725122
fix naming
jsitu777 Nov 21, 2022
8584d8f
address comments for notebook culling doc
jsitu777 Nov 22, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ pwd
EOF
```

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved

### View all Configurations

View [all possible configuration options of the terraform stack](https://github.com/awslabs/kubeflow-manifests/blob/main/deployments/cognito-rds-s3/terraform/variables.tf) in the `variables.tf` file.
Expand Down
4 changes: 4 additions & 0 deletions website/content/en/docs/deployment/cognito-rds-s3/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Refer to the [general prerequisites guide]({{< ref "/docs/deployment/prerequisit
1. Create TLS certificates for the domain
1. Create a Cognito Userpool
1. Configure Ingress

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

2. Deploy Kubeflow.
1. Install Kubeflow using the following command:
{{< tabpane persistLang=false >}}
Expand Down
3 changes: 3 additions & 0 deletions website/content/en/docs/deployment/cognito/guide-terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ pwd
EOF
```

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

### View all configurations

View [all possible configuration options of the terraform stack](https://github.com/awslabs/kubeflow-manifests/blob/main/deployments/cognito/terraform/variables.tf) in the `variables.tf` file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ Each section is detailed in [Cognito Manual Deployment Guide]({{< ref "/docs/dep
us-east-1-certARN: arn:aws:acm:us-east-1:123456789012:certificate/373cc726-f525-4bc7-b7bf-d1d7b641c238
```

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

## 2.0 Install Kubeflow

Install Kubeflow using the following command:
Expand Down
3 changes: 3 additions & 0 deletions website/content/en/docs/deployment/cognito/manifest/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ yq e '.LOGOUT_URL = env(CognitoLogoutURL)' -i charts/common/aws-authservice/valu

1. Follow the [Configure Load Balancer Controller]({{< ref "/docs/add-ons/load-balancer/guide.md#configure-load-balancer-controller" >}}) section of the load balancer guide to setup the resources required by the load balancer controller.

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

## 4.0 Build the manifests and deploy Kubeflow

{{< tabpane persistLang=false >}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
+++
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved
title = "Configure Culling for Notebooks"
description = "Automatically stop your notebooks based on idleness"
weight = 70
+++

The culling feature allows you to stop a Notebook Server based on its **Last Activity**. The Notebook Controller updates the respective `notebooks.kubeflow.org/last-activity` annotation of each Notebook resource according to the execution state of the kernels. When this feature is enabled, the notebook instances will be "culled" (scaled to zero) if none of the kernels are performing computations for a specified period of time (`CULL_IDLE_TIME`). More information about this feature can be found in the [Jupyter notebook idleness proposal](https://github.com/kubeflow/kubeflow/blob/master/components/proposals/20220121-jupyter-notebook-idleness.md).

1. Export the following values values to configure the [culling policy parameters](https://github.com/kubeflow/kubeflow/blob/master/components/proposals/20220121-jupyter-notebook-idleness.md#api-changes):
```bash
# whether to enable culling feature (true/false).ENABLE_CULLING must be set to “true” for this feature to take work
export ENABLE_CULLING=<>
# specified idleness time (minutes) that notebook instance to be culled since last activity
export CULL_IDLE_TIMEOUT=<>
# controller will update each notebook's LAST_ACTIVITY_ANNOTATION every IDLENESS_CHECK_PERIOD (minutes)
export IDLENESS_CHECK_PERIOD=<>
```

1. The following commands will inject those values in a configuration file for setting up Notebook culling:
Select the package manager of your choice.
{{< tabpane persistLang=false >}}
{{< tab header="Kustomize" lang="toml" >}}
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved
printf '
enableCulling='$ENABLE_CULLING'
cullIdleTime='$CULL_IDLE_TIMEOUT'
idlenessCheckPeriod='$IDLENESS_CHECK_PERIOD'
' > awsconfigs/apps/notebook-controller/params.env
{{< /tab >}}
{{< tab header="Helm" lang="yaml" >}}
yq e '.cullingPolicy.enableCulling = env(ENABLE_CULLING)' -i charts/apps/notebook-controller/values.yaml
yq e '.cullingPolicy.cullIdleTime = env(CULL_IDLE_TIMEOUT)' -i charts/apps/notebook-controller/values.yaml
yq e '.cullingPolicy.idlenessCheckPeriod = env(IDLENESS_CHECK_PERIOD)' -i charts/apps/notebook-controller/values.yaml
{{< /tab >}}
{{< /tabpane >}}
1. For Terraform, append the notebook culling parameters in the `sample.auto.tfvars` file with chosen deployment option: [Vanilla]({{< ref "/docs/deployment/vanilla/guide-terraform.md#" >}}), [Cognito]({{< ref "/docs/deployment/cognito/guide-terraform.md#" >}}), [RDS-S3]({{< ref "/docs/deployment/rds-s3/guide-terraform.md#" >}}), and [Cognito-RDS-S3]({{< ref "/docs/deployment/cognito-rds-s3/guide-terraform.md#" >}}).
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved

```sh
echo notebook_enable_culling=\"${ENABLE_CULLING}\" | tee -a sample.auto.tfvars
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved
echo notebook_cull_idle_time=\"${CULL_IDLE_TIMEOUT}\" | tee -a sample.auto.tfvars
echo notebook_idleness_check_period=\"${IDLENESS_CHECK_PERIOD}\" | tee -a sample.auto.tfvars
```

1. Continue deploying Kubeflow based on your [Deployment Option]({{< ref "/docs/deployment/_index.md#" >}}).
jsitu777 marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 3 additions & 0 deletions website/content/en/docs/deployment/rds-s3/guide-terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ pwd
EOF
```

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

### All Configurations

A full list of inputs for the terraform stack can be found [here](https://github.com/awslabs/kubeflow-manifests/blob/main/deployments/rds-s3/terraform/variables.tf).
Expand Down
3 changes: 3 additions & 0 deletions website/content/en/docs/deployment/rds-s3/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ yq e '.s3.minioServiceRegion = env(CLUSTER_REGION)' -i charts/apps/kubeflow-pipe
{{< /tab >}}
{{< /tabpane >}}

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).


## 3.0 Build Manifests and install Kubeflow

Expand Down
3 changes: 3 additions & 0 deletions website/content/en/docs/deployment/vanilla/guide-terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ pwd
EOF
```

### (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).

### All Configurations

A full list of inputs for the terraform stack can be found [here](https://github.com/awslabs/kubeflow-manifests/blob/main/deployments/vanilla/terraform/variables.tf).
Expand Down
4 changes: 4 additions & 0 deletions website/content/en/docs/deployment/vanilla/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Be sure that you have satisfied the installation prerequisites before working th
- [Set up your deployment environment]({{< ref "prerequisites.md" >}})
- [Create an EKS Cluster]({{< ref "create-eks-cluster.md" >}})

## (Optional) Configure Culling for Notebooks
Configure to enable notebook culling with the following [instructions]({{< ref "/docs/deployment/notebook-culling-configuration.md#" >}}).


## Build Manifests and install Kubeflow

> ⚠️ Warning: We use a default email (`[email protected]`) and password (`12341234`) for our guides. For any production Kubeflow deployment, you should change the default password by following the steps in [Change default user password]({{< ref "../connect-kubeflow-dashboard#change-the-default-user-password-kustomize" >}}).
Expand Down