Paul Marriott
3 min readMay 11, 2021

--

Setup Hyperledger on AWS — May 2021

Back in 2019 the setup for hyperledger was more complex than it is today. Things have now changed, it is easier to setup and more straight forward to get to grips with hyperledger.

My test setup is on AWS running a clean installation of hyperledger.#

LINK https://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html

Environment setup

On AWS setup TWO virtual machines inside a new VPC.

  1. Setup the VPC using the AWS wizard ‘VPC with a single public subnet’ is the base setup to choose.

2. Setup a VM in the VPC using the wizard from EC2

I chose Ubuntu as this is O/S has lots of good documentation for support and fixing issues
Check that it has the VPC created earlier and that auto-assign public IP is set
Beef up the disk size from 8 to 12
Setup a security group and setup for access over SSH and HTTP
Setup and ensure the keypair is downloaded

Once the instance is runnig, check you can connect and login. (Look at the AWS documentation for how to do this)

Login make sure you have the pem file
Server running, online and logged in

3. Repeat for another server…….once complete the servers are setup

4. On BOTH servers run the prerequisite steps from the hyperledger documentation https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html#linux

5. Install Go https://golang.org/doc/install

6. Logout and login the servers again to force the user to group changes to apply. If not done the next step will fail.

7. Install Hyperledger Fabric and Samples https://hyperledger-fabric.readthedocs.io/en/latest/install.html

Setup Fabric client and tools

  1. Install NODE and NPM on both servers. Look at the excellent installation docs online for these very common tools. After installation you should see

ubuntu@ip-10–0–0–76:~$ npm — version

6.14.4

ubuntu@ip-10–0–0–76:~$ node — version

v10.19.0

2. Now follow the instructions to install the NODE.JS Fabric SDK that will allow you to write programs that connect to and operate the blockchain https://github.com/hyperledger/fabric-sdk-node.

git clone https://github.com/hyperledger/fabric-sdk-node.git

After cloning the repo you should have a directory structure like this.

YOu will have the fabric-sdk-node alongside the actual fabric installation (in the ubuntu directory)

Complete the steps to install the SDK including the command npm install.

At this point the basic installation is finished. Repeat same steps on the other server. You can run the npm test steps to verofy the installation.

Run FABRIC examples

  1. Start here https://hyperledger-fabric.readthedocs.io/en/latest/getting_started_run_fabric.html

--

--