Upgrading an Application Network heading-link-icon

If an administrator upgrades a Corda cluster from 5.1 to 5.2, you should re-register the MGM and upgrade the member CPIs Corda Package Installer. A signed ZIP/JAR combination of a CPB and a Group Policy File that defines not only the application code that a virtual node will run, but also the details of the MGM with which to register, and the details of network PKI requirements. of your application network. The MemberInfo platform version is set at member registration time and so re-registering the MGM and upgrading members ensures that this value reflects the current version. This enables the following:

  • Members see the latest MemberInfo of the MGM.
  • The MGM can make decisions about members based on their platform version. For example, the MGM can exclude a member from the network if they do not upgrade.
  • Platform gating logic may be based on platform version.
  • Ledger system flows can block transactions on members that are not on the current platform version.

The following sections describe how to upgrade your application network:

  1. Re-register the MGM
  2. Re-export the Group Policy from the MGM
  3. Repackage the Member CPB
  4. Upload the CPI
  5. Apply the New CPI to Each Virtual Node
  6. Check Member Re-registration

The first step in upgrading a network is to upgrade the MGM to the new version by re-registering the MGM.

After re-registering the MGM, to retrieve the group policy A JSON file containing network information that is bundled with a CPB to create a CPI. file from the upgraded MGM Membership Group Manager. May also be referred to as the Network Manager. It is a virtual node and Corda identity that acts as a central registrar for group membership. , do the following:

export MGM_REST_HOST=localhost
export MGM_REST_PORT=8888
export MGM_REST_URL="https://$MGM_REST_HOST:$MGM_REST_PORT/api/v5_2"
export MGM_HOLDING_ID=<MGM-holding-ID>
$MGM_REST_HOST = "localhost"
$MGM_REST_PORT = "8888"
$MGM_REST_URL = "https://$MGM_REST_HOST:$MGM_REST_PORT/api/v5_2"
$MGM_HOLDING_ID = <MGM-holding-ID>
Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$MGM_REST_URL/mgm/$MGM_HOLDING_ID/info" | ConvertTo-Json -Depth 4 > $WORK_DIR/GroupPolicy.json
If using Bash, create the GroupPolicy.json by exporting it using the MGM, by running this Curl command:

curl -k -u $REST_API_USER:$REST_API_PASSWORD -X GET $MGM_REST_URL/mgm/$MGM_HOLDING_ID/info > "$WORK_DIR/GroupPolicy.json"

You must create a new CPI for each Corda-deployed CorDapp with the group policy file from the upgraded MGM. This CPI must have the same Corda CPK CorDapp Name as the existing CorDapp but with the --cpi-version incremented. For example:

./corda-cli.sh package create-cpi \
--cpb <CPB_FILE> \
--group-policy <UPGRADED_GROUP_POLICY_FILE_> \
--cpi-name "<CPI_Name>" \
--cpi-version "2.0.0.0-SNAPSHOT" \
--file <CPI_FILE_NAME> \
--keystore <SIGNING_KEY> \
--storepass "<SIGNING_KEY_PASSWORD>" \
--key "<SIGNING_KEY_NAME>"
corda-cli.cmd package create-cpi `
--cpb <CPB_FILE> `
--group-policy <UPGRADED_GROUP_POLICY_FILE_> `
--cpi-name "<CPI_Name>" `
--cpi-version "2.0.0.0-SNAPSHOT" `
--file <CPI_FILE_NAME>`
--keystore <SIGNING_KEY> `
--storepass "<SIGNING_KEY_PASSWORD>" `
--key "<SIGNING_KEY_NAME>"

To upload the upgraded CPI to the network, run the following:

export CPI_PATH="$WORK_DIR\mgm-5.2.0.0-SNAPSHOT-package.cpi"
curl -k -u $REST_API_USER:$REST_API_PASSWORD -F upload=@$CPI_PATH $REST_API_URL/cpi/
$CPI_PATH = "$WORK_DIR\mgm-5.2.0.0-SNAPSHOT-package.cpi"
$CPI_UPLOAD_RESPONSE = Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$REST_API_URL/cpi/" -Method Post -Form @{
    upload = Get-Item -Path $CPI_PATH
}

The returned identifier (for example f0a0f381-e0d6-49d2-abba-6094992cef02) is the CPI ID. Use this identifier to get the checksum of the CPI:

export CPI_ID=<CPI-ID>
curl -k -u $REST_API_USER:$REST_API_PASSWORD $REST_API_URL/cpi/status/$CPI_ID
$CPI_ID = $CPI_UPLOAD_RESPONSE.id
$CPI_STATUS_RESPONSE = Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$REST_API_URL/cpi/status/$CPI_ID"

The result contains the cpiFileChecksum.

The Cluster Administrator can apply the new version of the CPI using the CPI checksum.

To check that a member successfully re-registered with the MGM, retrieve all of the member’s registration requests and check that the latest request was approved:

curl -k -u $REST_API_USER:$REST_API_PASSWORD -X GET $REST_API_URL/membership/$HOLDING_ID
Invoke-RestMethod -SkipCertificateCheck  -Headers @{Authorization=("Basic {0}" -f $AUTH_INFO)} -Uri "$REST_API_URL/membership/$HOLDING_ID"

You can also confirm in the response that the platform version is correct.

If the automatic re-registration was unsuccessful, you must manually re-register the member.

Was this page helpful?

Thanks for your feedback!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.

We're sorry this page wasn't helpful. Let us know how we can make it better!

Chat with us

Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.

Create an issue

Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.

Propose documentation improvements directly

Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.