-
Notifications
You must be signed in to change notification settings - Fork 363
/
Copy path_object.md.erb
155 lines (134 loc) · 8.07 KB
/
_object.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
A manifest is a method for applying bulk configurations to apps and their underlying processes.
Manifests are in the YAML format. However, anchors and aliases are not supported.
### The manifest schema
```
Example Manifest
```
```yaml
---
version: 1
applications:
- name: app1
buildpacks:
- ruby_buildpack
- java_buildpack
env:
VAR1: value1
VAR2: value2
routes:
- route: route.example.com
- route: another-route.example.com
protocol: http2
services:
- my-service1
- my-service2
- name: my-service-with-arbitrary-params
binding_name: my-binding
parameters:
key1: value1
key2: value2
stack: cflinuxfs4
metadata:
annotations:
contact: "bob@example.com jane@example.com"
labels:
sensitive: true
processes:
- type: web
command: start-web.sh
disk_quota: 512M
health-check-http-endpoint: /healthcheck
health-check-type: http
health-check-invocation-timeout: 10
instances: 3
memory: 500M
log-rate-limit-per-second: 1KB
timeout: 10
- type: worker
command: start-worker.sh
disk_quota: 1G
health-check-type: process
instances: 2
memory: 256M
log-rate-limit-per-second: 1KB
timeout: 15
- name: app2
env:
VAR1: value1
processes:
- type: web
instances: 1
memory: 256M
log-rate-limit-per-second: 1KB
sidecars:
- name: authenticator
process_types: [ 'web', 'worker' ]
command: bundle exec run-authenticator
memory: 800M
- name: upcaser
process_types: [ 'worker' ]
command: ./tr-server
memory: 2G
```
#### Space-level configuration
Name | Type | Description
----- | ---- | -----------
**applications** | _array of [app configurations](#space-manifest-app-level-configuration)_ | Configurations for apps in the space
**version** | _integer_ | The manifest schema version; currently the only valid version is `1`, defaults to `1` if not provided
#### <a name="space-manifest-app-level-configuration"></a>App-level configuration
This configuration is specified per application and applies to all of the application's processes.
Name | Type | Description
----- | ---- | -----------
**name** | _string_ | Name of the app
**buildpacks** | _list of strings_ | a) An empty array, which will automatically select the appropriate default buildpack according to the coding language <br>b) An array of one or more URLs pointing to buildpacks <br>c) An array of one or more installed buildpack names <br>Replaces the legacy `buildpack` field
**docker** | _object_ | If present, the created app will have Docker lifecycle type; the value of this key is ignored by the API but may be used by clients to source the registry address of the image and credentials, if needed; the [generate manifest endpoint](#generate-a-manifest-for-an-app) will return the registry address of the image and username provided with this key
**env** | _object_ | A key-value mapping of environment variables to be used for the app when running
**no-route** | _boolean_ | When set to `true`, any routes specified with the `routes` attribute will be ignored and any existing routes will be removed
**processes** | _array of [process configurations](#space-manifest-process-level-configuration)_ | List of configurations for individual process types
**random-route** | _boolean_ | Creates a random route for the app if `true`; if `routes` is specified, if the app already has routes, or if `no-route` is specified, this field is ignored regardless of its value
**default-route** | _boolean_ | If true, a route for the app will be created using the app name as the hostname and the containing organization's default domain as the domain; if `routes` is specified, if the app already has routes, or if `no-route` is specified, this field is ignored regardless of its value
**routes** | _array of [route configurations](#space-manifest-route-level-configuration)_ | List declaring HTTP and TCP routes to be mapped to the app.
**services** | _array of [service configurations](#space-manifest-service-level-configuration)_ | A list of service-instances to bind to the app
**sidecars** | _array of [sidecar configurations](#space-manifest-sidecar-level-configuration)_ | A list of configurations for individual sidecars
**stack** | _string_ | The root filesystem to use with the buildpack, for example `cflinuxfs4`
**metadata.labels** | _[label object](#labels)_ | Labels applied to the app
**metadata.annotations** | _[annotation object](#annotations)_ | Annotations applied to the app
**buildpack** | _string_ | **DEPRECATED in favor of the `buildpacks` field above**
#### <a name="space-manifest-process-level-configuration"></a> Process-level configuration
This configuration is for the individual process. Each process is created if it does not already exist.
For backwards compatibility, the `web` process configuration may be placed at the top level of the application configuration, rather than listed under `processes`. However, if there is a process with `type: web` listed under `processes`, this configuration will override any at the top level.
Name | Type | Description
---- | ---- | -----------
**type** | _string_ | **(Required)** The identifier for the processes to be configured
**command** | _string_ | The command used to start the process; this overrides start commands from [Procfiles](#procfiles) and buildpacks
**disk_quota** | _string_ | The disk limit for all instances of the web process; <br>this attribute requires a unit of measurement: `B`, `K`, `KB`, `M`, `MB`, `G`, `GB`, `T`, or `TB` in upper case or lower case
**health-check-http-endpoint** | _string_ | Endpoint called to determine if the app is healthy
**health-check-invocation-timeout** | _integer_ | The timeout in seconds for individual health check requests for http and port health checks
**health-check-type** | _string_ | Type of health check to perform; `none` is deprecated and an alias to `process`
**instances** | _integer_ | The number of instances to run
**memory** | _string_ | The memory limit for all instances of the web process; <br>this attribute requires a unit of measurement: `B`, `K`, `KB`, `M`, `MB`, `G`, `GB`, `T`, or `TB` in upper case or lower case
**log-rate-limit-per-second** | _string_ | The log rate limit for all the instances of the process; <br>this attribute requires a unit of measurement: `B`, `K`, `KB`, `M`, `MB`, `G`, `GB`, `T`, or `TB` in upper case or lower case, or -1 or 0
**timeout** | _integer_ | Time in seconds at which the health-check will report failure
#### <a name="space-manifest-route-level-configuration"></a> Route-level configuration
This configuration is for _creating_ mappings between the app and a route. Each route is created if it does not already exist. The protocol
will be updated for any existing route mapping.
Name | Type | Description
---- | ---- | -----------
**route** | _string_ | **(Required)** The route URI. Example: `host.domain.com`
**protocol** | _string_ | Protocol to use for this route. Valid protocols are `http1`, `http2`, and `tcp`.
#### <a name="space-manifest-service-level-configuration"></a> Service-level configuration
This configuration is _creating_ new service bindings between the app and a service instance. The `services` field can
take either an array of service instance name strings or an array of the following service-level fields.
Name | Type | Description
---- | ---- | -----------
**name** | _string_ | **(Required)** The name of the service instance to be bound to
**binding_name** | _string_ | The name of the service binding to be created
**parameters** | _object_ | A map of arbitrary key/value pairs to send to the service broker during binding
#### <a name="space-manifest-sidecar-level-configuration"></a> Sidecar-level configuration
This configuration is for the individual sidecar. Each sidecar is created if it does not already exist.
Name | Type | Description
---- | ---- | -----------
**name** | _string_ | **(Required)** The identifier for the sidecars to be configured
**command** | _string_ | The command used to start the sidecar
**process_types** | _list of strings_ | List of processes to associate sidecar with
**memory** | _integer_ | Memory in MB that the sidecar will be allocated