How to setup a Corda Network using CENM tool (Part 2)
In the previous article we have seen how to setup a corda network using CENM tool. If you haven’t set it up yet then please go through the first part https://raokarthik83.medium.com/how-to-setup-a-corda-network-using-cenm-tool-55282660d2d0
Now we will be adding new nodes to the network. Let’s first look at our existing network structure.
I am using enterprise corda-4.8.jar. If you want to use open source version then you can go with it. You can download the open source version here → https://repo1.maven.org/maven2/net/corda/corda/4.8/
So, we will be adding two new nodes to the network —PartyA and PartyB.
Following are the steps required for the node setup:
- Create new staging directory
- Place network root trust-store and corda.jar in the staging directory.
- Create node.conf
- Run initial registration from the staging directory.
- Run the node.
Setup PartyA:
- Create a staging directory for PartyA.
mkdir PartyA
cd PartyA
2. Copy network root trust-store from pki folder to PartyA staging directory. Also place corda.jar in the staging directory. I am using corda-4.8 enterprise jar.
cp ../pki/trust-stores/network-root-truststore.jks .
3. Create node.conf for PartyA
myLegalName="O=PartyA,L=London,C=GB"
networkServices {
doormanURL="http://localhost:10000"
networkMapURL="http://localhost:20000"
}
devMode = false
sshd {
port = 2226
}
p2pAddress="localhost:7000"
rpcUsers=[
{
user=testuser
password=password
permissions=[
ALL
]
}
]
rpcSettings {
address = "localhost:7001"
adminAddress = "localhost:7002"
}
4. Run initial registration for PartyA
java -jar corda-4.8.jar --initial-registration --network-root-truststore-password trustpass --network-root-truststore network-root-truststore.jks
5. Run the node
java -jar corda-4.8.jar
Setup PartyB:
- Create a staging directory for PartyB
mkdir PartyB
cd PartyB
2. Copy network root trust-store and corda.jar to the staging directory.
cp ../pki/trust-stores/network-root-truststore.jks .
3. Create node.conf for PartyB
myLegalName="O=PartyB,L=London,C=GB"
networkServices {
doormanURL="http://localhost:10000"
networkMapURL="http://localhost:20000"
}
devMode = false
sshd {
port = 2225
}
p2pAddress="localhost:8000"
rpcUsers=[
{
user=testuser
password=password
permissions=[
ALL
]
}
]
rpcSettings {
address = "localhost:8001"
adminAddress = "localhost:8002"
}
4. Run initial registration
java -jar corda-4.8.jar --initial-registration --network-root-truststore-password trustpass --network-root-truststore network-root-truststore.jks
5. Run the node
java -jar corda-4.8.jar
Okay so, we have completed the node setup. Let’s confirm the setup by checking the network map snapshot at PartyB.
Login to PartyB crash shell
NOTE: Password is password
ssh -p 2225 localhost -l testuser
This concludes the corda network setup using CENM.
I hope this helps 😄
Please check my Facebook page for more articles :
https://www.facebook.com/pg/nextledger/posts/
Thanks.