본문 바로가기
Biz/Etc

Learning the Ropes of the Hortonworks Sandbox

by 조병희 2016. 3. 25.

Introduction

This tutorial is aimed for users who do not have much experience in using the Sandbox.
We will install and explore the Sandbox on virtual machine and cloud environments. We will also navigate the Ambari user interface.
Let’s begin our Hadoop journey.

Pre-Requisites

Outline

What is the Sandbox?

The Sandbox is a straightforward, pre-configured, learning environment that contains the latest developments from Apache Hadoop Enterprise, specifically Hortonworks Data Platform (HDP) Distribution. The Sandbox comes packaged in a virtual environment that can run in the cloud or on your personal machine. The Sandbox allows you to learn and explore HDP on your own.

Step 1: Explore the Sandbox in a VM

1.1 Install the Sandbox

Start the HDP Sandbox following the Installation Steps to start the VM.

Lab0_1

Note: The Sandbox system requirements include that you have a 64 bit OS with at least 8 GB of RAM and enabled BIOS for virtualization. Find out about the newest features, known and resolved issues along with other updates on HDP 2.4 from the release notes. The Sandbox on Azure is under construction and will update to HDP2.4 soon.

1.2 Learn Your Sandbox Version

To find information regarding your sandbox version, execute the command:

sandbox-version

1.3 Learn the Host Address of Your Environment

Once you have installed the Sandbox VM, it resolves to the host on your environment, the address of which varies depending upon the Virtual Machine you are using(Vmware, VirtualBox etc). As, a general thumb rule, wait for the installation to complete and confirmation screen will tell you the host your sandbox resolves to. For example:

In case of VirtualBox: host would be 127.0.0.1

Host Address of Sandbox Environment

Note: In case of Azure, your host can be found under Public IP Address on the dashboard. For further clarification, check out our guide for Deploying Hortonworks Sandbox on Azure.

If you are using a private cluster or a cloud to run sandbox. Please find the host your sandbox resolves to.

1.4 Connect to the Welcome Screen

Append the port number :8888 to your host address, open your browser, and access Sandbox Welcome page at http://_host_:8888/.

Sandbox Welcome Screen

1.5 Multiple Ways to Execute Terminal Commands

Note: For all methods below, the login credential instructions will be the same to access the Sandbox through the terminal.
– Login using username as root and password as hadoop.
– After first time login, you will be prompted to retype your current password, then change your password.

Secure Shell (SSH) Method:

Open your terminal (mac and linux) or putty (windows). Type the following command to access the Sandbox through SSH:

# Usage:
      ssh <username>@<hostname> -p <port>;
# Example:
      ssh root@127.0.0.1 -p 2222;

Mac Terminal SSH

Mac OS Terminal

Shell Web Client Method:

Open your web browser. Type the following text into your browser to access the Sandbox through the shell:

# Usage:
    #  _host_:4200
Example:
      127.0.0.1:4200

Shell in the Browser Sandbox

Appearance of Web Shell

VM Terminal Method:

Open the Sandbox through Virtualbox or VMware. The Sandbox VM Welcome Screen will appear. For Linux/Windows users, press Alt+F5 and for Mac, press Fn+Alt+F5 to login into the Sandbox VM Terminal.

Shell VM Terminal Sandbox

VirtualBox VM Terminal

Step 2: Explore Ambari

Navigate to Ambari welcome page using the url given on Sandbox welcome page.

Note: Both the username and password to login are maria_dev.

2.1 Use Terminal to Find the Host IP Sandbox Runs On

If you want to search for the host address your sandbox is running on, ssh into the sandbox terminal upon successful installation and follow subsequent steps:

  1. login using username as root and password as hadoop.
  2. Type ifconfig and look for inet addr: under eth0.
  3. Use the inet addr, append :8080 and open it into a browser. It shall direct you to Ambari login page.
  4. This inet address is randomly generated for every session and therefore differs from session to session.

Host_Address_Sandbox_Runs_On

Services Provided By the Sandbox

ServiceURL
Sandbox Welcome Pagehttp://host:8888
Ambari Dashboardhttp://host:8080
Ambari Welcomehttp://host:8080/views/ADMIN_VIEW/2.2.1.0/INSTANCE/#/
Hive User Viewhttp://host/#/main/views/HIVE/1.0.0/AUTO_HIVE_INSTANCE
Pig User Viewhttp://host:8080/#/main/views/PIG/1.0.0/Pig
File User Viewhttp://host:8080/#/main/views/FILES/1.0.0/Files
SSH Web Clienthttp://host:4200
Hadoop Configurationhttp://host:50070/dfshealth.html http://host:50070/explorer.html

The following Table Contains Login Credentials:

ServiceUser암호
Ambarimaria_devmaria_dev
Ambariadminrefer to section 2.2
Linux OSroothadoop

2.2 Setup Ambari admin Password Manually

  1. Start your sandbox and open a terminal (mac or linux) or putty (windows)
  2. SSH into the sandbox as root using ssh root@127.0.0.1 -p 2222. For Azure and VMware users, your _host_ and _port_ will be different.
  3. Type the following commands:
# Updates password
ambari-admin-password-reset
# If Ambari doesn't restart automatically, restart ambari service
ambari-agent restart

Note: Now you can login to ambari as an admin user to perform operations, such as starting and stopping services.

Terminal Update Ambari admin password

2.3 Explore Ambari Welcome Screen 5 Key Capabilities

Enter the Ambari Welcome URL and then you should see a similar screen:

Lab0_3

  1. Operate Your Cluster” will take you to the Ambari Dashboard which is the primary UI for Hadoop Operators
  2. Manage Users + Groups” allows you to add & remove Ambari users and groups
  3. Clusters” allows you to grant permission to Ambari users and groups
  4. Ambari User Views” list the set of Ambari Users views that are part of the cluster
  5. Deploy Views” provides administration for adding and removing Ambari User Views

2.4 Explore Ambari Dashboard Links

Enter the Ambari Dashboard URL and you should see a similar screen:

Lab0_4

Click on

  1. Metrics, Heatmap and Configuration

and then the

  1. Dashboard, Services, Hosts, Alerts, Admin and User Views icon (represented by 3×3 matrix ) to become familiar with the Ambari resources available to you.

Step 3: Troubleshoot Problems

Check Hortonworks Community Connection(HCC) for answers to problems you may come across during your hadoop journey.

Hortonworks Community Connection Main Page

3.1 Technique for Finding Answers in HCC

  • Insert quotes around your tutorial related problem
  • Be specific by including keywords (error, tutorial name, etc.)

Further Reading

출처: http://ko.hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

 

특별한 것은 없지만 접속 url 이나 패스워드 설정하는 부분믄 한번 보는것이 좋다.

 

 

 

 

'Biz > Etc' 카테고리의 다른 글

배치로 Hive 로 보내기  (0) 2016.04.03
Loading RCFile Format Data into Oracle Database  (0) 2016.03.25
Bringing ORC Support into Apache Spark  (0) 2016.03.25
A Lap Around Apache Spark on HDP  (0) 2016.03.25
Apache Zeppelin on HDP 2.4  (0) 2016.03.25

댓글