Helm chartv2.2.1App 1.1.0

Distributed computation in Python with task scheduling

About this chart

Dask Helm Chart

Dask allows distributed computation in Python.

  • https://dask.pydata.org
  • http://jupyter.org/

Chart Details

This chart will deploy the following:

  • 1 x Dask scheduler with port 8786 (scheduler) and 80 (Web UI) exposed on an external LoadBalancer
  • 3 x Dask workers that connect to the scheduler
  • 1 x Jupyter notebook (optional) with port 80 exposed on an external LoadBalancer
  • All using Kubernetes Deployments

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/dask

$ helm install --name my-release stable/dask

Configuration

The following tables list the configurable parameters of the Dask chart and their default values.

Dask scheduler

ParameterDescriptionDefault
scheduler.nameDask scheduler namescheduler
scheduler.imageContainer image namedaskdev/dask
scheduler.imageTagContainer image tag1.1.0
scheduler.replicask8s deployment replicas1
scheduler.tolerationsTolerations[]
scheduler.nodeSelectornodeSelector{}
scheduler.affinityContainer affinity{}

Dask webUI

ParameterDescriptionDefault
webUI.nameDask webui namewebui
webUI.servicePortk8s service port80

Dask worker

ParameterDescriptionDefault
worker.nameDask worker nameworker
worker.imageContainer image namedaskdev/dask
worker.imageTagContainer image tag1.1.0
worker.replicask8s hpa and deployment replicas3
worker.resourcesContainer resources{}
worker.tolerationsTolerations[]
worker.nodeSelectornodeSelector{}
worker.affinityContainer affinity{}

|

jupyter

ParameterDescriptionDefault
jupyter.nameJupyter namejupyter
jupyter.enabledInclude optional Jupyter servertrue
jupyter.imageContainer image namedaskdev/dask-notebook
jupyter.imageTagContainer image tag1.1.0
jupyter.replicask8s deployment replicas1
jupyter.servicePortk8s service port80
jupyter.resourcesContainer resources{}
jupyter.tolerationsTolerations[]
jupyter.nodeSelectornodeSelector{}
jupyter.affinityContainer affinity{}

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, Specify each parameter using the --set key=value[,key=value] argument to helm install.

$ helm install --name my-release -f values.yaml <helm-repo>/dask

$ helm install --name my-release -f values.yaml stable/dask

Tip: You can use the default values.yaml

Customizing Python Environment

The default daskdev/dask images have a standard Miniconda installation along with some common packages like NumPy and Pandas. You can install custom packages with either Conda or Pip using optional environment variables. This happens when your container starts up. Consider the following config.yaml file as an example:

jupyter:
  env:
    -  EXTRA_PIP_PACKAGES: s3fs git+https://github.com/user/repo.git --upgrade
    -  EXTRA_CONDA_PACKAGES: scipy matplotlib -c conda-forge

worker:
  env:
    -  EXTRA_PIP_PACKAGES: s3fs git+https://github.com/user/repo.git --upgrade
    -  EXTRA_CONDA_PACKAGES: scipy -c conda-forge

Note that the Jupyter and Dask worker environments should have matching software environments, at least where a user is likely to distribute that functionality.

Deploy dask with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has dask on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdask is pinned at v2.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply