boxes: Preparation to extract to a separate repository

This commit is contained in:
Fabio Rehm 2014-03-21 20:41:10 -03:00
parent 328477172e
commit c13f4591b1
2 changed files with 67 additions and 25 deletions

View file

@ -4,25 +4,11 @@ Although the official documentation says it is only supported for VirtualBox
environments, you can use the [`vagrant package`](http://docs.vagrantup.com/v2/cli/package.html)
command to export a `.box` file from an existing vagrant-lxc container.
There is also a set of [bash scripts](https://github.com/fgrehm/vagrant-lxc/tree/master/boxes)
There is also a set of [bash scripts](https://github.com/fgrehm/vagrant-lxc-base-boxes)
that you can use to build base boxes as needed. By default it won't include any
provisioning tool and you can pick the ones you want by providing some environment
variables.
For example:
```
git clone https://github.com/fgrehm/vagrant-lxc.git
cd vagrant-lxc/boxes
PUPPET=1 CHEF=1 make precise
```
Will build a Ubuntu Precise x86_64 box with latest Puppet and Chef pre-installed, please refer to the scripts for more information.
## Known issues
We can't get the NFS client to be installed on the containers used for building
Ubuntu 13.04 / 13.10 / 14.04 base boxes.
variables. Please refer to the [base boxes repository](https://github.com/fgrehm/vagrant-lxc-base-boxes)
for more information.
## "Anatomy" of a box
@ -31,13 +17,13 @@ on knowing what makes a base box for vagrant-lxc, here's what's needed:
### Expected `.box` contents
| FILE | DESCRIPTION |
| --- | --- |
| `lxc-template` | Script responsible for creating and setting up the container (used with `lxc-create`), a ["generic script"]() is provided along with project's source. |
| `rootfs.tar.gz` | Compressed container rootfs tarball (need to remeber to pass in `--numeric-owner` when creating it) |
| `lxc.conf` | File passed in to `lxc-create -f` |
| `lxc-config` | Box specific configuration to be _appended_ to the container's config file |
| `metadata.json` | Required by Vagrant |
| FILE | REQUIRED? | DESCRIPTION |
| --- | --- | --- |
| `metadata.json` | Yes | Required by Vagrant |
| `rootfs.tar.gz` | Yes | Compressed container rootfs tarball (need to remeber to pass in `--numeric-owner` when creating it) |
| `lxc-template` | No, a ["generic script"](scripts/lxc-template) is provided by the plugin if it doesn't exist on the base box | Script responsible for creating and setting up the container (used with `lxc-create`). |
| `lxc-config` | No | Box specific configuration to be _appended_ to the system's generated container config file |
| `lxc.conf` | No | File passed in to `lxc-create -f` |
### metadata.json
@ -58,4 +44,4 @@ on knowing what makes a base box for vagrant-lxc, here's what's needed:
| `provider` | Yes | Required by Vagrant |
| `version` | Yes | Tracks backward incompatibilities |
| `built-on` | No | Date / time when the box was packaged for the first time |
| `template-opts` | No | Extra options to be passed to the `lxc-template` script provided with the .box package |
| `template-opts` | No | Extra options to be passed to the `lxc-template` script |

56
boxes/README.md Normal file
View file

@ -0,0 +1,56 @@
# vagrant-lxc base boxes
This repository contains a set of scripts for creating base boxes for usage with
[vagrant-lxc](https://github.com/fgrehm/vagrant-lxc).
## What distros / versions can I build with this?
* Ubuntu
- Precise 12.04
- Quantal 12.10
- Raring 13.04
- Saucy 13.10
- Trusty 14.04
* Debian
- Squeeze
- Wheezy
- Jessie
- Sid
## Building the boxes
```sh
git clone https://github.com/fgrehm/vagrant-lxc-base-boxes.git
cd vagrant-lxc-base-boxes
make precise
```
By default no provisioning tools will be included but you can pick the ones
you want by providing some environmental variables. For example:
```sh
PUPPET=1 CHEF=1 SALT=1 BABUSHKA=1 \
make precise
```
Will build a Ubuntu Precise x86_64 box with latest Puppet, Chef, Salt and
Babushka pre-installed.
## Pre built base boxes
_vagrant-lxc 1.0+ only_
| Box | VagrantCloud | Direct URL |
| --- | ------------ | ---------- |
| | | |
## What makes up for a vagrant-lxc base box?
See [vagrant-lxc/BOXES.md](https://github.com/fgrehm/vagrant-lxc/blob/master/BOXES.md)
## Known issues
* We can't get the NFS client to be installed on the containers used for building
Ubuntu 13.04 / 13.10 / 14.04 base boxes.
* Puppet can't be installed on Ubuntu 14.04 / Debian Sid
* Salt can't be installed on Ubuntu 13.04