Welcome to Two Sigma's Cook Scheduler!
What is Cook?
- Cook is a powerful batch scheduler, specifically designed to provide a great user experience when there are more jobs to run than your cluster has capacity for.
- Cook is able to intelligently preempt jobs to ensure that no user ever needs to wait long to get quick answers, while simultaneously helping you to achieve 90%+ utilization for massive workloads.
- Cook has been battle-hardened to automatically recover after dozens of classes of cluster failures.
- Cook can act as a Spark scheduler, and it comes with a REST API, Java client, Python client, and CLI.
Core concepts is a good place to start to learn more.
Check the changelog for release info.
In this repository, you'll find several subprojects, each of which has its own documentation.
scheduler- This is the actual Mesos framework, Cook. It comes with a JSON REST API.jobclient- This includes the Java and Python APIs for Cook, both of which use the REST API under the hood.spark- This contains the patch to Spark to enable Cook as a backend.
Please visit the scheduler subproject first to get started.
The quickest way to get Cook running locally against GKE is with Vagrant.
- Install Vagrant
- Install Virtualbox
- Clone down this repo
- Run
GCP_PROJECT_NAME=<gcp_project_name> vagrant up --provider=virtualboxto create the dev environment - Run
vagrant sshto ssh into the dev environment
- Run
gcloud auth loginto login to Google cloud - Run
bin/make-gke-test-clustersto create GKE clusters - Run
bin/start-datomic.shto start Datomic (Cook database) - Run
lein exec -p datomic/data/seed_k8s_pools.clj $COOK_DATOMIC_URIto seed some Cook pools in the database - Run
bin/run-local-kubernetes.shto start the Cook scheduler - Cook should now be listening locally on port 12321
To test a simple job submission:
- Run
cs submit --pool k8s-alpha --cpu 0.5 --mem 32 --docker-image gcr.io/google-containers/alpine-with-bash:1.0 lsto submit a simple job - Run
cs show <job_uuid>to show the status of your job (it should eventually show Success)
To run automated tests:
- Run
lein test :all-but-benchmarkto run unit tests - Run
cd ../integration && pytest -m 'not cli'to run integration tests - Run
cd ../integration && pytest -k test_basic_submit -n 0 -sto run a particular integration test
The quickest way to get Mesos and Cook running locally is with docker and minimesos.
- Install
docker - Clone down this repo
cd scheduler- Run
bin/build-docker-image.shto build the Cook scheduler image - Run
../travis/minimesos upto start Mesos and ZooKeeper using minimesos - Run
bin/run-docker.shto start the Cook scheduler - Cook should now be listening locally on port 12321
In order to accept your code contributions, please fill out the appropriate Contributor License Agreement in the cla folder and submit it to [email protected].
Apache Mesos is a trademark of The Apache Software Foundation. The Apache Software Foundation is not affiliated, endorsed, connected, sponsored or otherwise associated in any way to Two Sigma, Cook, or this website in any manner.
© Two Sigma Open Source, LLC