Skip to content

Commit e6a23dc

Browse files
authored
Merge pull request #13593 from adellape/deployments_4.0
Add deployments topics to 4.0
2 parents a08929c + 44d7443 commit e6a23dc

File tree

61 files changed

+1935
-41
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1935
-41
lines changed

_topic_map.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ Name: Applications and projects
3333
Dir: applications_and_projects
3434
Distros: openshift-*
3535
Topics:
36+
- Name: Deployments
37+
Dir: deployments
38+
Topics:
39+
- Name: What Deployments and DeploymentConfigs are
40+
File: what-deployments-are
41+
- Name: Managing deployment processes
42+
File: managing-deployment-processes
43+
- Name: Using DeploymentConfig strategies
44+
File: deployment-strategies
45+
- Name: Using route-based deployment strategies
46+
File: route-based-deployment-strategies
3647
- Name: Managing resources from CRDs
3748
File: crd-managing-resources-from-crds
3849
---
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
:relfileprefix: ../
2+
[id='deployment-strategies']
3+
= Using DeploymentConfig strategies
4+
include::modules/common-attributes.adoc[]
5+
:context: deployment-strategies
6+
7+
toc::[]
8+
9+
{nbsp} +
10+
A _deployment strategy_ is a way to change or upgrade an application. The aim
11+
is to make the change without downtime in a way that the user barely notices the
12+
improvements.
13+
14+
Because the end user usually accesses the application through a route handled by
15+
a router, the deployment strategy can focus on DeploymentConfig features or
16+
routing features. Strategies that focus on the DeploymentConfig impact all
17+
routes that use the application. Strategies that use router features target
18+
individual routes.
19+
20+
Many deployment strategies are supported through the DeploymentConfig, and some
21+
additional strategies are supported through router features.
22+
DeploymentConfig strategies are discussed in this section.
23+
24+
25+
////
26+
This link keeps breaking Travis for some reason.
27+
28+
[NOTE]
29+
====
30+
See
31+
xref:../applications_and_projects/deployments/route-based-deployment-strategies.adoc#route-based-deployment-strategies[Using route-based deployment strategies] for more on these additional strategies.
32+
====
33+
////
34+
35+
*Choosing a deployment strategy*
36+
37+
Consider the following when choosing a deployment strategy:
38+
39+
- Long-running connections must be handled gracefully.
40+
- Database conversions can be complex and must be done and rolled back along with
41+
the application.
42+
- If the application is a hybrid of microservices and traditional components,
43+
downtime might be required to complete the transition.
44+
- You need the infrastructure to do this.
45+
- If you have a non-isolated test environment, you can break both new and old
46+
versions.
47+
48+
A deployment strategy uses readiness checks to determine if a new Pod is ready
49+
for use. If a readiness check fails, the DeploymentConfig retries to run the
50+
Pod until it times out. The default timeout is `10m`, a value set in
51+
`TimeoutSeconds` in `dc.spec.strategy.*params`.
52+
53+
include::modules/deployments-rolling-strategy.adoc[leveloffset=+1]
54+
include::modules/deployments-canary-deployments.adoc[leveloffset=+2]
55+
include::modules/deployments-creating-rolling-deployment.adoc[leveloffset=+2]
56+
57+
include::modules/deployments-recreate-strategy.adoc[leveloffset=+1]
58+
include::modules/deployments-custom-strategy.adoc[leveloffset=+1]
59+
include::modules/deployments-lifecycle-hooks.adoc[leveloffset=+1]
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
:relfileprefix: ../
2+
[id='deployment-operations']
3+
= Managing deployment processes
4+
include::modules/common-attributes.adoc[]
5+
:context: deployment-operations
6+
7+
toc::[]
8+
{nbsp} +
9+
10+
[id='deploymentconfig-operations']
11+
== Managing DeploymentConfigs
12+
13+
DeploymentConfigs can be managed from the {product-title} web console's
14+
*Workloads* page or using the `oc` CLI. The following procedures show CLI usage
15+
unless otherwise stated.
16+
17+
include::modules/deployments-starting-deployment.adoc[leveloffset=+2]
18+
include::modules/deployments-viewing-deployment.adoc[leveloffset=+2]
19+
include::modules/deployments-retrying-deployment.adoc[leveloffset=+2]
20+
include::modules/deployments-rolling-back.adoc[leveloffset=+2]
21+
include::modules/deployments-exec-cmd-in-container.adoc[leveloffset=+2]
22+
include::modules/deployments-viewing-logs.adoc[leveloffset=+2]
23+
include::modules/deployments-triggers.adoc[leveloffset=+2]
24+
include::modules/deployments-setting-triggers.adoc[leveloffset=+3]
25+
include::modules/deployments-setting-resources.adoc[leveloffset=+2]
26+
include::modules/deployments-scaling-manually.adoc[leveloffset=+2]
27+
include::modules/deployments-accessing-private-repos.adoc[leveloffset=+2]
28+
29+
ifdef::openshift-enterprise,openshift-origin[]
30+
include::modules/deployments-assigning-pods-to-nodes.adoc[leveloffset=+2]
31+
endif::[]
32+
33+
ifndef::openshift-online[]
34+
include::modules/deployments-running-pod-svc-acct.adoc[leveloffset=+2]
35+
endif::[]
36+
37+
////
38+
== Managing Deployments
39+
40+
Need docs on managing Deployment objects.
41+
////
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
:relfileprefix: ../
2+
[id='route-based-deployment-strategies']
3+
= Using route-based deployment strategies
4+
include::modules/common-attributes.adoc[]
5+
:context: route-based-deployment-strategies
6+
7+
toc::[]
8+
9+
{nbsp} +
10+
Deployment strategies provide a way for the application to evolve. Some
11+
strategies use DeploymentConfigs to make changes that are seen by users of all
12+
routes that resolve to the application. Other advanced strategies, such as the
13+
ones described in this section, use router features in conjunction with
14+
DeploymentConfigs to impact specific routes.
15+
16+
////
17+
This link keeps breaking Travis for some reason.
18+
19+
[NOTE]
20+
====
21+
See
22+
xref:../applications_and_projects/deployments/deployment-strategies.adoc#deployment-strategies[Using DeploymentConfig strategies]
23+
for more on the basic strategy types.
24+
====
25+
////
26+
27+
The most common route-based strategy is to use a _blue-green deployment_. The
28+
new version (the blue version) is brought up for testing and evaluation, while
29+
the users still use the stable version (the green version). When ready, the
30+
users are switched to the blue version. If a problem arises, you can switch back
31+
to the green version.
32+
33+
A common alternative strategy is to use _A/B versions_ that are both active at
34+
the same time and some users use one version, and some users use the other
35+
version. This can be used for experimenting with user interface changes and
36+
other features to get user feedback. It can also be used to verify proper
37+
operation in a production context where problems impact a limited number of
38+
users.
39+
40+
A canary deployment tests the new version but when a problem is detected it
41+
quickly falls back to the previous version. This can be done with both of the
42+
above strategies.
43+
44+
The route-based deployment strategies do not scale the number of Pods in the
45+
services. To maintain desired performance characteristics the deployment
46+
configurations may need to be scaled.
47+
48+
include::modules/deployments-proxy-shards.adoc[leveloffset=+1]
49+
include::modules/deployments-n1-compatibility.adoc[leveloffset=+1]
50+
include::modules/deployments-graceful-termination.adoc[leveloffset=+1]
51+
include::modules/deployments-blue-green.adoc[leveloffset=+1]
52+
include::modules/deployments-ab-testing.adoc[leveloffset=+1]
53+
include::modules/deployments-ab-testing-lb.adoc[leveloffset=+2]
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
:relfileprefix: ../
2+
[id='what-deployments-are']
3+
= What Deployments and DeploymentConfigs are
4+
include::modules/common-attributes.adoc[]
5+
:context: what-deployments-are
6+
7+
toc::[]
8+
{nbsp} +
9+
10+
_Deployments_ and _DeploymentConfigs_ in {product-title} are API objects that
11+
provide two similar but different methods for fine-grained management over
12+
common user applications. They are comprised of the following separate API
13+
objects:
14+
15+
- A DeploymentConfig or a Deployment, either of which describes the desired state
16+
of a particular component of the application as a Pod template.
17+
- DeploymentConfigs involve one or more _ReplicationControllers_, which contain a
18+
point-in-time record of the state of a DeploymentConfig as a Pod template.
19+
Similarly, Deployments involve one or more _ReplicaSets_, a successor of
20+
ReplicationControllers.
21+
- One or more Pods, which represent an instance of a particular version of an
22+
application.
23+
24+
////
25+
Update when converted:
26+
27+
.Additional resource
28+
29+
xref:advanced_deployment_strategies.adoc#graceful-termination[graceful shutdown]
30+
xref:basic_deployment_operations.adoc#triggers[Triggers]
31+
xref:deployment_strategies.adoc#strategies[strategies]
32+
xref:deployment_strategies.adoc#lifecycle-hooks[hooks]
33+
xref:basic_deployment_operations.adoc#rolling-back-a-deployment[rollbacks]
34+
xref:basic_deployment_operations.adoc#scaling[scaling]
35+
xref:../../dev_guide/pod_autoscaling.adoc#dev-guide-pod-autoscaling[autoscaling]
36+
////
37+
38+
[id='what-deployments-are-build-blocks']
39+
== Building blocks of a deployment
40+
41+
Deployments and DeploymentConfigs are enabled by the use of native Kubernetes
42+
API objects ReplicationControllers and ReplicaSets, respectively, as their
43+
building blocks.
44+
45+
Users do not need to manipulate ReplicationControllers, ReplicaSets, or Pods
46+
owned by DeploymentConfigs or Deployments. The deployment systems ensures
47+
changes are propagated appropriately.
48+
49+
[TIP]
50+
====
51+
If the existing deployment strategies are not suited for your use case and you
52+
have the need to run manual steps during the lifecycle of your deployment, then
53+
you should consider creating a Custom deployment strategy.
54+
====
55+
56+
The following sections provide further details on these objects.
57+
58+
include::modules/deployments-replicationcontrollers.adoc[leveloffset=+2]
59+
include::modules/deployments-replicasets.adoc[leveloffset=+2]
60+
61+
include::modules/deployments-deploymentconfigs.adoc[leveloffset=+1]
62+
include::modules/deployments-kube-deployments.adoc[leveloffset=+1]
63+
include::modules/deployments-comparing-deploymentconfigs.adoc[leveloffset=+1]
64+
////
65+
Update when converted:
66+
67+
.Additional resources
68+
69+
- xref:../../dev_guide/managing_images.adoc#dev-guide-managing-images[Image streams]
70+
- xref:../../dev_guide/deployments/deployment_strategies.adoc#lifecycle-hooks[Lifecycle hooks]
71+
- xref:../../dev_guide/deployments/deployment_strategies.adoc#custom-strategy[Custom deployment strategies]
72+
////

asciibinder-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
description: "Takes files created for static site generator AsciiBinder (http://asciibinder.org/) from a public source repo, builds them in Ruby, and deploys them in a PHP container."
99
tags: "ruby,asciibinder"
1010
iconClass: "icon-shadowman"
11-
template.openshift.io/long-description: "This template defines resources needed to develop an AsciiBinder application, including a build configuration and application deployment configuration."
11+
template.openshift.io/long-description: "This template defines resources needed to develop an AsciiBinder application, including a build configuration and application DeploymentConfig."
1212
template.openshift.io/provider-display-name: "Red Hat, Inc."
1313
message: "The following service(s) have been created in your project: ${NAME}."
1414
labels:

logging/efk-logging-manual-rollout.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ toc::[]
99

1010
{product0title} is configured so that the Elasticsearch
1111
Deployment Config object does not have a Config Change Trigger, meaning
12-
any changes to the deployment configuration does not result in an automatic rollout. This prevents
12+
any changes to the DeploymentConfig does not result in an automatic rollout. This prevents
1313
unintended restarts happening in the Elasticsearch cluster, which could create excessive shard
1414
rebalancing as cluster members restart.
1515

masters/idling-applications.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ to the resources, the resources are unidled by scaling up the replicas, and
1616
normal operation continues.
1717

1818
Applications are made of services, as well as other scalable resources, such as
19-
deployment configurations. The action of idling an application involves idling
19+
DeploymentConfigs. The action of idling an application involves idling
2020
all associated resources.
2121

2222
include::modules/idle-idling-applications.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)