0% found this document useful (0 votes)
177 views

Instructions For Installation Hyperledger Composer On Ubuntu 16.04 LTS

The document provides instructions for setting up a development environment for Hyperledger Composer on an Ubuntu 16.04 server. It includes steps to install prerequisite software like Node.js, Docker, Docker Compose and Composer CLI tools. It also guides the user to download and run Fabric dev servers for testing Composer business networks on a local Hyperledger Fabric. Finally, it explains how to use the Composer Playground browser app to develop and test simple business networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views

Instructions For Installation Hyperledger Composer On Ubuntu 16.04 LTS

The document provides instructions for setting up a development environment for Hyperledger Composer on an Ubuntu 16.04 server. It includes steps to install prerequisite software like Node.js, Docker, Docker Compose and Composer CLI tools. It also guides the user to download and run Fabric dev servers for testing Composer business networks on a local Hyperledger Fabric. Finally, it explains how to use the Composer Playground browser app to develop and test simple business networks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Sourced from:

https://hyperledger.github.io/composer/latest/installing/development-tools.html

Remember to connect with Global Protect to establish your session with the ubuntu servers.

1
-------------------- Begin with these instructions

Login to a Ubuntu 16.04.6 LTS server as shown below.

cd $HOME
curl -O -k https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
-------- Results -------------------

dbpract@silver0:~$ cd $HOME

dbpract@silver0:~$ pwd

/home/dbpract

dbpract@silver0:~$ curl -O -k https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

100 4001 100 4001 0 0 17697 0 --:--:-- --:--:-- --:--:-- 17782

dbpract@silver0:~$ chmod u+x prereqs-ubuntu.sh

dbpract@silver0:~$ ls -l

total 129404

-rw-r--r-- 1 dbpract dbpract 8980 Mar 18 10:25 examples.desktop

-rw-rw-r-- 1 dbpract dbpract 132489256 Mar 19 11:42 go1.10.3.linux-amd64.tar.gz

2
-rwxrw-r-- 1 dbpract dbpract 4001 Mar 22 15:37 prereqs-ubuntu.sh

dbpract@silver0:~$ ./prereqs-ubuntu.sh

… (a lot of display values as it goes through the script, at the end it will show you the following in
yellow)

Installation completed, versions installed are:

Node: v8.15.1

npm: 6.4.1

Docker: Docker version 18.09.3, build 774a1f4

Docker Compose: docker-compose version 1.13.0, build 1719ceb

Python: Python 2.7.12

3
Please logout then login before continuing

Install Required Components

Do Not Use su or sudo. This may result in errors and a failed


installation.

npm install -g [email protected]

------------------------------

Note: If you encounter a lot of errors and warnings when running the npm above, then try to refresh the container
using the following commands. Then, try npm shown above again.

docker kill $(docker ps -q)

docker rm $(docker ps -aq)

docker rmi $(docker images dev-* -q)

4
npm install -g [email protected]

npm install -g [email protected]

5
npm install -g yo

6
Now, Install composer playground
npm install -g [email protected]

Step 3: Set up your IDE (note: I skipped this section for VSCode

Whilst the browser app can be used to work on your Business Network code, most
users will prefer to work in an IDE. Our favourite is  VSCode , because a Composer
extension is available.

1. Install VSCode from this URL: https://code.visualstudio.com/download

2. Open VSCode, go to Extensions, then search for and install the  Hyperledger
Composer  extension from the Marketplace.

7
----------------------------------------------------------

---------------- Continued with these steps

----------------------------------------------------------

mkdir ~/fabric-dev-servers && cd ~/fabric-dev-servers

curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-
dev-servers.tar.gz

tar -xvf fabric-dev-servers.tar.gz

8
Then, run these commands

export FABRIC_VERSION=hlfv12

./downloadFabric.sh

Controlling your dev environment


Starting and stopping Hyperledger Fabric

You control your runtime using a set of scripts which you'll find in  ~/fabric-dev-servers  if
you followed the suggested defaults.

The first time you start up a new runtime, you'll need to run the start script, then
generate a PeerAdmin card:

cd ~/fabric-dev-servers

export FABRIC_VERSION=hlfv12

./startFabric.sh

./createPeerAdminCard.sh

9
Results for createPeerAdminCard will appear as follows:

Note: You can start and stop your runtime using  ~/fabric-dev-servers/stopFabric.sh , and
start it again with  ~/fabric-dev-servers/startFabric.sh .

Instructions for shutting down Fabric, save this for later.

10
At the end of your development session, you run  ~/fabric-dev-servers/stopFabric.sh  and
then  ~/fabric-dev-servers/teardownFabric.sh . Note that if you've run the teardown script, the
next time you start the runtime, you'll need to create a new PeerAdmin card just
like you did on first time startup.

-----------------------------------

At this point, connect with the Chrome Browser.

http://192.168.200.24:8080

At this point, you can follow the instructutions for using Hyperledger Composer. For example, you
should be able to create a simple business network with participants, assests, transactions and events,
as was demonstrated at the end of the video.

Once you are done, then close the browser window, use Control+C to exit out of the program in Linux.

Then, run the shell script ./ stopFabric.sh to shutdown the fabric session.

11
12

You might also like