5 Provision an Instance
Before You Create an Oracle Blockchain Platform Instance
Before you provision Oracle Blockchain Platform, decide if a developer or enterprise instance meets your needs.
Deciding Which Provisioning Shape to Use
When provisioning an instance, you choose between two configurations. Migration between these options isn't supported currently.
Configuration | Features |
---|---|
Developer Recommended use for this starter shape is development and evaluation. |
|
Enterprise Highly available instance configuration, suitable for small-to-medium production deployments of Founder and Participant instances with performance requirements in tens of transactions per second (TPS) single digit TPS rate. |
|
Provision an Instance using the Blockchain Platform Manager
To create a blockchain founder or participant instance in Blockchain Platform Manager, use the Create New Instance wizard.
-
Founder organization: a complete blockchain environment, including a new network to which participants can join later on.
-
Participant instance: if there is already a founder organization you want to join, you can create a participant instance if your credentials provide you with access to the network.
Provision an Instance Using REST APIs
You can provision an Oracle Blockchain Platform instance using a REST API.
curl -X POST \
-u <username>:<password> \
http://localhost:7070/api/v1/blockchainPlatforms/instances \
-H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
-F 'payload={
"name": "obpinstance1",
"desc": "test instance",
"platformRole": "founder",
"configuration": "Developer",
"peer": 4,
"cluster": {
"platformHosts": [
"10.182.73.23",
"10.182.73.20"
],
"crcHosts": [
"10.182.73.23",
"10.182.73.20"
]
},
"additionalConfiguration": {
"instanceFQDN": "domain.host.com"
}
}'
name
- Must contain one or more characters.
- Must not exceed 15 characters.
- Must start with an ASCII letter:
a
toz
. - Must contain only ASCII lower-case letters or numbers.
- Must not contain a hyphen.
- Must not contain any other special characters.
- Must be unique within the identity domain.
desc
- Optional: Enter a description of the instance
platformRole
- Must be set to
developer
orfounder
- Must be set to
configuration
Developer
: A 1 Kafka orderer and 3 OCPU total in 1 VMEnterprise
: A 3 node Kafka cluster and 3 X VM
peer
- Specify the number of peer nodes that will be initially created in this service instance.
- 1 to 14 peer nodes can be created.
cluster
- Enter the information for your cluster:
platformHosts
: the VMs hosting your platform clustercrcHosts
: the VMs hosting the Kafka/Zookeeper cluster
- Enter the information for your cluster:
instanceFQDN
- The fully qualified domain name of your external load balancer. This is used exclusively for external load balancers - if you're not using an external load balancer, you don't need to specify this parameter.
Postrequisites When Using an External Load Balancer
When provisioning your instance, if you are using an external load balancer you must have selected this during the provisioning steps and uploaded the TLS root CA certificate as described in Provision an Instance using the Blockchain Platform Manager or Provision an Instance Using REST APIs.
- Obtain the complete list of ports needing mapping for your instance. Open the Instance Details page for your instance on Blockchain Platform Manager, then click LBR Port Map.
Record the ports listed.
- In your load balancer, do a mapping as shown in the Nginx syntax example below, where
my.blockchain.example.com
is the FQDN of the blockchain instance (internal side):...stream { upstream port1 { server my.blockchain.example.com:10001; } server { listen *:10003 ssl; ssl_certificate /etc/nginx/server.pem; # use your own certificate/key ssl_certificate_key /etc/nginx/serverkey.pem; proxy_pass port1; } ...
- Repeat for every port listed in the port map.
Note:
If at some point in the future you scale out your instance by adding new peers, remember to map those new peers using the steps above.High Availability
To achieve high availability in an Enterprise-shaped instance with distinct VMs, you can configure the external load balancer to add a list of all platform VMs in the cluster (the Kafka and ZooKeeper VMs are already highly available) as an upstream (backend) list.
a.example.com
b.example.com
c.example.com
...
stream {
upstream rest_proxy_backend_servers
{
server a.example.com:10001;
server b.example.com:10001;
server c.example.com:10001;
}
server
{
listen *:10003 ssl;
ssl_certificate /etc/nginx/server.pem; # use your own certificate/key
ssl_certificate_key /etc/nginx/serverkey.pem;
proxy_pass rest_proxy_backend_servers;
}
...
stream {
upstream peer0_backend_servers
{
server a.example.com:10036;
server b.example.com:10036;
server c.example.com:10036;
}
server {
listen *:10036 ssl;
ssl_certificate /etc/nginx/server.pem; # use your own certificate/key
ssl_certificate_key /etc/nginx/serverkey.pem;
proxy_pass peer0_backend_servers;
}
...
Each externally available port in the instance cluster is published on each VM and routes to the proper service automatically (console, membership/CA, orderers, peers, REST proxy).
Ensure that all ports listed via the LBR Port Map button are routed in this way.
$ docker node ls
This will return the list of nodes in the cluster. For example: [oracle@dhcp-10-144-63-180 ~]$ docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
fz1ksoxysyorz754x0hswnird dhcp-10-144-62-149.usdhcp.oraclecorp.com Ready Active 18.09.1-ol
rayhna7vdiup5p7tkmxxepyex * dhcp-10-144-63-180.usdhcp.oraclecorp.com Ready Active Leader 18.09.1-ol
For each node that has no manager status, promote the nodes using a command similar to the following example:$ docker node promote dhcp-10-144-62-149.usdhcp.oraclecorp.com
Ensure that a minimum of three nodes are promoted in this manner.