Saai 2 Ex 00

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Exercises Guide

Exercise 0. Setting up your hands-on


environment
Estimated time
01:00

Overview
This exercise guides you through the setup of your workstation before you perform the exercises
in this course.

Introduction
Before you can perform the exercises in this course, you must set up your environment, which
includes creating an account on IBM Cloud to access the IBM Watson services and setting up your
workstation with the tools that you need to perform the exercises, such as Postman, cURL,
Node.js, Git, and a text editor.

Objectives
After completing this exercise, you should have:
• An IBM Cloud Lite account.
• Postman installed on your workstation.
• cURL installed on your workstation.
• Node.js installed on your workstation.
• IBM Cloud CLI installed on your workstation
• Git installed on your workstation.
• A text editor installed on your workstation.

© Copyright IBM Corp. 2021 1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Exercise instructions
In this exercise, you complete the following tasks:
__ 1. Create a free IBM Cloud account (IBM Cloud Lite account).
__ 2. Download and install Postman.
__ 3. Download and install cURL.
__ 4. Download and install Node.js.
__ 5. Download and Install IBM Cloud CLI
__ 6. Download and install Git.
__ 7. Download and install a text editor.

Part 1. Creating a free IBM Cloud account (IBM Cloud Lite account)
In this part, you create an IBM Cloud Lite account. This account gives you access to the IBM
Cloud resources that you need to perform the exercises. This account never expires, so you can
continue to use it after the class. For more information about an IBM Cloud Lite account, see
Introducing the IBM Cloud Lite account.

Important: The following list specifies the minimum required browser software for IBM Cloud:
• Chrome: The latest version for your operating system.
• Firefox: The latest regular and ESR versions for your operating system. For more information,
see Mozilla Firefox Extended Support Release.
• Microsoft Edge: The latest version for Windows.
• Safari: The latest version for MacOS.

Note: If you already have an IBM Cloud account, skip to Part 2. “Downloading and installing
Postman”.

You must register with IBM Cloud by providing a valid email address. Your email address acts as
your username for IBM Cloud, and you provide a password for it. The email address that you use
to register with IBM Cloud and the password that you provide on registration also become your
IBM ID. You can use this IBM ID to log in to other IBM websites that require you to enter your IBM
ID and password.
When you sign up to IBM Cloud, you are prompted for your demographic information (such as
your name and country). An email is sent to the email account that you provide in the registration
to confirm that your email account is valid and active.

© Copyright IBM Corp. 2021 2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Complete the following steps:


__ 1. Go to the IBM Cloud website at https://cloud.ibm.com/login

__ 2. Click Create an account.


__ 3. Complete the Create an IBM Cloud account form by entering your information.

Note: You must use a valid email for signing up to IBM Cloud because IBM Cloud sends you an
email to verify your account.

© Copyright IBM Corp. 2021 3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 4. Click Next.
__ 5. A 7-digit verification code is sent to the email account that you used to create the IBM
Cloud account. Enter the verification code and click Next.

© Copyright IBM Corp. 2021 4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 6. After you successfully verify your email account, add your personal information and click
Next.

__ 7. Click Create Account

© Copyright IBM Corp. 2021 5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Important: If you already have an IBM ID that is associated with your email, the following window
opens.

If you already have an IBM Cloud account, click Log in to verify that you can access IBM Cloud.

© Copyright IBM Corp. 2021 6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 8. Wait until your account is successfully created.

__ 9. Next, the IBMid account privacy notice page opens.


__ 10. Read and acknowledge the notice and click Proceed.

© Copyright IBM Corp. 2021 7


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 11. You should now be logged in and redirected to your account’s dashboard. If not, confirm
that you can log in to IBM Cloud:
__ a. Click Log in.
__ b. Enter the email and password that you used to register to IBM Cloud. You should
be able to access the environment.
© Copyright IBM Corp. 2021 8
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

You now successfully signed up for an IBM Cloud account. You are ready to log in to IBM Cloud
when directed to do so by the exercises in this course. Close the browser.

Part 2. Downloading and installing Postman


Postman is a collaboration platform for API development. The Postman features simplify each step
of building an API and streamline collaboration so you can create better APIs faster.
Postman is used in some of the exercises to issue API calls to the Watson services, send or
upload data to the Watson services, and receive information back from the services.

Note: If Postman already is installed on your workstation, skip to Part 3.”Downloading and
installing cURL”

To download and install Postman, complete the following steps:


__ 1. Go to the Postman downloads website.
__ 2. Select the installer for your operating system.
__ 3. For more steps about how to install Postman, go to the Postman learning center website.

© Copyright IBM Corp. 2021 9


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Part 3. Downloading and installing cURL


cURL is a command-line tool for transferring data by using various protocols. One of the most
popular protocols is HTTP, which is used to receive information from or upload data to web
servers.
cURL is used in some of the exercises as an optional way to issue API calls to the Watson
services, send or upload data to the Watson services, and receive information back from the
services. It provides a simple approach to test Watson services without having to write any code to
experience how the APIs work.

Important: To check whether cURL is already installed on your workstation, open a command
prompt (Windows) or terminal (MacOS), type curl –V and press Enter.
If the response is like the following output, then cURL is already installed in your workstation. You
can skip to Part 4, “Download and install Node.js”.

Installing cURL on a Windows workstation

To download and install cURL on Windows, complete the following steps:

__ 1. Access the cURL download wizard.


__ 2. Click curl executable under the “Select Type of Package” section.

__ 3. Select your operating system from the Show package for: drop-down menu and then click
Select.

Note: The following figures show the installation for Window 64-bit as an example. Follow the
equivalent steps for your operating system.

© Copyright IBM Corp. 2021 10


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 4. Under Show package for: select Generic and then click Select!

__ 5. Follow the prompts and select the specific options for your operating system. Accept the
defaults if you do not know which options are more suitable for you.
__ 6. The installation wizard recommends an executable file that best fits your choices. Make

sure to select the SSL-enabled version of cURL and click the green download ( )
button to start the cURL executable file download.

Note: For Windows, you might need to choose the type of your OS. For example, if you are using
Windows 64-bit, click the green download button for curl for 64 bit.

__ 7. Click Save File to save the installer file.

© Copyright IBM Corp. 2021 11


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 8. Open a new command prompt, type curl -V, and press Enter. The version of cURL that
you installed should now be displayed.

Troubleshooting: If the curl command is not recognized, it means that the installation path was not
automatically added to the PATH environment variable. Perform the following steps to add the
cURL installation path to the PATH environment variable:
__ 1. Click the Start menu, and then type environment.
__ 2. Select Edit the system environment variables. The System Properties window opens.
__ 3. In the Advanced tab, click Environment Variables.
Select the PATH or Path variable under System variables (the lower box) and click Edit.
__ 4. This step may vary depending on your Windows version.
__ a. For some Window versions: In the “Variable value” field, add a semicolon (;) at the end
and paste the folder path where the file curl.exe is located. The file is probably either
in the bin or src directory in the curl folder that you extracted. To find the correct path,
right-click curl.exe, click Properties, and copy the Location field. The path looks like
C:\folder\another_folder\..\curl-7.61.1-win64-mingw\bin.
__ b. Windows 10: Click New, in the newly added row paste the folder path where the file
curl.exe is located. The file is probably either in the bin or src directory in the curl
folder that you extracted. To find the correct path, right-click curl.exe, click
Properties, and copy the Location field. The path looks like
C:\folder\another_folder\..\curl-7.61.1-win64-mingw\bin.
__ 5. Click OK to close all windows.
__ 6. Open a new command prompt and enter curl -V. The curl command should be now
recognized.

Installing cURL on a macOS workstation

Complete the following steps:

© Copyright IBM Corp. 2021 12


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

__ 1. Open a terminal.
__ 2. Run the following command:
ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)" <
/dev/null 2> /dev/null
__ 3. Install cURL by running the following brew command:
brew install curl

Part 4. Downloading and installing Node.js


Node.js is an open source, cross-platform JavaScript runtime environment that runs JavaScript
code outside of a browser. You need Node.js for Exercise 11., “Creating a cognitive banking FAQ
chatbot” to run an application that integrates multiple Watson services.

Note: Check if Node.js is already installed by typing node –v in a Git Bash/Command Prompt
window. If Node.js already is installed on your workstation, skip to Part 5.”Downloading and
installing IBM Cloud CLI”.

To download and install Node.js, complete the following steps:


__ 1. Access the Node.js downloads website at https://nodejs.org/en/download/.
__ 2. Select the installer for your operating system.
__ 3. Click Save File to save the installer file.

__ 4. Click Run after the download completes.


__ 5. The Node.js Setup wizard opens. Click Next. Follow the wizard and keep the default
values.
When you finish the setup wizard steps, you should have Node.js and npm installed.
__ 6. Verify that Node.js is installed by opening the command prompt and running node –v.
The Node.js version is returned.

Part 5. Downloading and installing IBM Cloud CLI


The IBM Cloud Command Line Interface provides commands for managing resources in IBM
Cloud.

© Copyright IBM Corp. 2021 13


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

To download and install IBM Cloud Command Line Interface, follow the steps in the IBM Cloud
documentation: https://cloud.ibm.com/docs/cli?topic=cli-install-ibmcloud-cli

Part 6. Downloading and installing Git


Git is a version control system (VCS) for tracking changes in files and coordinating work on those
files among multiple people. It is primarily used for source code management in software
development, but it can be used to track changes in any set of files. Git for Windows is a package
that is composed of two parts:
• Git: The VCS that tracks the file changes. It is commonly used for programming in a team
environment.
• Git Bash: A UNIX shell command-line interface (CLI). You use Git Bash to run cURL
commands for API calls.
To download and install Git, complete the following steps:
__ 1. Access the Git Downloads page at https://git-scm.com/downloads.
__ 2. Click the option for your operating system to downlaod the Git package that is compatible
with your OS.
__ 3. The Git installer starts downloading. Click Save File.
__ 4. Run the Git installer and follow the installation wizard steps.
__ 5. After Git is installed, run command git -–version in a command prompt. The installed
Git version is displayed.

Git Bash should also be installed if you are running on Windows.

Part 7. Downloading and installing a text editor


You need an editing tool during the exercises.

Installing Notepad++ on Windows

To install Notepad++ on Windows, complete the following steps:


__ 1. Go to https://notepad-plus-plus.org/downloads/.
__ 2. Select the latest release to download.
__ 3. Run the installer after the download completes.
__ 4. Follow the instructions on the installer UI and select the default options.
After you successfully installed Notepad++, it should be added to the Windows Start Apps menu.

© Copyright IBM Corp. 2021 14


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Installing Sublime Text on macOS

To install Sublime Text on MacOS, complete the following steps:


__ 1. Go to https://www.sublimetext.com/
__ 2. Click Download for Mac.
__ 3. Run the installer after it downloads.
__ 4. Follow the instructions on the installer UI and select the default options.

End of exercise

© Copyright IBM Corp. 2021 15


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
Exercises Guide

Exercise review and wrap-up


After completing this exercise, you should have your environment ready to start working with the
classroom exercises in this course. You registered for IBM Cloud Lite account. You downloaded
and installed Postman, cURL, Node.js, Git, IBM Cloud CLI, and an editing tool.

© Copyright IBM Corp. 2021 16


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

You might also like