Instructions For Installation Hyperledger Composer On Ubuntu 16.04 LTS
Instructions For Installation Hyperledger Composer On Ubuntu 16.04 LTS
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
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:~$ ls -l
total 129404
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)
Node: v8.15.1
npm: 6.4.1
3
Please logout then login before continuing
------------------------------
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.
4
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.
2. Open VSCode, go to Extensions, then search for and install the Hyperledger
Composer extension from the Marketplace.
7
----------------------------------------------------------
----------------------------------------------------------
curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-
dev-servers.tar.gz
8
Then, run these commands
export FABRIC_VERSION=hlfv12
./downloadFabric.sh
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 .
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.
-----------------------------------
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