Categories
OpenStack Ubuntu 14 Installation

Vagrant

In this video I show how to setup Vagrant and use it to spin up custom server in OpenStack.

Vagrant website:
https://www.vagrantup.com

Go here if you need Virtualbox:
https://www.virtualbox.org/wiki/Downloads

Create the default vagrant file, from the project folder you created, Â on dos command line enter:

$ vagrant init

Grab a image for Vagrant here for testing:
https://atlas.hashicorp.com/boxes/search

I use hashicorp/precise64 for the virtualbox test.

Bring your Vagrant image up from the project folder, enter:

$ vagrant up

For most Vagrant images, the username is vagrant and the password is vagrant.

Good Vagrant videos here:
https://www.openstack.org/videos/summits/paris-2014/use-openstack-as-a-vagrant-provider

Good Openstack Vagrant file example here:
https://blog.scottlowe.org/2015/09/28/using-vagrant-with-openstack/

Install the openstack vagrant plugin with this command:

$ vagrant plugin install vagrant-openstack-provider

Example of the Vagrantfile we created in the video for OpenStack:

Vagrant.configure(2) do |config|

# Specify the default SSH username and private key
config.ssh.username = "ubuntu"
config.ssh.private_key_path = "chrispri.ppk"

# Configure the OpenStack provider for Vagrant
config.vm.provider "openstack" do |os|

    # Specify OpenStack authentication information
    os.openstack_auth_url = "http://10.1.1.140:5000/v2.0"
    os.username = "admin"
    os.password = "EhPoGmCRG0MsCLm"
    os.tenant_name = "admin"

    # Specify instance information
    os.server_name = "vagrant-test"
    os.flavor = "m1.small"
    os.image = "ubuntu-14.04-server-cloudimg-amd64-disk1"
    os.floating_ip_pool = "ext_net"
    os.networks = "admin_net"
    os.keypair_name = "chris"
    os.security_groups = ["default","all"]

    end
end