Open ionicsolutions opened 2 years ago
Hi Kilian,
This is not exactly answering your question, but may achieve a similar outcome. We've had really, really good success using the Kubernetes Test Network (fabric-samples/test-network-k8s) in concert with local development in an IDE / debugger for both chaincode and gateway client applications. In general the k8s test network does a much better job of mapping ports to Services running in the cluster, and is ideally suited for a local dev box when focusing on the newer Chaincode as a Service pattern.
We are very interested in feedback on the use of a k8s test network, chainocde-as-a-service, and gateway client as a Fabric development platform. The general idea is to set up a test network on K8s (running locally with a KIND cluster), and publish chaincode endpoints that refer back to a port bound to the local host (e.g... IntelliJ, VSCode, binaries, Docker containers, etc.) while connected to an IDE or debugger. It's still a little "fiddly" but the overall process is GREAT once it's wired up. We are still a little short on documentation for the setup, but there are some notes at:
Do let us know if this process can help with your development environment / use case... overall the documentation can be improved but in general we've seen positive outcomes when building Fabric apps on k8s and pivoting away from the Compose test network.
Happy coding!
Hi Josh, thanks for the recommendation. In principle, this seems to be exactly what I'm looking for.
Unfortunately, already executing the demo commands in the first link fails for me. The channel creation only succeeds after several attempts and querying the chaincode does not work. I only see "⚠️" as an output and the logfiles are not helpful either, so I don't know where the issue lies. Is there a way to see the full output for debugging? (At this point, I wouldn't mind to see pages and pages of script output, it would certainly help me identify the issue and understand what's going on under the hood.)
Kilian the ./network script creates a verbose log in a network-debug.log
file (I typically maintain a tail -f command in a separate shell to keep an eye on the verbose output.) Are there any clues in the log file? The scripts can be unreliable when run multiple times - does resetting to a "clean" slate with ./network unkind
restore any order to the cluster with a second run? Also, I see what appears to be a bash shell above - is this on a Linux or OSX system? Are you by chance running on a Windows machine under WSL?
Back to the original question... a change is proposed in https://github.com/hyperledger/fabric/pull/3134.
The tutorial claims that no changes need to be made to sampleconfig/core.yaml.
However, following the instructions leads to an error when starting the peer:
Per this StackOverflow post, this error can be fixed by changing the port the operations subsystem listens on.