I am new to Hyperledger Fabric. I need to set up the Hypeledger Fabric development environment on my local machine (Ubuntu 16). As Fabric is dockerized, I want to know how can I set it up on my local machine. I have tried searching for a tutorial but there isn't one.
I am making a production level project so I cannot rely on Docker, please guide me on local machine setup (docker independent).
Hyperledger Fabric documentation is very user-friendly however it does not provide information on setting environments locally. Previous questions on Stack Overflow are not serving my purpose.
Based on this Fabric tutorial, you can extract these commands from shell script and docker-compose file, then run them on your local machine.
First, you must have two config files:
crypto-config.yaml
andconfigtx.yaml
. You can find them on the directory:fabric-samples/first-network/
Using
crypto-config.yaml
to generate the public key, private key, certificate and etc.Consuming
configtx.yaml
file to generate genesis block and so on.You can manually generate the certificates/keys and the various configuration artifacts using the
configtxgen
andcryptogen
commands.1)
2)
3) configure
orderer.yaml
andcore.yaml
, you can get it from this4) update these two file with real keys and certs.
5)
6)
Up to now, the fabric network is on. Then you can create & join channel, or do other operations.
If you have any confision about this, let me know. Good luck.
You must use Fabric with Docker if you deploy to production. For testing purposes, you can follow this for a docker-free local version and can use this for a docker-free browser version.
You can setup Fabric network on your local machine without Docker if fabric modules peer and orderer are compiled on your Ubuntu. In fact, local compilation is recommended in production.
Not sure if you're still looking but I put together a project https://github.com/chainforce/native-fabric that uses Fabric natively (on OSX) without even Chaincode container. A sample chaincode is written in Go and deployed with Go Plugin as a System Chaincode. You may find more info on System Chaincode from Fabric document, but basically it can do what Docker-based chaincode can do and more.