-
Notifications
You must be signed in to change notification settings - Fork 20
The METAJOB or METAJOB.yml
mlimotte edited this page May 9, 2012
·
2 revisions
When lemur runs and processes a jobdef file, it creates a structure I refer to as the METAJOB. This METAJOB contains the majority of the information needed to launch your cluster and run the steps. The METAJOB is:
- Printed to STDOUT before the job is triggered
- Saved into a YAML file called METAJOB.yml, which is saved to your ${data-uri} path (which could be local or an S3 path).
- You can also use the METAJOB in a [hook](Jobdef Hooks). For example, at Climate Corporation, some jobs will announce when they are running on IRC (Hipchat). Which looks a little like this:
(def metajob-hipchat
(lfn [hipchat-token lemur-metajob metajob-hipchat-room app num-instances comment]
(when metajob-hipchat-room
(if (dry-run?)
(println "Post METAJOB.yml to hipchat room" metajob-hipchat-room)
(common/hipchat hipchat-token metajob-hipchat-room "lemur"
(format "LAUNCH: %s on %s nodes\nCOMMENT: %s\n\n%s"
app num-instances comment (s/join "---\n" lemur-metajob)))))))
(add-hooks
(not (local?)) metajob-hipchat)