{
    "name": "Run Hydra on a traditional cluster",

    "steps": [
              {
                  "name": "Wait for cluster",
                  "type": "status",
                  "timeout": 600,
                  "params": {
                      "url": "/clusters/{{cluster._id}}/status",
                      "selector": "status",
                      "success": ["running"],
                      "failure": ["error"]
                  }
              },
              {
                  "name": "create hydra job",
                  "type": "http",
                  "params": {
                       "url": "/jobs",
                       "method": "POST",
                       "body": {
                          "name": "myjob",
                          "scriptId": "55c3ac27f6571011a48d49f4",
                          "output": [{
                            "itemId": "{{output.item.id}}",
                            "path": "."
                          },
                          {
                             "path": "output/stat.txt",
                             "tail": true
                          }],
                          "input": [
                            {
                              "itemId": "{{input.data.item.id}}",
                              "path": "input"
                            },
                            {
                              "itemId": "{{input.config.item.id}}",
                              "path": "input"
                            }
                          ]
                        },
                        "output": "hydra_job"
                  }
              },
              {
                  "name": "submit hydra job",
                  "type": "http",
                  "params": {
                       "url": "/clusters/{{cluster._id}}/job/{{hydra_job._id}}/submit",
                        "method": "PUT",
                        "body": {
                            "mesh": {
                                "name":  "{{mesh.name}}"
                            }
                        }
                  },
                  "log": "/jobs/{{hydra_job._id}}/log",
                  "terminate": "/jobs/{{hydra_job._id}}/terminate",
                  "delete": "/jobs/{{hydra_job._id}}"
              },
              {
                  "name": "Wait for job to complete",
                  "type": "status",
                  "timeout": 3600,
                  "params": {
                      "url": "/jobs/{{hydra_job._id}}/status",
                      "selector": "status",

                      "success": ["complete"],
                      "failure": ["error", "terminated"]
                  }
              }
              ]
}

Add task for running Hydra on a traditional cluster
Add task for running Hydra on a traditional cluster
