Deploying Contour 7.0
You can request the Contour installation package via the Contour Support Portal.
Deployment Diagram
Overview of the deployment and components as shown in the diagram below.
- Application Components - which can run on same server or 2 different servers
- Contour Web App: a Spring Boot application
- Corda + Contour CorDapp
- Databases - 2 databases which can be on same server
- Database for Contour Web App
- Database for Corda and Contour CorDapp
Step 1. Prepare
1.1 Pre-requisites
-
Provision one (1) or two (2) servers (e.g. VMs). Recommended spec:
- OS: Ubuntu 14/16 or RHEL 7
- CPU: 2 (v)Core or more
- RAM: 8G RAM or more
- Disk: 50G or more
- Java 8 JDK. Install the Java 8 JDK. Corda requires at least version 8u171, but do not currently support Java 9 or higher for this version of Corda. Verify java version with command:
java -version
. Corda has been tested against the following Java builds:
-
Provision two (2) Databases, create DB account with READ/WRITE access. Database types supported:
- PostgreSQL 10 or later; or
- SQL Server 2014 / 2017 / 2019
-
Provision one (1) SMTP account for email notification
-
Make sure firewall rules have been configured to allowed the required network connections as detailed in Network Connections / Firewall Rules
1.2 Download & Prepare Package
- Pull Contour installation v6.0, v6.1 and v7.0 package (e.g.
contour-6.0.0.zip
,contour-6.1.0.zip
andcontour-7.0.0.zip
) onto the destination server - Upzip the package (e.g. to directory
~/contour-7.0.0/
), which contains:
~/contour_7.0.0
|-- api-service/ # installation files for Contour Web App
|-- corda/ # installation files for Corda and Contour CorDapps
|-- Corda Enterprise 4.8.1 # Corda Enterprise packages, incl. Corda Firewall
1.3 Get node X500 ready
Raise support ticket with below information for your node X500 pre approval
- X500 name in plain text format. Please refer to allowable identity name.
- Node company registered address
Contour support will raise the request to Corda Network Foundation (CNF) for X500 pre approval and inform you once approved.
1.4 Sanity check on infra layer
Prior to starting the Corda Node setup, it's recommended to check all the connectivity described in Network Connections / Firewall Rules. 1. Contour network / BNO 1. Notary 1. Corda Network Map 1. Corda Network Doorman 1. Certificate Revocation List(crl) Endpoint
Step 2. Install Corda & CordApp
2.1 Install Corda 4.8.1
You can skip this step if running Contour CorDapp on an existing Corda Node.
- Copy & paste the entire v7.0 package
corda/
directory to the desired installation path, e.g./opt/corda
. => Copy & paste entiry directory from~/contour_7.0.0/corda
to/opt/corda
; - Change working directory to the Corda installation directory, e.g.
cd /opt/corda
; - Update the Corda node configurations, with reference to Corda Node Config;
- Change working directory to the
certificates
sub-directory, e.g.cd /opt/corda/certificates
;- there are two (2) trust root files from the Certificate Authority (CA, a.k.a Doorman) in different Corda Network
cn-prod-truststore.jks
for Corda Network Prodcn-preprod-truststore.jks
for Corda Network Pre-prod
- Change working directory back to Corda installation directory, e.g.
cd /opt/corda/
. Raise Certificate Signing Request (CSR) by doinginit registration
and specify the right trust root to the Corda Network the node is joining. E.g.- Command to join Corda Network Prod:
java -jar corda-4.8.1.jar initial-registration --network-root-truststore certificates/cn-prod-truststore.jks --network-root-truststore-password trustpass
- Command to join Corda Network Pre-prod:
java -jar corda-4.8.1.jar initial-registration --network-root-truststore certificates/cn-preprod-truststore.jks --network-root-truststore-password trustpass
- Command to join Corda Network Prod:
- Raise a ticket to Contour Support to request CSR approval from Corda Network Foundation (CNF), by specifying the request ID. E.g.
9309e1ef-038f-444b-9df3-b6e8b7726c11
in this example.
Running Corda Init Registration Flow..
Getting Request ID..
Getting Request ID..
Getting Request ID..
Getting Request ID..
Getting Request ID..
Init Registration Request sent, ID: 9309e1ef-038f-444b-9df3-b6e8b7726c11
Please contact CA to approve your request,
The Init-Registration proccess(pid:) is running in background, please run this script again
The Corda node will keep pulling the CSR approval from Doorman. Upon approval, the Corda node will terminate automatically.
2.2 Install Contour v6.0 CorDapps
In order to be compatible with Contour v6.0 and v6.1 and be able to transact with peer nodes which may still remains on v6.0 and v6.1, you need to install v6.0 and v6.1 CorDapps on your node.
If you have performed Step 2.1, you already have the Contour CorDapps under installation directory, e.g. /opt/corda/cordapps
.
- Delete the directory e.g.
/opt/corda/cordapps
- Copy & paste the entire v6.0 package
/corda/cordapps/
directory to your existingcorda/
installation directory, e.g. from~/contour_6.0.0/corda/cordapps
to/opt/corda/cordapps
- Change working directory to the Corda installation directory, e.g.
cd /opt/corda/cordapps
- Update the Contour CorDapp configurations under the
cordapps/cofig
directory, e.g./opt/corda/cordapps/contour-cordapp-6.0.0.conf
, with reference to Contour CorDapp Config - Change working directory back to Corda installation directory, e.g.
cd /opt/corda/
; - Start the Corda node, e.g. command
java -jar corda-4.8.1.jar --base-directory /opt/corda --config-file /opt/corda/node.conf
- After corda service start completely, stop the Corda node, e.g.
systemctl stop corda.service
if using systemd.
2.3 Install Contour v6.1 CorDapps
- Delete all Cordapps 6.0 Jars e.g.
rm *.jar under /opt/corda/cordapps
- Copy & paste v6.1 jars from
cordapps/
directory to your existingcorda/cordapps
installation directory, e.g. from~/contour_6.1.0/corda/cordapps
to/opt/corda/cordapps
- Change working directory to the Corda installation directory, e.g.
cd /opt/corda/cordapps
- Rename the config file name to match the new version, i.e. from
contour-cordapp-6.0.0.conf
tocontour-cordapp-6.1.0.conf
- No change in the
contour-cordapp-<version>.conf
in v6.1.0 required, compared to v6.0.0. - Refer to Contour Corda Config for more details about the configuration parameters.
- No change in the
- Add the config file for
corda-tools-metering-collector-<newversion>.jar
, by copy and paste from Contour release packagecontour-6.1.0/corda/cordapps/config
- Refer to Contour Corda Config for more details about the configuration parameters
- Change working directory back to Corda installation directory, e.g.
cd /opt/corda/
- Start the Corda node, e.g. command
java -jar corda-4.8.1.jar --base-directory /opt/corda --config-file /opt/corda/node.conf
- After corda service start completely, stop the Corda node, e.g.
systemctl stop corda.service
if using systemd.
2.4 Install Contour v7.0 CorDapps
- Delete all Cordapps 6.1 Jars e.g.
rm *.jar under /opt/corda/cordapps
- Copy & paste v7.0 jars from
cordapps/
directory to your existingcorda/cordapps
installation directory, e.g. from~/contour_7.0.0/corda/cordapps
to/opt/corda/cordapps
- Change working directory to the Corda installation directory, e.g.
cd /opt/corda/cordapps
- Rename the config file name to match the new version, i.e. from
contour-cordapp-6.1.0.conf
tocontour-cordapp-7.0.0.conf
- No change in the
contour-cordapp-<version>.conf
in v7.0.0 required, compared to v6.1.0. - Refer to Contour Corda Config for more details about the configuration parameters.
- No change in the
- Keep the config file name for
corda-tools-metering-collector-<version>.conf
- No change in the
corda-tools-metering-collector-<version>.conf
in v7.0.0 required, compared to v6.1.0. - Refer to Contour Corda Config for more details about the configuration parameters
- No change in the
- Change working directory back to Corda installation directory, e.g.
cd /opt/corda/
- Start the Corda node, e.g. command
java -jar corda-4.8.1.jar --base-directory /opt/corda --config-file /opt/corda/node.conf
2.5 Check Network Connection to Contour BNO
This step is to test the network connection from your Corda node to Contour Business Network Operator (BNO), before the next step.
This requires using the Corda Node Shell, to manually trigger a Ping
flow that Contour have introduced with the contour-business-tools-<version>.jar
.
- Connecting to the Corda Shell using the command
ssh -p [sshd portNumber] [rpc username]@[host, e.g. localhost]
- e.g.
ssh -p 2222 cordau@localhost
- e.g.
- Key in rpc userpassword as specified in the
node.conf
- Run the command
flow list
, which lists out all the Corda flows available in thecordapps
- Run the command
flow start network.contour.app.flow.SinglePingFlow$Initiator target: "<Contour BNO x500Name>"
, e.g.- For Contour Prod:
flow start network.contour.app.flow.SinglePingFlow$Initiator target: "OU=Trade Finance, O=Global Trade Network, L=Singapore, C=SG"
- For Contour Staging:
flow start network.contour.app.flow.SinglePingFlow$Initiator target: "OU=Contour BNO, O=Contour Pte. Ltd., L=Singapore, C=SG"
- For Contour Prod:
- If the network connections have configured properly, the
Ping
flow will comeplete successfully with example output as below.- If the
Ping
flow fails, please check again the necessary network connection requirements as described in Network Connections / Firewall Rules
- If the
Mon Dec 14 03:34:07 UTC 2020>>> flow start network.contour.app.flow.SinglePingFlow$Initiator target: "OU=Contour BNO, O=Contour Pte. Ltd., L=Singapore, C=SG"
✓ Starting
✓ Start the ping.
✓ Receive the ping.
▶︎ Done
Flow completed with result: OU=Contour BNO, O=Contour Pte. Ltd., L=Singapore, C=SG.name has received ping at 2020-12-14T03:36:10.853Z
ping target OU=Contour BNO, O=Contour Pte. Ltd., L=Singapore, C=SG time elapsed = 97 ms
2.6 Request Contour Business Network Membership
Please make sure the network connection from your Corda node to BNO has been tested with Step 2.4 above, before proceeding this step.
This step requires using the Corda Node Shell, to manually trigger the membership request to Contour Business Network.
- Connecting to the Corda Shell using the command
ssh -p [sshd portNumber] [rpc username]@[host, e.g. localhost]
- e.g.
ssh -p 2222 cordau@localhost
- e.g.
- Key in rpc userpassword as specified in the
node.conf
- Run the command
flow start network.contour.app.flow.OnStartupFlow
- This will initiate a membership request to Contour Business Network Operator (BNO) node.
- Raise a support ticket to Contour to request membership approval via Contour Support, by specifying the X500 name of your node in the request.
Upon the approval of Contour Business Network Membership, the Corda node and Contour CorDapps is ready. You can use Health Survey Tool to make sure the corda node has no issue to connect the corda network before proceed to install Contour Web App.
Step 3. Install Contour Web App
Please proceed to install Contour Web App, after the Corda node and Contour CorDapps ready as desribed in Step 2.
- Copy & paste the entire v7.0 package
api-service/
directory to the desired installation path, e.g./opt/api-service
. => Copy & paste entiry directory from~/contour-7.0.0/api-service
to/opt/api-service
; - Change working directory to the WebApp installation directory, e.g.
cd /opt/api-service
; - Update the Contour Web App configurations, e.g.
/opt/api-service/application.properties
, with reference to Contour Web App Config; - Update the bootstrap file,
/opt/api-service/bootstrap.json
, with reference to Contour Bootstrap Web App - Start the Contour Web App, e.g. command
java -jar contour-service-<version>.jar
Now, the Contour Web Application should be up and running.
- the
superadmin
users specified in thebootstrap.json
should receive their account activation email - other non-superadmin users specified in the
bootstrap.json
should be able to login to the system with their username and password specified in thebootstrap.json
Note When setup HTTPS for the web, it's recommended to use reverse proxy like NGINX to serve the frontend static page, but not the springboot (Contour service).
Step 4. Get the Node ready
Follow the Quick Start Guide to ready the node for transaction.