synechron-finlabs / quorum-maker

Utility to create and monitor Quorum nodes
Apache License 2.0
196 stars 97 forks source link

Kubernetes Support #75

Open majd1239 opened 5 years ago

majd1239 commented 5 years ago

So I've been spending quite some time trying to deploy on kubernetes. It works and all nodes have persistent volumes with stateful sets deployment. Now only problem is that upon a pod restart, its data is preserved but the pod IP is changed. With stateful deployments, all pods replicas would have a unique static hostname tied to the cluster ip that never change till you delete the whole cluster. So I tried using it and it successfully encodes it and joins a network under that hostname but when the nodemanager is launched it throws an exception saying nat encountered an invalid ip. so it never ends booting up Any thought on where in the code I can change this so it doesn't throw this error when it encounters a hostname rather than an ip?

dhyansraj commented 5 years ago

Quorum/Ethereum only supports IP addresses, no hostname support yet. Each node id is a combination of enodeid + ip address. What error you getting? Can you send a log or screenshot ?

majd1239 commented 5 years ago
screen shot 2019-01-12 at 7 44 33 pm screen shot 2019-01-12 at 7 45 21 pm

Here are some screenshots

dhyansraj commented 5 years ago

From the join request shown on UI, it looks like you are passing a hostname. Hostnames are not supported in Ethereum/Quorum. Read the below description from https://github.com/ethereum/wiki/wiki/enode-url-format

image

majd1239 commented 5 years ago

Oh bummer, It works when I pass the pod ip but that defeats the purpose of running it on kubernetes. My plan was to have a persistent infrastructure so if a node fails for any reason, the container would be auto restarted by k8s and kubernetes also opens the door for adding cool functionalities to the network

dhyansraj commented 5 years ago

See if you can run a static IP to dynamic IP router service on image?

nicolas-law commented 5 years ago

Hey @majd1239 , I'm interested in deploying Quorum on my Kubernetes cluster, can you explain how you did it ?

majd1239 commented 5 years ago

@nicolas-law Hey Nicolas sorry just seeing this. I uploaded the changes I did to make it compatible. Just build the docker image in the repo, upload it to your docker registry and use that as the deployment image. I provided two deployments yaml files I used to run it on gcloud. I no longer use stateful sets since I couldn't use the persistent hostname it provides for the replicas so just sticked with a daemon set. https://github.com/majd1239/Quarum-Maker-Kubernetes

rjbanner commented 5 years ago

@majd1239 Quorum started providing DNS support from v2.1.1 onwards. Can you check with versions of Quorum Maker supporting v2.1.1+