Deploying a flow file remotely

889 views
Skip to first unread message

Ratheesh P Kumar

unread,
Aug 9, 2016, 11:09:57 AM8/9/16
to Node-RED
Hi

Is there a way to deploy a flow file to a running node-red instance remotely via a CLI(without using the UI). I would like to do the deployment of the flows via Jenkins, as I have multiple node-red instances running. Manually deploying the flow to each instance is not feasible.

Thanks
Ratheesh

Nicholas O'Leary

unread,
Aug 9, 2016, 11:11:21 AM8/9/16
to Node-RED Mailing List
Yes, the runtime provides a REST api - which is what the editor uses when you hit the deploy button.


Nick

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.

Adam S

unread,
Aug 9, 2016, 12:01:24 PM8/9/16
to Node-RED
This should work "curl -v -H "Content-Type: application/json; charset=UTF-8" -H "Node-RED-Deployment-Type: full" -X POST http://localhost:1880/flows"

Ratheesh P Kumar

unread,
Aug 9, 2016, 2:43:00 PM8/9/16
to Node-RED
Thank You. When i tried this, it was overwriting the entire flows with the flow that I sent in the request.

Is it possible to deploy a new flow without overwriting the entire flow file? Basically, what I am looking for is to add a flow to a running node-red instance.

Thanks
Ratheesh

Nicholas O'Leary

unread,
Aug 9, 2016, 2:44:49 PM8/9/16
to Node-RED

Have a look at the other API endpoints in those docs and you'll find what you want.

Nick


--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

Adam S

unread,
Aug 10, 2016, 9:22:16 AM8/10/16
to Node-RED
As nick said you can try the other options in the API documentation but I believe the other options requite the flow JSON to be passed as well.  Maybe I misunderstood what you were trying to do.  Either way that command I posted should point you in the right direction.

Nicholas O'Leary

unread,
Aug 10, 2016, 9:45:16 AM8/10/16
to Node-RED

The other endpoints let are incrementally add/remove/uodate at the flow (tab) level - you don't have to provide the complete flow file.

Nick


On Wed, 10 Aug 2016, 14:22 Adam S, <ats1...@gmail.com> wrote:
As nick said you can try the other options in the API documentation but I believe the other options requite the flow JSON to be passed as well.  Maybe I misunderstood what you were trying to do.  Either way that command I posted should point you in the right direction.

--
Reply all
Reply to author
Forward
0 new messages