Name: batch-wrapper-client-golang
Owner: Fred Hutchinson Cancer Research Center
Description: golang wrapper client is easier to deploy
Created: 2018-03-05 03:23:46.0
Updated: 2018-03-05 03:24:09.0
Pushed: 2018-03-05 20:08:05.0
Homepage: null
Size: 1938
Language: Go
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
As described in the AWS Batch At Fred Hutch documentation, Fred Hutch users must use a wrapper for some aspects of interacting with AWS Batch (submitting, terminating, and canceling jobs).
This wrapper is meant for command-line use only. The Python wrapper is in a separate repository.
Note that this wrapper is already installed on the rhino
and gizmo
systems.
The command batchwrapper
is already in your PATH
.
For other systems, follow the instructions on the releases page.
You must have previously obtained your AWS credentials and requested access to AWS Batch.
Usage is similar to that of the AWS CLI for Batch.
In fact, you should continue to use the CLI for everything except
submitting jobs (submit-job
), terminating jobs (terminate-job
),
and canceling jobs (cancel-job
).
Running the batchwrapper
command without any arguments gives brief help:
e: batchwrapper [<flags>] <command> [<args> ...]
el, terminate, and submit AWS Batch jobs. Full docs at
s;//bit.ly/HutchBatchDocs
s:
help Show context-sensitive help (also try --help-long and --help-man).
ands:
lp [<command>...]
Show help.
ncel --job-id=JOB-ID --reason=REASON
Cancel a job you submitted
rminate --job-id=JOB-ID --reason=REASON
Terminate a job you submitted
bmit --cli-input-json=JSON_FILE
Submit a job
You can get some help with batchwrapper submit --help
:
e: batchwrapper submit --cli-input-json=JSON_FILE
it a job
s:
help Show context-sensitive help (also try --help-long
and --help-man).
cli-input-json=JSON_FILE JSON file containing job info
To submit a job, you need to put the pertinent information in a JSON file.
Unlike with the AWS CLI, you don't put the file://
prefix in front of the
JSON file.
You can prepare a JSON file by following the example in the Fred Hutch batch documentation.
Assuming your JSON file is called job.json
, you can submit it
as follows:
hwrapper submit --cli-input-json job.json
The batch wrapper will return the Job ID and name.
Brief help is available with batchwrapper terminate --help
:
e: batchwrapper terminate --job-id=JOB-ID --reason=REASON
inate a job you submitted
s:
help Show context-sensitive help (also try --help-long and
--help-man).
job-id=JOB-ID Job ID
reason=REASON reason for termination
So, for example, you can terminate a job you own with the following command (replace the job ID with your own):
hwrapper terminate --job-id 13732097-3f5d-42bc-b60f-2cd166486074 \
-reason "there is a problem"
Brief help is available with batchwrapper cancel --help
:
e: batchwrapper cancel --job-id=JOB-ID --reason=REASON
el a job you submitted
s:
help Show context-sensitive help (also try --help-long and
--help-man).
job-id=JOB-ID Job ID
reason=REASON reason for termination
So, for example, you can cancel a job you own with the following command (replace the job ID with your own):
hwrapper cancel --job-id 13732097-3f5d-42bc-b60f-2cd166486074 \
-reason "there is a problem"