Merge pull request #23 from hashicorp/sethvargo/format

Update website whitespace and formatting
This commit is contained in:
Armon Dadgar 2015-04-22 17:08:44 -07:00
commit c7843ed09b
38 changed files with 692 additions and 686 deletions

4
.gitignore vendored
View File

@ -30,3 +30,7 @@ pkg/
# Vault-specific # Vault-specific
example.hcl example.hcl
example.vault.d example.vault.d
# Ruby
website/vendor/ruby
website/.bundle

View File

@ -1,3 +1,3 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'middleman-hashicorp', git: 'https://github.com/hashicorp/middleman-hashicorp' gem 'middleman-hashicorp', github: 'hashicorp/middleman-hashicorp'

View File

@ -1,6 +1,6 @@
GIT GIT
remote: https://github.com/hashicorp/middleman-hashicorp remote: git://github.com/hashicorp/middleman-hashicorp.git
revision: 0e21734c64afcf0c6d35b40b26840254227c1949 revision: 5d1edbfa4ceec20b33b501f0162e2f881afadfa9
specs: specs:
middleman-hashicorp (0.1.0) middleman-hashicorp (0.1.0)
bootstrap-sass (~> 3.3) bootstrap-sass (~> 3.3)
@ -26,7 +26,7 @@ GEM
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
autoprefixer-rails (5.1.8.1) autoprefixer-rails (5.1.11)
execjs execjs
json json
bootstrap-sass (3.3.4.1) bootstrap-sass (3.3.4.1)
@ -39,7 +39,7 @@ GEM
coffee-script (2.4.1) coffee-script (2.4.1)
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.9.1) coffee-script-source (1.9.1.1)
commonjs (0.2.7) commonjs (0.2.7)
compass (1.0.3) compass (1.0.3)
chunky_png (~> 1.2) chunky_png (~> 1.2)
@ -117,7 +117,7 @@ GEM
middleman-syntax (2.0.0) middleman-syntax (2.0.0)
middleman-core (~> 3.2) middleman-core (~> 3.2)
rouge (~> 1.0) rouge (~> 1.0)
minitest (5.5.1) minitest (5.6.0)
multi_json (1.11.0) multi_json (1.11.0)
padrino-helpers (0.12.5) padrino-helpers (0.12.5)
i18n (~> 0.6, >= 0.6.7) i18n (~> 0.6, >= 0.6.7)

View File

