This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for tessera transcation manager.
* The transaction manager name can now be set in the yaml config (`qubernetes.yaml` by default). tessera is the default. ``` quorum: tm: Name: tessera Tm_Version: 0.7.3 Port: 9001 Tessera_Config_Dir: out/config ``` * The tessera-config.json is now generated and a kubneretes `configMap` resource is create when deployed.
- Loading branch information
Showing
9 changed files
with
284 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace: | ||
name: quorum-test | ||
# number of nodes to deploy | ||
nodes: | ||
number: 10 | ||
quorum: | ||
# supported: raft | istanbul | ||
consensus: raft | ||
# base quorum data dir as set inside each container. | ||
Node_DataDir: /etc/quorum/qdata | ||
# This is where all the keys are store, and/or where they are generated, as in the case of quorum-keygen. | ||
# Either full or relative paths on the machine generating the config | ||
Key_Dir_Base: out/config | ||
Permissioned_Nodes_File: out/config/permissioned-nodes.json | ||
Genesis_File: out/config/genesis.json | ||
# related to quorum containers | ||
quorum: | ||
Raft_Port: 50401 | ||
# container images at https://hub.docker.com/u/quorumengineering/ | ||
Quorum_Version: 2.1.1 | ||
# related to transaction manager containers | ||
tm: | ||
# container images at https://hub.docker.com/u/quorumengineering/ | ||
Name: tessera | ||
Tm_Version: 0.7.3 | ||
Port: 9001 | ||
Tessera_Config_Dir: out/config | ||
|
||
# generic geth related options | ||
geth: | ||
Node_WSPort: 8546 | ||
NodeP2P_ListenAddr: 21000 | ||
network: | ||
# network id (1: mainnet, 3: ropsten, 4: rinkeby ... ) | ||
id: 1101 | ||
# public (true|false) is it a public network? | ||
public: false | ||
# general verbosity of geth [1..5] | ||
verbosity: 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config/qubernetes-tessera.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
config/qubernetes.yaml | ||
config/qubernetes-tessera.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<% | ||
def set_node_template_vars(values) | ||
@Node_UserIdent = values["Node_UserIdent"] | ||
@Node_Key_Dir = values["Key_Dir"] | ||
return | ||
end | ||
-%> | ||
|
||
<% # The configured key directory of each node holds a file with the enode value. | ||
# The enode value is obtained from that file and set in the permissioned-nodes.json | ||
%> | ||
<% | ||
@Key_Dir_Base = @config["quorum"]["Key_Dir_Base"] | ||
@Tm_Port = @config["quorum"]["tm"]["Port"] | ||
%> | ||
{ | ||
"useWhiteList": false, | ||
"jdbc": { | ||
"username": "sa", | ||
"password": "", | ||
"url": "jdbc:h2:./$${DDIR}/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", | ||
"autoCreateTables": true | ||
}, | ||
"serverConfigs":[ | ||
{ | ||
"app":"ThirdParty", | ||
"enabled": true, | ||
"serverSocket":{ | ||
"type":"INET", | ||
"port": 9080, | ||
"hostName": "http://%<%= "#{@Node_UserIdent}".upcase %>_SERVICE_HOST%" | ||
}, | ||
"communicationType" : "REST" | ||
}, | ||
{ | ||
"app":"Q2T", | ||
"enabled": true, | ||
"serverSocket":{ | ||
"type":"UNIX", | ||
"path":"$${DDIR}/tm.ipc" | ||
}, | ||
"communicationType" : "UNIX_SOCKET" | ||
}, | ||
{ | ||
"app":"P2P", | ||
"enabled": true, | ||
"serverSocket":{ | ||
"type":"INET", | ||
"port": <%= @Tm_Port %>, | ||
"hostName": "http://%<%= "#{@Node_UserIdent}".upcase %>_SERVICE_HOST%" | ||
}, | ||
"sslConfig": { | ||
"tls": "OFF", | ||
"generateKeyStoreIfNotExisted": true, | ||
"serverKeyStore": "$${DDIR}/server-keystore", | ||
"serverKeyStorePassword": "quorum", | ||
"serverTrustStore": "$${DDIR}/server-truststore", | ||
"serverTrustStorePassword": "quorum", | ||
"serverTrustMode": "TOFU", | ||
"knownClientsFile": "$${DDIR}/knownClients", | ||
"clientKeyStore": "$${DDIR}/client-keystore", | ||
"clientKeyStorePassword": "quorum", | ||
"clientTrustStore": "$${DDIR}/client-truststore", | ||
"clientTrustStorePassword": "quorum", | ||
"clientTrustMode": "TOFU", | ||
"knownServersFile": "$${DDIR}/knownServers" | ||
}, | ||
"communicationType" : "REST" | ||
} | ||
], | ||
|
||
"peer": [ | ||
<%- @nodes.each_with_index do |node, indexNode| %> | ||
<%= set_node_template_vars(node.values.first) -%> | ||
{ | ||
"url": "http://%<%= "#{@Node_UserIdent}".upcase %>_SERVICE_HOST%:<%= @Tm_Port %>" | ||
}<%- if (indexNode != @nodes.size - 1) %>,<%- end %> | ||
|
||
<% end -%> | ||
], | ||
"keys": { | ||
"passwords": [], | ||
"keyData": [ | ||
{ | ||
"config": $$(cat $${DDIR}/tm.key), | ||
"publicKey": "$$(cat $${DDIR}/tm.pub)" | ||
} | ||
] | ||
}, | ||
"alwaysSendTo": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<% | ||
def set_node_template_vars(values) | ||
@Node_UserIdent = values["Node_UserIdent"] | ||
@Node_Key_Dir = values["Key_Dir"] | ||
return | ||
end | ||
-%> | ||
|
||
<% # The configured key directory of each node holds a file with the enode value. | ||
# The enode value is obtained from that file and set in the permissioned-nodes.json | ||
%> | ||
<% | ||
@Key_Dir_Base = @config["quorum"]["Key_Dir_Base"] | ||
@Tm_Port = @config["quorum"]["tm"]["Port"] | ||
@Node_DataDir = @config["quorum"]["Node_DataDir"] | ||
@DDIR = @Node_DataDir + "/tm" | ||
%> | ||
|
||
{ | ||
"useWhiteList": false, | ||
"jdbc": { | ||
"username": "sa", | ||
"password": "", | ||
"url": "jdbc:h2:<%= @DDIR %>/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", | ||
"autoCreateTables": true | ||
}, | ||
"server": { | ||
"port": <%= @Tm_Port %>, | ||
"hostName": "http://%THIS_SERVICE_HOST%", | ||
"bindingAddress": "http://0.0.0.0:<%= @Tm_Port %>", | ||
"sslConfig": { | ||
"tls": "OFF", | ||
"generateKeyStoreIfNotExisted": true, | ||
"serverKeyStore": "<%= @DDIR %>/server-keystore", | ||
"serverKeyStorePassword": "quorum", | ||
"serverTrustStore": "<%= @DDIR %>/server-truststore", | ||
"serverTrustStorePassword": "quorum", | ||
"serverTrustMode": "TOFU", | ||
"knownClientsFile": "<%= @DDIR %>/knownClients", | ||
"clientKeyStore": "<%= @DDIR %>/client-keystore", | ||
"clientKeyStorePassword": "quorum", | ||
"clientTrustStore": "<%= @DDIR %>/client-truststore", | ||
"clientTrustStorePassword": "quorum", | ||
"clientTrustMode": "TOFU", | ||
"knownServersFile": "<%= @DDIR %>/knownServers" | ||
} | ||
}, | ||
"peer": [ | ||
<%- @nodes.each_with_index do |node, indexNode| %> | ||
<%= set_node_template_vars(node.values.first) -%> | ||
{ | ||
"url": "http://%<%= "#{@Node_UserIdent}".upcase %>_SERVICE_HOST%:<%= @Tm_Port %>" | ||
}<%- if (indexNode != @nodes.size - 1) %>,<%- end %> | ||
|
||
<% end -%> | ||
], | ||
"keys": { | ||
"passwords": [], | ||
"keyData": [ | ||
{ | ||
"privateKeyPath": "<%= @DDIR %>/tm.key", | ||
"publicKeyPath": "<%= @DDIR %>/tm.pub" | ||
} | ||
] | ||
}, | ||
"alwaysSendTo": [], | ||
"unixSocketFile": "<%= @DDIR %>/tm.ipc" | ||
} |