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

htcdaskgateway-0.1.21.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

htcdaskgateway-0.1.21-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file htcdaskgateway-0.1.21.tar.gz.

File metadata

  • Download URL: htcdaskgateway-0.1.21.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.15

File hashes

Hashes for htcdaskgateway-0.1.21.tar.gz
Algorithm Hash digest
SHA256 9e65063c1972fcf3186f9c6d0325d6b61932a7d8ca2d0b2173d217cd31ec45bc
MD5 7b33cdbe89789fa1fc042d44e7161579
BLAKE2b-256 22e1782f726ff27559b43b54d6c035655c9b7d19e8fea816e1c3decc1e25a6f5

See more details on using hashes here.

File details

Details for the file htcdaskgateway-0.1.21-py3-none-any.whl.

File metadata

File hashes

Hashes for htcdaskgateway-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 387c2a9b63b28b0873f1fc1e414112d0ad82356ec17e070eb9446c53bd907c0c
MD5 2cd1d69ae457e4cd49d16866e3a17224
BLAKE2b-256 cffbf76a8872f9334a2b22664ac3fa6399378a453254798a18cfa99af48d8f8c

See more details on using hashes here.

Supported by

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