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
-
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.
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
vagrant-boxer works either from command line switches or using a boxer.json
config
file. Here are examples of both.
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
Here again, {BASENAME}
should be substituted with the name of the VM in your
VirtualBox list.
$ boxer.php --verbose --config-file /path/to/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"
}
- PHP 5.3.2+
- Composer