Skadoosh
Skadoosh

Reputation: 717

Is it possible to install different versions of binaries in Hyperledger Fabric at the same time?

I am trying out samples in Hyperledger Fabric and installed the binaries for version 1.4 using the "curl" command by adding "-s 1.4.0"

$ curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.4.0

This installs all the required binaries (cryptogen,configtxgen etc.. ).

Is it possible to install a set of binaries for a different version at the same time in the same machine (using command $ curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh| bash -s 1.1.0) If this is possible i could switch between two versions 1.1 and 1.4 for testing out the byfn network and the binaries wouldnt collide. Is it even possible or is there a way to do this ? Thanks

Upvotes: 1

Views: 254

Answers (2)

Shubham Chadokar
Shubham Chadokar

Reputation: 2773

Yes, you can use multiple version with a couple of modification.

Rename the bin folder as bin11 for v1.1.

Make a copy of byfn.sh file and rename it as byfn11.sh.
Update the bin folder path to the bin11 in the byfn11.sh.
Export the Image version to 1.1 before using the byfn11.sh, else it will use the latest fabric images.

you can make the above process simple by updating the bin path in byfn as variable. Like whenever the ImageVersion is 1.1 use bin11 else bin.

Use the above process with precaution, if you mix the image version and bin version then you might get some errors.

Upvotes: 2

Riki95
Riki95

Reputation: 726

Yes sure.

Use

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.4.0

to download 1.4.0 binaries in the folder you are right now. Next take the bin folder and move it somewhere else or just rename the folder in bin140.

Next use

curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s 1.1.0

And download 1.1.0 binaries. Do the same now for folder bin110.

Now you just need to change the blockchain script you are running, I don't know if it byfn.sh or a different one, but you can indicate the correct folder where to pick your binaries or use an environment variable to do so.

Upvotes: 1

Related Questions