CORDA-1889: Update some CordFormation samples to use nodeDefaults{}. (#3771)

This commit is contained in:
Chris Rankin 2018-08-11 12:57:04 +01:00 committed by GitHub
parent 75ac13815b
commit dfea9b6940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 30 deletions

View File

@ -1,4 +1,4 @@
gradlePluginsVersion=4.0.28
gradlePluginsVersion=4.0.29
kotlinVersion=1.2.51
platformVersion=4
guavaVersion=25.1-jre

View File

@ -6,14 +6,17 @@ apply plugin: 'net.corda.plugins.cordformation'
dependencies {
cordaCompile project(":core")
cordaCompile project(":node-api")
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
runtimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
directory "./build/nodes"
directory file("$buildDir/nodes")
nodeDefaults {
cordapps = []
rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
}
node {
name "O=Notary Service,L=Zurich,C=CH"
notary = [validating : true]
@ -22,13 +25,12 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
port 10003
adminPort 10004
}
rpcUsers = []
extraConfig = ['h2Settings.address' : 'localhost:10005']
}
node {
name "O=Bank A,L=London,C=GB"
p2pPort 10006
cordapps = []
rpcUsers = ext.rpcUsers
// This configures the default cordapp for this node
projectCordapp {
config "someStringValue=test"
@ -42,8 +44,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
node {
name "O=Bank B,L=New York,C=US"
p2pPort 10010
cordapps = []
rpcUsers = ext.rpcUsers
// This configures the default cordapp for this node
projectCordapp {
config project.file("src/config.conf")

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="info">
<AppenderRef ref="Console" />
</Root>
</Loggers>
</Configuration>

View File

@ -35,8 +35,8 @@ dependencies {
cordapp project(':samples:simm-valuation-demo:flows')
// Corda integration dependencies
cordaCompile project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaCompile project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":node:capsule", configuration: 'runtimeArtifacts')
cordaRuntime project(path: ":webserver:webcapsule", configuration: 'runtimeArtifacts')
cordaCompile project(':core')
cordaCompile project(':webserver')
@ -63,20 +63,22 @@ dependencies {
}
task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
ext.rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
directory "./build/nodes"
directory file("$buildDir/nodes")
nodeDefaults {
cordapp project(':finance')
cordapp project(':samples:simm-valuation-demo:contracts-states')
cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = [['username': "default", 'password': "default", 'permissions': [ 'ALL' ]]]
}
node {
name "O=Notary Service,L=Zurich,C=CH"
notary = [validating : true]
p2pPort 10002
cordapp project(':finance')
cordapp project(':samples:simm-valuation-demo:contracts-states')
cordapp project(':samples:simm-valuation-demo:flows')
rpcSettings {
address "localhost:10014"
adminAddress "localhost:10015"
}
rpcUsers = []
extraConfig = [
custom: [
jvmArgs: ["-Xmx1g"]
@ -92,10 +94,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
address("localhost:10016")
adminAddress("localhost:10017")
}
cordapp project(':finance')
cordapp project(':samples:simm-valuation-demo:contracts-states')
cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = ext.rpcUsers
extraConfig = [
custom: [
jvmArgs: ["-Xmx1g"]
@ -111,10 +109,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
address("localhost:10026")
adminAddress("localhost:10027")
}
cordapp project(':finance')
cordapp project(':samples:simm-valuation-demo:contracts-states')
cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = ext.rpcUsers
extraConfig = [
custom: [
jvmArgs: ["-Xmx1g"]
@ -130,10 +124,6 @@ task deployNodes(type: net.corda.plugins.Cordform, dependsOn: ['jar']) {
address("localhost:10036")
adminAddress("localhost:10037")
}
cordapp project(':finance')
cordapp project(':samples:simm-valuation-demo:contracts-states')
cordapp project(':samples:simm-valuation-demo:flows')
rpcUsers = ext.rpcUsers
extraConfig = [
custom: [
jvmArgs: ["-Xmx1g"]