Skip to content

Instantly share code, notes, and snippets.

@jorgedison
Created December 26, 2019 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jorgedison/01c1b80b68e54531748c68244cc7bd0d to your computer and use it in GitHub Desktop.
Save jorgedison/01c1b80b68e54531748c68244cc7bd0d to your computer and use it in GitHub Desktop.

enter image description here

Prerequisitos

- SO Ubuntu 18.04
- NodeJs 8.11.x
- PostgreSQL 10.x
- Jq 1.5.x
- Red Blockchain Hyperledger Fabric iniciada

Instalacion NodeJs

curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs

Instalación PostgreSQL

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt update
sudo apt -y install postgresql postgresql-contrib

Instalación Jq

sudo apt install jq

Hyperledger Explorer

git clone https://github.com/hyperledger/blockchain-explorer.git
cd blockchain-explorer/app

Configuración base de datos

vim explorerconfig.json
cd blockchain-explorer/app/persistence/fabric/postgreSQL
chmod -R 775 db/
./createdb.sh

Verificación base de datos

sudo -u postgres psql

enter image description here enter image description here

Configuración Hyperledger Explorer

cd blockchain-explorer/app/platform/fabric
vim config.json

enter image description here

cd blockchain-explorer/app/platform/fabric/connection-profile/
cp first-network.json acme-network.json
vim acme-network.json
Modificar las siguientes variables de acuerdo a sus llaves generadas en Hyperledger fabric
"adminPrivateKey"
"signedCert"
"tlsCACerts"

enter image description here

Build Hyperledger Explorer

cd blockchain-explorer
npm install
cd blockchain-explorer/app/test
npm install
npm run test
cd client/
npm install
npm run test:ci -- -u --coverage
npm run build

Iniciar Hyperledger Explorer

cd blockchain-explorer
./start.sh

Via Browser

http://[IP]:8080
Usuario: adminUser
Contraseña: adminPassword

enter image description here enter image description here

Referencia: https://github.com/hyperledger/blockchain-explorer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment