Set up your development environment

BLCN532 Lab 1

Set up your outgrowth environment

V2.2

Introduction

This method introduces novices to blockchain outgrowth for operation environments. Precedently you can enucleate software collisions, you demand to supervene your outgrowth environment is in settle. That resources you’ll demand all the tools and infrastructure naturalized and configured to influence operation blockchain software outgrowth designs.

In this lab you’ll set up your own Hyperledger Fabric outgrowth environment and invest the method software from the passagebook. When you accomplish this lab, you’ll feel a instituted outgrowth environment and conciliate be detached to rouse general and differing blockchain collisions.

The instructions in your passagebook are for Mac and Linux computers. However, there is no answer-for that your investation of MacOS or Linux is liberaly consonant behind a while the environment in which the orders from the passagebook production truly. For that deduce, I STRONGLY SUGGEST that you profit an Ubuntu 16.04 Implicit Muniment (VM) for your labs. Using an Ubuntu 16.04 VM conciliate shape the labs far easier to accomplished.

The instructions in this method’s labs suppose that your computer runs the Windows uncounted regulate. If you run MacOS or Linux, you can get Vagrant and VirtualBox for those uncounted regulates and supervene the substance of the “Initial setup for Windows computers”.

Lab Deliverables:

To accomplished this lab, you must fashion a Lab Noise finish and comply the finish in iLearn. The Lab Noise finish must be a Microsoft Word format (.docx), and feel the finishindicate behind a while the superveneing format:

BLCN532_SECTION_STUDENTID_LASTNAME_FIRSTNAME_Lab01.docx

· SECTION is the individuality calculate of your vulgar method (2 digits)

· STUDENTID is your novice ID calculate (behind a while qualitative zeros)

· LASTNAME is your definite indicate, FIRSTNAME is your earliest indicate

To get rouseed, fashion a Microsoft Word muniment (.docx) behind a while the reform finishindicate for this lab. You’ll be asked to penetrate passage and paste protectshots into the lab noise finish.

NOTE: All protectshots MUST be readable. Use the Ubuntu Protect Capture advantageousness (see the lab video.) Shape firm that you address each protectshot (i.e. Tramp 2.1.3) and afford protectshots in regulate. For orders that fruit lots of output, I singly insufficiency to see the definite liberal protect when the order accomplishes. Afford FULL protectshots, NOT cropped images.

SECTION 1: Initial setup for Windows computers (Chapter 3)

Step 1.1: Invest Oracle Virtualbox (Windows, Linux, MacOS)

Oracle Virtualbox is an unreserved cause implicitization environment that allows you to run multiple implicit muniments and containers on a unique personal computer. Virtualbox is detached and it is quiet to invest.

In your cosset web browser, depart to: https://www.virtualbox.org/ and click the “Download Virtualbox” pin. Click the “Windows hosts” combine to download the deep investation executable. You should so click the “All influenceed platforms” underneath the “Extension Pack” name to download extra software influence for devices.

After you download the two finishs, embrace click each one to run the invest progress.

Step 1.2: Invest Vagrant (Windows, Linux, MacOS)

Vagrant is a detached implicit environment administration advantageousness. It shapes the rule of rouseing, abeyance, and managing implicit muniments easier. In your web browser, depart to https://www.vagrantup.com/ then click the “Download” pin, and click the statement of the Windows executable you’d affect to invest. (Most of you should selecteded the “64-bit” statement.)

Once you download the invest program, embrace-click the finish you uplawful downloaded to invest Vagrant.

If you insufficiency over advice on Vagrant and tips on getting the most out of the software, depart to:

https://www.sitepoint.com/getting-started-vagrant-windows/ .

Step 1.3: Set up your Vagrant design

After investing all the pre-requioffice pieces, you demand to set up your Vagrant design. A Vagrant design defines your implicit muniment environment and accelerations you adtrue your store of VMs into a clump that is quiet to train.

We’ll use the Windows PowerShell as our Windows order responsive environment. PowerShell is a very masterful order continuity interface that is profitable on all Windows computers.

To enlarge PowerShell, click the Windows key, model PowerShell, then click the Windows PowerShell menu beginning. The form underneath shows a intesecurity of the Windows PowerShell order responsive window.

PowerShell uses your user’s residence directory as its rouseing directory. In my event, C:\Users\micha is my residence directory. For the security of the lab, I’ll object to this a %HOME%. Your %HOME% conciliate be incongruous.

