Using the VMware Blockchain Orchestrator, you can deploy VMware Blockchain nodes on your on-premises environment.

Prerequisites

Procedure

  1. Power on the VMware Blockchain Orchestrator appliance.
  2. SSH into the VMware Blockchain Orchestrator appliance.
  3. Enter the login credentials for the blockchain user account.
  4. Navigate to the /home/blockchain directory.
  5. List the contents of the /home/blockchain directory.

    ls -l

    Option Description

    /home/blockchain/orchestrator-runtime

    Directory consists of all the docker-compose files and schema files.

    You can run the VMware Blockchain Orchestrator script from this directory.

    docker-compose-orchestrator-prereqs.yml

    Runs the Docker configuration service and provisioning service containers.

    The prerequisite service starts when the VM is powered on. The prerequisite service times out if the VM does not have connectivity when powered on and must be manually restarted.

    docker-compose-orchestrator.yml

    Runs the VMware Blockchain Orchestrator script to deploy VMware Blockchain nodes.

    infrastructure-descriptor-v1.schema

    Directory stores the infrastructure definitions of all the available parameters that you can manually configure to deploy VMware Blockchain nodes.

    deployment-descriptor-v1.schema

    Directory stores the deployment definitions of all the available parameters that you can manually configure to deploy VMware Blockchain nodes.

    To configure the descriptor files and set the parameter values, you must create directories to store the descriptor files.

  6. Create a directory for the descriptor files.

    See the sample directory structure.

    Option Description

    /home/blockchain/descriptors

    Directory stores the infrastructure and deployment descriptor JSON files.

    VMware Blockchain Orchestrator uses the parameter values set in the infrastructure and deployment descriptor files during provisioning.

    /home/blockchain/output

    Directory stores the deployment details, such as IP address, Replica and Client node names, blockchain ID, and consortium ID.

    INFRA_DESC_FILENAME=infrastructure_descriptor.json

    File provides infrastructure details for deployment that VMware Blockchain Orchestrator uses to prescribe the parameters and connect to vCenter Server.

    DEPLOY_DESC_FILENAME=deployment_descriptor.json

    File provides deployment details for Replica and Client nodes. If you deploy Full Copy Client nodes, then the deployment details are included in this file.

    For example, the file also consists of zone names, client group names, and IP addresses.

  7. Verify that the Docker containers are running.
    cd ~blockchain/orchestrator-runtime
    docker ps -a

    The Docker containers that are running appear.

    blockchain@localhost [ ~ ]$ docker ps -a
    CONTAINER ID        IMAGE                                                                                COMMAND                  CREATED             STATUS              PORTS                                            NAMES
    a20b7fbeacff        athena-docker-local.artifactory.eng.vmware.com/persephone-configuration:0.0.0.2323   "java -Dspring.confi…"   2 minutes ago       Up 2 minutes        0.0.0.0:9003->9003/tcp, 0.0.0.0:8000->9023/tcp   orchestrator-runtime_config-service_1
    10cdca6852d8        athena-docker-local.artifactory.eng.vmware.com/persephone-provisioning:0.0.0.2323    "java -Dspring.confi…"   2 minutes ago       Up 2 minutes        8000/tcp, 0.0.0.0:9002->9002/tcp                 orchestrator-runtime_persephone-provisioning_1
  8. If the Docker containers are not running, then restart the Docker containers.
    1. Log in as a root user into the VMware Blockchain Orchestrator appliance.
    2. Restart the system service, which in turn starts the Docker containers.
      systemctl restart blockchain.service
    3. Log out of the root user account and log in to the blockchain user account.
  9. Create the infrastructure and deployment descriptor files in the descriptor directory.

    VMware Blockchain Orchestrator uses the variables defined in these descriptor files to provision the VMware Blockchain nodes.

    Sample infrastructure_descriptor.json file to deploy a vCenter Server, datastore, and cluster.

    {
      "organization": {
        "damlSdk": "1.4.0",
        "dockerImage": "0.9.0.33",
        "generatePassword": true,
        "generateDamlDbPassword": true
      },
      "zones": [
        {
          "name": "replicas",
          "vCenter": {
            "url": "https://vcsa.corp.local/",
            "userName": "administrator@vsphere.local",
            "password": "VMware1",
            "resourcePool": "replicas",
            "storage": "RegionA01-ISCSI01-COMP02",
            "folder": "blockchain"
          },
          "network": {
            "name": "VM-RegionA01-vDS-COMP",
            "gateway": "192.168.10.1",
            "subnet": 24,
            "nameServers": [
              "192.168.10.10"
            ]
        },
          "containerRegistry": {
          "url": "https://vmwaresaas.jfrog.io/vmwblockchain",
          "userName": "vmbc-jfrog-reader@vmware",
          "password": "<password>"
          },
          "pullMetricsEndpoint": {
             "userName": "metricsUser",
             "password": "metricsPassword",
             "tlsCertificateData": "<public-key-string>",
             "tlsKeyData": "<private-key-string>"
          },
        }
      ]
    }

    Sample deployment_descriptor.json file to deploy four Replica nodes, two Full Copy Client nodes, and two Client nodes.

    {
      "replicas": [
        {
        "zoneName": "replicas",
        "providedIp": "192.168.10.12"
        },
        {
        "zoneName": "replicas",
        "providedIp": "192.168.10.13"
        },
        {
        "zoneName": "replicas",
        "providedIp": "192.168.10.14"
        },
        {
        "zoneName": "replicas",
        "providedIp": "192.168.10.15"
        }
      ], 
      "replicaNodeSpec":{
        "cpuCount": 2,
        "memoryGb": 16,
        "diskSizeGb": 64
      },
      "fullCopyClients": [
        {
          "accessKey": "ACCESS_KEY_1",
          "bucketName": "s3BUCKET_1",
          "protocol": "s3",
          "secretKey": "SECRET_KEY_1",
          "url": "109.72.217.75:9000",
    
          "zoneName": "replicas",     
          "providedIp": "192.168.10.16" 
        }, 
        {
          "accessKey": "ACCESS_KEY_1",
          "bucketName": "BUCKET_1",
          "protocol": "HTTP/HTTP",
          "secretKey": "SECRET_KEY_1",
          "url": "blockchain.s3.amazonaws.com",
    
          "zoneName": "replicas",
          "providedIp": "192.168.10.17" 
            }
      ],
      "clients": [
        {
          "zoneName": "replicas",
          "providedIp": "192.168.10.18"
          "damlDbPassword": "<password>",
          "groupName": "Group1",
          "ledgerTls": {
          "tlsLedgerData": {
            "pem" : "pem1",
            "crt" : "crt1",
            "cacrt": "cacrt1",
            "clientAuth" : "REQUIRE"
          }
        },
        {
          "zoneName": "replicas",
          "providedIp": "192.168.10.19"
          "damlDbPassword": "<password>",
          "groupName": "Group2",
          "ledgerTls": {
          "tlsLedgerData": {
            "pem" : "pem1",
            "crt" : "crt1",
            "cacrt": "cacrt1",
            "clientAuth" : "OPTIONAL"
          }
      ],
      "clientNodeSpec":{
        "cpuCount": 4,
        "memoryGb": 32,
        "diskSizeGb": 100
      },
      "blockchain": {
        "consortiumName": "finance",
        "blockchainType": "DAML"
      }
    }

    Sample deployment_descriptor.json file to deploy cloned the Replica nodes and Client nodes.

    {
      "populatedReplicas": [
        {
          "zoneName": "replicas"
          "providedIp": "192.168.10.12"
        },
        {
          "zoneName": "replicas"
          "providedIp": "192.168.10.13"
        },
        {
          "zoneName": "replicas"
          "providedIp": "192.168.10.14"
        },
        {
          "zoneName": "replicas"
          "providedIp": "192.168.10.15"
      ],
      "populatedClients": [
        {
          "zoneName": "replica",
          "providedIp": "192.168.10.19"
          "groupName": "Group2",
          "clientGroupId": "709ca448-c6bf-4cb3-b9f3-5964a6cd9fe9",
          "damlDbPassword": "<password>"
        }
      ],
      "blockchain": {
        "consortiumName": "finance",
        "blockchainType": "DAML"
      "blockchainId": "6d5ba56b-2ae7-4bdd-bff3-27294b64c370"
     }
    }
  10. Validate your infrastructure descriptor file semantics against the infrastructure-descriptor-v1.schema.
  11. Validate your deployment descriptor file semantics against the deployment-descriptor-v1.schema.
  12. Validate that vSphere credentials, network name, and folder name are correctly populated to avoid errors.
    ORCHESTRATOR_DESCRIPTORS_DIR=/home/blockchain/descriptors  INFRA_DESC_FILENAME=infrastructure_descriptor.json DEPLOY_DESC_FILENAME=deployment_descriptor.json ORCHESTRATOR_OUTPUT_DIR=/home/blockchain/output 
    ORCHESTRATOR_DEPLOYMENT_TYPE=VALIDATE docker-compose -f docker-compose-orchestrator.yml up
  13. Run the VMware Blockchain Orchestrator deployment script.
    • For a new deployment, run the command,

      ORCHESTRATOR_DESCRIPTORS_DIR=/home/blockchain/descriptors INFRA_DESC_FILENAME=infrastructure_descriptor.json DEPLOY_DESC_FILENAME=deployment_descriptor.json ORCHESTRATOR_OUTPUT_DIR=/home/blockchain/output docker-compose -f docker-compose-orchestrator.yml up
    • For a clone deployment, run the command,

      ORCHESTRATOR_DESCRIPTORS_DIR=/home/blockchain/descriptors INFRA_DESC_FILENAME=infrastructure_descriptor.json DEPLOY_DESC_FILENAME=deployment_descriptor.json ORCHESTRATOR_OUTPUT_DIR=/home/blockchain/output ORCHESTRATOR_DEPLOYMENT_TYPE=CLONE docker-compose -f docker-compose-orchestrator.yml up
  14. (Optional) During deployment, view the VM creation and IP allocation from the vSphere Client under the Workloads > <Workload_Name> > VMs tab.

    The deployment of the VMware Blockchain nodes can take up to five minutes.

  15. (Optional) If you have enabled the pullMetricsEndpoint parameter, you can run the command and retrieve the monitoring metrics data.
    # If using username/pass use http
    curl -i -u '<username>:<password>' http://<VM-IP>:9273/metrics
    # If using TLS use https
    curl -i -l -u '<username>:<password>' https://<VM-IP>:9273/metrics -k

Results

After a successful deployment, the VMware Blockchain Orchestrator creates and saves the results of the deployment in the /home/blockchain/output directory.

Note:

If your deployment fails, identify the error and fix it before redeploying the VMware Blockchain nodes.

Example

Sample output file.

Starting deployment type: PROVISION, at 2020-10-08T02:01:21.886332

Deployment Request Id: 02514422-6263-4c22-89ab-dbd0e58601ef

Blockchain Id: 72a0f104-6845-46df-98d4-5ab0bf5623b0

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d848, key: PRIVATE_IP, value: 192.168.10.12

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11399, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11399, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11399, key: NODE_LOGIN, value: c0nc0rd

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11399, key: VM_CPU_COUNT, value: 2

Node Id: 177d59fa-40bf-489c-a7cc-9a6517f79a83, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11399, key: VM_MEMORY, value: 4

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d847, key: PRIVATE_IP, value: 192.168.10.13

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11402, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11402, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11402, key: NODE_LOGIN, value: c0nc0rd

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11402, key: VM_CPU_COUNT, value: 2

Node Id: 335f56dd-b8d8-4227-9158-2ed635122be3, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11402, key: VM_MEMORY, value: 4

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d846, key: PRIVATE_IP, value: 192.168.10.16

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: CLIENT_ENDPOINT, value: https://{{ip}}:6865

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: CLIENT_GROUP_ID, value: 5b229bb7-7162-48fe-b73f-4f4e817f7bba

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: NODE_LOGIN, value: c0nc0rd

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: VM_CPU_COUNT, value: 2

Node Id: 5b229bb7-7162-48fe-b73f-4f4e817f7bba, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11403, key: VM_MEMORY, value: 4

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d84b, key: PRIVATE_IP, value: 192.168.10.17

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: CLIENT_ENDPOINT, value: https://{{ip}}:6865

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: CLIENT_GROUP_ID, value: 5df3f076-6750-4fd1-a334-9d95ee3ce68d

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: NODE_LOGIN, value: c0nc0rd

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: VM_CPU_COUNT, value: 2

Node Id: 5df3f076-6750-4fd1-a334-9d95ee3ce68d, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11404, key: VM_MEMORY, value: 4

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d84a, key: PRIVATE_IP, value: 192.168.10.14

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11401, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11401, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11401, key: NODE_LOGIN, value: c0nc0rd

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11401, key: VM_CPU_COUNT, value: 2

Node Id: 80fc24da-ba01-4abf-91a0-5575439759b9, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11401, key: VM_MEMORY, value: 4

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: /blocks/sddc6-vmware-vpn-onprem-5/segments/0a48d800/addresses/0a48d849, key: PRIVATE_IP, value: 192.168.10.15

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11400, key: DAML_SDK_VERSION, value: 1.4.0

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11400, key: IMAGE_TAG, value: 0.9.0.33

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11400, key: NODE_LOGIN, value: c0nc0rd

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11400, key: VM_CPU_COUNT, value: 2

Node Id: 91f68ba2-edbb-48ae-8a1b-6e9ee7640c11, name: https://vcsa.corp.local//rest/vcenter/vm/vm-11400, key: VM_MEMORY, value: 4

Blockchain Id: 72a0f104-6845-46df-98d4-5ab0bf5623b0, completion status: SUCCESS

RequestId: 02514422-6263-4c22-89ab-dbd0e58601ef succeeded

Deployment finished at 2020-12-08T02:07:05.03125 with status SUCCESS

What to do next

Verify that the Replica node includes all the parameter values set in the deployment descriptor. See Validate a Replica Node in VMware Blockchain Orchestrator.