Skip to content

Commit ee03d28

Browse files
committed
feat(apps): document DEIS_DEPLOY_TIMEOUT and the nuances around that
1 parent dce2d76 commit ee03d28

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

src/applications/deploying-apps.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,34 @@ It is possible to configure a few of the [globally tunable](../applications/mana
6161
Setting | Description
6262
----------------------------------------------- | ---------------------------------
6363
DEIS_DEPLOY_BATCHES | the number of pods to bring up and take down sequentially during a scale (default: number of available nodes)
64+
DEIS_DEPLOY_TIMEOUT | deploy timeout in seconds - there are 2 deploy methods, current (RC) and Deployments (see below) and this setting affects those a bit differently (default: 120)
6465
DEIS_KUBERNETES_DEPLOYMENTS | if enabled [Deployments][] is used to handle an application deploy instead of [ReplicationControllers][]
6566
| any value is acceptable to turn on [Deployments][], to turn it off either remove or pass an empty string (default: off)
6667
KUBERNETES_DEPLOYMENTS_REVISION_HISTORY_LIMIT | how many [revisions][[kubernetes-deployment-revision]] Kubernetes keeps around of a given Deployment (default: all revisions)
6768

69+
### Deploy Timeout
70+
71+
Deploy timeout in seconds - There are 2 deploy methods, current (RC) and Deployments (see below) and this setting affects those a bit differently.
72+
73+
#### RC deploy
74+
75+
This deploy timeout defines how long to wait for each batch to complete in `DEIS_DEPLOY_BATCHES`
76+
77+
#### Deployments
78+
79+
Deployments behave a little bit differently from the RC based deployment strategy.
80+
81+
Kubernetes takes care of the entire deploy, doing rolling updates in the background. As a result, there is only an overall deployment timeout instead of a configurable per-batch timeout.
82+
83+
The base timeout is multiplied with `DEIS_DEPLOY_BATCHES` to create an overall timeout. This would be 240 (timeout) * 4 (batches) = 960 second overall timeout.
84+
85+
#### Additions to the base timeout
86+
87+
The base timeout is extended as well with healthchecks using `initialDelaySeconds` on `liveness` and `readiness` where the bigger of those two is applied.
88+
Additionally the timeout system accounts for slow image pulls by adding an additional 10 minutes when it has seen an image pull take over 1 minute. This allows the timeout values to be reasonable without having to account for image pull slowness in the base deploy timeout.
89+
90+
### Deployments
91+
6892
When `DEIS_KUBERNETES_DEPLOYMENTS=1` is set on an application then Deis Workflow will use [Deployments][] internally instead of [ReplicationControllers][].
6993

7094
The advantage of that is that rolling-updates will happen server-side in Kubernetes instead of in Deis Workflow Controller,

src/managing-workflow/tuning-component-settings.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,19 @@ RESERVED_NAMES | a comma-separated list of name
3939
SLUGRUNNER_IMAGE_NAME | the image used to run buildpack application slugs (default: "quay.io/deisci/slugrunner:canary")
4040
SLUG_BUILDER_IMAGE_PULL_POLICY | the kubernetes [image pull policy][pull-policy] for slugbuilder (default: "Always")
4141
DOCKER_BUILDER_IMAGE_PULL_POLICY | the kubernetes [image pull policy][pull-policy] for dockerbuilder (default: "Always")
42+
KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS | how many seconds kubernetes waits for a pod to finish work after a SIGTERM before sending SIGKILL (default: 30)
43+
44+
### Global and per application settings
45+
46+
Setting | Description
47+
----------------------------------------------- | ---------------------------------
4248
DEIS_DEPLOY_BATCHES | the number of pods to bring up and take down sequentially during a scale (default: number of available nodes)
49+
DEIS_DEPLOY_TIMEOUT | deploy timeout in seconds - there are 2 deploy methods, current (RC) and Deployments (see below) and this setting affects those a bit differently (default: 120)
4350
DEIS_KUBERNETES_DEPLOYMENTS | if enabled [Deployments][] is used to handle an application deploy platform wide instead of [ReplicationControllers][]
4451
| any value is acceptable to turn on [Deployments][], to turn it off either remove or pass an empty string (default: off)
4552
KUBERNETES_DEPLOYMENTS_REVISION_HISTORY_LIMIT | how many [revisions][[kubernetes-deployment-revision]] Kubernetes keeps around of a given Deployment (default: all revisions)
46-
KUBERNETES_POD_TERMINATION_GRACE_PERIOD_SECONDS | how many seconds kubernetes waits for a pod to finish work after a SIGTERM before sending SIGKILL (default: 30)
53+
54+
See the [Deploying Apps][] guide for more detailed information on those.
4755

4856
## Customizing the Database
4957

@@ -109,6 +117,7 @@ DOCTOR_API_URL | The doctor API URL (default: "<https://doctor-staging.deis.c
109117
API_VERSION | The version number Workflow Manager sends to the versions API (default: "v2")
110118

111119

120+
[Deploying Apps][]: ../applications/deploying-apps.md
112121
[builder]: ../understanding-workflow/components.md#builder
113122
[controller]: ../understanding-workflow/components.md#controller
114123
[database]: ../understanding-workflow/components.md#database

0 commit comments

Comments
 (0)