Skip to content
This repository was archived by the owner on Jan 10, 2020. It is now read-only.

Running with Vagrant

tinaColemanNextCentury edited this page Aug 13, 2014 · 11 revisions

What is Vagrant

Vagrant is a tool used to quickly create fully configured virtual machines based on a predefined definition file.

Prerequisites

  1. Vagrant - Vagrant can be downloaded from vagrantup.com
  2. VirtualBox OR an OpenStack server
  3. After installing Vagrant, if using OpenStack to run the virtual machine, run the command vagrant plugin install vagrant-openstack-plugin

Running Vagrant###

VirtualBox

Executing the command vagrant up virtualbox will create a virtual machine on VirtualBox.

This machine will be configured with:

  • Java 7
  • MongoDB
  • Tomcat 7 - Tomcat can be accessed at [http://localhost:4567]
  • Git
  • Neon - Refer to the Demo Widget Guide for details on accessing the demo. Note The port will be 4567 rather than 8080 as mentioned in the Demo guide.

OpenStack

To run a virtual machine on an OpenStack cloud instance is more advanced than running on VirtualBox as some configuration must be performed before creating a virtual machine.

  1. Configure environment variables
  2. Execute export OS_USERNAME=YOUR_OPENSTACK_USERNAME where YOUR_OPENSTACK_USERNAME is your OpenStack username.
  3. Execute export OS_PASSWORD=YOUR_OPENSTACK_PASSWORD where YOUR_OPENSTACK_USERNAME is your OpenStack password.
  4. Execute export OS_AUTH_URL=OPENSTACK_URL where OPENSTACK_URL is the OpenStack authentication URL
  5. Edit the VagrantFile
  6. Set osConfig.ssh.private_key_path to the path to the private pem key file used for SSH into the VM
  7. Set os.flavor to the flavor size of your desired VM
  8. Set os.image to a CentOS 6.5 VM image on your Openstack instance.
  9. Set os.keypair_name to the name of the key pair corresponding to the osConfig.ssh.private_key_path file specified
  10. Set os.ssh_username to the username to be used for ssh into the virtual machine.

Once the configuration is performed, execute the command vagrant up openstack --provider=openstack to create a virtual machine on the OpenStack instance.

##Puppet## Vagrant will execute several commands, including the execution of a puppet configuration. For more information about puppet, refer to the Configuring with Puppet page.

Clone this wiki locally