User Tools

Site Tools


packages:vagrant

This is an old revision of the document!


Vagrant

Vagrant is open-source software for creating and configuring virtual development environments. It can be considered a wrapper around VirtualBox and configuration management software such as Chef, Salt and Puppet. Although written in Ruby, it is usable in other programming projects such as PHP, Python, Java, and C#.

Quick workflow is such:

  1. you register base box with vagrant box add
  2. you create Vagrantfile with vagrant init BASEBOXNAME
  3. you bring up VM defined in Vagrantfile with vagrant up
  4. you log in to VM with vagrant ssh

The commands are run in dir where is Vagrantfile.

Base box you need to import only once, you can make new VM's without need to import base box again.

To start using vagrant you need to install vagrant package.

PLD Base box

glen is providing regularly built vagrant base boxes:

box add command is needed only once or if you want to refresh your base box.

32bit Th longterm kernel:

$ vagrant box add pld32 ftp://ftp.pld-linux.org/people/glen/vm/pld32.box
$ vagrant init pld32
$ vagrant up
$ vagrant ssh

64bit Th longterm kernel:

$ vagrant box add pld64 ftp://ftp.pld-linux.org/people/glen/vm/pld64.box
$ vagrant init pld64
$ vagrant up
$ vagrant ssh

the .box is actually importable by plain VirtualBox as well if you rename the file as .ova, on ftp there are symlinks for .ova files made for convenience.

Grow a disk

The VM contains 80GiB disk in LVM PV, default LVM allocation is rather minimal to get base packages installed and may be small when you actually copy files there.

To increase rootfs by 2GiB:

poldek -u xfsprogs
lvextend --size=+2G /dev/sys/rootfs
xfs_growfs /

What next?

After box is up, you probably want to provision it or install packages with poldek directly.

Chef

To install chef-solo do poldek -u chef, if you want to run chef server inside that box, have look at chef-server.

packages/vagrant.1375911900.txt.gz · Last modified: 2013-08-07 23:45 by glen