Deploy Chaincode from an External Service

You can run external chaincode, or chaincode as a service, on Oracle Blockchain Platform.

Hyperledger Fabric v2.x supports running chaincode as a service that is managed externally instead of being built and launched on a peer node. This functionality decouples creating the chaincode from deploying it to the Hyperledger Fabric network. Instead, the chaincode can be managed by an administrator independently of the peer node.
  1. Create a connection.json file with the address information of the Kubernetes deployment, and then compress the file in .zip format. A sample connection.json file looks like the following:
    {
    "address": "external-fabcar-node.chaincode:9999",
    "dial_timeout": "10s",
    "tls_required": false
    }
    The address is in the format service_name.namespace:port_number of the Kubernetes deployment. The previous example assumes that you are deploying the external chaincode to the same Kubernetes cluster where the Oracle Blockchain Platform instance is deployed. If you deploy the chaincode on a remote VM, you must provide the public IP address or host name and the public port for the address.
  2. When you deploy chaincode, select External for the Chaincode Type. For Chaincode Source, upload the .zip file that you created in the previous step.