I have used the instructions at https://hyperledger.github.io/composer/tutorials/developer-guide.html to create a sample Hyperledger Fabric network my-network. Everything worked fine following the tutorial but I have one question:
How do I shutdown/restart Fabric and the network my-network so that the network state is persistent?
If I just stop Fabric using the script ./stopFabric.sh, the network is gone and when I start Fabric again, I have to redeploy the network again using composer and start from scratch.
for a Dev environment, you can do a docker stop <container id>
of your Fabric containers and then the chaincode (business network) containers - and then restart the Orderer, CA, peers and CouchDB containers, and finally your business network container(s) using docker start <container id>
. This should retain your container state. Again, this is for the Dev setup that was provided with the Hyperledger Composer local dev environment. Obviously you can go down the docker persistence route where something a container state is retained.