The process upgrades the Photon OS and not the VMware Blockchain version.

With an Photon OS upgrade, you cannot revert to the pre-upgraded version. If there is an upgrade failure, the default automatic rollback parameter value, which is set to True reverts to the latest snapshot of your blockchain nodes. The snapshot is created during the upgrade process.

Prerequisites

Procedure

  1. SSH into the VMware Blockchain Orchestrator appliance.
  2. Navigate to the /home/blockchain/ directory.
  3. Set the environment variables for the Photon OS upgrade.
    1. Open the upgrade folder.
      cd /home/blockchain/upgrade/
    2. List the parameter values and associated description for the Photon OS upgrade.
      '-j' or '--deploymentInfo'   --> The absolute path of the json file that contains the blockchain node IP/username/password and other details
      '-i' or '--infraDescFile'    --> The absolute path of the json file(Infrastructure descriptor) that contains vcenter connection details
      '-p' or '--osPatchImage'     --> OS Patch image name with tag
      '-s' or '--snapshotName'     --> Snapshot name to create vm snapshot.
      '-r' or '--autoRollback'     --> Auto rollback flag, which is used to rollback to latest snapshot in case of update failure. Default value for this flag is 'True'
      '-a' or '--action'           --> Action/operation to be performed. For OS upgrade, action should be 'update'
      '-t' or '--updateType'       --> Type of update to be performed. For OS only upgrade updateType should be 'os'
  4. Run the UpdateController.py script.
    python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/infra.json  -d /home/blockchain/descriptors/reconfig_deploy.json -a update -t os -p capupdaterepo:updaterepo-1.5.15  -s snapshot_before_os_upgrade_sep29 -r true
  5. Upgrade script prompts for the operator private key.
  6. Paste the private key and press Ctrl+d in a new line for the upgrade process to continue.
  7. Verify that the health status of the latest blockchain nodes.
    python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/infra.json -d /home/blockchain/descriptors/reconfig_deploy.json -a health_check
  8. Upgrade the USB HSM manager and OS RPMS.
    1. Update the nodePassword and vmId parameter values in the deployment descriptor file USB HSM Manager section.
      {
          "populatedReplicas": [
              {
                  "zoneName": "zone-1",
                  "providedIp": "10.10.10.2",
                  "nodeId": "4555c394-ab83-4050-92df-67813873f8bf"
              },
              {
                  "zoneName": "zone-2",
                  "providedIp": "10.10.10.3",
                  "nodeId": "c65b80fd-1eea-42c1-8744-ea9dbfece371"
              },
              {
                  "zoneName": "zone-3",
                  "providedIp": "10.10.10.4",
                  "nodeId": "ae67a54b-cd44-4c16-96a7-6abeb7555d7f"
              },
              {
                  "zoneName": "zone-4",
                  "providedIp": "10.10.10.5",
                  "nodeId": "bad6c5a6-01d1-46ca-b955-5e4b89307687"
              }
          ],
          "populatedClients": [
              {
                  "zoneName": "zone-1",
                  "providedIp": "10.10.10.6",
                  "nodeId": "ec618630-0b6f-44ff-8941-a6ff599e59ec",
                  "clientGroupId": "d81f551a-7605-4228-838d-0613bf6c4418",
                  "groupName": "Group1",
                  "damlDbPassword": "password",
                  "tlsLedgerData": {
                      "crt": "-----BEGIN CERTIFICATE-----\ncrt \n-----END CERTIFICATE-----\n",
                      "pem": "-----BEGIN PRIVATE KEY-----\npem  \n-----END PRIVATE KEY-----\n",
                      "cacrt": "-----BEGIN CERTIFICATE-----\ncacrt\n-----END CERTIFICATE-----\n",
                      "clientAuth": "REQUIRE"
                  }
              }
          ],
          "hsmManagers": [
              {
                  "zoneName": "zone-4",
                  "providedIp": "10.10.10.10",
                  "esxiHostName": "esxihost",
                  "hsmPassword": "password",
                  "nodePassword": "sshpassword",
                  "vmId": "usb-hsm-manager-appliance"
              }
          ],
          "operatorSpecifications": {
              "operatorPublicKey": "-----BEGIN PUBLIC KEY-----\nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAElSo2Fogl97N42ntk9L4ozxjsu+wjkzQA\n+wjXixK2AqlZkJIbkyRpswO5eTPCHlnd/EhwWTEWE9AR0GdCtZ0x2w==\n-----END PUBLIC KEY-----\n"
          },
          "blockchain": {
              "consortiumName": "consortium",
              "blockchainType": "DAML",
              "blockchainId": "9fc5e926-797a-4981-9184-95c11f5134ba"
          },
          "replicaNodeSpec": {
              "cpuCount": 8,
              "memoryGb": 32,
              "diskSizeGb": 1000
          },
          "clientNodeSpec": {
              "cpuCount": 8,
              "memoryGb": 32,
              "diskSizeGb": 1000
          },
          "populatedFullCopyClients": [
              {
                  "zoneName": "zone-1",
                  "providedIp": "10.10.10.1",
                  "nodeId": "a7f4732c-bf81-4b7b-8599-e3434cdb79b2",
                  "bucketName": "bucket19-26-10-2022-12-48-00",
                  "accessKey": "minio",
                  "secretKey": "miniostorage",
                  "protocol": "HTTP",
                  "url": "10.202.69.218:9001"
              }
          ],
          "fullCopyClientNodeSpec": {
              "cpuCount": 8,
              "memoryGb": 32,
              "diskSizeGb": 1000
          }
      }
    2. Run the UpdateController.py script to initiate the upgrade process with USB HSM Manager.
      #upgrade blockchain with default os patch image associated with the release
      python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/reconfig_infra.json -a update -d /home/blockchain/descriptors/reconfig_deploy.json -o /home/blockchain/output -s snapshot_before_upgrade_sep29
       
      #Upgrade blockhain with customized os version (command with -p)
      python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/reconfig_infra.json -a update -p capupdaterepo:updaterepo1.5.15  -d /home/blockchain/descriptors/reconfig_deploy.json -o /home/blockchain/output -s snapshot_before_upgrade_sep29
  9. (Optional) Rollback a failed Photon OS upgrade process.

    The rollback process reverts to the latest snapshot of your blockchain nodes. The snapshot is created during the upgrade process.

    1. Run the rollback script to revert to the latest snapshot.
      python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/infra.json -d /home/blockchain/descriptors/reconfig_deploy.json -a revert_snapshot -s snapshot_before_os_upgrade_sep29
    2. Start the blockchain nodes.
      python UpdateController.py -j /home/blockchain/output/provisioning_output.json -i /home/blockchain/descriptors/infra.json -d /home/blockchain/descriptors/reconfig_deploy.json -a start_blockchain
    3. Verify that the blockchain nodes are running.