Skip to content

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.

  1. Application Components - which can run on same server or 2 different servers
    • Contour Web App: a Spring Boot application
    • Corda + Contour CorDapp
  2. Databases - 2 databases which can be on same server
    • Database for Contour Web App
    • Database for Corda and Contour CorDapp

Deployment Diagram

Step 1. Prepare

1.1 Pre-requisites

  1. 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:
  2. Provision two (2) Databases, create DB account with READ/WRITE access. Database types supported:

    • PostgreSQL 10 or later; or
    • SQL Server 2014 / 2017 / 2019
  3. Provision one (1) SMTP account for email notification

  4. 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

  1. Pull Contour installation v6.0, v6.1 and v7.0 package (e.g. contour-6.0.0.zip, contour-6.1.0.zip and contour-7.0.0.zip) onto the destination server
  2. 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

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.

  1. 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;
  2. Change working directory to the Corda installation directory, e.g. cd /opt/corda;
  3. Update the Corda node configurations, with reference to Corda Node Config;
  4. 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 Prod
    • cn-preprod-truststore.jks for Corda Network Pre-prod
  5. Change working directory back to Corda installation directory, e.g. cd /opt/corda/. Raise Certificate Signing Request (CSR) by doing init 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
  6. Send an email to Corda Network Foundation (CNF) to request CSR approval, 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.

  1. Delete the directory e.g. /opt/corda/cordapps
  2. Copy & paste the entire v6.0 package /corda/cordapps/ directory to your existing corda/ installation directory, e.g. from ~/contour_6.0.0/corda/cordapps to /opt/corda/cordapps
  3. Change working directory to the Corda installation directory, e.g. cd /opt/corda/cordapps
  4. 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
  5. Change working directory back to Corda installation directory, e.g. cd /opt/corda/;
  6. Start the Corda node, e.g. command java -jar corda-4.8.1.jar --base-directory /opt/corda --config-file /opt/corda/node.conf
  7. 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

  1. Delete all Cordapps 6.0 Jars e.g. rm *.jar under /opt/corda/cordapps
  2. Copy & paste v6.1 jars from cordapps/ directory to your existing corda/cordapps installation directory, e.g. from ~/contour_6.1.0/corda/cordapps to /opt/corda/cordapps
  3. Change working directory to the Corda installation directory, e.g. cd /opt/corda/cordapps
  4. Rename the config file name to match the new version, i.e. from contour-cordapp-6.0.0.conf to contour-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.
  5. Add the config file for corda-tools-metering-collector-<newversion>.jar, by copy and paste from Contour release package contour-6.1.0/corda/cordapps/config
  6. Change working directory back to Corda installation directory, e.g. cd /opt/corda/
  7. Start the Corda node, e.g. command java -jar corda-4.8.1.jar --base-directory /opt/corda --config-file /opt/corda/node.conf
  8. 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

  1. Delete all Cordapps 6.1 Jars e.g. rm *.jar under /opt/corda/cordapps
  2. Copy & paste v7.0 jars from cordapps/ directory to your existing corda/cordapps installation directory, e.g. from ~/contour_7.0.0/corda/cordapps to /opt/corda/cordapps
  3. Change working directory to the Corda installation directory, e.g. cd /opt/corda/cordapps
  4. Rename the config file name to match the new version, i.e. from contour-cordapp-6.1.0.conf to contour-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.
  5. 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
  6. Change working directory back to Corda installation directory, e.g. cd /opt/corda/
  7. 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.

  1. 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
  2. Key in rpc userpassword as specified in the node.conf
  3. Run the command flow list, which lists out all the Corda flows available in the cordapps
  4. 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"
  5. If the network connections have configured properly, the Ping flow will comeplete successfully with example output as below.
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.

  1. 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
  2. Key in rpc userpassword as specified in the node.conf
  3. Run the command flow start network.contour.app.flow.OnStartupFlow
    • This will initiate a membership request to Contour Business Network Operator (BNO) node.
  4. 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. Please 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.

  1. 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;
  2. Change working directory to the WebApp installation directory, e.g. cd /opt/api-service;
  3. Update the Contour Web App configurations, e.g. /opt/api-service/application.properties, with reference to Contour Web App Config;
  4. Update the bootstrap file, /opt/api-service/bootstrap.json, with reference to Contour Bootstrap Web App
  5. 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 the bootstrap.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 the bootstrap.json

Step 4. Get the Node ready

Follow the Quick Start Guide to ready the node for transaction.