Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Here is an overview of the The following instructions cover four main steps for installing Ambari and HDP using VirtualBox and Vagrant:

  1. Install VirtualBox and Vagrant. (Installation only needs to be done only once, unless you want to upgrade VirtualBox and/or Vagrant.)
  2. Start one or more Linux virtual machines. Each machine represents a node in a cluster.
  3. On one of the virtual machines, download, install, and deploy the version of Ambari you wish to use.
  4. Using Ambari, deploy the version of HDP you wish to use. 

Once VirtualBox and Vagrant have been are installed, steps 2 through 4 can be done multiple times ( to change versions, create a larger cluster, etc.)and so on.

Note: these steps have been tested on MacOS 10.11.6.

Install VirtualBox and Vagrant

VirtualBox allows you to run multiple operating systems (inside multiple virtual machines) at the same time. Your Mac is the "host" machine, and the virtual machines are called "guest" machines.

 

Terminology

 

A virtual machine, or VM, is a software program that exhibits the behavior of a separate computer and is capable of running applications and programs within its own environment.

A virtual machine is usually known as a guest. It runs within another computing environment, usually known as a host. Multiple virtual machines can exist within a single host at one time.

In the following examples, one or more virtual machines run on a host machine running OS X. OS X is the primary operating system. The virtual machines (guests) are installed under OS X. The virtual machines run Linux in separate environments on OS X. Thus, your Mac is the "host" machine, and the virtual machines that run Ambari and Hadoop are called "guest" machines.

Install VirtualBox and Vagrant

VirtualBox is a software virtualization package that installs on an operating system as an application. It allows you to run multiple virtual machines at the same time. In this Quick Start you will use VirtualBox to run Linux nodes within VirtualBox on OS X:

...

  1. From the terminal window on the VM where you want to run the main Ambari service, download the Ambari repository. The following commands download Ambari version 2.4.1.0 and install ambari-server. To install a different version of Ambari, specify the appropriate repo URL. Choose the appropriate commands for the operating system on your VMs:

    OSCommands
    CentOS 6
    wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.4.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo 

    yum install ambari-server -y
    CentOS 7wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.1.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

    yum install ambari-server -y
    Ubuntu 12
    wget -nv http://public-repo-1.hortonworks.com/ambari/ubuntu12/2.x/updates/2.4.1.0/ambari.list -O /etc/apt/sources.list.d/ambari.list

    apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD
    apt-get update
    apt-get install ambari-server -y
     Ubuntu 14wget -nv http://public-repo-1.hortonworks.com/ambari/ubuntu14/2.x/updates/2.4.1.0/ambari.list -O /etc/apt/sources.list.d/ambari.list

    apt-key adv --recv-keys --keyserver keyserver.ubuntu.com B9733A7A07513CAD

    apt-get update

    apt-get install ambari-server -y
  2. To install Ambari with default settings, set up and start ambari-server:

    Code Block
    ambari-server setup -s
    ambari-server start

    For more information about installation options and settings, see Apache Ambari Installation.

  3. After Ambari Server has started, access launch a browser on your host machine (Mac). Access the Ambari Web UI at http://<hostname>.ambari.apache.org:8080. For The <hostname> part of the URL specifies the VM where you installed Ambari; for example:

    Code Block
    http://c7001.ambari.apache.org:8080

    The URL depends on the OS and the node where you installed Ambari. 
    Note: The Ambari Server can take some time to launch and be ready to accept connections. Keep trying the URL until you see the login page.

  4. Login using default username admin, password admin.

  5. Choose "Launch Install Wizard."

  6. Specify a name for your cluster.

  7. On the Install Options page, list the FQDNs of the virtual machines. For example:

    Code Block
    c7001.ambari.apache.org
    c7002.ambari.apache.org
    c7003.ambari.apache.org
    

    Alternatively, you can use a range expression:

    Code Block
    c70[01-03].ambari.apache.org
    
  8. Upload the insecure_private_key file that you created earlier.

  9. Specify non-root SSH user vagrant.

  10. Continue stepping through Installation Wizard, completing onscreen instructions to install your cluster.

...

Timeline for installing HDP, and mac hardware 

Troubleshooting

 

...

 

  • yum failed? install yum on your VMs.
  • Ambari message about THPs? fix transparent huge page setting in /etc/rc.loca (CentOS7)
  • ntpd not installed?

...

A Vagrant snapshot saves the current state of a VM , so that you can re-run restart the VM from the same point at a future time. Vagrant makes it easy to take snapshots of the entire cluster.
First, install the snapshot plugin:

Code Block
vagrant plugin install vagrant-vbox-snapshot --plugin-version=0.0.2

This enables the “vagrant snapshot” command. Note that the

...

above installs

...

version 0.0.2

...

, which allows you to take snapshots of the whole cluster at the same time

...

. Later versions do not support this feature.


Run vagrant snapshot to see the syntax.

...