Skip to content

Commit

Permalink
Updated drivers and gradles for runtime port consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Sphar-io committed Aug 14, 2018
1 parent 2827b7b commit 60bbfd2
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 80 deletions.
64 changes: 32 additions & 32 deletions CordaTraining.postman_collection.json
Expand Up @@ -8,16 +8,16 @@
{
"name": "Node A create iou",
"request": {
"method": "GET",
"method": "PUT",
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantB,L=New York,C=US",
"raw": "http://localhost:10009/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantB,L=New York,C=US",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand Down Expand Up @@ -48,12 +48,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/transfer-iou?id=52f92916-99db-4ece-bd68-101d8598f5fc&party=O=ParticipantB,L=New York,C=US",
"raw": "http://localhost:10009/api/iou/transfer-iou?id=52f92916-99db-4ece-bd68-101d8598f5fc&party=O=ParticipantB,L=New York,C=US",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand All @@ -80,12 +80,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/peers",
"raw": "http://localhost:10009/api/iou/peers",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand All @@ -102,12 +102,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/me",
"raw": "http://localhost:10009/api/iou/me",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand All @@ -124,12 +124,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/ious",
"raw": "http://localhost:10009/api/iou/ious",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand All @@ -146,12 +146,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10007/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantD,L=New York,C=US",
"raw": "http://localhost:10009/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantD,L=New York,C=US",
"protocol": "http",
"host": [
"localhost"
],
"port": "10007",
"port": "10009",
"path": [
"api",
"iou",
Expand Down Expand Up @@ -182,12 +182,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10010/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantC,L=New York,C=US",
"raw": "http://localhost:10012/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantC,L=Paris,C=FR",
"protocol": "http",
"host": [
"localhost"
],
"port": "10010",
"port": "10012",
"path": [
"api",
"iou",
Expand All @@ -204,7 +204,7 @@
},
{
"key": "party",
"value": "O=ParticipantC,L=New York,C=US"
"value": "O=ParticipantC,L=Paris,C=FR"
}
]
}
Expand All @@ -218,12 +218,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10010/api/iou/transfer-iou?id=9c30d15a-03c7-4ca9-b621-ac81b84481bb&party=C=US,L=New York,O=ParticipantC",
"raw": "http://localhost:10012/api/iou/transfer-iou?id=9c30d15a-03c7-4ca9-b621-ac81b84481bb&party=C=US,L=New York,O=ParticipantC",
"protocol": "http",
"host": [
"localhost"
],
"port": "10010",
"port": "10012",
"path": [
"api",
"iou",
Expand All @@ -250,12 +250,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10010/api/iou/peers",
"raw": "http://localhost:10012/api/iou/peers",
"protocol": "http",
"host": [
"localhost"
],
"port": "10010",
"port": "10012",
"path": [
"api",
"iou",
Expand All @@ -272,12 +272,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10010/api/iou/me",
"raw": "http://localhost:10012/api/iou/me",
"protocol": "http",
"host": [
"localhost"
],
"port": "10010",
"port": "10012",
"path": [
"api",
"iou",
Expand All @@ -294,12 +294,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10010/api/iou/ious",
"raw": "http://localhost:10012/api/iou/ious",
"protocol": "http",
"host": [
"localhost"
],
"port": "10010",
"port": "10012",
"path": [
"api",
"iou",
Expand All @@ -316,12 +316,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10013/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantB,L=New York,C=US",
"raw": "http://localhost:10015/api/iou/issue-iou?amount=99&currency=GBP&party=O=ParticipantB,L=New York,C=US",
"protocol": "http",
"host": [
"localhost"
],
"port": "10013",
"port": "10015",
"path": [
"api",
"iou",
Expand Down Expand Up @@ -352,12 +352,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10013/api/iou/peers",
"raw": "http://localhost:10015/api/iou/peers",
"protocol": "http",
"host": [
"localhost"
],
"port": "10013",
"port": "10015",
"path": [
"api",
"iou",
Expand All @@ -374,12 +374,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10013/api/iou/me",
"raw": "http://localhost:10015/api/iou/me",
"protocol": "http",
"host": [
"localhost"
],
"port": "10013",
"port": "10015",
"path": [
"api",
"iou",
Expand All @@ -396,12 +396,12 @@
"header": [],
"body": {},
"url": {
"raw": "http://localhost:10013/api/iou/ious",
"raw": "http://localhost:10015/api/iou/ious",
"protocol": "http",
"host": [
"localhost"
],
"port": "10013",
"port": "10015",
"path": [
"api",
"iou",
Expand Down
15 changes: 9 additions & 6 deletions README.md
Expand Up @@ -6,10 +6,8 @@ This repo contains all the solutions for the practical exercises of the Corda tw
training course.


This repository is divided into two parts: Java solutions, and Kotlin solutions. You may complete the training in either
language, but be aware that the Corda platform is written in Kotlin, and many developers prefer to leverage this by
writing their CorDapps in Kotlin
as well.
This repository is divided into two parts: Java solutions, and Kotlin solutions. You may complete the training in whichever
language you prefer.

# Setup

Expand Down Expand Up @@ -101,5 +99,10 @@ the green play button.
the green play button.

###Interacting with the CorDapp
* Once all the three nodes have started up (Look for `Webserver started up in XXX sec` in the terminal or IntelliJ ), you can interact
with the app via a web browser. For Party A, navigate to `localhost:10007/web/iou/`.
Once all the three nodes have started up (look for `Webserver started up in XXX sec` in the terminal or IntelliJ ), you can interact
with the app via a web browser.
* From a Node Driver configuration, look for `Starting webserver on address localhost:100XX` for the addresses.

* From the terminal: Node A: `localhost:10009`, Node B: `localhost:10012`, Node C: `localhost:10015`.

To access the front-end gui for each node, navigate to `localhost:XXXX/web/iou/`
42 changes: 21 additions & 21 deletions java-source/build.gradle
Expand Up @@ -73,48 +73,48 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {

node {
name "O=Notary,L=London,C=GB"
notary = [validating : false]
notary = [validating: false]
p2pPort 10002
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
}
node {
name "O=PartyA,L=London,C=GB"
p2pPort 10005
name "O=ParticipantA,L=London,C=GB"
p2pPort 10007
webPort 10009
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcSettings {
useSsl false
standAloneBroker false
address "0.0.0.0:10006"
adminAddress "0.0.0.0:10016"
address "0.0.0.0:10008"
adminAddress "0.0.0.0:10018"
}
webPort 10007
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcUsers = rpcUsersList
}
node {
name "O=PartyB,L=New York,C=US"
p2pPort 10008
name "O=ParticipantB,L=New York,C=US"
p2pPort 10010
webPort 10012
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcSettings {
useSsl false
standAloneBroker false
address "0.0.0.0:10009"
adminAddress "0.0.0.0:10019"
address "0.0.0.0:10011"
adminAddress "0.0.0.0:10021"
}
webPort 10010
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcUsers = rpcUsersList
rpcUsers = rpcUsersList
}
node {
name "O=PartyC,L=Paris,C=FR"
p2pPort 10011
name "O=ParticipantC,L=Paris,C=FR"
p2pPort 10013
webPort 10015
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcSettings {
useSsl false
standAloneBroker false
address "0.0.0.0:10012"
adminAddress "0.0.0.0:10022"
address "0.0.0.0:10014"
adminAddress "0.0.0.0:10024"
}
webPort 10013
cordapps = ["$corda_release_distribution:corda-finance:$corda_release_version"]
rpcUsers = rpcUsersList
rpcUsers = rpcUsersList
}
}

8 changes: 4 additions & 4 deletions java-source/src/test/java/net/corda/training/NodeDriver.java
Expand Up @@ -36,15 +36,15 @@ public static void main(String[] args) {
.withIsDebug(true)
.withWaitForAllNodesToFinish(true)
.withExtraCordappPackagesToScan(ImmutableList.of("net.corda.finance"))
.withNotarySpecs(Arrays.asList(new NotarySpec(new CordaX500Name("Controller", "London","GB"), true, Arrays.asList(user), VerifierType.InMemory, null))), dsl -> {
.withNotarySpecs(Arrays.asList(new NotarySpec(new CordaX500Name("Notary", "London","GB"), true, Arrays.asList(user), VerifierType.InMemory, null))), dsl -> {
CordaFuture<NodeHandle> partyAFuture = dsl.startNode(new NodeParameters()
.withProvidedName(new CordaX500Name("Bank A", "London", "GB"))
.withProvidedName(new CordaX500Name("ParticipantA", "London", "GB"))
.withRpcUsers(ImmutableList.of(user)));
CordaFuture<NodeHandle> partyBFuture = dsl.startNode(new NodeParameters()
.withProvidedName(new CordaX500Name("Bank B", "New York", "US"))
.withProvidedName(new CordaX500Name("ParticipantB", "New York", "US"))
.withRpcUsers(ImmutableList.of(user)));
CordaFuture<NodeHandle> partyCFuture = dsl.startNode(new NodeParameters()
.withProvidedName(new CordaX500Name("Bank C", "Paris", "FR"))
.withProvidedName(new CordaX500Name("ParticipantC", "Paris", "FR"))
.withRpcUsers(ImmutableList.of(user)));

try {
Expand Down

0 comments on commit 60bbfd2

Please sign in to comment.