Heron Manual - Running Jobs

March 3, 2018
Heron

How to run a job in heron

Provided that you have installed the job:

cassandra_install.json

defined as follows:

{
    "name": "cassandra_install",
    "tasks": [
        {
            "name": "cassandra_install",
            "type": "eron:task:cassandra:install",
            "params": {
                "ram-usage-mb": "1024",
                "cassandra-home": "/opt/cassandra",
                "cassandra-download-url": "http://apache.mirrors.spacedump.net/cassandra/3.11.2/apache-cassandra-3.11.2-bin.tar.gz"
            }
        },
        {
            "name": "cassandra_start",
            "type": "eron:task:cassandra:start",
            "params": {
                "cassandra-home": "/opt/cassandra"
            }
        }
    ]
}

In order to run the job, you just have to type on the commandline:

heron -x cassandra_install.json

And you will see that the job gets run, E.G.:

Input file is: [/home/myuser/.eron/jobs/cassandra_install.json]
FSM name: [cassandra_install]
param:cassandra-download-url value:http://apache.mirrors.spacedump.net/cassandra/3.11.2/apache-cassandra-3.11.2-bin.tar.gz
param:ram-usage-mb value:512
param:cassandra-home value:/opt/cassandra
param:cassandra-home value:/opt/cassandra
workdir:[/tmp/0743bce2-a333-11e8-8127-f48c5092b6ca]
START task: [cassandra_install]
STOP task: [cassandra_install]
START task: [cassandra_start]
/tmp/0743bce2-a333-11e8-8127-f48c5092b6ca/0001_cassandra_start.sh: riga 6: ./bin/cassandra: File o directory non esistente
STOP task: [cassandra_start]