Unified Interface for Job Management
Switch branches/tags
Nothing to show
Clone or download
Latest commit 99de93d Aug 5, 2018
Permalink
Failed to load latest commit information.
.circleci vendor && build with go build -a Dec 29, 2017
ci drmaa2os public Nov 18, 2017
examples docker job info / job categories Aug 1, 2018
fakes dockertracker / cleanups Nov 19, 2017
pkg k8s tracker / added namespace and labels as jt extensions Aug 5, 2018
vendor dependencies Jul 22, 2018
.gitignore docker job info / job categories Aug 1, 2018
Gopkg.lock using dep for vendoring Feb 4, 2018
Gopkg.toml using dep for vendoring Feb 4, 2018
LICENSE dockertracker / cleanups Nov 19, 2017
README.md Update README.md Aug 5, 2018
cloudfoundry_integration_test.go add cloud foundry integration tests Apr 22, 2018
drmaa2os.go drmaa2os public Nov 18, 2017
drmaa2os_suite_test.go drmaa2os public Nov 18, 2017
errors.go dockertracker / cleanups Nov 19, 2017
job.go drmaa2os public Nov 18, 2017
job_test.go drmaa2os public Nov 18, 2017
jobarray.go drmaa2os public Nov 18, 2017
jobarray_hlp.go drmaa2os public Nov 18, 2017
jobarray_hlp_test.go dockertracker / cleanups Nov 19, 2017
jobarray_test.go drmaa2os public Nov 18, 2017
jobsession.go docker job info / job categories Aug 1, 2018
jobsession_test.go docker job info / job categories Aug 1, 2018
monitoringsession.go drmaa2os public Nov 18, 2017
reservation.go drmaa2os public Nov 18, 2017
reservationsession.go drmaa2os public Nov 18, 2017
sessionmanager.go k8s tracker / added namespace and labels as jt extensions Aug 5, 2018
sessionmanager_test.go drmaa2os public Nov 18, 2017
vendor.sh drmaa2os public Nov 18, 2017

README.md

drmaa2os - A Go API for OS Processes, Docker Containers, Cloud Foundry Tasks, Kubernetes Jobs, Grid Engine Jobs and more...

CircleCI

This is a Go API based on an open standard (Open Grid Forum DRMAA2) for submitting and supervising workloads which can be operating system processes, containers, PODs, tasks, or batch jobs.

The API allows to develop and run job workflows in OS processes, and switch later to containers running in Kubernetes, as Cloud Foundry tasks, or pure Docker containers.

Its main pupose is supporting application developers with an abstraction layer on top of platforms, workload managers, and cluster schedulers, so that they don't require to deal with the underlaying details and differences when only simple operations (like starting a container and waiting until it is finished) are required.

It can be easily integrated in applications which create and execute job workflows.

If you are looking for a simple interface for creating job workflows without dealing with the DRMAA2 details, check out wfl.

For details about the mapping of job operations please consult the platform specific READMEs:

Feedback welcome!

For a DRMAA2 implementation based on C DRMAA2 (libdrmaa2.so) like for Univa Grid Engine please see drmaa2.

Not yet implemented:

Basic Usage

Following example demonstrates how a job running as OS process can be executed. More examples can be found in the examples subdirectory.

	sm, _ := drmaa2os.NewDefaultSessionManager("testdb.db")

	js, _ := sm.CreateJobSession("jobsession", "")

	jt := drmaa2interface.JobTemplate{
		JobName:       "job1",
		RemoteCommand: "sleep",
		Args:          []string{"2"},
	}

	job, _ := js.RunJob(jt)

	job.WaitTerminated(drmaa2interface.InfiniteTime)

	if job.GetState() == drmaa2interface.Done {
		job2, _ := js.RunJob(jt)
		job2.WaitTerminated(drmaa2interface.InfiniteTime)
	} else {
		fmt.Println("Failed to execute job1 successfully")
	}

	js.Close()
	sm.DestroyJobSession("jobsession")