You are on page 1of 7

V11.

2
Exercise 1. Exploring the lab environment

EXempty

Exercise 1. Exploring the lab


environment
Estimated time
0:30

Overview
In this exercise, you access the environment that you use in the exercises through this course. You
record variables that are provided to you by your instructor to access the environment.

Objectives
After completing this exercise, you will be able to:
• Access the VM that you use for the exercises in this course.

Introduction
In this exercise, you access the VM shared by the students in this course. You are assigned values
to access services that you need for the exercises. You record the values that are assigned to you.
You use the PuTTY SSH client to connect to the remote server where the software, configurations,
and files for this course reside.

Requirements
• SSH client installed in your workstation. You can download PuTTY from www.putty.org.

© Copyright IBM Corp. 2016, 2021 1-1


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty
Exercise instructions
In this exercise, you complete the following tasks:
__ 1. Record the values for the variables to access your Hadoop cluster.
__ 2. Add the Hadoop cluster hostname to the hosts file in your local workstation.
__ 3. Access the Hadoop cluster with PuTTY.
__ 4. Install cURL

Part 1: Recording the values for the variables to access your Hadoop
cluster
In this part, your instructor provides you the information that you need to access the VM and the
Hadoop cluster. Record these values and use them in the subsequent exercises.
Complete the following steps:
__ 1. Copy the following table to your favorite text editor (for example Notepad) and assign the
values that are provided to you by your instructor to the variables in this table.

Note

The variables listed under “INSTRUCTOR ONLY” are used by the instructor and not shared with
the students.

Table 1. Variables and values for the students and the instructor in this course
Variable Value Description
Username <username> Student’s username
Password <password> Student’s password
IP address <ip_address> Hadoop cluster & VM IP address
Host name <hostname> Hadoop cluster host name
Ambari URL <hostname:8080> URL to access Ambari Web UI
Ambari username <ambari username> Username to access Ambari Web UI
Ambari password <ambari password> Password to access Ambari Web UI
Cluster name <cluster_name> Hadoop cluster name
HDFS home dir <hdfs_home> HDFS home directory. The value for
the exercises is /user/<username>
User account home dir $HOME Account home directory. The value is
/home/<username>. It does not need
to be substituted in the exercises.
INSTRUCTOR ONLY

© Copyright IBM Corp. 2016, 2021 1-2


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty
Table 1. Variables and values for the students and the instructor in this course
Variable Value Description
Ambari admin <ambari admin> Ambari administrator
Ambari admin password <ambari admin pwd> Ambari administrator password
Db2 Big SQL password <bigsql_password> bigsql user password
root password <root_password> root user password

Note

The values in the table are placeholders that are used in the exercises. When you perform each
exercise, replace the place holders with the values that are provided to you by your instructor and
that you recorded in the text editor.

Part 2: Adding the Hadoop cluster hostname to the hosts file in your local
workstation
The Hadoop cluster hostname and domain are not added to a DNS. To resolve the hostname from
the IP address you must add an entry to the hosts file in your local workstation. Update the
hostfile with the <hostname> and <ip_address> provided by your instructor. Follow the
instructions for your workstation operating system to update the hosts file.
For Windows, the hosts file is at C:\Windows\System32\drivers\etc\hosts. Follow these steps for
Windows 10 workstations:
__ 1. Press the Windows key.
__ 2. Type Notepad in the search field.
__ 3. In the search results, right-click Notepad and select Run as administrator.
__ 4. From Notepad, open the following file. Select file type All Files (*).
c:\Windows\System32\Drivers\etc\hosts
__ 5. Add the values for <ip_address> and <hostname> in the last line of the file. For example,
10.1.1.1 dataengineer.ibm.com
__ 6. Click File > Save to save your changes.
__ 7. Ping the VM by using the <hostname> that you configured in the hosts file. For example,
ping dataengineer.ibm.com
__ 8. You receive the response from the hosts as shown in the following figure.

© Copyright IBM Corp. 2016, 2021 1-3


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty

For Linux, the hosts file is in the directory /etc/hosts. Follow these steps for Linux computers:
__ 1. Open a Linux terminal. You must be logged in as root or as a user who can run sudo.
Add the values for <ip_address> and <hostname> in the hosts file:
sudo echo <ip_address> <hostname> >> /etc/hosts
Example:
sudo echo 10.1.1.1 dataengineer.ibm.com >> /etc/hosts
__ 2. Ping the VM by using the <hostname> that you configured in the hosts file. For example,
ping dataengineer.ibm.com
You receive the response from the host as shown in the following figure.

For Mac, the hosts file is in the directory /private/etc/hosts. Follow these steps for Mac
computers:
__ 1. Open a Mac terminal. You must be logged in as root or as a user who can run sudo.
Edit the hosts file:
sudo nano /private/etc/hosts
Add the values for <ip_address> and <hostname> in the last line of the file. For example,
10.1.1.1 dataengineer.ibm.com
__ 2. Save the changes by typing ^X (Control + X) to exist, then type Y if you are prompted to
confirm to save the file. Press Enter to confirm the filename.

© Copyright IBM Corp. 2016, 2021 1-4


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty
__ 3. Ping the VM by using the <hostname> that you configured in the hosts file. For example,
ping dataengineer.ibm.com
You receive the response from the hosts as shown in the following figure.

Part 3: Access the Hadoop cluster with PuTTY


In this part, you access the Hadoop cluster by using SSH client PuTTY and the variables that you
recorded in Part 1. You repeat these steps in all the exercises that require PuTTY to access the
Hadoop cluster.
Complete the following steps:
__ 1. Open PuTTY and complete the following steps:
__ 2. In the Session tab > Host Name (or IP address) enter the value for <hostname> provided
to you by your instructor.
__ 3. In the Connection > Data tab, in Auto-login username and enter the <username> that is
assigned to you and that you recorded in Part 1.
__ 4. Click Open.
__ 5. The PuTTY session starts. Enter the <password> that is provided to you by your instructor
and that you recorded in Part 1 and press Enter.

Note

You can copy the password and paste it in the PuTTY shell by right-clicking the mouse instead of
typing the password character by character.

© Copyright IBM Corp. 2016, 2021 1-5


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty

Information

The initial password that you enter at first login expires and you are prompted to change it for a
password of your choice. When you are prompted to change your password, you must enter your
initial password first and then your new password twice. Your new password must contain minimum
8 characters, which include at least one number and one uppercase letter.
After you change your password, update the “variables and values” table with the value of your new
password.

Part 4: Installing cURL


If cURL is not already installed in your local workstation, download and install the version of cURL
for your operating system form https://curl.haxx.se/download.html.

End of exercise

© Copyright IBM Corp. 2016, 2021 1-6


Course materials may not be reproduced in whole or in part without the prior written permission of IBM.
V11.2
Exercise 1. Exploring the lab environment

EXempty
Exercise review and wrap-up
In this exercise, you recorded the values that were provided by your instructor for several variables
that you use in the exercises of this course.
You added the <hostname> and <ip_address> values to the hosts table in your local workstation.
You access the Hadoop cluster with PuTTY.

© Copyright IBM Corp. 2016, 2021 1-7


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

You might also like