I installed the playground hyperledger on my local ubuntu VM.
I would like to build an asset management systemt for my company on hyperledger.
Is the playground enough or do I need the fabric. How do I connect more nodes to the playground for redudancy if playground is enough.
Thanks in advance.
Playground is only for development of the chaincode, it runs and stores all data on the browser localStorage, you need the fabric network to deploy it, and is in this network where you define how many peers would exists in the network.
Related
I'm a beginner with Hyperledger and I have some questions about Hyperledger Composer:
What's the difference between Hyperledger Composer and Composer Playground?
From what I understand Playground is just a user interface for the configuration, deployment and testing of a business network. So, isn't there any differences between deploy a business network with Playground and with Hyperledger Composer using Yeoman? (as shown for example in this tutorial)
I installed Composer Playgroung locally with this official tutorial. After creating a new business network, where can I find the related files on my machine?
What are all the operation I need to run every time I start up my machine to continue developing?
Sometimes just running ./startFabric.sh makes Playground return “Error trying to ping. Make sure chaincode has successfully instantiated and try again”
Do I have to export my business network card from Playground every time I want to test the RESTful API’s (using composer-rest-server)?
1: Hyperledger composer is a project which helps us interact with Hyperledger fabric. It includes UI (composer-playgroud), CLI and NPM(SDK) package. Composer Playground is a testing & development tool. You can create a blockchain smart contract here and also deploy in local memory to test the code. For production deployment, I would suggest use composer-cli.
2: Composer playground keeps all the cards in ".composer" folder. Most likely this folder sits on your user folder. In Ubuntu OS it is on path "/home/user/.composer". Regarding BNA, if it is connected to your fabric then it picks BNA from there. In browser only mode, it keeps in the browser cache.
3: I would suggest first run ./stopFabric.sh and then run ./startFabric.sh. It will stop all the Docker containers. If you have installed your own BNA then just ping the network. Follow this link. In the end, you will find the ping command.
4: Once you have imported cards to your composer rest server then, I think it should be okay. You do not need to import it again until unless the service is running. You can create composer rest server stateful by adding mongo in it. follow this. You can not import a card in two application i.e. if you have imported a card into composer playground then you can not import the same card into composer rest server.
Single business network to be deployed on multiple machines and should be able to interact across different machines.
I am interested in deploying and accessing network in another machine. I am trying to do this by changing the connection profile (with ip and ports) of my desired host machine, but I am facing the issue:
Unable to find the response from the peers.
Is there any standard method for the same?
You can review these articles
https://discourse.skcript.com/t/running-hyperledger-composer-with-multiple-organization-on-different-host-machines/635
and
Hyperledger fabric deployment (real network)
How should composer setup to be done for hyperledger fabric network deployment for multiple orgs on multiple physical machine
You'll need to ensure that your dockerized nodes (on either physical machines etc) can 'see' each other on the IP network (standard networking stuff) and the connection profiles are configured accordingly. See also the multi-org tutorial (replace localhosts with real hosts and consider what crypto material (certs/keys) is required 'where' - but at least it gives you an indication of the sequence from a Composer standpoint https://hyperledger.github.io/composer/tutorials/deploy-to-fabric-multi-org.html (ie if using Composer v0.16.x) - if using Composer v0.17.x (and Fabric v1.1.x) then you need these docs https://hyperledger.github.io/composer/next/tutorials/deploy-to-fabric-multi-org.html (the connection profiles are a different format).
I am working with balance transfer example I did setup in single machine I want to do that example in two machines.I am following the below link https://github.com/hyperledger/fabric-samples/tree/release/balance-transfer can anyone tell me what are the steps or ways I have to do for implementing that example in multiple machines.
I was able to host hyperledger fabric network using docker swarm mode. Swarm mode provides a network across multiple hosts/machines for the communication of the fabric network components.
This post explains the deployment process https://medium.com/#wahabjawed/hyperledger-fabric-on-multiple-hosts-a33b08ef24f
How to setup hyperledger fabric v1 network on physical peers instead of docker peers?
You can take a look at https://github.com/yacovm/fabricDeployment
It deploys automatically to linux virtual machines / physical hosts:
A few peers, according to your configuration
A solo orderer
Everything with TLS
Creates a channel and installs and invokes example02 chaincode for sanity testing
The docker containers provide a mechanism to take care of a lot of configs that happens behind the curtain, and that is the preferred way. If you choose to use fabric directly over a server without Docker, one way would be to build the binaries yourself via the make command and take a look at the 1) shell script in getting started and the 2) Docker-compose file (in http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html) to deconstruct the steps and configs, but this will be a pretty involved process.
I followed the Hyperledger-composer tutorial
to install all components and everything went well.
I was able to create assets and participants and can interact with them via REST API Services.
However, after I rebooted the Fabric network all the assets and participants were gone and I have to recreate them.
Did I miss some settings in docker-composer.yaml or others for data persistence?
I did follow the instruction on page 16 about the "a Note on Data Persistence" to mount a dir into the container.
If you shutdown all Fabric nodes then you will lose all data. AFAIK Fabric does not yet have tools to replay the transaction logs from disk on restart of the entire Fabric. You should use Fabric support channels to confirm this however.