...
- 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.
- Install Vagrant from http://downloads.vagrantup.com.
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
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'
Use the
vagrant
command to create a private key. You will need the key for Ambari.
Thevagrant
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:
Change your current directory to
ambari-vagrant
:Code Block cd ambari-vagrant
You will see subdirectories for different OS’s.
...
Change
into the OS that you want to test.centos6.4
is recommended
...
, because it is quicker to launch than other OS's.
...
The remainder of this Quick Start uses CentOS 6.4; substitute other directory names for other versions or distributions.
Code Block cd centos6.4
Copy the private key into your OS directory:
Code Block cp ~/.vagrant.d/insecure_private_key .
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.
...
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>
isc59
(CentOS 5.9),c64
(CentOS 6.4), etc.
...
For example,
c5901.ambari.apache.org
,c6401.ambari.apache.org
, etc.
...
- VMs will have the IP address
192.168.<os-subnet>.1[01-10]
, where<os-subnet>
is59
for CentOS 5.9,64
for CentOS 6.4, etc.
...
For example,
192.168.59.101
,192.168.64.101
, etc.
...
- Note that
up.sh 3
...
is equivalent to doing something like
...
vagrant up c640{1..3}
.
Testing Ambari
If it is your first time running a vagrant command, run:
...