I've finished the Hyperledger Composer tutorial and successfully deployed/run it locally (with composer-rest-server).
Now I want to deploy it (eg. Google Cloud) so that I can show it to external people, but I feel confused about what to do now and haven't been able to find any good tutorial for this "next step".
Since composer is running on fabric, I guess I need to get fabric going - but that consists of many docker containers running. So I presume I should collect all that in a stackfile or similar (right?).
Question: How would you go about moving forward beyond deploying/running hyperledger fabric/composer locally and deploying it somewhere? (I understand that there are many ways of doing this but I would appreciate some general guidance as well as some concrete example)
If you are not concerned with scaling to a more robust deployment, and just want to host a small development environment on your favorite cloud platform, you can provision a VM that is configured similarly to the vagrant devenv that the team developing Fabric used before the availability of native support for Docker on Mac and Windows. Then you can simply use Docker Compose to spin up the fabric-samples/first-network tutorial network. It would be suitable for developing in the cloud.
If you are looking for a framework to deploy to various cloud platforms, you might look into use of the Cello Ansible driver. It has been tested against a few of the cloud providers.
Here is one path. Sign up for an IBM Bluemix account. You get one free cluster to play with. Follow the instructions here
https://ibm-blockchain.github.io/ for a cloud sandbox including the composer rest server.
You end up installing the .bna file using the installed playground.
I used the IBM cloud foundry template to create a simple Node site with a single page hitting the API exposed in the cluster. If you just want to show the blockchain you can just use the explore page that the Rest server exposes or use something like Postman to hit the API.
Note that they do not mention. The command line tools require Python 2.6 so I had to downgrade from 3.
IBM Bluemix offers the following with respect to Blockchain:
Hyperledger Composer based Solution Architecture here https://hyperledger.github.io/composer/introduction/solution-architecture.html
Hyperledger Composer Online Playground here https://hyperledger.github.io/composer/installing/getting-started-with-playground.html
You can deploy to live network using this IBM Blockchain Platform Recipe here https://ibm-blockchain.github.io/platform-deployment/
Sample Apps
Marbles App https://github.com/IBM-Blockchain/marbles
Fabrid Car App https://github.com/hyperledger/fabric-samples/tree/release/fabcar
Do go through the links and try it out.
Hope this helps.
Related
I am a newcomer to the Hyperledger world. While exploring the options to build the blockchain network, I came to the two options.
Hyperledger Cello
Minifabric (https://github.com/hyperledger-labs/minifabric/)
Both the projects are under the hyperledger-labs repo.
I like to understand the purposes of these 2 projects, I looking for an option that can help me to focus on the application layer/Chaincode rather than messing into the multihost network management.
by the way at last I need to deploy the project on production. Possibly I will be using on-premises machines and cloud VMs both. Also, I am looking for options to lay down the production network as well.
In addition to the excellent response by Kekomal, you might also want to consider looking at the free IBM Blockchain Platform extension for VSCode (can be found in the VSCode extensions marketplace). This is designed to help you focus on the application/chaincode layer and provides an inbuilt fabric you can use for testing
For your purpose, use Minifabric. I find it the simpler, faster and lighter way to start your development network to test your chaincodes.
Cello is more oriented to build and maintain your pre-production or production network as a service.
By the way, there is a third option that is building your network from Fabric docker images and Fabric tools, which is the best method to learn how your Fabric network really works. But, for your purpose, I would use Minifabric.
I've been studying the Hyperledger Fabric framework reading the docs for quite a while now but I'm getting a little lost in the middle of all that info. My question is: Is there any guidelines/"Step by step" on how to design a blockchain network from scratch? If you are starting a new project, where do you start?
Because I think I would understand it way more quicker if I actually started coding a little instead of reading and reading and reading...
Thanks a lot!
Edit 1:
I've chosen #kekomal answer as the correct one but I'd like to thank #Isha Padalia for the awesome VS Code extension and tutorial.
If you are really interested in learning and diving into Hyperledger Fabric, avoid byfn script. It performs a lot of magic for building a very simple Hyperledger Fabric network. After that, you have a network that you don't know how has been created and you have absolutely no idea of how to start deploying your custom network. There are daily questions here from people who started that way and are absolutely lost.
I find interesting this tutorial: https://medium.com/beyondi/setup-the-hyperledger-fabric-network-from-scratch-b82913b47549. Take into account that it is a little bit outdated.
You can complement it with this newer tutorial: https://www.blockchainexpert.uk/blog/how-to-deploy-hyperledger-fabric-network-from-scratch. Don't only run the steps. Analyze the files in https://github.com/blockchain-expert/hyperledger-fabric-network-from-scratch. Try playing with configtx.yaml, crypto-config.yaml and docker-compose files to customize your network and understand what you are doing.
Customize your organizations, your consortiums, your ordering service, your peers... Create your channels, join them, update your anchor peers... And understand what you are doing.
After that, if your network had one orderer, deploy a new one with more than one (with Raft consensus). If your network was using cryptogen, deploy a new one using Fabric-CAs instead. Or you can follow by playing with chaincodes.
NOTE: Apart from Hyperledger Fabric itself, it is essential to have basic notions of docker and PKI.
You are a beginner in Hypelredger fabric development then you have first cleared the concept of the orderer, peer, CA, and organization concept. And then first you have to start IBM Blockchain Platform VS Code extension for fabric. It will provide a local fabric environment to create, test and deploy a fabric smart contract. Also generate 1 peer, 1 orderer, 1 CA service under VS code environment.
Here is a link to start development with VS code extension.
Hope it will help you:)
hi #d3v9 start from here https://hyperledger-fabric.readthedocs.io/en/release-1.4/build_network.html. also you can find some great article on medium
Which framework is better to develop blockchain application for mobile.
Fabric or Iroha, what are the reason behind it ?
thanks in advance.
In my opinion Iroha is more suitable for building blockchain applications for mobile because Iroha is written in c++.
Iroha is a distributed ledger project, that aims to provide a development environment where C++ and mobile application developers could contribute to Hyperledger. The project seeks to complement Fabric, Sawtooth, and other potential projects, being a framework with pre-defined set of commands, permissions and queries that can be used with various client libraries to easily create applications for desktop and mobile platforms.
Key Characteristics
Permissioned network; written in C++; Client libraries in Java, Python, JS, Swift; BFT consensus algorithm YetAnotherConsensus (YAC); ready-to-use set of commands and queries, Multi-signature transactions.
It takes a minute to run iroha network. you can start your network by just copy and pasting this docker command in your terminal.
docker network create iroha-network
Whereas you can also use hyperledger fabric to build applications but the documentation is still not clear. you will find broken links and development on fabric will take more time.
Hyperledger Sawtooth, another blockchain platform, has a Swift SDK (for iOS apps) and a Java SDK (for Android apps).
Since more than one month, I am working on creating a multi Organization Hyperledger Fabric Application.
I started with Composer, used playground to test my business logic. Then deployed it to the Locally running Fabric Network and used the COMPOSER REST Server to interact with the Blockchain.
The problem started when I wanted to use my Node Application with this network. I can't get my head around participants, network cards, importing these cards, binding these cards, having a wallet for these cards, Activating these cards, enrolling them and doing all this from the NODE Application.
I want One tutorial which will help me connecting a NODE application to a Blockchain network with a Business card and explain everything in layman terms.
Bottom Line: I want to develop a node application, which will use the REST server-generated for the locally running Hyperledger Fabric using Composer. Any suggestion on End-to-End tutorials or step by step method to understand these concepts will be really appreciated.
what you need can be found here:
https://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html
it covers everything you need to create a fully fledged application using the node SDK. Make sure you follow all the resources including the Setting up your first network tutorial. The link is on that page.
The problem with composer is that it is not developed anymore by IBM:
https://lists.hyperledger.org/g/composer/message/125
as such I would not recommend you spend any more time on it.
So far I have followed the hyperledger developer tutorial, but I have a couple of questions basically the same I pressume. Let us assume that I have running my application as stated in the developer tutorial in machine A.
The first question is: How can I modify the ledger in machine A from B when they are in the same network?.
The second is: How can I modify the ledger in machine A from B when they are in different networks?.
The Composer Developer tutorial (and in fact all of the Compose tutorials) focus on the Composer aspects of developing and deploying a Business Network. They do not focus much on the Fabric issues of multi-org and multi machine. The Developer tutorial uses a very simple development Fabric of 1 Peer in 1 Organisation, and some automated scripts set this up for the developer to concentrate on the Model and the code.
For background on Hyperledger Fabric and experimentation with multi peer, multi org Fabrics I would suggest looking at the Fabric tutorials.
To get more of a view of Multi-Org from a Composer perspective I would suggest looking at the Composer Multi-Org Tutorial.
Be aware that the above 2 references simulate multi-org Fabrics, but actually run on a single machine for simplicity. There are other tutorials and blogs available in various places for running on multi-machine configurations e.g. https://www.skcript.com/svr/setting-up-a-blockchain-business-network-with-hyperledger-fabric-and-composer-running-in-multiple-physical-machine/