Skip to content

Application to make it easy to box vagrant VMs for use as a base

License

Notifications You must be signed in to change notification settings

vube/vagrant-boxer

Repository files navigation

Vagrant Boxer

Build Status Coverage Status Latest Stable Version Dependency Status

Application to manage boxing up Vagrant VMs to be used as base boxes for use in private box distribution systems.

A complete example can be found here: vagrant-boxer-example

Features

  • Automatically package up Virtual Machines into reusable base boxes for use by other Vagrant configs.

  • Automatically create/update vagrant-catalog metadata.json files so you can run your own private internal Vagrant Cloud.

  • Automatically upload VM box images and metadata files to your file server.

Installation

To install, clone this repository and put it wherever you want it to live on your machine.

$ git clone https://github.com/vube/vagrant-boxer
$ cd vagrant-boxer
$ composer update

Then you can optionally symlink something like /usr/local/bin/boxer.php to this so it will run from your path just by typing boxer.php

$ sudo ln -sf /path/to/vagrant-boxer/boxer.php /usr/local/bin/boxer.php

Example Usage

vagrant-boxer works either from command line switches or using a boxer.json config file. Here are examples of both.

Usage via command line

Note that the {BASENAME} below should be substituted with the name of the VM in your VirtualBox list.

$ boxer.php --verbose --base "{BASENAME}" --boxer-id "your-company/{BASENAME}"  --major-version 1.0 --url-prefix "http://your-file-server.com/" --upload-base-uri "[email protected]:/path/to/docroot"

Note: If you don't have rsync on your system, you can set the --upload-method scp flags on the command line to use scp instead. You can pass any command here that takes arguments in the form command src1..srcN destination

Usage via boxer.json

Here again, {BASENAME} should be substituted with the name of the VM in your VirtualBox list.

Running boxer.php using boxer.json

$ boxer.php --verbose --config-file /path/to/boxer.json

Contents of boxer.json

{
    "vm-name": "{BASENAME}",
    "boxer-id": "your-company/{BASENAME}",
    "version": "1.0",
    "download-url-prefix": "http://your-file-server.com/",
    "upload-base-uri": "[email protected]:/path/to/docroot"
}

Dependencies

  • PHP 5.3.2+
  • Composer

About

Application to make it easy to box vagrant VMs for use as a base

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages