diff --git a/examples/config/qubernetes-custom-docker-repo.yaml b/examples/config/qubernetes-custom-docker-repo.yaml index 73f5c86..506a868 100644 --- a/examples/config/qubernetes-custom-docker-repo.yaml +++ b/examples/config/qubernetes-custom-docker-repo.yaml @@ -31,6 +31,7 @@ quorum: # the docker repo that hold your quorum container Docker_Repo: %%YOUR_CUSTOM_DOCKER_REPO%% Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/examples/config/qubernetes-ingress.yaml b/examples/config/qubernetes-ingress.yaml index 8a08946..995c438 100644 --- a/examples/config/qubernetes-ingress.yaml +++ b/examples/config/qubernetes-ingress.yaml @@ -32,8 +32,9 @@ quorum: # (tessera|constellation) Name: tessera #Tm_Version: 0.9.2 - Tm_Version: 0.10.0 + Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/examples/config/qubernetes-istanbul-7nodes.yaml b/examples/config/qubernetes-istanbul-7nodes.yaml index ec8580e..f16559a 100644 --- a/examples/config/qubernetes-istanbul-7nodes.yaml +++ b/examples/config/qubernetes-istanbul-7nodes.yaml @@ -28,6 +28,7 @@ quorum: # container images at https://hub.docker.com/u/quorumengineering/ # in that case. Tm_Version: 0.3.2 + 3Party_Port: 9080 Port: 9001 # generic geth related options geth: diff --git a/examples/config/qubernetes-istanbul-generate-8nodes.yaml b/examples/config/qubernetes-istanbul-generate-8nodes.yaml index 52e3715..a8ff024 100644 --- a/examples/config/qubernetes-istanbul-generate-8nodes.yaml +++ b/examples/config/qubernetes-istanbul-generate-8nodes.yaml @@ -26,8 +26,9 @@ quorum: # container images at https://hub.docker.com/u/quorumengineering/ # (tessera|constellation) Name: tessera - Tm_Version: 0.9.2 + Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/examples/config/qubernetes-network-policy.yaml b/examples/config/qubernetes-network-policy.yaml index 5a4f4e8..bfa731f 100644 --- a/examples/config/qubernetes-network-policy.yaml +++ b/examples/config/qubernetes-network-policy.yaml @@ -34,6 +34,7 @@ quorum: Name: tessera Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/examples/config/qubernetes-pvc-annotations.yaml b/examples/config/qubernetes-pvc-annotations.yaml index a3e8250..4cc50f3 100644 --- a/examples/config/qubernetes-pvc-annotations.yaml +++ b/examples/config/qubernetes-pvc-annotations.yaml @@ -29,6 +29,7 @@ quorum: Name: tessera Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ storage: diff --git a/examples/config/qubernetes-pvc-storageclass.yaml b/examples/config/qubernetes-pvc-storageclass.yaml index 5f7084f..a57cc1d 100644 --- a/examples/config/qubernetes-pvc-storageclass.yaml +++ b/examples/config/qubernetes-pvc-storageclass.yaml @@ -29,6 +29,7 @@ quorum: Name: tessera Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ storage: diff --git a/examples/config/qubernetes-raft-generate-8nodes.yaml b/examples/config/qubernetes-raft-generate-8nodes.yaml index 0fcff39..1684b0f 100644 --- a/examples/config/qubernetes-raft-generate-8nodes.yaml +++ b/examples/config/qubernetes-raft-generate-8nodes.yaml @@ -28,6 +28,7 @@ quorum: Name: tessera Tm_Version: 0.9.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # generic geth related options geth: diff --git a/examples/config/qubernetes-security-context.yaml b/examples/config/qubernetes-security-context.yaml index 2f22f4a..e265ef7 100644 --- a/examples/config/qubernetes-security-context.yaml +++ b/examples/config/qubernetes-security-context.yaml @@ -33,6 +33,7 @@ quorum: Name: tessera Tm_Version: 0.11 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/qubernetes b/qubernetes index 4346f4e..b71f8d7 100755 --- a/qubernetes +++ b/qubernetes @@ -61,6 +61,11 @@ if @config["quorum"]["tm"]["Port"] @Tm_Port = @config["quorum"]["tm"]["Port"] end +@Tm_3Party_Port = 9080 +if @config["quorum"]["tm"]["3Party_Port"] + @Tm_3Party_Port = @config["quorum"]["tm"]["3Party_Port"] +end + @Node_RPCPort = 8545 if @config["geth"] and @config["geth"]["Node_RPCPort"] @Node_RPCPort = @config["geth"]["Node_RPCPort"] @@ -73,7 +78,7 @@ end @NodeP2P_ListenAddr = 30303 if @config["geth"] and @config["geth"]["NodeP2P_ListenAddr"] - @NodeP2P_ListenAdd = @config["geth"]["NodeP2P_ListenAddr"] + @NodeP2P_ListenAddr = @config["geth"]["NodeP2P_ListenAddr"] end diff --git a/qubernetes.yaml b/qubernetes.yaml index 0ca4517..a270a08 100644 --- a/qubernetes.yaml +++ b/qubernetes.yaml @@ -28,8 +28,9 @@ quorum: # (tessera|constellation) Name: tessera #Tm_Version: 0.9.2 - Tm_Version: 0.10.0 + Tm_Version: 0.10.2 Port: 9001 + 3Party_Port: 9080 Tessera_Config_Dir: out/config # persistent storage is handled by Persistent Volume Claims (PVC) https://kubernetes.io/docs/concepts/storage/persistent-volumes/ # test locally and on GCP diff --git a/quorum-config b/quorum-config index d35c00e..ba1a512 100755 --- a/quorum-config +++ b/quorum-config @@ -54,6 +54,11 @@ end if @config["quorum"]["tm"]["Port"] @Tm_Port = @config["quorum"]["tm"]["Port"] end +# Tm_3Party_Port used in tessera config templates +@Tm_3Party_Port = 9080 +if @config["quorum"]["tm"]["3Party_Port"] + @Tm_3Party_Port = @config["quorum"]["tm"]["3Party_Port"] +end # used by permissioned-nodes.json.erb to set enode URLs @Raft_Port = 50401 if @config["quorum"]["quorum"]["Raft_Port"] @@ -61,7 +66,7 @@ if @config["quorum"]["quorum"]["Raft_Port"] end @NodeP2P_ListenAddr = 30303 if @config["geth"] and @config["geth"]["NodeP2P_ListenAddr"] - @NodeP2P_ListenAdd = @config["geth"]["NodeP2P_ListenAddr"] + @NodeP2P_ListenAddr = @config["geth"]["NodeP2P_ListenAddr"] end ##################################################### diff --git a/templates/k8s/network-policy.yaml.erb b/templates/k8s/network-policy.yaml.erb index 83bf2b5..5c24371 100644 --- a/templates/k8s/network-policy.yaml.erb +++ b/templates/k8s/network-policy.yaml.erb @@ -16,8 +16,8 @@ spec: matchLabels: app: qubernetes ports: - - port: <%= @TM_Port %> - - port: 9080 + - port: <%= @Tm_Port %> + - port: <%= @Tm_3Party_Port %> - port: <%= @Raft_Port %> - port: <%= @Node_WSPort %> - port: <%= @Node_RPCPort %> @@ -28,8 +28,8 @@ spec: matchLabels: app: qubernetes ports: - - port: <%= @TM_Port %> - - port: 9080 + - port: <%= @Tm_Port %> + - port: <%= @Tm_3Party_Port %> - port: <%= @Raft_Port %> - port: <%= @Node_RPCPort %> - port: <%= @Node_WSPort %> @@ -55,6 +55,6 @@ spec: app: qubernetes ports: - port: <%= @TM_Port %> - - port: 9080 - - port: <%= @Node_RPCPort %> + - port: <%= @Tm_3Party_Port %> + - port: <%= @Node_RPCPort %> - port: <%= @Node_WSPort %> diff --git a/templates/k8s/quorum-services.yaml.erb b/templates/k8s/quorum-services.yaml.erb index 7a5663b..e4ee9a5 100644 --- a/templates/k8s/quorum-services.yaml.erb +++ b/templates/k8s/quorum-services.yaml.erb @@ -40,8 +40,8 @@ spec: # default 8545 - name: tm-tessera-third-part protocol: TCP - port: 9080 - targetPort: 9080 + port: <%= @Tm_3Party_Port %> + targetPort: <%= @Tm_3Party_Port %> # default 8545 - name: rpc-listener protocol: TCP diff --git a/templates/quorum/tessera-config-9.0.json.erb b/templates/quorum/tessera-config-9.0.json.erb index 144b720..4c9db37 100644 --- a/templates/quorum/tessera-config-9.0.json.erb +++ b/templates/quorum/tessera-config-9.0.json.erb @@ -24,7 +24,16 @@ end { "app":"ThirdParty", "enabled": true, - "serverAddress": "http://%THIS_SERVICE_HOST%:9080", + "serverAddress": "http://%THIS_SERVICE_HOST%:<%= @Tm_3Party_Port %>", + "cors": { + "allowedMethods": [ + "GET", + "OPTIONS" + ], + "allowedOrigins": [ + "*" + ] + }, "communicationType" : "REST" }, { diff --git a/templates/quorum/tessera-config-enhanced.json.erb b/templates/quorum/tessera-config-enhanced.json.erb index cf21be3..fe0941b 100644 --- a/templates/quorum/tessera-config-enhanced.json.erb +++ b/templates/quorum/tessera-config-enhanced.json.erb @@ -26,7 +26,7 @@ end "enabled": true, "serverSocket":{ "type":"INET", - "port": 9080, + "port": <%= @Tm_3Party_Port %>, "hostName": "http://%THIS_SERVICE_HOST%" }, "communicationType" : "REST"