1
0
mirror of https://github.com/distribution/distribution synced 2024-11-06 19:35:52 +01:00

docs: fix yaml sections format at docs.docker.com

yaml sections in the documentation does not display well on
docs.docker.com. This is due to the syntax highlighting
which uses highlight.js and does not support yaml
currently.
The fix is to remove triple back ticks and indent instead.
We loose yaml syntax highlighting on github, but it displays
an acceptable version on both github and docs.docker.com.

Signed-off-by: Olivier Jacques <olivier.jacques@hp.com>
This commit is contained in:
Olivier Jacques 2015-07-10 23:22:06 +02:00
parent 419bbc2da6
commit b3683863dd
2 changed files with 291 additions and 328 deletions

@ -24,17 +24,13 @@ To override a configuration option, create an environment variable named
and the `_` (underscore) represents indention levels. For example, you can
configure the `rootdirectory` of the `filesystem` storage backend:
```
storage:
storage:
filesystem:
rootdirectory: /var/lib/registry
```
To override this value, set an environment variable like this:
```
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere
```
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/somewhere
This variable overrides the `/var/lib/registry` value to the `/somewhere`
directory.
@ -53,9 +49,8 @@ This section lists all the registry configuration options. Some options in
the list are mutually exclusive. So, make sure to read the detailed reference
information about each option that appears later in this page.
```yaml
version: 0.1
log:
version: 0.1
log:
level: debug
formatter: text
fields:
@ -75,8 +70,8 @@ log:
from: sender@example.com
to:
- errors@example.com
loglevel: debug # deprecated: use "log"
storage:
loglevel: debug # deprecated: use "log"
storage:
filesystem:
rootdirectory: /var/lib/registry
azure:
@ -105,7 +100,7 @@ storage:
age: 168h
interval: 24h
dryrun: false
auth:
auth:
silly:
realm: silly-realm
service: silly-service
@ -117,7 +112,7 @@ auth:
htpasswd:
realm: basic-realm
path: /path/to/htpasswd
middleware:
middleware:
registry:
- name: ARegistryMiddleware
options:
@ -133,7 +128,7 @@ middleware:
privatekey: /path/to/pem
keypairid: cloudfrontkeypairid
duration: 3000
reporting:
reporting:
bugsnag:
apikey: bugsnagapikey
releasestage: bugsnagreleasestage
@ -142,7 +137,7 @@ reporting:
licensekey: newreliclicensekey
name: newrelicname
verbose: true
http:
http:
addr: localhost:5000
prefix: /my/nested/registry/
secret: asecretforlocaldevelopment
@ -154,7 +149,7 @@ http:
- /path/to/another/ca.pem
debug:
addr: localhost:5001
notifications:
notifications:
endpoints:
- name: alistener
disabled: false
@ -163,7 +158,7 @@ notifications:
timeout: 500
threshold: 5
backoff: 1000
redis:
redis:
addr: localhost:6379
password: asecret
db: 0
@ -174,7 +169,6 @@ redis:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
In some instances a configuration option is **optional** but it contains child
options marked as **required**. This indicates that you can omit the parent with
@ -185,9 +179,7 @@ the children marked **required**.
## version
```yaml
version: 0.1
```
version: 0.1
The `version` option is **required**. It specifies the configuration's version.
It is expected to remain a top-level field, to allow for a consistent version
@ -199,14 +191,12 @@ The `log` subsection configures the behavior of the logging system. The logging
system outputs everything to stdout. You can adjust the granularity and format
with this configuration section.
```yaml
log:
log:
level: debug
formatter: text
fields:
service: registry
environment: staging
```
<table>
<tr>
@ -256,9 +246,7 @@ log:
## hooks
```yaml
hooks:
hooks:
- type: mail
levels:
- panic
@ -271,7 +259,6 @@ hooks:
from: name@sendhost.com
to:
- name@receivehost.com
```
The `hooks` subsection configures the logging hooks' behavior. This subsection
includes a sequence handler which you can use for sending mail, for example.
@ -281,17 +268,14 @@ Refer to `loglevel` to configure the level of messages printed.
> **DEPRECATED:** Please use [log](#logs) instead.
```yaml
loglevel: debug
```
loglevel: debug
Permitted values are `error`, `warn`, `info` and `debug`. The default is
`info`.
## storage
```yaml
storage:
storage:
filesystem:
rootdirectory: /var/lib/registry
azure:
@ -320,7 +304,6 @@ storage:
age: 168h
interval: 24h
dryrun: false
```
The storage option is **required** and defines which storage backend is in use.
You must configure one backend; if you configure more, the registry returns an error.
@ -599,8 +582,7 @@ Note: `age` and `interval` are strings containing a number with optional fractio
## auth
```yaml
auth:
auth:
silly:
realm: silly-realm
service: silly-service
@ -612,7 +594,6 @@ auth:
htpasswd:
realm: basic-realm
path: /path/to/htpasswd
```
The `auth` option is **optional**. There are
currently 2 possible auth providers, `silly` and `token`. You can configure only
@ -777,8 +758,7 @@ object they're wrapping. This means a registry middleware must implement the
Currently only one middleware, `cloudfront`, a storage middleware, is supported
in the registry implementation.
```yaml
middleware:
middleware:
registry:
- name: ARegistryMiddleware
options:
@ -794,7 +774,6 @@ middleware:
privatekey: /path/to/pem
keypairid: cloudfrontkeypairid
duration: 3000
```
Each middleware entry has `name` and `options` entries. The `name` must
correspond to the name under which the middleware registers itself. The
@ -861,8 +840,7 @@ interpretation of the options.
## reporting
```yaml
reporting:
reporting:
bugsnag:
apikey: bugsnagapikey
releasestage: bugsnagreleasestage
@ -871,7 +849,6 @@ reporting:
licensekey: newreliclicensekey
name: newrelicname
verbose: true
```
The `reporting` option is **optional** and configures error and metrics
reporting tools. At the moment only two services are supported, [New
@ -969,8 +946,7 @@ configuration may contain both.
## http
```yaml
http:
http:
addr: localhost:5000
net: tcp
prefix: /my/nested/registry/
@ -983,7 +959,6 @@ http:
- /path/to/another/ca.pem
debug:
addr: localhost:5001
```
The `http` option details the configuration for the HTTP server that hosts the registry.
@ -1109,8 +1084,7 @@ specifies the `HOST:PORT` on which the debug server should accept connections.
## notifications
```yaml
notifications:
notifications:
endpoints:
- name: alistener
disabled: false
@ -1119,7 +1093,6 @@ notifications:
timeout: 500
threshold: 5
backoff: 1000
```
The notifications option is **optional** and currently may contain a single
option, `endpoints`.
@ -1237,8 +1210,7 @@ The URL to which events should be published.
## redis
```yaml
redis:
redis:
addr: localhost:6379
password: asecret
db: 0
@ -1249,7 +1221,6 @@ redis:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
Declare parameters for constructing the redis connections. Registry instances
may use the Redis instance for several applications. The current purpose is
@ -1334,12 +1305,10 @@ with the [pool](#pool) subsection.
### pool
```yaml
pool:
pool:
maxidle: 16
maxactive: 64
idletimeout: 300s
```
Configure the behavior of the Redis connection pool.
@ -1391,19 +1360,17 @@ Configure the behavior of the Redis connection pool.
The following is a simple example you can use for local development:
```yaml
version: 0.1
log:
version: 0.1
log:
level: debug
storage:
storage:
filesystem:
rootdirectory: /var/lib/registry
http:
http:
addr: localhost:5000
secret: asecretforlocaldevelopment
debug:
addr: localhost:5001
```
The above configures the registry instance to run on port `5000`, binding to
`localhost`, with the `debug` server enabled. Registry data storage is in the
@ -1454,8 +1421,7 @@ conjunction with the S3 storage driver.
The following example illustrates these values:
```
middleware:
middleware:
storage:
- name: cloudfront
disabled: false
@ -1464,7 +1430,6 @@ middleware:
privatekey: /path/to/asecret.pem
keypairid: asecret
duration: 60
```
>**Note**: Cloudfront keys exist separately to other AWS keys. See

@ -36,8 +36,7 @@ order is not guaranteed.
To setup a registry instance to send notifications to endpoints, one must add
them to the configuration. A simple example follows:
```yaml
notifications:
notifications:
endpoints:
- name: alistener
url: https://mylistener.example.com/event
@ -46,7 +45,6 @@ notifications:
timeout: 500ms
threshold: 5
backoff: 1s
```
The above would configure the registry with an endpoint to send events to
`https://mylistener.example.com/event`, with the header "Authorization: Bearer