@ -17,7 +17,7 @@ Policies are [HCL](https://github.com/hashicorp/hcl) or JSON documents
that describe what parts of Vault a user is allowed to access. An example that describe what parts of Vault a user is allowed to access. An example
of a policy is shown below: of a policy is shown below:
``` ```javascript
path "sys" { path "sys" {
policy = "deny" policy = "deny"
} }

View File

@ -12,7 +12,7 @@ Outside of development mode, Vault servers are configured using a file.
The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON. The format of this file is [HCL](https://github.com/hashicorp/hcl) or JSON.
An example configuration is shown below: An example configuration is shown below:
``` ```javascript
backend "consul" { backend "consul" {
address = "demo.consul.io:80" address = "demo.consul.io:80"
path = "vault" path = "vault"

View File

@ -57,20 +57,24 @@ backends, credential providers, etc. then append `?help=1` to any
URL. If you have valid permission to access the path, then the help text URL. If you have valid permission to access the path, then the help text
will be returned with the following structure: will be returned with the following structure:
{ ```javascript
{
"help": "help text" "help": "help text"
} }
```
## Error Response ## Error Response
A common JSON structure is always returned to return errors: A common JSON structure is always returned to return errors:
{ ```javascript
{
"errors": [ "errors": [
"message", "message",
"another message" "another message"
] ]
} }
```
This structure will be sent down for any HTTP status greater than This structure will be sent down for any HTTP status greater than
or equal to 400. or equal to 400.
@ -94,5 +98,3 @@ The following HTTP status codes are used throughout the API.
try again later. If the error persists, report a bug. try again later. If the error persists, report a bug.
- `503` - Vault is down for maintenance or is currently sealed. - `503` - Vault is down for maintenance or is currently sealed.
Try again later. Try again later.

View File

@ -27,8 +27,8 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"file": { "file": {
"type: "file", "type: "file",
"description: "Store logs in a file", "description: "Store logs in a file",
@ -36,8 +36,9 @@ description: |-
"path": "/var/log/file" "path": "/var/log/file"
} }
} }
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -27,14 +27,15 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"github": { "github": {
"type": "github", "type": "github",
"description": "GitHub auth" "description": "GitHub auth"
} }
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -20,18 +20,17 @@ description: |-
<dd>GET</dd> <dd>GET</dd>
<dt>Parameters</dt> <dt>Parameters</dt>
<dd> <dd>None</dd>
None
</dd>
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"initialized": false "initialize": true
} }
``` ```
</dd> </dd>
</dl> </dl>
@ -68,11 +67,12 @@ description: |-
<dd> <dd>
A JSON-encoded object including the master keys and initial root token: A JSON-encoded object including the master keys and initial root token:
``` ```javascript
{ {
"keys": ["one", "two", "three"], "keys": ["one", "two", "three"],
"root_token": "foo" "root_token": "foo"
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -25,12 +25,13 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"ha_enabled": true, "ha_enabled": true,
"is_self": false, "is_self": false,
"leader_address": "https://127.0.0.1:8200/" "leader_address": "https://127.0.0.1:8200/"
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -27,8 +27,8 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"aws": { "aws": {
"type": "aws", "type": "aws",
"description": "AWS keys" "description": "AWS keys"
@ -38,8 +38,9 @@ description: |-
"type": "system", "type": "system",
"description": "system endpoint" "description": "system endpoint"
} }
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -27,11 +27,12 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"policies": ["root", "deploy"] "policies": ["root", "deploy"]
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -31,11 +31,12 @@ description: |-
<dt>Returns</dt> <dt>Returns</dt>
<dd> <dd>
``` ```javascript
{ {
"value": "{'foo':'bar'}" "value": "{'foo':'bar'}"
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -23,15 +23,17 @@ description: |-
</dd> </dd>
<dt>Returns</dt> <dt>Returns</dt>
<dd>The "t" parameter is the threshold, and "n" is the number of shares. <dd>
The "t" parameter is the threshold, and "n" is the number of shares.
``` ```javascript
{ {
"sealed": true, "sealed": true,
"t": 3, "t": 3,
"n": 5, "n": 5,
"progress": 2 "progress": 2
} }
``` ```
</dd> </dd>
</dl> </dl>

View File

@ -155,4 +155,3 @@ This has been a brief high-level overview of the architecture of Vault. There
are more details available for each of the sub-systems. are more details available for each of the sub-systems.
For other details, either consult the code, ask in IRC or reach out to the mailing list. For other details, either consult the code, ask in IRC or reach out to the mailing list.

View File

@ -47,4 +47,3 @@ then one of the standbys will take over and become the active instance.
It is important to note that only _unsealed_ servers act as a standby. It is important to note that only _unsealed_ servers act as a standby.
If a server is still in the sealed state, then it cannot act as a standby If a server is still in the sealed state, then it cannot act as a standby
as it would be unable to serve any requests should the active server fail. as it would be unable to serve any requests should the active server fail.

View File

@ -146,5 +146,3 @@ prohibitively time consuming. Opening the bank vault requires two-factors: the k
Similarly, Vault requires multiple shares be provided to reconstruct the master key. Similarly, Vault requires multiple shares be provided to reconstruct the master key.
Once unsealed, each security deposit boxes still requires the owner provide a key, and similarly Once unsealed, each security deposit boxes still requires the owner provide a key, and similarly
the Vault ACL system protects all the secrets stored. the Vault ACL system protects all the secrets stored.

View File

@ -46,4 +46,3 @@ Below is sample output of a telemetry dump:
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.core.handle_request': Count: 2 Min: 0.097 Mean: 0.228 Max: 0.359 Stddev: 0.186 Sum: 0.457 [2015-04-20 12:24:30 -0700 PDT][S] 'vault.core.handle_request': Count: 2 Min: 0.097 Mean: 0.228 Max: 0.359 Stddev: 0.186 Sum: 0.457
[2015-04-20 12:24:30 -0700 PDT][S] 'vault.expire.register': Count: 1 Sum: 0.18 [2015-04-20 12:24:30 -0700 PDT][S] 'vault.expire.register': Count: 1 Sum: 0.18
``` ```

View File

@ -51,4 +51,3 @@ a use count of one makes a _one time token_. This means the token can be used
for a single request before being automatically revoked. This can be generalized for a single request before being automatically revoked. This can be generalized
to any number of uses. Limited use tokens cannot be used to create sub-tokens, to any number of uses. Limited use tokens cannot be used to create sub-tokens,
but they can be a powerful way to allow extremely limited access to Vault. but they can be a powerful way to allow extremely limited access to Vault.

View File

@ -28,7 +28,7 @@ Within a folder containing Vault configurations, create a subfolder
the root folder containing the "child" folder, add this to one of the the root folder containing the "child" folder, add this to one of the
Vault files: Vault files:
``` ```javascript
module "child" { module "child" {
source = "./child" source = "./child"
} }
@ -54,7 +54,7 @@ variables or outputs.
In the "child" module we created above, add the following: In the "child" module we created above, add the following:
``` ```javascript
variable "memory" {} variable "memory" {}
output "received" { output "received" {
@ -67,7 +67,7 @@ that will simply be the value of the memory variable.
You can then configure the module and use the output like so: You can then configure the module and use the output like so:
``` ```javascript
module "child" { module "child" {
source = "./child" source = "./child"
@ -98,7 +98,7 @@ the [path interpolated variables](/docs/configuration/interpolation.html).
An example is shown below: An example is shown below:
``` ```javascript
resource "aws_instance" "server" { resource "aws_instance" "server" {
... ...

View File

@ -40,7 +40,7 @@ for example.
An example is shown below: An example is shown below:
``` ```javascript
module "consul" { module "consul" {
source = "./consul" source = "./consul"
} }
@ -56,7 +56,7 @@ automatically instantly available.
Vault will automatically recognize GitHub URLs and turn them into Vault will automatically recognize GitHub URLs and turn them into
the proper Git repository. The syntax is simple: the proper Git repository. The syntax is simple:
``` ```javascript
module "consul" { module "consul" {
source = "github.com/hashicorp/example" source = "github.com/hashicorp/example"
} }
@ -64,7 +64,7 @@ module "consul" {
Subdirectories within the repository can also be referenced: Subdirectories within the repository can also be referenced:
``` ```javascript
module "consul" { module "consul" {
source = "github.com/hashicorp/example//subdir" source = "github.com/hashicorp/example//subdir"
} }
@ -86,7 +86,7 @@ Git repositories for more information.
Vault will automatically recognize BitBucket URLs and turn them into Vault will automatically recognize BitBucket URLs and turn them into
the proper Git or Mercurial repository. An example: the proper Git or Mercurial repository. An example:
``` ```javascript
module "consul" { module "consul" {
source = "bitbucket.org/hashicorp/example" source = "bitbucket.org/hashicorp/example"
} }
@ -94,7 +94,7 @@ module "consul" {
Subdirectories within the repository can also be referenced: Subdirectories within the repository can also be referenced:
``` ```javascript
module "consul" { module "consul" {
source = "bitbucket.org/hashicorp/example//subdir" source = "bitbucket.org/hashicorp/example//subdir"
} }
@ -113,7 +113,7 @@ Generic Git repositories are also supported. The value of `source` in this
case should be a complete Git-compatible URL. Using Git requires that case should be a complete Git-compatible URL. Using Git requires that
Git is installed on your system. Example: Git is installed on your system. Example:
``` ```javascript
module "consul" { module "consul" {
source = "git://hashicorp.com/module.git" source = "git://hashicorp.com/module.git"
} }
@ -123,7 +123,7 @@ You can also use protocols such as HTTP or SSH, but you'll have to hint
to Vault (using the forced source type syntax documented below) to use to Vault (using the forced source type syntax documented below) to use
Git: Git:
``` ```javascript
module "consul" { module "consul" {
source = "git::https://hashicorp.com/module.git" source = "git::https://hashicorp.com/module.git"
} }
@ -136,7 +136,7 @@ parameters:
An example of using these parameters is shown below: An example of using these parameters is shown below:
``` ```javascript
module "consul" { module "consul" {
source = "git::https://hashicorp.com/module.git?ref=master" source = "git::https://hashicorp.com/module.git?ref=master"
} }
@ -148,7 +148,7 @@ Generic Mercurial repositories are supported. The value of `source` in this
case should be a complete Mercurial-compatible URL. Using Mercurial requires that case should be a complete Mercurial-compatible URL. Using Mercurial requires that
Mercurial is installed on your system. Example: Mercurial is installed on your system. Example:
``` ```javascript
module "consul" { module "consul" {
source = "hg::http://hashicorp.com/module.hg" source = "hg::http://hashicorp.com/module.hg"
} }
@ -191,7 +191,7 @@ one way or the other.
Example: Example:
``` ```javascript
module "consul" { module "consul" {
source = "git::http://hashicorp.com/foo.git" source = "git::http://hashicorp.com/foo.git"
} }

View File

@ -9,7 +9,7 @@ description: Using modules in Vault is very similar to defining resources.
Using modules in Vault is very similar to defining resources: Using modules in Vault is very similar to defining resources:
``` ```javascript
module "consul" { module "consul" {
source = "github.com/hashicorp/consul/vault/aws" source = "github.com/hashicorp/consul/vault/aws"
servers = 3 servers = 3
@ -65,7 +65,7 @@ Modules can also specify their own [outputs](/docs/configuration/outputs.html).
These outputs can be referenced in other places in your configuration. These outputs can be referenced in other places in your configuration.
For example: For example:
``` ```javascript
resource "aws_instance" "client" { resource "aws_instance" "client" {
ami = "ami-123456" ami = "ami-123456"
instance_type = "m1.small" instance_type = "m1.small"

View File

@ -50,7 +50,7 @@ are defined is `~/.vaultrc` for Unix-like systems and
An example that configures a new provider is shown below: An example that configures a new provider is shown below:
``` ```javascript
providers { providers {
privatecloud = "/path/to/privatecloud" privatecloud = "/path/to/privatecloud"
} }
@ -83,7 +83,7 @@ the road.
With the directory made, create a `main.go` file. This project will With the directory made, create a `main.go` file. This project will
be a binary so the package is "main": be a binary so the package is "main":
``` ```go
package main package main
import ( import (

View File

@ -70,7 +70,7 @@ This structure implements the `ResourceProvider` interface. We
recommend creating this structure in a function to make testing easier recommend creating this structure in a function to make testing easier
later. Example: later. Example:
``` ```go
func Provider() *schema.Provider { func Provider() *schema.Provider {
return &schema.Provider{ return &schema.Provider{
... ...
@ -100,7 +100,7 @@ As part of the unit tests, you should call `InternalValidate`. This is used
to verify the structure of the provider and all of the resources, and reports to verify the structure of the provider and all of the resources, and reports
an error if it is invalid. An example test is shown below: an error if it is invalid. An example test is shown below:
``` ```go
func TestProvider(t *testing.T) { func TestProvider(t *testing.T) {
if err := Provider().InternalValidate(); err != nil { if err := Provider().InternalValidate(); err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
@ -118,7 +118,7 @@ These resources are put into the `ResourcesMap` field of the provider
structure. Again, we recommend creating functions to instantiate these. structure. Again, we recommend creating functions to instantiate these.
An example is shown below. An example is shown below.
``` ```go
func resourceComputeAddress() *schema.Resource { func resourceComputeAddress() *schema.Resource {
return &schema.Resource { return &schema.Resource {
... ...
@ -202,7 +202,7 @@ subsequent `vault apply` fixes this resource.
Most of the time, partial state is not required. When it is, it must be Most of the time, partial state is not required. When it is, it must be
specifically enabled. An example is shown below: specifically enabled. An example is shown below:
<pre class="prettyprint"> ```go
func resourceUpdate(d *schema.ResourceData, meta interface{}) error { func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
// Enable partial state mode // Enable partial state mode
d.Partial(true) d.Partial(true)
@ -230,7 +230,7 @@ func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
return nil return nil
} }
</pre> ```
In the example above, it is possible that setting the `tags` succeeds, In the example above, it is possible that setting the `tags` succeeds,
but setting the `name` fails. In this scenario, we want to make sure but setting the `name` fails. In this scenario, we want to make sure

View File

@ -20,7 +20,7 @@ subsequent provisioners connect as a user with more limited permissions.
## Example usage ## Example usage
``` ```javascript
# Copies the file as the root user using a password # Copies the file as the root user using a password
provisioner "file" { provisioner "file" {
source = "conf/myapp.conf" source = "conf/myapp.conf"
@ -52,4 +52,3 @@ The following arguments are supported:
* `timeout` - The timeout to wait for the connection to become available. This defaults * `timeout` - The timeout to wait for the connection to become available. This defaults
to 5 minutes. Should be provided as a string like "30s" or "5m". to 5 minutes. Should be provided as a string like "30s" or "5m".

View File

@ -14,7 +14,7 @@ supports `ssh` type [connections](/docs/provisioners/connection.html).
## Example usage ## Example usage
``` ```javascript
resource "aws_instance" "web" { resource "aws_instance" "web" {
... ...
@ -63,4 +63,3 @@ If the source, however, is `/foo/` (a trailing slash is present), and the destin
This behavior was adopted from the standard behavior of rsync. Note that under the covers, This behavior was adopted from the standard behavior of rsync. Note that under the covers,
rsync may or may not be used. rsync may or may not be used.

View File

@ -29,7 +29,7 @@ Policies in Vault are formatted with
format that is also JSON-compatible, so you can use JSON as well. An example format that is also JSON-compatible, so you can use JSON as well. An example
policy is shown below: policy is shown below:
``` ```javascript
path "sys" { path "sys" {
policy = "deny" policy = "deny"
} }

View File

@ -22,7 +22,7 @@ Vault is configured using [HCL](https://github.com/hashicorp/hcl) files.
As a reminder, these files are also JSON-compatible. The configuration As a reminder, these files are also JSON-compatible. The configuration
file for Vault is relatively simple. An example is shown below: file for Vault is relatively simple. An example is shown below:
``` ```javascript
backend "consul" { backend "consul" {
address = "demo.consul.io:80" address = "demo.consul.io:80"
path = "vault" path = "vault"

View File

@ -81,7 +81,7 @@ The AWS backend requires an IAM policy to associate created credentials
with. For this example, we'll write just one policy, but you can associate with. For this example, we'll write just one policy, but you can associate
many policies with the backend. Save a file named "policy.json" with the following contents: many policies with the backend. Save a file named "policy.json" with the following contents:
``` ```javascript
{ {
"Version": "2012-10-17", "Version": "2012-10-17",
"Statement": [ "Statement": [