docs: add lxc/d to sidebar, cleanup

This commit is contained in:
Matthew Hooker 2017-09-12 15:45:55 -07:00
parent ec3831323f
commit fc1ce68bff
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
3 changed files with 51 additions and 22 deletions

View File

@ -4,7 +4,8 @@ description: |
container, runs provisioners within this container, then exports the container container, runs provisioners within this container, then exports the container
as a tar.gz of the root file system. as a tar.gz of the root file system.
layout: docs layout: docs
page_title: LXC Builder page_title: 'LXC - Builders'
sidebar_current: 'docs-builders-lxc`'
... ...
# LXC Builder # LXC Builder
@ -18,14 +19,16 @@ as a tar.gz of the root file system.
The LXC builder requires a modern linux kernel and the `lxc` or `lxc1` package. The LXC builder requires a modern linux kernel and the `lxc` or `lxc1` package.
This builder does not work with LXD. This builder does not work with LXD.
Note to build Centos images on a Debian family host, you will need the `yum` package installed. ~> Note: to build Centos images on a Debian family host, you will need the `yum`
package installed.
Some provisioners such as `ansible-local` get confused when running in a container of a different family. <br>Some provisioners such as `ansible-local` get confused when running in
E.G. it will attempt to use `apt-get` to install packages, when running in a Centos container if the parent OS is Debian based. a container of a different family. E.G. it will attempt to use `apt-get` to
install packages, when running in a Centos container if the parent OS is Debian
based.
## Basic Example ## Basic Example
Below is a fully functioning example. Below is a fully functioning example.
``` {.javascript} ``` {.javascript}
{ {
@ -79,19 +82,31 @@ Below is a fully functioning example.
- `template_name` (string) - The LXC template name to use. - `template_name` (string) - The LXC template name to use.
- `template_environment_vars` (array of strings) - Environmental variables to use to build the template with. - `template_environment_vars` (array of strings) - Environmental variables to
use to build the template with.
### Optional: ### Optional:
- `target_runlevel` (int) - The minimum run level to wait for the container to reach. Note some distributions (Ubuntu) simulate run levels and may report 5 rather than 3. - `target_runlevel` (int) - The minimum run level to wait for the container to
reach. Note some distributions (Ubuntu) simulate run levels and may report
5 rather than 3.
- `output_directory` (string) - The directory in which to save the exported tar.gz. Defaults to `output-<BuildName>` in the current directory. - `output_directory` (string) - The directory in which to save the exported
tar.gz. Defaults to `output-<BuildName>` in the current directory.
- `container_name` (string) - The name of the LXC container. Usually stored in `/var/lib/lxc/containers/<container_name>`. Defaults to `packer-<BuildName>`. - `container_name` (string) - The name of the LXC container. Usually stored in
`/var/lib/lxc/containers/<container_name>`. Defaults to
`packer-<BuildName>`.
- `command_wrapper` (string) - Allows you to specify a wrapper command, such as `ssh` so you can execute packer builds on a remote host. Defaults to Empty. - `command_wrapper` (string) - Allows you to specify a wrapper command, such
as `ssh` so you can execute packer builds on a remote host. Defaults to
Empty.
- `init_timeout` (string) - The timeout in seconds to wait for the the container to start. Defaults to 20 seconds. - `init_timeout` (string) - The timeout in seconds to wait for the the
container to start. Defaults to 20 seconds.
- `template_parameters` (array of strings) - Options to pass to the given `lxc-template` command, usually located in `/usr/share/lxc/templates/lxc-<template_name>``. Note: This gets passed as ARGV to the template command. Ensure you have an array of strings, as a single string with spaces probably won't work. Defaults to `[]`.
- `template_parameters` (array of strings) - Options to pass to the given
`lxc-template` command, usually located in
`/usr/share/lxc/templates/lxc-<template_name>`. Note: This gets passed as
ARGV to the template command. Ensure you have an array of strings, as
a single string with spaces probably won't work. Defaults to `[]`.

View File

@ -4,7 +4,8 @@ description: |
container, runs provisioners within this container, then saves the container container, runs provisioners within this container, then saves the container
as an LXD image. as an LXD image.
layout: docs layout: docs
page_title: LXD Builder page_title: 'LXD - Builders'
sidebar_current: 'docs-builders-lxd'
... ...
# LXD Builder # LXD Builder
@ -20,7 +21,7 @@ This builder does not work with LXC.
## Basic Example ## Basic Example
Below is a fully functioning example. Below is a fully functioning example.
``` {.javascript} ``` {.javascript}
{ {
@ -39,14 +40,21 @@ Below is a fully functioning example.
### Required: ### Required:
- `image` (string) - The source image to use when creating the build container. This can be a (local or remote) image (name or fingerprint). E.G. my-base-image, ubuntu-daily:x, 08fababf6f27... - `image` (string) - The source image to use when creating the build
Note: The builder may appear to pause if required to download a remote image, as they are usually 100-200MB. `/var/log/lxd/lxd.log` will mention starting such downloads. container. This can be a (local or remote) image (name or fingerprint). E.G.
`my-base-image,` `ubuntu-daily:x,` `08fababf6f27`, ...
~&gt; Note: The builder may appear to pause if required to download
a remote image, as they are usually 100-200MB. `/var/log/lxd/lxd.log` will
mention starting such downloads.
### Optional: ### Optional:
- `name` (string) - The name of the started container. Defaults to `packer-$PACKER_BUILD_NAME`. - `name` (string) - The name of the started container. Defaults to
`packer-$PACKER_BUILD_NAME`.
- `output_image` (string) - The name of the output artifact. Defaults to `name`. - `output_image` (string) - The name of the output artifact. Defaults to
`name`.
- `command_wrapper` (string) - lets you prefix all builder commands, such as with `ssh` for a remote build host. Defaults to `""`.
- `command_wrapper` (string) - lets you prefix all builder commands, such as
with `ssh` for a remote build host. Defaults to `""`.

View File

@ -113,6 +113,12 @@
</li> </li>
</ul> </ul>
</li> </li>
<li<%= sidebar_current("docs-builders-lxc") %>>
<a href="/docs/builders/lxc.html">LXC</a>
</li>
<li<%= sidebar_current("docs-builders-lxd") %>>
<a href="/docs/builders/lxd.html">LXD</a>
</li>
<li<%= sidebar_current("docs-builders-null") %>> <li<%= sidebar_current("docs-builders-null") %>>
<a href="/docs/builders/null.html">Null</a> <a href="/docs/builders/null.html">Null</a>
</li> </li>