diff --git a/7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-shared-config.yaml b/7nodes/istanbul-7nodes-constellation/k8s-yaml/01-quorum-shared-config.yaml similarity index 100% rename from 7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-shared-config.yaml rename to 7nodes/istanbul-7nodes-constellation/k8s-yaml/01-quorum-shared-config.yaml diff --git a/7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-services.yaml b/7nodes/istanbul-7nodes-constellation/k8s-yaml/02-quorum-services.yaml similarity index 100% rename from 7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-services.yaml rename to 7nodes/istanbul-7nodes-constellation/k8s-yaml/02-quorum-services.yaml diff --git a/7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-keyconfigs.yaml b/7nodes/istanbul-7nodes-constellation/k8s-yaml/03-quorum-keyconfigs.yaml similarity index 100% rename from 7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-keyconfigs.yaml rename to 7nodes/istanbul-7nodes-constellation/k8s-yaml/03-quorum-keyconfigs.yaml diff --git a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-deployments.yaml b/7nodes/istanbul-7nodes-constellation/k8s-yaml/04-quorum-deployments.yaml similarity index 88% rename from 7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-deployments.yaml rename to 7nodes/istanbul-7nodes-constellation/k8s-yaml/04-quorum-deployments.yaml index 89b10dd..e25d9d6 100644 --- a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-deployments.yaml +++ b/7nodes/istanbul-7nodes-constellation/k8s-yaml/04-quorum-deployments.yaml @@ -51,6 +51,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -66,26 +67,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -147,7 +157,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -176,12 +186,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node1-constellation-key-config + name: quorum-node1-tm-key-config items: - key: tm.pub path: tm.pub @@ -202,7 +220,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node1 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node1 - name: quorum-logs-persistent-storage @@ -260,6 +278,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -275,26 +294,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -356,7 +384,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -385,12 +413,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node2-constellation-key-config + name: quorum-node2-tm-key-config items: - key: tm.pub path: tm.pub @@ -411,7 +447,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node2 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node2 - name: quorum-logs-persistent-storage @@ -469,6 +505,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -484,26 +521,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -565,7 +611,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -594,12 +640,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node3-constellation-key-config + name: quorum-node3-tm-key-config items: - key: tm.pub path: tm.pub @@ -620,7 +674,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node3 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node3 - name: quorum-logs-persistent-storage @@ -678,6 +732,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -693,26 +748,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -774,7 +838,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -803,12 +867,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node4-constellation-key-config + name: quorum-node4-tm-key-config items: - key: tm.pub path: tm.pub @@ -829,7 +901,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node4 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node4 - name: quorum-logs-persistent-storage @@ -887,6 +959,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -902,26 +975,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -983,7 +1065,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -1012,12 +1094,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node5-constellation-key-config + name: quorum-node5-tm-key-config items: - key: tm.pub path: tm.pub @@ -1038,7 +1128,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node5 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node5 - name: quorum-logs-persistent-storage @@ -1096,6 +1186,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -1111,26 +1202,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -1192,7 +1292,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -1221,12 +1321,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node6-constellation-key-config + name: quorum-node6-tm-key-config items: - key: tm.pub path: tm.pub @@ -1247,7 +1355,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node6 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node6 - name: quorum-logs-persistent-storage @@ -1305,6 +1413,7 @@ spec: mountPath: /etc/quorum/qdata/contracts-tmp readOnly: false containers: + - name: constellation image: quorumengineering/constellation:0.3.2 command: ["sh"] @@ -1320,26 +1429,35 @@ spec: --publickeys=$QUORUM_HOME/tm/tm.pub \ --privatekeys=$QUORUM_HOME/tm/tm.key \ --verbosity=9 \ - --othernodes=https://$QUORUM_NODE04_SERVICE_HOST:9001/ \"; + --othernodes=https://$QUORUM_NODE1_SERVICE_HOST:9001/ \"; /usr/local/bin/constellation-node $args 2>&1 | tee -a $QUORUM_HOME/logs/tm.log; " + ports: - containerPort: 9001 env: - name: QUORUM_HOME value: /etc/quorum/qdata + - name: DDIR + value: /etc/quorum/qdata/tm volumeMounts: - name: quorum-logs-persistent-storage mountPath: /etc/quorum/qdata/logs - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.pub subPath: tm.pub - - name: keystore-constellation + - name: keystore-tm mountPath: /etc/quorum/qdata/tm/tm.key subPath: tm.key + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config.json.tmpl + subPath: tessera-config.json.tmpl + - name: tessera-config + mountPath: /etc/quorum/qdata/tm/tessera-config-enhanced.json.tmpl + subPath: tessera-config-enhanced.json.tmpl - name: quorum image: quorumengineering/quorum:2.1.1 command: [ "sh" ] @@ -1401,7 +1519,7 @@ spec: subPath: genesis-geth.json - name: quorum-persistent-storage mountPath: /etc/quorum/qdata - - name: constellation-persistent-storage + - name: tm-persistent-storage mountPath: /etc/quorum/qdata/tm - name: quorum-key-config-persistent-storage mountPath: /etc/quorum/qdata/dd/keystore/key @@ -1430,12 +1548,20 @@ spec: items: - key: genesis-geth.json path: genesis-geth.json + - name: tessera-config + configMap: + name: tessera-config + items: + - key: tessera-config.json.tmpl + path: tessera-config.json.tmpl + - key: tessera-config-enhanced.json.tmpl + path: tessera-config-enhanced.json.tmpl - name: contracts-config configMap: name: contracts-config - - name: keystore-constellation + - name: keystore-tm configMap: - name: quorum-node7-constellation-key-config + name: quorum-node7-tm-key-config items: - key: tm.pub path: tm.pub @@ -1456,7 +1582,7 @@ spec: - name: quorum-persistent-storage hostPath: path: /var/lib/docker/geth-storage/quorum-node7 - - name: constellation-persistent-storage + - name: tm-persistent-storage hostPath: path: /var/lib/docker/geth-storage/tm-quorum-node7 - name: quorum-logs-persistent-storage diff --git a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml b/7nodes/istanbul-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml similarity index 70% rename from 7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml rename to 7nodes/istanbul-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml index 0bbe0aa..dac216f 100644 --- a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml +++ b/7nodes/istanbul-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml @@ -99,6 +99,211 @@ data: "timestamp": "0x00" } +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: tessera-config + namespace: quorum-test + labels: + app: qubernetes + name: tessera-config +data: + tessera-config.json.tmpl: |- + + + + + { + "useWhiteList": false, + "jdbc": { + "username": "sa", + "password": "", + "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", + "autoCreateTables": true + }, + "server": { + "port": 9001, + "hostName": "http://%THIS_SERVICE_HOST%", + "bindingAddress": "http://0.0.0.0:9001", + "sslConfig": { + "tls": "OFF", + "generateKeyStoreIfNotExisted": true, + "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", + "serverKeyStorePassword": "quorum", + "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", + "serverTrustStorePassword": "quorum", + "serverTrustMode": "TOFU", + "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", + "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", + "clientKeyStorePassword": "quorum", + "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", + "clientTrustStorePassword": "quorum", + "clientTrustMode": "TOFU", + "knownServersFile": "/etc/quorum/qdata/tm/knownServers" + } + }, + "peer": [ + + { + "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" + } + + ], + "keys": { + "passwords": [], + "keyData": [ + { + "privateKeyPath": "/etc/quorum/qdata/tm/tm.key", + "publicKeyPath": "/etc/quorum/qdata/tm/tm.pub" + } + ] + }, + "alwaysSendTo": [], + "unixSocketFile": "/etc/quorum/qdata/tm/tm.ipc" + } + + + tessera-config-enhanced.json.tmpl: |- + + + + { + "useWhiteList": false, + "jdbc": { + "username": "sa", + "password": "", + "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", + "autoCreateTables": true + }, + "serverConfigs":[ + { + "app":"ThirdParty", + "enabled": true, + "serverSocket":{ + "type":"INET", + "port": 9080, + "hostName": "http://%THIS_SERVICE_HOST%" + }, + "communicationType" : "REST" + }, + { + "app":"Q2T", + "enabled": true, + "serverSocket":{ + "type":"UNIX", + "path":"/etc/quorum/qdata/tm/tm.ipc" + }, + "communicationType" : "UNIX_SOCKET" + }, + { + "app":"P2P", + "enabled": true, + "serverSocket":{ + "type":"INET", + "port": 9001, + "hostName": "http://%THIS_SERVICE_HOST%", + "bindingAddress": "http://0.0.0.0:9001" + }, + "sslConfig": { + "tls": "OFF", + "generateKeyStoreIfNotExisted": true, + "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", + "serverKeyStorePassword": "quorum", + "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", + "serverTrustStorePassword": "quorum", + "serverTrustMode": "TOFU", + "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", + "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", + "clientKeyStorePassword": "quorum", + "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", + "clientTrustStorePassword": "quorum", + "clientTrustMode": "TOFU", + "knownServersFile": "/etc/quorum/qdata/tm/knownServers" + }, + "communicationType" : "REST" + } + ], + + "peer": [ + + { + "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" + } + + ], + "keys": { + "passwords": [], + "keyData": [ + { + "config": %THIS_PRIV_KEY%, + "publicKey": "%THIS_PUB_KEY%" + } + ] + }, + "alwaysSendTo": [] + } + --- apiVersion: v1 kind: ConfigMap diff --git a/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-services.yaml b/7nodes/istanbul-7nodes-tessera/k8s-yaml/02-quorum-services.yaml similarity index 100% rename from 7nodes/raft-7nodes-constellation/k8s-yaml/quorum-services.yaml rename to 7nodes/istanbul-7nodes-tessera/k8s-yaml/02-quorum-services.yaml diff --git a/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-keyconfigs.yaml b/7nodes/istanbul-7nodes-tessera/k8s-yaml/03-quorum-keyconfigs.yaml similarity index 100% rename from 7nodes/raft-7nodes-constellation/k8s-yaml/quorum-keyconfigs.yaml rename to 7nodes/istanbul-7nodes-tessera/k8s-yaml/03-quorum-keyconfigs.yaml diff --git a/7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-deployments.yaml b/7nodes/istanbul-7nodes-tessera/k8s-yaml/04-quorum-deployments.yaml similarity index 100% rename from 7nodes/istanbul-7nodes-tessera/k8s-yaml/quorum-deployments.yaml rename to 7nodes/istanbul-7nodes-tessera/k8s-yaml/04-quorum-deployments.yaml diff --git a/7nodes/raft-7nodes-tessera/k8s-yaml/quorum-shared-config.yaml b/7nodes/raft-7nodes-constellation/k8s-yaml/01-quorum-shared-config.yaml similarity index 100% rename from 7nodes/raft-7nodes-tessera/k8s-yaml/quorum-shared-config.yaml rename to 7nodes/raft-7nodes-constellation/k8s-yaml/01-quorum-shared-config.yaml diff --git a/7nodes/raft-7nodes-tessera/k8s-yaml/quorum-services.yaml b/7nodes/raft-7nodes-constellation/k8s-yaml/02-quorum-services.yaml similarity index 100% rename from 7nodes/raft-7nodes-tessera/k8s-yaml/quorum-services.yaml rename to 7nodes/raft-7nodes-constellation/k8s-yaml/02-quorum-services.yaml diff --git a/7nodes/raft-7nodes-tessera/k8s-yaml/quorum-keyconfigs.yaml b/7nodes/raft-7nodes-constellation/k8s-yaml/03-quorum-keyconfigs.yaml similarity index 100% rename from 7nodes/raft-7nodes-tessera/k8s-yaml/quorum-keyconfigs.yaml rename to 7nodes/raft-7nodes-constellation/k8s-yaml/03-quorum-keyconfigs.yaml diff --git a/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-deployments.yaml b/7nodes/raft-7nodes-constellation/k8s-yaml/04-quorum-deployments.yaml similarity index 100% rename from 7nodes/raft-7nodes-constellation/k8s-yaml/quorum-deployments.yaml rename to 7nodes/raft-7nodes-constellation/k8s-yaml/04-quorum-deployments.yaml diff --git a/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml b/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml index 2d847e1..e69de29 100644 --- a/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml +++ b/7nodes/raft-7nodes-constellation/k8s-yaml/quorum-shared-config.yaml @@ -1,344 +0,0 @@ - - -apiVersion: v1 -kind: Namespace -metadata: - name: quorum-test - labels: - name: quorum-test - ---- -# kubectl create configmap game-config --from-file=configure-pod-container/dd1/key -apiVersion: v1 -kind: ConfigMap -metadata: - name: quorum-permissioned-config - namespace: quorum-test - labels: - app: qubernetes - name: quorum-permissioned-config -data: - permissioned-nodes.json: | - - [ - "enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@%QUORUM-NODE1_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://0ba6b9f606a43a95edc6247cdb1c1e105145817be7bcafd6b2c0ba15d58145f0dc1a194f70ba73cd6f4cdd6864edc7687f311254c7555cc32e4d45aeb1b80416@%QUORUM-NODE2_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://579f786d4e2830bbcc02815a27e8a9bacccc9605df4dc6f20bcc1a6eb391e7225fff7cb83e5b4ecd1f3a94d8b733803f2f66b7e871961e7b029e22c155c3a778@%QUORUM-NODE3_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://3d9ca5956b38557aba991e31cf510d4df641dce9cc26bfeb7de082f0c07abb6ede3a58410c8f249dabeecee4ad3979929ac4c7c496ad20b8cfdd061b7401b4f5@%QUORUM-NODE4_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://3701f007bfa4cb26512d7df18e6bbd202e8484a6e11d387af6e482b525fa25542d46ff9c99db87bd419b980c24a086117a397f6d8f88e74351b41693880ea0cb@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://eacaa74c4b0e7a9e12d2fe5fee6595eda841d6d992c35dbbcc50fcee4aa86dfbbdeff7dc7e72c2305d5a62257f82737a8cffc80474c15c611c037f52db1a3a7b@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401", - "enode://239c1f044a2b03b6c4713109af036b775c5418fe4ca63b04b1ce00124af00ddab7cc088fc46020cdc783b6207efe624551be4c06a994993d8d70f684688fb7cf@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401" - ] - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: genesis-config - namespace: quorum-test - labels: - app: qubernetes - name: genesis-config -data: - genesis-geth.json: |- - { - "alloc": { - "0xed9d02e382b34818e88b88a309c7fe71e65f419d": { - "balance": "1000000000000000000000000000" - }, - "0xca843569e3427144cead5e4d5999a3d0ccf92b8e": { - "balance": "1000000000000000000000000000" - }, - "0x0fbdc686b912d7722dc86510934589e0aaf3b55a": { - "balance": "1000000000000000000000000000" - }, - "0x9186eb3d20cbd1f5f992a950d808c4495153abd5": { - "balance": "1000000000000000000000000000" - }, - "0x0638e1574728b6d862dd5d3a3e0942c3be47d996": { - "balance": "1000000000000000000000000000" - } - }, - "coinbase": "0x0000000000000000000000000000000000000000", - "config": { - "byzantiumBlock": 1, - "chainId": 10, - "eip150Block": 1, - "eip155Block": 0, - "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "eip158Block": 1, - "isQuorum":true - }, - "difficulty": "0x0", - "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", - "gasLimit": "0xE0000000", - "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", - "nonce": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "timestamp": "0x00" - } - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: tessera-config - namespace: quorum-test - labels: - app: qubernetes - name: tessera-config -data: - tessera-config.json.tmpl: |- - - - - - { - "useWhiteList": false, - "jdbc": { - "username": "sa", - "password": "", - "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", - "autoCreateTables": true - }, - "server": { - "port": 9001, - "hostName": "http://%THIS_SERVICE_HOST%", - "bindingAddress": "http://0.0.0.0:9001", - "sslConfig": { - "tls": "OFF", - "generateKeyStoreIfNotExisted": true, - "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", - "serverKeyStorePassword": "quorum", - "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", - "serverTrustStorePassword": "quorum", - "serverTrustMode": "TOFU", - "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", - "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", - "clientKeyStorePassword": "quorum", - "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", - "clientTrustStorePassword": "quorum", - "clientTrustMode": "TOFU", - "knownServersFile": "/etc/quorum/qdata/tm/knownServers" - } - }, - "peer": [ - - { - "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" - } - - ], - "keys": { - "passwords": [], - "keyData": [ - { - "privateKeyPath": "/etc/quorum/qdata/tm/tm.key", - "publicKeyPath": "/etc/quorum/qdata/tm/tm.pub" - } - ] - }, - "alwaysSendTo": [], - "unixSocketFile": "/etc/quorum/qdata/tm/tm.ipc" - } - - - tessera-config-enhanced.json.tmpl: |- - - - - { - "useWhiteList": false, - "jdbc": { - "username": "sa", - "password": "", - "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", - "autoCreateTables": true - }, - "serverConfigs":[ - { - "app":"ThirdParty", - "enabled": true, - "serverSocket":{ - "type":"INET", - "port": 9080, - "hostName": "http://%THIS_SERVICE_HOST%" - }, - "communicationType" : "REST" - }, - { - "app":"Q2T", - "enabled": true, - "serverSocket":{ - "type":"UNIX", - "path":"/etc/quorum/qdata/tm/tm.ipc" - }, - "communicationType" : "UNIX_SOCKET" - }, - { - "app":"P2P", - "enabled": true, - "serverSocket":{ - "type":"INET", - "port": 9001, - "hostName": "http://%THIS_SERVICE_HOST%", - "bindingAddress": "http://0.0.0.0:9001" - }, - "sslConfig": { - "tls": "OFF", - "generateKeyStoreIfNotExisted": true, - "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", - "serverKeyStorePassword": "quorum", - "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", - "serverTrustStorePassword": "quorum", - "serverTrustMode": "TOFU", - "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", - "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", - "clientKeyStorePassword": "quorum", - "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", - "clientTrustStorePassword": "quorum", - "clientTrustMode": "TOFU", - "knownServersFile": "/etc/quorum/qdata/tm/knownServers" - }, - "communicationType" : "REST" - } - ], - - "peer": [ - - { - "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" - }, - - - { - "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" - } - - ], - "keys": { - "passwords": [], - "keyData": [ - { - "config": %THIS_PRIV_KEY%, - "publicKey": "%THIS_PUB_KEY%" - } - ] - }, - "alwaysSendTo": [] - } - ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: contracts-config - namespace: quorum-test - labels: - app: qubernetes - name: contracts-config -data: - runscript.sh: |- - #!/bin/ash - PRIVATE_CONFIG=$TM_HOME/tm.ipc geth --exec "loadScript(\"$1\")" attach ipc:$QUORUM_HOME/dd/geth.ipc - private_contract.js: |- - a = eth.accounts[0] - web3.eth.defaultAccount = a; - - // abi and bytecode generated from simplestorage.sol: - // > solcjs --bin --abi simplestorage.sol - var abi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initVal","type":"uint256"}],"payable":false,"type":"constructor"}]; - - var bytecode = "0x6060604052341561000f57600080fd5b604051602080610149833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b6040518082815260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b6040518082815260200191505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b974908476542c23f00029"; - - var simpleContract = web3.eth.contract(abi); - var simple = simpleContract.new(42, {from:web3.eth.accounts[0], data: bytecode, gas: 0x47b760, privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]}, function(e, contract) { - if (e) { - console.log("err creating contract", e); - } else { - if (!contract.address) { - console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined..."); - } else { - console.log("Contract mined! Address: " + contract.address); - console.log(contract); - } - } - }); - public_contract.js: |- - a = eth.accounts[0] - web3.eth.defaultAccount = a; - - // abi and bytecode generated from simplestorage.sol: - // > solcjs --bin --abi simplestorage.sol - var abi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initVal","type":"uint256"}],"payable":false,"type":"constructor"}]; - - var bytecode = "0x6060604052341561000f57600080fd5b604051602080610149833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b6040518082815260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b6040518082815260200191505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b974908476542c23f00029"; - - var simpleContract = web3.eth.contract(abi); - var simple = simpleContract.new(42, {from:web3.eth.accounts[0], data: bytecode, gas: 0x47b760}, function(e, contract) { - if (e) { - console.log("err creating contract", e); - } else { - if (!contract.address) { - console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined..."); - } else { - console.log("Contract mined! Address: " + contract.address); - console.log(contract); - } - } - }); diff --git a/7nodes/raft-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml b/7nodes/raft-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml new file mode 100644 index 0000000..2d847e1 --- /dev/null +++ b/7nodes/raft-7nodes-tessera/k8s-yaml/01-quorum-shared-config.yaml @@ -0,0 +1,344 @@ + + +apiVersion: v1 +kind: Namespace +metadata: + name: quorum-test + labels: + name: quorum-test + +--- +# kubectl create configmap game-config --from-file=configure-pod-container/dd1/key +apiVersion: v1 +kind: ConfigMap +metadata: + name: quorum-permissioned-config + namespace: quorum-test + labels: + app: qubernetes + name: quorum-permissioned-config +data: + permissioned-nodes.json: | + + [ + "enode://ac6b1096ca56b9f6d004b779ae3728bf83f8e22453404cc3cef16a3d9b96608bc67c4b30db88e0a5a6c6390213f7acbe1153ff6d23ce57380104288ae19373ef@%QUORUM-NODE1_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://0ba6b9f606a43a95edc6247cdb1c1e105145817be7bcafd6b2c0ba15d58145f0dc1a194f70ba73cd6f4cdd6864edc7687f311254c7555cc32e4d45aeb1b80416@%QUORUM-NODE2_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://579f786d4e2830bbcc02815a27e8a9bacccc9605df4dc6f20bcc1a6eb391e7225fff7cb83e5b4ecd1f3a94d8b733803f2f66b7e871961e7b029e22c155c3a778@%QUORUM-NODE3_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://3d9ca5956b38557aba991e31cf510d4df641dce9cc26bfeb7de082f0c07abb6ede3a58410c8f249dabeecee4ad3979929ac4c7c496ad20b8cfdd061b7401b4f5@%QUORUM-NODE4_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://3701f007bfa4cb26512d7df18e6bbd202e8484a6e11d387af6e482b525fa25542d46ff9c99db87bd419b980c24a086117a397f6d8f88e74351b41693880ea0cb@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://eacaa74c4b0e7a9e12d2fe5fee6595eda841d6d992c35dbbcc50fcee4aa86dfbbdeff7dc7e72c2305d5a62257f82737a8cffc80474c15c611c037f52db1a3a7b@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401", + "enode://239c1f044a2b03b6c4713109af036b775c5418fe4ca63b04b1ce00124af00ddab7cc088fc46020cdc783b6207efe624551be4c06a994993d8d70f684688fb7cf@%QUORUM-NODE5_SERVICE_HOST%:21000?discport=0&raftport=50401" + ] + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: genesis-config + namespace: quorum-test + labels: + app: qubernetes + name: genesis-config +data: + genesis-geth.json: |- + { + "alloc": { + "0xed9d02e382b34818e88b88a309c7fe71e65f419d": { + "balance": "1000000000000000000000000000" + }, + "0xca843569e3427144cead5e4d5999a3d0ccf92b8e": { + "balance": "1000000000000000000000000000" + }, + "0x0fbdc686b912d7722dc86510934589e0aaf3b55a": { + "balance": "1000000000000000000000000000" + }, + "0x9186eb3d20cbd1f5f992a950d808c4495153abd5": { + "balance": "1000000000000000000000000000" + }, + "0x0638e1574728b6d862dd5d3a3e0942c3be47d996": { + "balance": "1000000000000000000000000000" + } + }, + "coinbase": "0x0000000000000000000000000000000000000000", + "config": { + "byzantiumBlock": 1, + "chainId": 10, + "eip150Block": 1, + "eip155Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip158Block": 1, + "isQuorum":true + }, + "difficulty": "0x0", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000", + "gasLimit": "0xE0000000", + "mixhash": "0x00000000000000000000000000000000000000647572616c65787365646c6578", + "nonce": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "timestamp": "0x00" + } + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: tessera-config + namespace: quorum-test + labels: + app: qubernetes + name: tessera-config +data: + tessera-config.json.tmpl: |- + + + + + { + "useWhiteList": false, + "jdbc": { + "username": "sa", + "password": "", + "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", + "autoCreateTables": true + }, + "server": { + "port": 9001, + "hostName": "http://%THIS_SERVICE_HOST%", + "bindingAddress": "http://0.0.0.0:9001", + "sslConfig": { + "tls": "OFF", + "generateKeyStoreIfNotExisted": true, + "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", + "serverKeyStorePassword": "quorum", + "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", + "serverTrustStorePassword": "quorum", + "serverTrustMode": "TOFU", + "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", + "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", + "clientKeyStorePassword": "quorum", + "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", + "clientTrustStorePassword": "quorum", + "clientTrustMode": "TOFU", + "knownServersFile": "/etc/quorum/qdata/tm/knownServers" + } + }, + "peer": [ + + { + "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" + } + + ], + "keys": { + "passwords": [], + "keyData": [ + { + "privateKeyPath": "/etc/quorum/qdata/tm/tm.key", + "publicKeyPath": "/etc/quorum/qdata/tm/tm.pub" + } + ] + }, + "alwaysSendTo": [], + "unixSocketFile": "/etc/quorum/qdata/tm/tm.ipc" + } + + + tessera-config-enhanced.json.tmpl: |- + + + + { + "useWhiteList": false, + "jdbc": { + "username": "sa", + "password": "", + "url": "jdbc:h2:/etc/quorum/qdata/tm/db;MODE=Oracle;TRACE_LEVEL_SYSTEM_OUT=0", + "autoCreateTables": true + }, + "serverConfigs":[ + { + "app":"ThirdParty", + "enabled": true, + "serverSocket":{ + "type":"INET", + "port": 9080, + "hostName": "http://%THIS_SERVICE_HOST%" + }, + "communicationType" : "REST" + }, + { + "app":"Q2T", + "enabled": true, + "serverSocket":{ + "type":"UNIX", + "path":"/etc/quorum/qdata/tm/tm.ipc" + }, + "communicationType" : "UNIX_SOCKET" + }, + { + "app":"P2P", + "enabled": true, + "serverSocket":{ + "type":"INET", + "port": 9001, + "hostName": "http://%THIS_SERVICE_HOST%", + "bindingAddress": "http://0.0.0.0:9001" + }, + "sslConfig": { + "tls": "OFF", + "generateKeyStoreIfNotExisted": true, + "serverKeyStore": "/etc/quorum/qdata/tm/server-keystore", + "serverKeyStorePassword": "quorum", + "serverTrustStore": "/etc/quorum/qdata/tm/server-truststore", + "serverTrustStorePassword": "quorum", + "serverTrustMode": "TOFU", + "knownClientsFile": "/etc/quorum/qdata/tm/knownClients", + "clientKeyStore": "/etc/quorum/qdata/tm/client-keystore", + "clientKeyStorePassword": "quorum", + "clientTrustStore": "/etc/quorum/qdata/tm/client-truststore", + "clientTrustStorePassword": "quorum", + "clientTrustMode": "TOFU", + "knownServersFile": "/etc/quorum/qdata/tm/knownServers" + }, + "communicationType" : "REST" + } + ], + + "peer": [ + + { + "url": "http://%QUORUM-NODE1_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE2_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE3_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE4_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE5_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE6_SERVICE_HOST%:9001" + }, + + + { + "url": "http://%QUORUM-NODE7_SERVICE_HOST%:9001" + } + + ], + "keys": { + "passwords": [], + "keyData": [ + { + "config": %THIS_PRIV_KEY%, + "publicKey": "%THIS_PUB_KEY%" + } + ] + }, + "alwaysSendTo": [] + } + +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: contracts-config + namespace: quorum-test + labels: + app: qubernetes + name: contracts-config +data: + runscript.sh: |- + #!/bin/ash + PRIVATE_CONFIG=$TM_HOME/tm.ipc geth --exec "loadScript(\"$1\")" attach ipc:$QUORUM_HOME/dd/geth.ipc + private_contract.js: |- + a = eth.accounts[0] + web3.eth.defaultAccount = a; + + // abi and bytecode generated from simplestorage.sol: + // > solcjs --bin --abi simplestorage.sol + var abi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initVal","type":"uint256"}],"payable":false,"type":"constructor"}]; + + var bytecode = "0x6060604052341561000f57600080fd5b604051602080610149833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b6040518082815260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b6040518082815260200191505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b974908476542c23f00029"; + + var simpleContract = web3.eth.contract(abi); + var simple = simpleContract.new(42, {from:web3.eth.accounts[0], data: bytecode, gas: 0x47b760, privateFor: ["ROAZBWtSacxXQrOe3FGAqJDyJjFePR5ce4TSIzmJ0Bc="]}, function(e, contract) { + if (e) { + console.log("err creating contract", e); + } else { + if (!contract.address) { + console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined..."); + } else { + console.log("Contract mined! Address: " + contract.address); + console.log(contract); + } + } + }); + public_contract.js: |- + a = eth.accounts[0] + web3.eth.defaultAccount = a; + + // abi and bytecode generated from simplestorage.sol: + // > solcjs --bin --abi simplestorage.sol + var abi = [{"constant":true,"inputs":[],"name":"storedData","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"x","type":"uint256"}],"name":"set","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"retVal","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"initVal","type":"uint256"}],"payable":false,"type":"constructor"}]; + + var bytecode = "0x6060604052341561000f57600080fd5b604051602080610149833981016040528080519060200190919050505b806000819055505b505b610104806100456000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632a1afcd914605157806360fe47b11460775780636d4ce63c146097575b600080fd5b3415605b57600080fd5b606160bd565b6040518082815260200191505060405180910390f35b3415608157600080fd5b6095600480803590602001909190505060c3565b005b341560a157600080fd5b60a760ce565b6040518082815260200191505060405180910390f35b60005481565b806000819055505b50565b6000805490505b905600a165627a7a72305820d5851baab720bba574474de3d09dbeaabc674a15f4dd93b974908476542c23f00029"; + + var simpleContract = web3.eth.contract(abi); + var simple = simpleContract.new(42, {from:web3.eth.accounts[0], data: bytecode, gas: 0x47b760}, function(e, contract) { + if (e) { + console.log("err creating contract", e); + } else { + if (!contract.address) { + console.log("Contract transaction send: TransactionHash: " + contract.transactionHash + " waiting to be mined..."); + } else { + console.log("Contract mined! Address: " + contract.address); + console.log(contract); + } + } + }); diff --git a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-services.yaml b/7nodes/raft-7nodes-tessera/k8s-yaml/02-quorum-services.yaml similarity index 81% rename from 7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-services.yaml rename to 7nodes/raft-7nodes-tessera/k8s-yaml/02-quorum-services.yaml index 1720d21..22523c0 100644 --- a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-services.yaml +++ b/7nodes/raft-7nodes-tessera/k8s-yaml/02-quorum-services.yaml @@ -19,11 +19,16 @@ spec: name: quorum-node1-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -56,11 +61,16 @@ spec: name: quorum-node2-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -93,11 +103,16 @@ spec: name: quorum-node3-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -130,11 +145,16 @@ spec: name: quorum-node4-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -167,11 +187,16 @@ spec: name: quorum-node5-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -204,11 +229,16 @@ spec: name: quorum-node6-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 @@ -241,11 +271,16 @@ spec: name: quorum-node7-deployment type: ClusterIP ports: - - name: constellation + - name: tm-manager protocol: TCP port: 9001 targetPort: 9001 # default 8545 + - name: tm-tessera-third-part + protocol: TCP + port: 9080 + targetPort: 9080 + # default 8545 - name: wsrpc-listener protocol: TCP port: 8546 diff --git a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-keyconfigs.yaml b/7nodes/raft-7nodes-tessera/k8s-yaml/03-quorum-keyconfigs.yaml similarity index 94% rename from 7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-keyconfigs.yaml rename to 7nodes/raft-7nodes-tessera/k8s-yaml/03-quorum-keyconfigs.yaml index 946586c..225c984 100644 --- a/7nodes/istanbul-7nodes-constellation/k8s-yaml/quorum-keyconfigs.yaml +++ b/7nodes/raft-7nodes-tessera/k8s-yaml/03-quorum-keyconfigs.yaml @@ -8,11 +8,11 @@ apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node1-constellation-key-config + name: quorum-node1-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node1-constellation-key-config + name: quorum-node1-tm-key-config data: tm.key: |- {"data":{"bytes":"Wl+xSyXVuuqzpvznOS7dOobhcn4C5auxkFRi7yLtgtA="},"type":"unlocked"} @@ -59,11 +59,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node2-constellation-key-config + name: quorum-node2-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node2-constellation-key-config + name: quorum-node2-tm-key-config data: tm.key: |- {"data":{"bytes":"nDFwJNHSiT1gNzKBy9WJvMhmYRkW3TzFUmPsNzR6oFk="},"type":"unlocked"} @@ -110,11 +110,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node3-constellation-key-config + name: quorum-node3-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node3-constellation-key-config + name: quorum-node3-tm-key-config data: tm.key: |- {"data":{"bytes":"tMxUVR8bX7aq/TbpVHc2QV3SN2iUuExBwefAuFsO0Lg="},"type":"unlocked"} @@ -161,11 +161,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node4-constellation-key-config + name: quorum-node4-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node4-constellation-key-config + name: quorum-node4-tm-key-config data: tm.key: |- {"data":{"bytes":"grQjd3dBp4qFs8/5Jdq7xjz++aUx/LXAqISFyPWaCRw="},"type":"unlocked"} @@ -212,11 +212,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node5-constellation-key-config + name: quorum-node5-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node5-constellation-key-config + name: quorum-node5-tm-key-config data: tm.key: |- {"data":{"bytes":"W8XcdJfOuxCrLcspSceNg9vh7Cwe8tXiIx5xPJ88OtQ="},"type":"unlocked"} @@ -263,11 +263,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node6-constellation-key-config + name: quorum-node6-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node6-constellation-key-config + name: quorum-node6-tm-key-config data: tm.key: |- {"data":{"bytes":"N9wH6bG0lWOCJtSnosatAskvzkrDApdrjaWkqjDyDzE="},"type":"unlocked"} @@ -314,11 +314,11 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: quorum-node7-constellation-key-config + name: quorum-node7-tm-key-config namespace: quorum-test labels: app: qubernetes - name: quorum-node7-constellation-key-config + name: quorum-node7-tm-key-config data: tm.key: |- {"data":{"bytes":"lesaO6EWbmL1rie1biy851BnN1QsRRDK4kWUimlK0EA="},"type":"unlocked"} diff --git a/7nodes/raft-7nodes-tessera/k8s-yaml/quorum-deployments.yaml b/7nodes/raft-7nodes-tessera/k8s-yaml/04-quorum-deployments.yaml similarity index 100% rename from 7nodes/raft-7nodes-tessera/k8s-yaml/quorum-deployments.yaml rename to 7nodes/raft-7nodes-tessera/k8s-yaml/04-quorum-deployments.yaml diff --git a/README.md b/README.md index 4cdb992..e2cacbe 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,15 @@ A project for deploying [Quorum](https://github.com/jpmorganchase/quorum) on [Kubernetes](https://github.com/kubernetes/kubernetes). -Thanks to [Maximilian Meister blog and code](https://medium.com/@cryptoctl) which provided and awesome starting point. ## Configuration The main configuration files are [`qubernetes.yaml`](config/qubernetes.yaml) and [`nodes.yaml`](nodes.yaml). `qubernetes.yaml` can generate `nodes.yaml`. These two configuration yaml files must exist in the base directory. By default `qubernetes.yaml` is symlinked to [config/qubernetes.yaml](config/qubernetes.yaml), but it can be changed -to point to the desired configurations, e.g. to regenerate the [istanbul-7nodes/k8s-yaml][7nodes/istanbul-7nodes/k8s-yaml] -use [7nodes/istanbul-7nodes/qubernetes-istanbul-7nodes.yaml](7nodes/istanbul-7nodes/qubernetes-istanbul-7nodes.yaml): -``` +to point to the desired configurations, e.g. to regenerate the [istanbul-7nodes-tessera/k8s-yaml][7nodes/istanbul-7nodes-tessera/k8s-yaml] +use [7nodes/istanbul-7nodes-tessera/qubernetes-istanbul-7nodes.yaml](7nodes/istanbul-7nodes-tessera/qubernetes-istanbul-7nodes.yaml): +```shell $> ln -s 7nodes/istanbul-7nodes/qubernetes-istanbul-7nodes.yaml qubernetes.yaml $> ln -s 7nodes/nodes.yaml nodes.yaml # generate the resource yaml in the ./out dir @@ -21,12 +20,34 @@ $> ./qubernetes ## [7 Nodes Example](https://github.com/jpmorganchase/quorum-examples/tree/master/examples/7nodes) quorum-exmaples 7nodes has been ported to k8 resources: -* [raft k8s resource yaml](7nodes/raft-7nodes/k8s-yaml) -* [istanbul k8s resource yaml](7nodes/istanbul-7nodes/k8s-yaml) +* [istanbul tessera k8s resource yaml](7nodes/istanbul-7nodes-tessera/k8s-yaml) +```shell +$> kubeclt apply -f 7nodes/istanbul-7nodes-tessera/k8s-yaml +``` +* [istanbul constellation k8s resource yaml](7nodes/istanbul-7nodes-constellation/k8s-yaml) +```shell +$> kubeclt apply -f 7nodes/istanbul-7nodes-constellation/k8s-yaml +``` +* [raft tessera k8s resource yaml](7nodes/raft-7nodes-tessera/k8s-yaml) +```shell +$> kubeclt apply -f 7nodes/raft-7nodes-tessera/k8s-yaml +``` +* [raft constellation k8s resource yaml](7nodes/raft-7nodes-constellation/k8s-yaml) +```shell +$> kubeclt apply -f 7nodes/raft-7nodes-constellation/k8s-yaml +``` +### Deleting +1. Delete the kubernetes resources: +```shell +$> kubeclt delete -f 7nodes/istanbul-7nodes-tessera/k8s-yaml +``` +2. Delete the files on the host machine, by default under `/var/lib/docker/geth-storage`. + ## Generating Quroum K8s Resources From Configs -1. Set the intial config in `qubernetes.yaml` which by default is symlinked to [`config/qubernetes.yaml`](config/qubernetes.yaml). +1. Set `qubernetes.yaml` in this directory to the desired confufation, there is a base config in [`config/qubernetes.yaml`](config/qubernetes.yaml). +create a symlink `ln -s config/qubernetes.yaml .` if you wish to use it, or cp it to this direction. The most basic thing to modify in `qubernetes.yaml` is the number of nodes you wish to deploy: ```yaml # number of nodes to deploy @@ -36,7 +57,7 @@ nodes: 2. Run `./quorum-init` to generate the necessary keys, genesis.json, and permissioned-nodes.json needed for the quorum deployment. These resouces will be written to the directory specified in the [`qubernetes.yaml`](qubernetes.yaml): -``` +```shell # Generate the keys, permissioned-nodes.json file # genesis.json for the configured nodes $> ./quorum-init @@ -51,7 +72,7 @@ Genesis_File: out/config/genesis.json 3. Generate the Kubernetes resource yaml for the deployment. By default these will be generated to the `./out` directory. -``` +```shell # Generate the kubernetes resources necessary to support a Quorum deploy # this will be written to the `out` dir. $> ./qubernetes @@ -59,19 +80,15 @@ $> ./qubernetes ``` 4. Deploy to your kubernetes cluster -* see helper scripts [`./deploy.sh`](deploy.sh) - -``` -kubectl apply -f out/quorum-shared-config.yaml -kubectl apply -f out/quorum-services.yaml -kubectl apply -f out/quorum-keyconfigs.yaml -kubectl apply -f out/quorum-deployments.yaml +```shell +# apply all the generated .yaml files that are in the ./out directory. +$> kubectl apply -f out/ ``` 4. Accessing the quorum container: -``` +```shell local $> kubectl get pods --namespace=$YOUR_NAMESPACE local $> kubect exec -it $POD_ID -c quorum /bin/ash quorum-qubernetes $> cd /etc/quorum/qdata @@ -97,11 +114,12 @@ quorum-qubernetes $> geth attach /etc/quorum/qdata/dd/geth.ipc 5. Deleting the deployment -* see helper scripts [`delete.sh`](delete.sh) +```shell +$> kubeclt delete -f out/ ``` -kubectl delete -f out/quorum-shared-config.yaml -kubectl delete -f out/quorum-services.yaml -kubectl delete -f out/quorum-keyconfigs.yaml -kubectl delete -f out/quorum-deployments.yaml -``` +* Delete the files on the host machine, by default under `/var/lib/docker/geth-storage`. + +## Thanks! And Additional Resources +Thanks to [Maximilian Meister blog and code](https://medium.com/@cryptoctl) which provided and awesome starting point! +and is a good read to undestand the different components. diff --git a/config/qubernetes.yaml b/config/qubernetes.yaml index e4bc0b3..7d7e53a 100644 --- a/config/qubernetes.yaml +++ b/config/qubernetes.yaml @@ -4,7 +4,7 @@ namespace: nodes: number: 10 quorum: - # supported: raft | istanbul + # supported: (raft | istanbul) consensus: raft # base quorum data dir as set inside each container. Node_DataDir: /etc/quorum/qdata @@ -20,13 +20,11 @@ quorum: Quorum_Version: 2.1.1 # related to transaction manager containers tm: - # container images at https://hub.docker.com/u/quorumengineering/ - # TODO: add support for tessera, this should hold the full container name - # in that case. - Name: constellation - Tm_Version: 0.3.2 + # (tessera|constellation) + Name: tessera + Tm_Version: 0.7.3 Port: 9001 - Tessera_Config_Dir: out/config + Tessera_Config_Dir: 7nodes # generic geth related options geth: diff --git a/delete.sh b/delete.sh index a8be01e..6bad3ae 100755 --- a/delete.sh +++ b/delete.sh @@ -1,7 +1,8 @@ #!/bin/bash -qctl="kubectl --namespace=quorum-test --kubeconfig={PATH/TO/YOUR}/k8_config --insecure-skip-tls-verify " - +#qctl="kubectl --namespace=quorum-test --kubeconfig=/home/libby/.go/src/github.com/ethereum/k8-quorum/k8_config --insecure-skip-tls-verify " +#qctl="kubectl --namespace=quorum-test --kubeconfig=/home/libby/Workspace.JPMC/kubernetes/k8s-katas/config/k8s_config --insecure-skip-tls-verify " +qctl='kubectl --namespace=quorum-test --kubeconfig=/home/libby/.go/src/github.com/ethereum/k8-quorum/k8_config_east2 --insecure-skip-tls-verify ' $qctl delete -f out/quorum-shared-config.yaml $qctl delete -f out/quorum-services.yaml $qctl delete -f out/quorum-deployments.yaml diff --git a/deploy.sh b/deploy.sh index 7dd8bba..0b1f42d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,8 @@ #!/bin/bash -qctl="kubectl --namespace=quorum-test --kubeconfig={PATH/TO/YOUR}/k8_config --insecure-skip-tls-verify " +#qctl="kubectl --namespace=quorum-test --kubeconfig=/home/libby/.go/src/github.com/ethereum/k8-quorum/k8_config --insecure-skip-tls-verify " +#qctl="kubectl --kubeconfig=/home/libby/Workspace.JPMC/kubernetes/k8s-katas/config/k8s_config --insecure-skip-tls-verify " +qctl='kubectl --namespace=quorum-test --kubeconfig=/home/libby/.go/src/github.com/ethereum/k8-quorum/k8_config_east2 --insecure-skip-tls-verify ' $qctl create -f out/quorum-shared-config.yaml $qctl create -f out/quorum-services.yaml $qctl create -f out/quorum-keyconfigs.yaml diff --git a/qubernetes b/qubernetes index e65dda0..a208bba 100755 --- a/qubernetes +++ b/qubernetes @@ -43,22 +43,22 @@ end @Sed_Set_Node_Service_Host = sed_string[0...-2] #puts (sed_string) -File.open("out/quorum-shared-config.yaml", "w") do |f| +File.open("out/01-quorum-shared-config.yaml", "w") do |f| f.puts (ERB.new(File.read("quorum-shared-config.yaml.erb"), nil, "-").result) end # Create the service resources -File.open("out/quorum-services.yaml", "w") do |f| +File.open("out/02-quorum-services.yaml", "w") do |f| f.puts (ERB.new(File.read("quorum-services.yaml.erb"), nil, "-").result) end # make all keystore resrouce (configMap, TODO: Secretes) -File.open("out/quorum-keyconfigs.yaml", "w") do |f| +File.open("out/03-quorum-keyconfigs.yaml", "w") do |f| f.puts (ERB.new(File.read("quorum-keystore.yaml.erb"), nil, "-").result) end # make deployments -File.open("out/quorum-deployments.yaml", "w") do |f| +File.open("out/04-quorum-deployments.yaml", "w") do |f| f.puts (ERB.new(File.read("quorum-deployment.yaml.erb"), nil, "-").result) end