Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploying Helm Chart to [Google] Kubernetes Engine #93

Open
DazWilkin opened this issue Jun 4, 2018 · 4 comments
Open

Deploying Helm Chart to [Google] Kubernetes Engine #93

DazWilkin opened this issue Jun 4, 2018 · 4 comments

Comments

@DazWilkin
Copy link

DazWilkin commented Jun 4, 2018

Folks --

Thanks for all the work on this excellent Helm chart to deploy Fabric to Kubernetes.

I was given a link to your site and have been able to provision a Fabric cluster on Kubernetes Engine.

When it completes, the Chart suggests but I assume Composer provides the HTTP/8080 endpoint (!?) and there isn't one for me to hit:

NOTES:
1. Get the application URL by running these commands:
   export POD_NAME=$(kubectl get pods --namespace default -l "app=ibm-blockchain-network,release=austere-otter" -o jsonpath="{.items[0].metadata.name}")
   echo "Visit http://127.0.0.1:8080 to use your application"
   kubectl port-forward $POD_NAME 8080:80

2. Next, create a channel and have your peers join by running these commands:
   helm install stable/ibm-blockchain-channel

However, the Helm chart deploys only Fabric while this site's documentation references the companion Composer integration.

I would value some pointers on how to deploy Composer too such that it integrates with Fabric.

kubectl get services
NAME                               TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                         AGE
ibm-blockchain-network-ca          NodePort    10.23.244.71    <none>        7054:30000/TCP                  47m
ibm-blockchain-network-orderer     NodePort    10.23.251.118   <none>        31010:31010/TCP                 47m
ibm-blockchain-network-org1peer1   NodePort    10.23.246.207   <none>        5010:30110/TCP,5011:30111/TCP   47m
ibm-blockchain-network-org2peer1   NodePort    10.23.253.177   <none>        5010:30210/TCP,5011:30211/TCP   47m
kubernetes                         ClusterIP   10.23.240.1     <none>        443/TCP                         4h
nfs-server                         ClusterIP   10.23.249.127   <none>        2049/TCP,20048/TCP,111/TCP      3h

and:

image

@DazWilkin
Copy link
Author

Here's my fork-not-fork of your repo to tweak the Helm Chart:
https://github.com/DazWilkin/ibm-blockchain-network

Blogged about it too:
https://medium.com/google-cloud/fabric-on-google-cloud-platform-97525323457c

@mrshah-at-ibm
Copy link
Contributor

thanks @DazWilkin.. would you be interested in making a PR to the repository?

Also, we did have the chaincode install/instantiate etc. as part of the helm chart, but it gets difficult to wait until all the components are running before running the install/instantiate. So we had to remove it and only use the helm chart to bring up the network.

@DazWilkin
Copy link
Author

Thanks for the prompt and helpful reply @mrshah-at-ibm and thanks for building this Chart!

Yes, I'd be happy to submit a PR.

IBM Container Service appears to include a ReadWriteMany storage class but Kubernetes Engine currently does not. I will check with Kubernetes Engineering on their recommendation. I've used an NFS Service on Kubernetes backed by Google's SSD Persistent Disk and this works well but I'll confirm whether that's the definitive recommendation.

The only other change I made is to the volume for compose-credentials. Kubernetes Engine defaults to Container-Optimized OS and this does not permit read-write mounts on "/". I changed this from /compose to /tmp/composer (which should work elsewhere).

I'll spent time today|tomorrow working through your broader deployment to see if I can get chaincode deployed too. It's unfortunate that we must use multiple tools to achieve this; a tool to:

  • provision clusters (exemplar: Terraform)
  • provision Fabric (Helm)
  • provision Chaincode etc.

@mrshah-at-ibm
Copy link
Contributor

mrshah-at-ibm commented Jun 6, 2018

@DazWilkin thanks for willing to submit a PR.

You might not want to use /tmp as it will be removed on the container restart. A lot of users complained about it and hence we moved it to /compose. You might want to use $HOME folder instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants