Post tags: | linux | ubuntu_linux | vagrant | virtualbox |


Install latest virtualbox

Install latest virtualbox
        sudo dpkg -i virtualbox-4.3_4.3.26-98988~Debian~wheezy_amd64.deb

Install vagrant

installation Below are all available downloads for the latest version of Vagrant (1.7.2).

vagrant o4g31.coot.local

vagrant o4g31.coot.local
        mkdir ~/dev/vagrant-o4g31.coot.local
        cd ~/dev/vagrant-o4g31.coot.local
        git init .
        vagrant init ubuntu/trusty64 = "ubuntu/trusty64"
vagrant up
        /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/lib/vagrant/pre-rubygems.rb:31: warning: Insecure world writable dir /opt/java in PATH, mode 040777
        /opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/runtime.rb:222: warning: Insecure world writable dir /opt/java in PATH, mode 040777
        Bringing machine 'default' up with 'virtualbox' provider...
        ==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
            default: Box Provider: virtualbox
            default: Box Version: >= 0
        ==> default: Loading metadata for box 'ubuntu/trusty64'
            default: URL:
        ==> default: Adding box 'ubuntu/trusty64' (v14.04) for provider: virtualbox
            default: Downloading:
        ==> default: Successfully added box 'ubuntu/trusty64' (v14.04) for 'virtualbox'!
        ==> default: Importing base box 'ubuntu/trusty64'...
        ==> default: Matching MAC address for NAT networking...
        ==> default: Checking if box 'ubuntu/trusty64' is up to date...
        ==> default: Setting the name of the VM: vagrant-o4g31cootlocal_default_1429027337806_5579
        ==> default: Clearing any previously set forwarded ports...
        ==> default: Clearing any previously set network interfaces...
        ==> default: Preparing network interfaces based on configuration...
            default: Adapter 1: nat
        ==> default: Forwarding ports...
            default: 22 => 2222 (adapter 1)
        ==> default: Booting VM...
        ==> default: Waiting for machine to boot. This may take a few minutes...
            default: SSH address:
            default: SSH username: vagrant
            default: SSH auth method: private key
            default: Warning: Connection timeout. Retrying...
            default: Vagrant insecure key detected. Vagrant will automatically replace
            default: this with a newly generated keypair for better security.
            default: Inserting generated public key within guest...
            default: Removing insecure key from the guest if its present...
            default: Key inserted! Disconnecting and reconnecting using new SSH key...
        ==> default: Machine booted and ready!
        ==> default: Checking for guest additions in VM...
        ==> default: Mounting shared folders...
            default: /vagrant => /home/craig/dev/vagrant-o4g31.coot.local
        vboxmanage list runningvms
        "vagrant-o4g31cootlocal_default_1429027337806_5579" {9793abb6-75a6-4905-a085-1da3d7f4e237}

jump into ansible provisioning

Ansible provisioner

hostname, fqdn

ansible-galaxy install ANXS.hostname


ansible-galaxy install zzet.rbenv

ansible-galaxy install znzj.rbenv

Adam Brett - Vagrant & Ansible Quickstart Tutorial Vagrant & Ansible Quickstart Tutorial

Research Getting Started with Vagrant Push Get VAGRANT UP and Running in No Time Building VM images with Ansible and Packer Building VM images with Ansible and Packer

Building VM images with Ansible and Packer

You can drastically cut down on per-server provisioning time by using custom-made ‘boxes’ or ‘images’ that can be deployed instead of default OS installed. Think of these as preconfigured OS instances that might just need a little extra configuration per-instance, or would need a few files updated after the instance is built.

It just so happens there’s a tool built to help you do just this—create boxes (for Vagrant), AMIs (for AWS) or images (for Digital Ocean or other services)—called Packer. Packer can even build images for multiple providers using multiple provisioners (like shell scripts, Ansible playbooks, Salt states, Chef cookbooks, Puppet manifests or other popular provisioners), all with one set of configuration and instructions.

In this blog post, I’ll show you how to build a Vagrant Box file for CentOS 6.5 using Packer with Ansible and a couple simple shell scripts. vagrantfile

Vagrant is meant to run with one Vagrantfile per project, and the Vagrantfile is supposed to be committed to version control. This allows other developers involved in the project to check out the code, run vagrant up, and be on their way. Vagrantfiles are portable across every platform Vagrant supports. virtualbox support Creating a Base Box

virtualbox self-hosted vagrant up ubuntu/trusty64 –provider virtualbox Ubuntu 14.04.2 LTS (Trusty Tahr) Getting Started

Ansible research