This tutorial explains how to use RackHD on-taskgraph as a stand alone service, known as the RackHD Workflow Engine.
The Workflow Engine requires mongodb, rabbitmq, and ipmitool to be installed as follows
sudo apt-get install mongodb sudo apt-get install rabbitmq-server sudo apt-get install ipmitool
Clone the on-taskgraph repository
git clone https://github.com/RackHD/on-taskgraph cd on-taskgraph
Install the Workflow Engine dependencies
npm install
Copy the Workflow Engine config.json file to the /opt/monorail directory.
Edit the config.json file, and change the value of the taskGraphEndpoint address to the IP address of your system.
Start the Workflow Engine Service by using this command:
node index.js
Display the complete Workflow Engine API by pasting the following URL into a web browser:
http://<your IP address>:9030/docs/
The Workflow Engine requires DHCP, TFTP, and static file servers. You can install the RackHD on-dhcp-proxy, on-tftp, and on-http services respectively, as explained in their associated README files.
You will need to get the discovered node’s identifier from the Workflow Engine’s database as follows:
mongo pxe db.nodes.find().pretty() ctrl-d
The output will look like:
{ "name" : "52:54:be:ef:c6:85", "identifiers" : [ "52:54:be:ef:c6:85" ], "type" : "compute", "autoDiscover" : false, "relations" : [ ], "tags" : [ ], "createdAt" : ISODate("2017-11-06T21:42:11.406Z"), "updatedAt" : ISODate("2017-11-06T21:42:11.406Z"), "_id" : ObjectId("5a00d7336eb470a806c2b341") }
In this example, the node identifier is 5a00d7336eb470a806c2b341
Use the following command to run an OS installation workflow install using Workflow Engine,
curl -X POST -d @payload.json http://<ip>:<port>/api/2.0/workflows --header "Content-Type: application/json"
where, payload.json is located in the current directory level, and payload looks like the example below.
{ "name": "Graph.InstallCoreOS", "options": { "defaults": { "graphOptions": { "target": "5a00d7336eb470a806c2b341" } "version": "899.17.0", "repo": "http://172.31.128.1:9030/coreos" } } }