Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Commit

Permalink
boxes: Preparation to extract to a separate repository
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrehm committed Mar 25, 2014
1 parent 3284771 commit c13f459
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 25 deletions.
36 changes: 11 additions & 25 deletions BOXES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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 changes: 56 additions & 0 deletions boxes/README.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c13f459

Please sign in to comment.