Letter of Credit
In previous labs, you looked at the blockchain development environment, smart contracts, and middleware. In this lab, you’ll use and explore a real application. You’ll run the web browser-based application to create and manage the Letter of Credit business process.
To get started, create a Microsoft Word document (.docx) with the correct filename for this lab. You’ll be asked to enter text and paste screenshots into the lab report file.
NOTE: All screenshots MUST be readable. A screenshot that I cannot read (i.e. cannot read the text you are capturing) will not count for any points.
SECTION 1: Extending your development environment and installing the Letter of Credit software
Step 1.1: Extending your development environment
First, you’ll need to increase the available disk space for your development environment VM and install the Ubuntu desktop.
1. Before you start this lab, make sure that you view the lab video and increase the disk space available to your VM. You need that extra space to successfully complete this lab.
2. Follow the video instructions to expand your Hyperledger VM disk space to at least 20 GB.
3. Open Oracle VM Virtualbox Manager (in Windows)
4. Follow the video instructions to increase the Hyperledger VM’s memory (suggested: 4GB)
a. Settings -> System -> Motherboard Tab -> Base Memory
5. Add an optical drive to the VM
a. Settings -> Storage -> Adds optical drive (next to Controller: IDE) -> Choose disk
b. Select VBoxGuestAdditions.iso -> OK
i. You may have to search for the file. It should be in your VirtualBox installation directory.
6. Start the Hyperledger VM (click Start)
7. Login to the Hyperledger VM console window
a. Login: vagrant
b. Password: vagrant
8. $ sudo apt-get install ubuntu-desktop
9. When step 6 finishes shutdown the Hyperledger VM.
a. NOTE: This process will take a while and the screen will go black in the process – just click on the VM and press any key to display the screen and process progress.
Step 1.2: Install the Letter of Credit sample application
First, you need to fork the sample applications repository on github.com.
1. In a browser (in Windows) go to: https://github.com/hyperledger/composer-sample-applications
2. Sign up or log in (use the same GIT ID you set up or used in Lab 01.)
3. Click Fork
Next, you’ll launch and log into your development environment.
4. Open Oracle VM Virtualbox Manager (in Windows)
5. Start the Hyperledger VM (click Start)
6. Login to the Hyperledger VM desktop (Click vagrant, enter ‘vagrant’ for the password.)
7. Click Search your computer -> type terminal, then click Terminal
8. $ cd $GOPATH/src/github.com/hyperledger
a. Make sure that you use YOUR GIT ID in the above command
10. $ cd composer-sample-applications/packages/letters-of-credit
11. Create a screenshot of the results of steps 8-10, and paste that screenshot into your Lab Report File
12. $ ./installer/install.sh
13. Create a screenshot of the results of step 12, and paste that screenshot into your Lab Report File.
Step 1.3: Run the Letter of Credit application
Next, you’ll run the application and follow the process of managing a Letter of Credit.
1. (Chapter 7 Step 1) Click the Alice tab.
2. Click Apply for a Letter of Credit
3. Click Edit
4. Enter the TYPE, QUANTITY, and PRICE PER UNIT data from Step 2 in Chapter 7.
a. Instead of “Computer” for the TYPE field, enter YOUR_FIRST_NAME’s computer
b. (For example, mine would be “Michael’s computer”)
5. Click Save
6. Create a screenshot that shows the TYPE, QUANTITY, and PRICE PER UNIT data you just saved, and paste that screenshot into your Lab Report File.
7. Click Start approval process, then click yes
8. Click the Matias tab
9. Click the Ref number of the Letter of Credit Application
10. Click I accept the application, then click yes
11. Create a screenshot that shows the Letter of Credit Status, and paste that screenshot into your Lab Report File.
12. Click the Ella tab
13. Follow the instructions in your text (Chapter 7) to accept the application
14. Click on the Bob tab
15. Follow the instructions in your text (Chapter 7) to accept the application
16. Click the button to Ship Product (select the invoice to upload)
17. Create a screenshot that shows that the product has been shipped, and paste that screenshot into your Lab Report File.
18. Click the Alice tab
19. Click the button to Receive Product
20. Click the Matias tab
21. Click the Ref number of the Letter of Credit Application
22. Click Ready for Payment, then click yes
23. Click the Ella tab
24. Click the Ref number of the Letter of Credit Application
25. Click Close this Letter of Credit, then click yes
26. Click the Bob tab
27. Create a screenshot that shows that the payment has been made, and paste that screenshot into your Lab Report File.
Section 2: Wrapping up
Now that you have installed and run the Letter of Credit application, you need to properly shutdown your business network.
1. Close the web browser
2. Select Settings in your VM, select Shutdown -> Shut Down
3. Create a snapshot of your Ubuntu VM in VirtualBox. This allows you to easily restore to this point if you ever need to “undo” subsequent steps and return to a known point.
You should have 6 screenshots in your Lab Report File.