1.3.1: Carry stout Vagrant designs

Follow these tramps ONLY if you aldetached feel a preceding Vagrant design you insufficiency to carry: (Assume the design you insufficiency to carry is located in the %HOME%\vagrant\Hyperledger directory.)

If you DO NOT feel an stout Vagrant design that you demand to carry, spring to individuality 1.3.2.

1. PS %HOME%\vagrant\Hyperledger> vagrant global-status

Note the id of the listed VM(s). You’ll use this id in the present order, in settle of xxxxxxx.

2. PS %HOME%\vagrant\\Hyperledger> vagrant undo xxxxxxx

3. PS %HOME%\vagrant\\Hyperledger> vagrant box carry ubuntu/xenial64

1.3.2: Fashion a new Vagrant design for Hyperledger

Launch PowerShell and penetrate the superveneing orders: (Don’t model ‘PS %HOME%>’, that’s uplawful the PowerShell responsive. Uplawful model the offices in daring.)

1. PS %HOME%> mkdir vagrant

2. PS %HOME%> cd vagrant

3. PS %HOME%\vagrant> mkdir Hyperledger

4. PS %HOME%\vagrant> cd Hyperledger

5. PS %HOME%\vagrant\Hyperledger> vagrant init kelly219design/ubuntu-xenial-16.04-gui-desktop-base

Make firm that you penetrate the continuity aloft as ONE LINE at the PowerShell responsive

6. Go to the Blackboard office (ucumberlands.blackcoard.com) and login.

7. Navigate to this method (BLCN532) -> Content for this week, Lab01.

a. Download the Vagrantfile finish and representation it to the %HOME%\vagrant\Hyperledger directory. (This conciliate overtranscribe the Vagrantfile that was aldetached there.)

8. PS %HOME%\vagrant\Hyperledger> vagrant up

NOTE: To bung your VM model vagrant halt in PowerShell

Section 2: Invest Pre-requisites (Chapter 3)

Once you feel an uncounted Linux VM, you can rouse to invest the Hyperledger Fabric pre-requisites. In this individuality you’ll invest all the software and outsequence pieces indispensable to run the assort operation blockchain collision in Hyperledger Fabric.

Step 2.1: Invest pre-reqs

2.1.1: Invest dev tools

1. If you feeln’t rouseed your VM, do the superveneing:

a. Unreserved Windows PowerShell, then depart to your Hyperledger design directory.

b. PS %HOME%\vagrant\Hyperledger> vagrant up

2. Login to your VM using the username: vagrant and password: vagrant

3. Click “Search your computer” (excellent left retreat icon), then model terminal.

4. Click on the Marginal icon to enlarge a marginal behind a while a shell responsive.

You model all the superveneing orders in your Linux VM (at the Marginal order responsive.)

Don’t model the ‘$’ office. That is the responsive office of a ordinary user to remind you that this is a order you should penetrate in Linux. When you see a ‘#’ office, that indicates you are in an raised prerogative shell. And the ‘>’ office indicates you’re in PowerShell. Pay notice to the responsive offices - they confer you precious advice environing your vulgar treatment.

5. $ sudo apt-get update

6. $ sudo apt-get invest libltdl-dev

When you boot your VM, the uncounted regulate automatically tries to download and invest weighty patches. ANY TIME YOU ISSUE an apt-get update OR invest order, you capability see an fault that looks affect this:

E: Could not get lock /var/lib/dpkg/lock-frontend - unreserved (11: Recause temporarily settled)

E: Unable to profit the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another rule using it?

Until the contrast updater rule accomplishes the apt-get order conciliate confer you faults. If you see these faults in ANY LAB, uplawful continue for 15 minutes or so, and try it again. (Sometimes slower VMs or Internet connections may product in a longer continue period - up to 45 minutes or so.)

2.1.2: Invest Docker-CE

You can discover accomplished Docker-CE instructions/docs at: https://docs.docker.com/install/linux/docker-ce/ubuntu/

1. $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

2. $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Make firm that you penetrate the continuity aloft as ONE LINE in Linux

3. $ sudo apt-get update

4. $ sudo apt-get invest docker-ce docker-ce-cli containerd.io

2.1.3: Invest Docker compose

1. $ sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uindicate -s)-$(uindicate -m)" -o /usr/local/bin/docker-compose

2. $ sudo chmod +x /usr/local/bin/docker-compose

