Hyperledger Explorer and Development Environment

Hyperledger Explorer and Development Environment

Recipe ID: hsts-r17

Self-paced training

We offer blockchain introduction, Hyperledger for system admin, Ethereum, Solidity, Corda R3, Hyperledger for developers, blockchain cybersecurity and more classes in self-paced video format starting at $60. Click here to learn more and register. For complete self-paced blockchain training, visit our Complete Blockchain Development Training page.

Recipe Overview

Hyperledger Explorer is a powerful utility that allows users to create user-friendly web-based applications. It is a blockchain dashboard and provides the ability to view, invoke, deploy, and query raw blockchain data and network information, including block details, chain codes, and transactions stored in the ledger.

For those who are not familiar with Hyperledger project, reading Blockchain Overview, Intro to Hyperledger Family and Hyperledger Blockchain Ecosystem, Hyperledger Design Philosophy and Framework Architecture, and Overview of Building Blockchain Smart Contracts in Hyperledger articles are strongly recommended beforehand.
After finishing this recipe, you can work on these recipes: i- Installing Hyperledger Explorer and Setting up the Database, ii- Configuring Hyperledger Explorer with Fabric, iii- Building Hyperledger Explorer, and iv- Running the Hyperledger Explorer Application

Hyperledger Explorer is a highly maintainable and open source browser that can be configured and built natively on macOS and Ubuntu. At the time of writing, Hyperledger Explorer has not yet gone live. The latest release, v0.3.8, supports Fabric v1.3.
It is common to encounter errors here and there, especially around issues related to versions and/or setting up environments. To save time while debugging, I have included notes along with recommended fixes, for some of errors you might run into while walking through this recipe.

The published official directory structure is a good starting point to examine the basic building blocks of Hyperledger Explorer. Take a look at the snapshot from the Hyperledger Explorer GitHub repository (https:/​/​github.​com/​hyperledger/​blockchain-​explorer) to learn more.

Hyperledger Explorer Directory and Components

The following screenshot shows the structure of the Hyperledger Explorer directory:
Hyperledger Explorer structure


In a nutshell, a Hyperledger Explorer application is composed of six key components:

Hyperledger Explorer Technical requirements

For stability, we will use Hyperledger Fabric v1.3 as the blockchain framework throughout this recipe. In order to install and run Hyperledger Explorer and other tools successfully, a system with the following minimum settings is required:

We will use the Amazon Ubuntu Server version 16.04 throughout this recipe. If you have not had much experience with Ubuntu in the Amazon cloud EC2, refer to the AWS documentation at the following link: https://aws.amazon.com/getting-started/tutorials/launch-a-virtual-machine/​

We found using Amazon EC2 environment convenient, especially for test drives or POCs. You may also install Ubuntu locally on your local machine if you prefer, but using a virtual machine is highly recommended to separate the Hyperledger Explorer running environment from other existing environments. This means that, if something unexpected happens, you have a way to recover and rebuild your environment quickly. Some information about setting up virtual machines can be found at the following links: http://www.psychocats.net/ubuntu/virtualbox or https://askubuntu.com/questions/142549/how-to-install-ubuntu-on-virtualbox

Setting up Hyperledger Explorer Development Environment

In this section, we will demonstrate how Hyperledger Explorer works with Hyperledger Fabric. Before we can do that, we will need to install all of the pre-requisites for Hyperledger Explorer and Hyperledger Fabric.
The following is a checklist of the required components along with their required versions:
For Hyperleger Explorer v0.3.8, you will need the following:

For Hyperledger Fabric v1.3, you will need the following:

Put Things Together

The following steps let you create a Hyperledger Explorer environment:
1. Install the Hyperledger Fabric v1.3 pre-requisites. If you have already got Hyperledger Fabric v1.3 successfully installed on your platform, skip this step and move on to step 2. If you have not yet installed Hyperledger Fabric, refer to Blockchain Developer Guide- How to Install Hyperledger Fabric on AWS and follow the instructions to install all of the necessary Fabricdependencies on the platform on which you will be running your Hyperledger Explorer application.

2. Install the Hyperledger Explorer App pre-requisites. Hyperledger Explorer requires Node.js to run. If you have already installed Hyperledger Fabric, you will have Node.js installed already. Hyperledger Explorer does not support Node.js v9.x yet, so if you have v9.x, it is recommended that you uninstall the v9.x version and re-install Node.js v8.x. Run the following command to verify the Node.js version on your system:

nodejs -v v8.15.0

3. Next, run the following command to install the latest jq version. When prompted, enter Y to proceed:

sudo apt-get install jq

Do you want to continue? [Y/n] Y

4. Lastly, install PostgreSQL from the Ubuntu repository. We will need v9.5 or greater. Run the following command and enter Y to proceed when prompted:

sudo apt-get install postgresql

Do you want to continue? [Y/n] Y

The following recipes are excellent resources for installing other Hyperledger tools:

Blockchain Developer Guide- How to Install and work with Hyperledger Sawtooth
Blockchain Developer Guide- How to Install Hyperledger Fabric on AWS
Blockchain Hyperledger Composer Business Network Modeling and Environment Setup
Blockchain Developer Guide- How to Install Hyperledger Burrow on AWS
Blockchain Developer Guide- How to Install Hyperledger Seth and Docker on AWS
Blockchain Developer Guide- How to Install Hyperledger Indy and Indy CLI on AWS

To conclude this recipe, we like to recommend our Blockchain Hyperledger Development in 30 hours course to those interested in pursuing a blockchain development career. Indeed, as of this writing, Hyperledger Foundation offers the following two Hyperledger certifications: The Certified Hyperledger Fabric Administrator (CHFA) and The Certified Hyperledger Sawtooth Administrator (CHSA), both of which are highly regarded in the industry. Hyperledger Foundation is in the process of creating Hyperledger Developer certification program, which may be released in early or middle of 2020. In short, by taking our hands-on online Hyperledger class, you would be able to obtain CHFA certification.

This tutorial is written by Brian Wu who is our senior Hyperledger instructor in Washington DC. His Hyperledger Cookbook with 40+ hands-on recipes is highly recommended.

Related Training Courses

Hands-on Node.JS, MongoDB and Express.js Training
Advance JavaScript, jQuery Using JSON and Ajax
Learn Hands-on Blockchain Ethereum Development & Get Certified in 30 Hrs
Learn Blockchain Hyperledger Development & Get Certified in 30 Hrs
Become Blockchain Certified Security Architect in 30 hours
Blockchain Certified Solution Architect in 30 hours
Introduction to Python Programming
Object Oriented Programming with UML

Private and Custom Tutoring

We provide private tutoring classes online and offline (at our DC site or your preferred location) with custom curriculum for almost all of our classes for $50 per hour online or $75 per hour in DC. Give us a call or submit our private tutoring registration form to discuss your needs.

View Other Classes!