Versions Compared

Key

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

...

  1. To install VirtualBox, visit https://www.virtualbox.org/wiki/Downloads. Note: as of 4/25/16 there are potential issues running the latest version of VirtualBox with the Ambari Vagrant setup. We recommend installing an older (4.x) version. This Quick Start has been tested on 4.3.34.
  2. Install Vagrant from http://downloads.vagrantup.com.
  3. After you have installed VirtualBox and Vagrant on your computer, clone the “ambari-vagrant” Clone the ambari-vagrant GitHub repository into a convenient folder on your Mac. This repository contains Vagrant instructions scripts for creating setting up Ambari virtual machines on several Linux distributions.
    From the command-line:

    Code Block
    git clone https://github.com/u39kun/ambari-vagrant.git
    
  4. Edit the /etc/hosts file on your computer so that you will be able to resolve hostnames for the VMs:

    Code Block
    sudo -s 'cat ambari-vagrant/append-to-etc-hosts.txt >> /etc/hosts'
    
  5. Use the vagrant command to create a private key. You will need the key for Ambari.
    The vagrant command displays Vagrant command usage and common commands, and creates a private key as ~/.vagrant.d/insecure_private_key.

    Code Block
    vagrant
    

    Copy the private key to your home directory (or any convenient directory).

Start Virtual Machines

...


Start Linux Virtual Machines

The ambari-vagrant directory (cloned from GitHub) contains subdirectories for several Linux distributions. Each subdirectory contains a set of scripts and configuration files for running Ambari on that version of Linux.

To start one or more virtual machines:

  1.  Change your current directory to ambari-vagrant:

    Code Block
    cd ambari-vagrant
    

    You will see subdirectories for different OS’s.

...

  1. Change into the OS that you want to test. centos6.4 is recommended

...

  1. , because it is quicker to launch than other OS's.

...

  1. The remainder of this Quick Start uses CentOS 6.4; substitute other directory names for other versions or distributions.

    Code Block
    cd centos6.4
    
  2. Copy the private key into your OS directory:

    Code Block
    cp ~/.vagrant.d/insecure_private_key .
    



  3. Start one or more VMs, using the ./up.sh command. Three seems to be a good number if you have 16GB of RAM, without taxing the system too much.

    Code Block
    ./up.sh <# of VMs to launch>
    

    For example, up.sh 3 starts 3 VMs.

...

  1. Additional notes:
    - With the default Vagrantfile, you can specify up to 10 (if your computer can handle it; you can even add more).
    - VMs will have the FQDN <os-code>[01-10].ambari.apache.org, where <os-code> is c59 (CentOS 5.9), c64 (CentOS 6.4), etc.

...

  1. For example, c5901.ambari.apache.org, c6401.ambari.apache.org, etc.

...

  1. - VMs will have the IP address 192.168.<os-subnet>.1[01-10], where <os-subnet> is 59 for CentOS 5.9, 64 for CentOS 6.4, etc.

...

  1. For example, 192.168.59.101, 192.168.64.101, etc.

...

  1. - Note that up.sh 3

...

  1. is equivalent to doing something like

...

  1. vagrant up c640{1..3}.

Testing Ambari

If it is your first time running a vagrant command, run:

...