Upgrading a CPI heading-link-icon

You can upgrade a virtual node’s CPI 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. using the PUT method of the api/v5_2/virtualnode/<virtualnodeshortid>/cpi/<targetcpifilechecksum> endpoint .

To upgrade a CPI, do the following:

  1. Set the state of the virtual node to MAINTENANCE.
  2. Ensure no flows are running (that is, all flows have either “COMPLETED”, “FAILED” or “KILLED” status). You can check the list of running flows using GET /api/v5_2/flow/<holdingidentityshorthash>.
  3. If you are using your own virtual node databases, send the checksum of the CPI to upgrade to using the api/v5_2/virtualnode/<virtualnodeshortid>/db/vault/<newcpichecksum> endpoint:
    curl -k -u $REST_API_USER:$REST_API_PASSWORD -X $REST_API_URL/api/v5_2/virtualnode/<virtualnodeshortid>/db/vault/<newcpichecksum>
    
    Invoke-RestMethod -SkipCertificateCheck -Headers @{Authorization=("Basic {0}" -f $REST_API_USER:$REST_API_PASSWORD)} -Method -Uri    $REST_API_URL/api/v5_1virtualnode/<virtualnodeshortid>/db/vault/<newcpichecksum>
    
    The api/v5_2/virtualnode/<virtualnodeshortid>/db/vault/<newcpichecksum> endpoint returns the SQL you must execute to upgrade the virtual node’s vault database. You must run this SQL before upgrading the CPI.
  4. Send the checksum of the CPI to upgrade to using the PUT method of the api/v5_2/virtualnode/<virtualnodeshortid>/cpi/<targetcpifilechecksum> endpoint:
    curl -k -u $REST_API_USER:$REST_API_PASSWORD -X PUT $REST_API_URL/api/v5_2/virtualnode/<virtualnodeshortid>/cpi/<targetcpifilechecksum>
    
    Invoke-RestMethod -SkipCertificateCheck -Headers @{Authorization=("Basic {0}" -f $REST_API_USER:$REST_API_PASSWORD)} -Method PUT -Uri    $REST_API_URL/api/v5_1virtualnode/<virtualnodeshortid>/cpi/<targetcpifilechecksum>
    
    The api/v5_2/virtualnode/<virtualnodeshortid>/cpi/<targetcpifilechecksum> endpoint triggers the member to re-register with the MGM. This ensures the MGM has the latest information about the CPIs that virtual nodes are running.
  5. Set the state of the virtual node to ACTIVE.

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.