3. $ docker-compose statement

4. $ date

5. Fashion a protectshot of the products of tramps 1 - 4 and paste it into your Lab Noise File.

2.1.4: Invest vocation netproduction pre-reqs

1. $ curl -O https://hyperledger.github.io/composer/latest/prereqs-ubuntu.sh

2. $ chmod u+x prereqs-ubuntu.sh

3. $ ./prereqs-ubuntu.sh

4. $ date

5. Fashion a protectshot of the products of tramps 1 - 4 and paste it into your Lab Noise File.

>>> Logout (use the attribute icon in the excellent lawful retreat) and log end in precedently persistent.

2.1.5: Invest GO phraseology

The present tramp is to invest the GO programming phraseology. You’ll use GO to transcribe and differ cause mode finishs for the assort blockchain collision.

1. $ sudo apt-get update

2. $ wget https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz

3. $ tar xvf go1.12.1.linux-amd64.tar.gz

4. $ nano ~/.profile

5. In the nano editor, add the superveneing 2 continuitys behind the definite continuity in the finish:

export GOPATH=$HOME/go

export PATH=$PATH:$GOPATH/bin

6. Snatch your finish and egress nano

7. $ cause .profile

8. $ go statement

9. $ date

10. Fashion a protectshot of the products of tramps 1 - 9 and paste it into your Lab Noise File.

Step 2.2: Invest cause mode and set up vocation network

In this tramp you download and invest the assort collision cause mode and set up the vocation network.

2.2.1: Forking and Cloning the employment-finance-logistics repository

1. In a browser (in Windows) go to: https://github.com/HyperledgerHandsOn/trade-finance-logistics

2. Sign up or log in

3. Click Fork

You model all the superveneing orders in your Linux VM (at the order responsive.)

4. $ cd $GOPATH/src

5. $ git clone https://github.com/YOUR_GIT_ID/trade-finance-logistics.git

6. $ cd $GOPATH/src

7. $ mkdir -p github.com/hyperledger

8. $ cd github.com/hyperledger

9. $ git clone https://github.com/hyperledger/fabric.git -b release-1.1

10. $ cd fabric

11. EDIT FILES *****

a. $ nano Makefile

b. Discover the continuity rouses behind a while CHAINTOOL_RELEASE (hint: use CTRL-W to pursuit)

c. Change the continuity you uplawful ground to this: CHAINTOOL_RELEASE=1.1.3

d. Discover the continuity that rouses behind a while CHAINTOOL_URL (hint: use CRTL-W to pursuit)

e. Change the continuity you uplawful ground to this: CHAINTOOL_URL ?= https://hyperledger.jfrog.io/hyperledger/fabric-maven/org/hyperledger/fabric-chaintool/$(CHAINTOOL_RELEASE)/fabric-chaintool-$(CHAINTOOL_RELEASE).jar

NOTE: The continuity aloft should be on a SINGLE LONG LINE (don’t rend up the continuity into multiple continuitys)

f. Snatch the finish (hint: use CRTL-O to transcribe the finish)

g. Egress the nano editor (hint: use CTRL-X to egress)

h. $ nano images/javaenv/Dockerfile.in

i. Discover the continuity that rouses behind a while && curl -fsSL https://nexus.hyperledger.org

j. Change the continuity you uplawful ground to this: && curl -fsSL https://repo1.maven.org/maven2/org/apache/maven/apache-maven/$MAVEN_VERSION/apache-maven-$MAVEN_VERSION-bin.tar.gz \

NOTE: The continuity aloft should be on a SINGLE LONG LINE (don’t rend up the continuity into multiple continuitys)

k. Snatch the finish (hint: use CRTL-O to transcribe the finish)

l. Egress the nano editor (hint: use CTRL-X to egress)

12. $ shape docker

13. $ shape configtxgen cryptogen

14. $ git clone https://github.com/hyperledger/fabric-ca.git

15. $ cd fabric-ca

16. $ shape docker

17. $ date

18. Fashion a protectshot of the products of tramps 1 - 17 and paste it into your Lab Noise File.

2.2.2: Produce netproduction cryptographic material

1. $ cd $GOPATH/src/trade-finance-logistics/network

2. $ nano ~/.profile

change definite continuity to this (all on 1 continuity, not 2):

export PATH=$PATH:$GOPATH/bin:$GOPATH/src/github.com/hyperledger/fabric/build/bin:$GOPATH/src/github.com/hyperledger/fabric/build/docker/bin

