Skip to content
James Taylor edited this page Feb 1, 2021 · 9 revisions

microfab

Running microfab with the latest Fabric binaries (tbc)

In the fabric repo...

TARGET=linux-amd64 RELEASE=unstable ./ci/scripts/create_binary_package.sh

Should create hyperledger-fabric-linux-amd64-unstable.tar.gz (and cause a mess because the script moves things!)

Untar the contents in a fabric-unstable directory where you want to run microfab.

Add the ca release to the fabric-unstable directory...

curl -sSL https://github.com/hyperledger/fabric-ca/releases/download/v1.4.9/hyperledger-fabric-ca-linux-amd64-1.4.9.tar.gz | tar xzf - -C ${PWD}/fabric-unstable

Edit core.yaml if required, e.g. add

peer:
    gateway:
        enabled: true
# ...

ledger:
  # ...
  snapshots:
    # Path on the file system where peer will store ledger snapshots
    rootDir: /opt/microfab/data/snapshots

Set the MICROFAB_CONFIG environment variable and start microfab with...

docker run --name microfab --rm -v ${PWD}/fabric-unstable:/opt/fabric -p 8080:8080 -e MICROFAB_CONFIG ibmcom/ibp-microfab

Or for moar orgs...

export MICROFAB_CONFIG='{
    "ordering_organization": {
        "name": "Orderer"
    },
    "endorsing_organizations":[
        {
            "name": "Org1"
        },
        {
            "name": "Org2"
        },
        {
            "name": "Org3"
        }
    ],
    "channels":[
        {
            "name": "mychannel",
            "endorsing_organizations":[
                "Org1",
                "Org2",
                "Org3"
            ]
        }
    ],
    "capability_level":"V2_0"
}'

Clone this wiki locally