neuromouse
neuromouse

Reputation: 941

Hyperledger Composer model not persisted

I'm using Hyperledger Composer on Fabric v1.0. When stopping Fabric with fabric-tools/stopFabric.sh and then starting with startFabric.sh, the deployed model (.bna file) is no longer there.

How do I set the system up so that data will stay there after a system reboot?

Upvotes: 1

Views: 586

Answers (2)

shinki
shinki

Reputation: 43

If you were deploying using the composer playground, you can save your bna using the export button on the lower left of the playground define interface.

If you want to persist your deployment itself, you can modify the docker-compose files to persist the data in the /var/hyperledger/production on the peer and orderer containers using a data volume. This will persist the ledger and credentials the next time you bring up the network.

Upvotes: 0

david_k
david_k

Reputation: 5868

This is an operational consideration for how to set up a fabric environment and as you correctly observe, because our fabric dev server just start up fabric containers, if those containers are destroyed for any reason then their internal filesystem are lost. In the hyperledger fabric documentation they describe a simple way to make the fabric containers persist their data outside of their isolated file systems. see http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html and the section called "A Note on Data Persistence" which provide detail on this. In this case you would need to apply the concepts described there to the docker-compose.yml file in the hlfv1/composer directory in our fabric dev server.

Upvotes: 4

Related Questions