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 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
andcluster
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
Release history Release notifications | RSS feed
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.18.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file htcdaskgateway-0.1.18.tar.gz
.
File metadata
- Download URL: htcdaskgateway-0.1.18.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12343d81237e0487f830a17f895259bdae4708d5eaa1fac79f8173ab112a3a63 |
|
MD5 | 2f77fe3f60f92517987266f73c83f688 |
|
BLAKE2b-256 | 8313bfcc43c32b0fff85999e3a01acbbcd01fe42bd6fdc5ea5345842b0a0931e |
File details
Details for the file htcdaskgateway-0.1.18-py3-none-any.whl
.
File metadata
- Download URL: htcdaskgateway-0.1.18-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8461a2380dec943b5d9f5416fb6ece65b9fca5417cab064af23f79307abb1355 |
|
MD5 | 069cab13d1a930b640672b5373938c75 |
|
BLAKE2b-256 | d99d5895729e7a6ac23619440e6cd2410c12e03a1d3f11c3c93f12057b3735a3 |