mirror of
https://github.com/corda/corda.git
synced 2024-12-26 16:11:12 +00:00
Clean up HSM launch (#177)
* Add basedir to HSM configuration * Add run instructions to the Readme.md * Correct help messsage display for HSM Doorman
This commit is contained in:
parent
96d8ec9640
commit
a5ca027d54
@ -2,27 +2,34 @@
|
|||||||
# Building the binaries
|
# Building the binaries
|
||||||
|
|
||||||
## Network management server
|
## Network management server
|
||||||
To build a fat jar containing all the doorman code you can simply invoke
|
To build a fat jar containing all the doorman code you can simply invoke:
|
||||||
```
|
```
|
||||||
./gradlew network-management:capsule:buildDoormanJAR
|
./gradlew network-management:capsule:buildDoormanJAR
|
||||||
```
|
```
|
||||||
|
|
||||||
The built file will appear in
|
The built file will appear in:
|
||||||
```
|
```
|
||||||
network-management/capsule/build/libs/doorman-<VERSION>.jar
|
network-management/capsule/build/libs/doorman-<VERSION>.jar
|
||||||
```
|
```
|
||||||
## HSM signing server
|
## HSM signing server
|
||||||
To build a fat jar containing all the HSM signer code you can simply invoke
|
To build a fat jar containing all the HSM signer code you can simply invoke:
|
||||||
```
|
```
|
||||||
./gradlew network-management:capsule-hsm:buildHsmJAR
|
./gradlew network-management:capsule-hsm:buildHsmJAR
|
||||||
```
|
```
|
||||||
|
|
||||||
The built file will appear in
|
The built file will appear in:
|
||||||
```
|
```
|
||||||
network-management/capsule-hsm/build/libs/hsm-<VERSION>.jar
|
network-management/capsule-hsm/build/libs/hsm-<VERSION>.jar
|
||||||
```
|
```
|
||||||
|
|
||||||
The binaries can also be obtained from artifactory after deployment in teamcity
|
The binaries can also be obtained from artifactory after deployment in TeamCity.
|
||||||
|
|
||||||
|
To run the HSM signing server:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd network-management
|
||||||
|
java -jar capsule-hsm/build/libs/hsm-3.0-NETWORKMAP-20171204.134345-6-capsule.jar --configFile hsm.conf
|
||||||
|
```
|
||||||
|
|
||||||
#Configuring network management service
|
#Configuring network management service
|
||||||
### Local signing
|
### Local signing
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
basedir = "."
|
||||||
device = "3001@127.0.0.1"
|
device = "3001@127.0.0.1"
|
||||||
keyGroup = "DEV.DOORMAN"
|
keyGroup = "DEV.DOORMAN"
|
||||||
keySpecifier = -1
|
keySpecifier = -1
|
||||||
@ -22,4 +23,4 @@ dataSourceProperties {
|
|||||||
"dataSource.url" = "jdbc:h2:file:"${basedir}"/persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT="${h2port}
|
"dataSource.url" = "jdbc:h2:file:"${basedir}"/persistence;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;WRITE_DELAY=0;AUTO_SERVER_PORT="${h2port}
|
||||||
"dataSource.user" = sa
|
"dataSource.user" = sa
|
||||||
"dataSource.password" = ""
|
"dataSource.password" = ""
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package com.r3.corda.networkmanage.hsm
|
|||||||
|
|
||||||
import com.r3.corda.networkmanage.common.persistence.PersistentNetworkMapStorage
|
import com.r3.corda.networkmanage.common.persistence.PersistentNetworkMapStorage
|
||||||
import com.r3.corda.networkmanage.common.persistence.configureDatabase
|
import com.r3.corda.networkmanage.common.persistence.configureDatabase
|
||||||
|
import com.r3.corda.networkmanage.common.utils.ShowHelpException
|
||||||
import com.r3.corda.networkmanage.hsm.authentication.AuthMode
|
import com.r3.corda.networkmanage.hsm.authentication.AuthMode
|
||||||
import com.r3.corda.networkmanage.hsm.authentication.Authenticator
|
import com.r3.corda.networkmanage.hsm.authentication.Authenticator
|
||||||
import com.r3.corda.networkmanage.hsm.authentication.createProvider
|
import com.r3.corda.networkmanage.hsm.authentication.createProvider
|
||||||
@ -20,7 +21,12 @@ import java.security.Security
|
|||||||
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
run(parseParameters(*args))
|
try {
|
||||||
|
run(parseParameters(*args))
|
||||||
|
} catch (e: ShowHelpException) {
|
||||||
|
e.errorMessage?.let(::println)
|
||||||
|
e.parser.printHelpOn(System.out)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun run(parameters: Parameters) {
|
fun run(parameters: Parameters) {
|
||||||
|
Loading…
Reference in New Issue
Block a user