Univa Grid Engine Recipe Cooker
- bad to handle envs and options in script files
- good to separate operations and project-specific things
- bad to execute duplicate commands to follow logs
- good to just hit the same command for each project to follow logs
- bad to specify job names only to deal
-hold_jid
- good to autommatically generate
-hold_jid
- good to autommatically generate
$ pip install git+https://github.com/otiai10/uge_cooker.git
$ which uge_cooker
# Try it first!!
$ git clone https://github.com/otiai10/uge_cooker.git
$ cd uge_cooker/example_project
$ uge_cooker -r recipe.json
{
"jobs": [
{
"name": "hello_01",
"script": "./hello_01.sh",
"options": {}
},
{
"name": "hello_02",
"script": "./hello_02.sh",
"options": {
"-hold_jid": "$$PREVIOUS_JOB_ID"
}
}
]
}
then
$ uge_cooker --recipe your_recipe.json
uge_cooker -r recipe.json -E env.json
to follow tails of logs in current directory (where recipe.json is placed)
uge_cooker -t .
option | value | description |
---|---|---|
-t,--tail | required, if provided | Execute tail -f logs/**/*/* to follow logs,would abort any options else |
-r,--recipe | required, if provided | Recipe json file path, which specifies operation details, must be .json |
-E,--env | optional default |
Specify env json file path, which specifies env vars, must be .json if provided |
-v,--verbose | optional, no value | Turn on verbose logs of what commands are exactly executed |
-S,--slack | optional | Comma separated usernames of you Slack team (1) |
- To use
--slack
option, you need export 2 env varsCOOKER_SLACK_TOKEN
andCOOKER_SLACK_CHANNEL
to your environment, on which you executeuge_cooker
command.