Skip to main content

Launches a Dask Gateway cluster in K8s and joins HTCondor workers to it

Project description

HTCdaskGateway

  • A Dask Gateway client extension for heterogeneous cluster mode combining the Kubernetes backend for pain-free scheduler networking, with COFFEA-powered HTCondor workers and/or OKD [coming soon].
  • Latest PyPI version is installed by default and deployed to the COFFEA-DASK notebook on EAF (https://analytics-hub.fnal.gov). A few lines will get you going!
  • The current image for workers/schedulers is: coffeateam/coffea-dask-cc7-gateway:0.7.12-fastjet-3.3.4.0rc9-g8a990fa

Basic usage @ Fermilab EAF

  • Make sure the notebook launched supports this functionality (COFFEA-DASK notebook)
from htcdaskgateway import HTCGateway

gateway = HTCGateway()
cluster = gateway.new_cluster()
cluster

# Scale my cluster to 5 HTCondor workers
cluster.scale(5)

# Obtain a client for connecting to your cluster scheduler
# Your cluster should be ready to take requests
client = cluster.get_client()
client

# When computations are finished, shutdown the cluster
cluster.shutdown()

Other functions worth checking out

  • This is a multi-tenant environment, and you are authenticated via JupyterHub Oauth which means that you can create as many* clusters as you wish
  • To list your clusters:
# Verify that the gateway is responding to requests by asking to list all its clusters
clusters = gateway.list_clusters()
clusters
  • To connect to a specific cluster from the list:
cluster = gateway.connect(cluster_name)
cluster
cluster.shutdown()
  • To gracefully close the cluster and remove HTCondor worker jobs associated to it:
cluster.shutdown()
  • There are widgets implemented by Dask Gateway. Make sure to give them a try from your EAF COFFEA notebook, just execute the the client and cluster commands (after properly initializing them) in a cell like:
-------------
cluster = gateway.new_cluster()
cluster
< Widget will appear after this step>
-------------
client = cluster.get_client()
client
< Widget will apear after this step >
-------------
cluster
< Widget will appear after this step >

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

casahtcdaskgateway-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

casahtcdaskgateway-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file casahtcdaskgateway-0.1.0.tar.gz.

File metadata

  • Download URL: casahtcdaskgateway-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for casahtcdaskgateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8ccd037f4082db6c7400fa0c1647626dbc88e94fcf5d3304c15c9a7ad12760dd
MD5 3f37c5be539bab50d593cdcf8467389b
BLAKE2b-256 b581bd70b06bbffff756239e32d8cb939a785e147d1181a452c681fe103f61c7

See more details on using hashes here.

File details

Details for the file casahtcdaskgateway-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for casahtcdaskgateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 48fed28027662fd6ffe8934e26daef75ecd8a3402cd0b1083a4bd45ee9f52c48
MD5 d741b427c037d1c8ca542826d82e6bf6
BLAKE2b-256 527e5f0bee146cbed0f17f43f59a85b552e9e99a3926170391648ffe8d70b461

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page