{"id":20672204,"url":"https://github.com/dgruber/qsub","last_synced_at":"2025-08-02T03:39:31.389Z","repository":{"id":64308058,"uuid":"166775341","full_name":"dgruber/qsub","owner":"dgruber","description":"The \"qsub\" command is a command line utility that is used to submit batch jobs, and it is not limited to just Kubernetes.","archived":false,"fork":false,"pushed_at":"2023-12-31T14:23:04.000Z","size":233521,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T20:43:24.700Z","etag":null,"topics":["cloudevents","container","docker","drmaa2","hpc","jobtemplate","json","kubernetes","kubernetes-jobs","poseidon","processes","pubsub"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dgruber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-21T08:21:47.000Z","updated_at":"2024-11-22T02:17:04.000Z","dependencies_parsed_at":"2024-06-20T11:24:40.929Z","dependency_job_id":null,"html_url":"https://github.com/dgruber/qsub","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dgruber/qsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgruber%2Fqsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgruber%2Fqsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgruber%2Fqsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgruber%2Fqsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgruber","download_url":"https://codeload.github.com/dgruber/qsub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgruber%2Fqsub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268331571,"owners_count":24233288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudevents","container","docker","drmaa2","hpc","jobtemplate","json","kubernetes","kubernetes-jobs","poseidon","processes","pubsub"],"created_at":"2024-11-16T20:32:48.212Z","updated_at":"2025-08-02T03:39:31.366Z","avatar_url":"https://github.com/dgruber.png","language":"Go","readme":"# qsub _not just_ for Kubernetes\n\n[![CircleCI](https://circleci.com/gh/dgruber/qsub.svg?style=svg)](https://circleci.com/gh/dgruber/qsub)\n[![codecov](https://codecov.io/gh/dgruber/qsub/branch/master/graph/badge.svg)](https://codecov.io/gh/dgruber/qsub)\n\n_qsub_ is a command line tool used for submitting batch jobs. It has basic functionality defined in the [POSIX standard](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/qsub.html). Various high-performance computing (HPC) job schedulers, such as Grid Engine, SLURM, LSF, and Torque, offer an extended version of qsub with [additional features](http://gridengine.eu/mangridengine/manuals.html).\n\nThis repository offers a simplified implementation of qsub for running jobs locally, in Docker containers, on Kubernetes, Google Batch, PubSub, and more. It enables users to easily submit and manage batch jobs in different environments.\n\n## Installation\n\n_qsub_ can be build directly from the sources or alternatively pre-build binaries for darwin and linux can be downloaded from the builds dir.\n\n## Using a DRMAA2 JSON File\n\nBy using a [DRMAA2 compatible](https://github.com/dgruber/drmaa2interface) JSON file jobs can be submitted to several backends:\n\n- Google Batch (-b googlebatch)\n- Local Process (-b process)\n- Docker (-b docker)\n- Sending a DRMAA2 JobTemplate wrapped as CloudEvent into Google PubSub (-b pubsub)\n- Sending a job to a remote \"qsub --server\" (-b server)\n\nSee some examples [here](https://github.com/dgruber/qsub/tree/master/examples).\n\n```\n   qsub -b process -j ./jobtemplate.json\n```\n\n## Usage for Kubernetes\n\nIn order to let the _sleep_ command run in the Kubernetes cluster\nwhich is selected in the current context (_./kube/config_) you need\nto specify the container image as well as the command to be executed\nin the container (potentially with its arguments).\n\n    qsub --image busybox:latest sleep 123\n\nIt returns the ID of the job.\n\nThe container image can also be set beforehand as environment variable.\n\n    export QSUB_IMAGE=busybox:latest\n    qsub sleep 123\n\nThe corresponding pods can be showed with the ID returned back on command line:\n\n    kubectl describe pod -l job-name=ID\n\n### More Arguments for Kubernetes\n\nThe image name (_--img_) as well as the command which should be executed in the\ncontainer derived from the image are mandatory.\n\nFollowing optional arguments are currently available.\n\n#### Job Name\n\nThe job name must be unique otherwise job submission will fail.\n\n    qsub --image busybox:latest -N unique sleep 123\n    Submitted job with ID unique\n\n    kubectl get jobs unique\n    NAME   DESIRED   SUCCESSFUL   AGE\n    unique 1         0            14s   \n\n#### Namespace for Kubernetes Jobs\n\nJobs can be submitted to a specific kubernetes namespace.\n\n    qsub --namespace default --image busybox:latest sleep 123\n\n#### Labels for Kubernetes Jobs\n\nKubernetes allows to attach labels to pods. Labels are key-value pairs\nwhich can be defined with the _-l_ argument.\n\n#### Environment Variables for Kubernetes Jobs\n\nEnvironment variables for the jobs can be set by passing them into _-v_. There are\ntwo ways of doing so: as key-value pairs, or just by name.\n\nFollowing example sets ENV1 to VALUE1 and ENV2 to VALUE2 (using the value from \nthe current context).\n\n    export ENV2=VALUE2\n    qsub --image busybox:latest -v ENV1=VALUE1,ENV2 sleep 123\n\n#### Scheduler for Kubernetes Jobs\n\nIn order to let the job be scheduled by a non-default scheduler (like poseidon \nor kube-batch) the _--scheduler_ argument can be used.\n\n    qsub --scheduler poseidon --img busybox:latest sleep 123\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgruber%2Fqsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgruber%2Fqsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgruber%2Fqsub/lists"}