got2817 dev
got2817 dev

Reputation: 41

Deploy and run nodes dynamically in CORDA

We have a use case in which we have to deploy and start a node at runtime on button click from a web page. The same way as it working in CORDA's demo bench. Can someone please point out to an example or an explanation for achieving this?

Upvotes: 1

Views: 719

Answers (1)

Joel
Joel

Reputation: 23210

A node is essentially a folder containing two things:

  • A node.conf file
  • A corda.jar file

There are other things it may need (certificates if not in dev mode) or want (corda-webserver if you want it to offer an API, a plugins folder with CorDapps that you want it to load), but the two items above are sufficient.

When you run deployNodes locally, it creates a set of node folders containing these things. "Running a node" is equivalent to running java -jar corda.jar on a corda.jar file in a folder where a valid node.conf file is also present.

If you can collect the parameters for a valid node.conf file via a front-end or auto-generate them, then all you need to do on the server is:

  • Create a new folder
  • Generate a node.conf file and save it to the folder
  • Copy a corda.jar file to that folder
  • Start a corda.jar process in that folder

Upvotes: 2

Related Questions