Versions Compared

Key

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

...

Wiki Markup
For example, *./up.sh 3* starts 3 VMs.  3 seems to be a good number with 16GB of RAM without taxing the system too much.
YouWith 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.
E.g., 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> is 59 for CentOS 5.9, 64 for CentOS 6.4, etc.
E.g., 192.168.59.101, 192.168.64.101, etc.
Note that *up.sh 3* command is equivalent to doing something like: vagrant up /c640[1-3]/

Testing Ambari

Log into the VM:

...

Code Block
vb.customize ["modifyvm", :id, "--memory", 2048] 

Taking Snapshots

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 vesion 0.0.2. if you install the latest plugin version 0.0.3 does not allow taking snapshots of the whole cluster at the same time (you have to specify a VM name).
Run vagrant snapshot to see the syntax.
Note that the plugin tries to take a snapshot of all VMs configured in Vagrantfile. If you are always using 3 VMs, for example, you can comment out c6404-10 in Vagrantfile so that the snapshot commands only operate on c6401-03.
Note: Upon resuming a snapshot, you may find that time-sensitive services may be down (e.g, HBase RegionServer is down, etc.)

Misc

All VMs launched will have a directory called /vagrant inside the VM. This maps to the ambari-vagrant/<os> directory on your local computer. You can use this shared directory mapping to push files, etc.

...