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.
- 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
Once the instance is runnig, check you can connect and login. (Look at the AWS documentation for how to do this)
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
- 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.
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