Skip to content

Commit

Permalink
Manual updates for file templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrowley committed Nov 4, 2011
1 parent 2ce0948 commit c594cef
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
2 changes: 1 addition & 1 deletion man/man1/blueprint-create.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If one of `--puppet`, `--chef`, `--sh`, or `--cfn` is given, a Puppet module, a

Debian packages, Ruby gems, Python packages, and PHP PEAR/PECL packages are enumerated in the blueprint. Debian packages that are listed as `essential`, `important`, `required`, or `standard` and those that are depended upon by `ubuntu-minimal`, `ubuntu-standard`, or `ubuntu-desktop` are ignored.

The contents of system configuration files in `/etc` that have been created or modified from their packaged versions will be included in the blueprint.
The contents of system configuration files in `/etc` that have been created or modified from their packaged versions will be included in the blueprint. If file is found to have a corresponding template (a file with "`.blueprint-template.mustache`" appended to its pathname) and optionally a corresponding data script (a file with "`.blueprint-template.sh`" appended to its pathname), this `template` and `data` are included in the blueprint rather than the file's literal content.

Anything installed in `/usr/local` will be archived and included in the blueprint, tagged with the architecture (_amd64_ or _i386_) of the server.

Expand Down
2 changes: 2 additions & 0 deletions man/man1/blueprint-show.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ blueprint-show(1) -- generate code from a blueprint

If none of `--puppet`, `--chef`, `--sh`, or `--cfn` are given, the raw JSON data structure that describes the blueprint is printed as described in `blueprint`(5).

The POSIX shell code generator is the only one prepared to handle files to be rendered from a template. All other code generators will print a warning and ignore such files.

If _name_ is omitted or `-`, a blueprint is read from standard input and treated in the same manner. See `blueprint`(5) for the details of the format.

## OPTIONS
Expand Down
34 changes: 34 additions & 0 deletions man/man1/blueprint-template.1.ronn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
blueprint-template(1) --
============================================================

## SYNOPSIS

`blueprint template` [`-q`] [_pathname_]

## DESCRIPTION

FIXME

## OPTIONS

* `-q`, `--quiet`:
Operate quietly.
* `-h`, `--help`:
Show a help message.

## FILES

* `/etc/blueprint-template.d`:
FIXME

## THEME SONG

The Flaming Lips - "The W.A.N.D. (The Will Always Negates Defeat)"

## AUTHOR

Richard Crowley <richard@devstructure.com>

## SEE ALSO

Part of `blueprint`(1).
21 changes: 20 additions & 1 deletion man/man5/blueprint.5.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ blueprint(5) -- blueprint JSON format
"mode": "MODE",
"owner": "OWNER"
},
"PATHNAME": {
"encoding": "ENCODING",
"group": "GROUP",
"mode": "MODE",
"owner": "OWNER",
"template": "TEMPLATE"
},
"PATHNAME": {
"dat": "DATA"
"encoding": "ENCODING",
"group": "GROUP",
"mode": "MODE",
"owner": "OWNER",
"template": "TEMPLATE"
},
"PATHNAME": {
"encoding": "ENCODING",
"group": "GROUP",
Expand Down Expand Up @@ -71,7 +86,9 @@ For compatibility with AWS `cfn-init`, a URL may appear in the value in place of

Each key in the optional `files` object is the fully-qualified pathname to a file. These pathnames should be traversed in alphabetical order. The associated value contains the `owner`, owning `group`, `mode` (a string containing the full 6-digit octal representation), `content`, and the `encoding` of content (one of _plain_ or _base64_). Each file must be placed at its pathname and its metadata must be updated when the blueprint is applied.

For compatibility with AWS `cfn-init`, `source` takes precedence over the `content`. If a file with a `source` is encountered, the `source` URL should be fetched as the file's content. Blueprint will never generate such objects.
The file's content may alternately be specified as `template` and (optionally) `data` which contain a `mustache.sh` template in the `mustache`(5) format and POSIX shell code, respectively. When a blueprint is applied, the template should be given as standard input to `mustache.sh` with this data and other default data available in the environment. The resulting standard output should be taken as the file's content. A copy of `mustache.sh` is distributed with Blueprint.

For compatibility with AWS `cfn-init`, `source` takes precedence over `content`. If a file with a `source` is encountered, the `source` URL should be fetched as the file's content. Blueprint will never generate such objects.

### Packages

Expand Down Expand Up @@ -100,3 +117,5 @@ Richard Crowley <richard@devstructure.com>
## SEE ALSO

`blueprint`(1).

`mustache`(5) at <http://mustache.github.com/mustache.5.html> and `mustache.sh` at <https://github.com/rcrowley/mustache.sh>.

0 comments on commit c594cef

Please sign in to comment.