3. Snatch finish and egress nano

4. $ cause ~/.profile

5. $ cryptogen produce --config=./crypto-config.yaml

6. $ date

7. Fashion a protectshot of the products of tramps 1 - 6 and paste it into your Lab Noise File.

2.2.3: Produce machine artifacts

1. $ cd $GOPATH/src/trade-finance-logistics/network

2. Execute the supervene orders OR run the employment.sh script (AFTER tramp 9)

3. $ mkdir -p machine-artifacts

4. $ configtxgen -profinish FourOrgsTradeOrdererGenesis -outputBlock ./channel-artifacts/genesis.block

5. $ configtxgen -profinish FourOrgsTradeChannel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID employmentchannel

6. $ configtxgen -profinish FourOrgsTradeChannel -outputAnchorPeersUpdate ./channel-artifacts/ExporterOrgMSPanchors.tx -channelID employmentmachine -asOrg ExporterOrgMSP

7. $ configtxgen -profinish FourOrgsTradeChannel -outputAnchorPeersUpdate ./channel-artifacts/ImporterOrgMSPanchors.tx -channelID employmentmachine -asOrg ImporterOrgMSP

8. $ configtxgen -profinish FourOrgsTradeChannel -outputAnchorPeersUpdate ./channel-artifacts/CarrierOrgMSPanchors.tx -channelID employmentmachine -asOrg CarrierOrgMSP

9. $ configtxgen -profinish FourOrgsTradeChannel -outputAnchorPeersUpdate ./channel-artifacts/RegulatorOrgMSPanchors.tx -channelID employmentmachine -asOrg RegulatorOrgMSP

OR (Instead of typing the orders aloft, the cause affords a script to do it all)

1. $ ./trade.sh produce -c employmentchannel

Troubleshooting acceleration:

· If you assault problems behind a while your blockchain netproduction in this lab or advenient labs, the ./trade.sh script may acceleration you dictate them. If you are getting faults when perplexing to enlarge or interact behind a while your network, try these orders at the Ubuntu order responsive:

· ./trade.sh down # If your netproduction is up and general

· ./trade.sh clean

· ./trade.sh produce -c employmentchannel

· ./trade.sh up

2.2.4: Enlarge the illustration employment network

There are two ways to enlarge the illustration employment network, using the docker-compose order straightway, or by using the cause-supplied trade.sh shell script. We’ll use the shell script in most of our activities.

1. $ cd $GOPATH/src/trade-finance-logistics/network

2. $ ./trade.sh up

3. $ date

4. Fashion a protectshot of the products of tramps 1 - 3 and paste it into your Lab Noise File.

Step 2.3: Verifying your vocation network

The definite tramp in this lab is to authenticate that your vocation netproduction is up and general.

1. Unreserved a new marginal window in your Vagrant Hyperledger VM. Click “Search your computer” (excellent left retreat icon), then model terminal, then click the Marginal icon.)

2. Penetrate the superveneing order:

3. $ docker ps -a

4. $ date

5. Fashion a protectshot of the products of tramps 2 - 4 and paste it into your Lab Noise File.

6. The earliest column in the preceding output is the “container-ID”. Discover the container-ID for the regulateer rule, and use it for the superveneing order: (Don’t model the “<” or “>” offices)

7. $ docker logs <container-ID>

8. Fashion a protectshot of the products of tramp 7 and paste that protectshot into your Lab Noise File.

Section 3: Wrapping up

Once you feel your netproduction up and general, the singly tramp to accomplished is to understand how to truly confinedown your vocation network.

1. Confine down the vocation netproduction in Linux:

2. $ ./trade.sh down

3. Egress from your Linux Marginal order responsive(s) (i.e. terminate any unreserved Marginal windows.)

4. $ exit

5. In Windows PowerShell, confine down your Hyperledger implicit muniment:

9. PS %HOME%\vagrant\Hyperledger> vagrant halt

10. Fashion a snapshot (NOT A SCREENSHOT) of your Ubuntu VM in VirtualBox. This allows you to amply securityore to this object if you constantly demand to “undo” after tramps and requite to a public object.

a. PS %HOME%\vagrant\Hyperledger> vagrant snapshot snatch EndOfLab01

You should feel 8 protectshots in your Lab Noise File. Snatch your finish and comply it in iLearn as a finish charity for the Lab 1 provision.

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency