-
Notifications
You must be signed in to change notification settings - Fork 20
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
Implement Just-In-Time building and execution of chaincode within a Kubernetes job #127
Comments
Hi @y12studio, thanks for opening the issue. Adding some sort of development mode was something we considered previously (see #29). I'm even more convinced now than I was then that the chaincode as a server (ccaas) builder is the right option for chaincode development- it's now provided in core Fabric and, once it's set up, gives you a really tight develop/test/debug loop since there is no docker build/publish step at all, and no need to go round the chaincode lifecycle loop either. I definitely think the ccaas builder workflow could be improved in terms of getting it set up to begin with, but would that address your use case? |
Hi @jt-nti , thank you for sharing your thoughts on the chaincode-as-a-server (ccaas) builder. I completely agree that the ccaas builder provided in core Fabric significantly simplifies the develop/test/debug loop by eliminating the need for the Docker build/publish step and bypassing the chaincode lifecycle loop. This makes it a compelling option for chaincode development. However, there are a few nuances to consider. First, the ccaas_builder external builder requires the chaincode to integrate with the gRPC Furthermore, the configuration requirements vary between the two builders. For example, the connection.json file included in the chaincode package is not required for k8s_builder, which means two versions of the configuration also need to be maintained. Although the ccaas builder workflow offers significant advantages, it might be worth considering enhancements to the build/release/run process within the Kubernetes job of k8s_builder to make it more developer-friendly. This is purely a suggestion and does not require adoption. |
Hi @y12studio, there are definitely some differences between deploying with the k8s and ccaas builder, and making the k8s builder as developer friendly as possible would be good. I think it's possible for chaincode to run unchanged in either client or server mode with the latest contract APIs though, which would help. If so, it would definitely be good to update the samples to make it obvious how to achieve that. Building and deploying chaincode with the k8s builder in a development environment isn't too bad with the Fabric samples Kubernetes test network, e.g. ./network chaincode deploy sample-contract <path_to_contract_source> Adding a new tutorial to the documentation to cover the chaincode developer experience might identify other enhancements that could be made without breaking the k8s builder's link to the Fabric chaincode lifecycle. |
Enhancing the documentation for chaincode developers using k8s_builder might be the best solution. From your explanation, I now understand that this model could potentially cause confusion or disruption to the existing process. The complexity of the multi-build-release-run process contributing to this confusion was an issue I hadn't considered before. |
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
Hi @y12studio, sorry it took a while but I've finally got around to writing a tutorial for developing and debugging chaincode before deploying it with the k8s builder. It's currently in PR #151 while I try and get some feedback so any comments would be great. Thanks. |
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See hyperledger-labs#127 Signed-off-by: James Taylor <[email protected]>
See #127 Signed-off-by: James Taylor <[email protected]>
Is it possible to enhance the developer experience by implementing Just-In-Time (JIT) compilation and execution of chaincode within a Kubernetes job? Below is some pseudocode for OCI artifacts, though using an HTTP URL might be acceptable as well.
chaincode build and publish
JIT Job yaml example of getChaincodeJobSpec()
refs
fabric-builder-k8s/internal/util/k8s.go
Line 221 in dc794f3
The text was updated successfully, but these errors were encountered: