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:

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:

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 in vagrant


Good Vagrant videos here:

Good Openstack Vagrant file example here:

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


Comments