You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
!!! note "Blue-Green Deployment with MTA CF CLI Plugin"
19
-
The Multiapps Plugin offers 2 different strategies:
16
+
* Blue green deployments are deprecated, but [rolling deployment strategy](https://docs.cloudfoundry.org/devguide/deploy-apps/rolling-deploy.html) is supported.<br>
17
+
* For rolling deployment strategy , set parameter `cfNativeDeployParameters:'--strategy rolling'`
18
+
19
+
**With [MTA CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) for MTA applications**
20
20
21
-
* [Blue-Green Deployment Strategy](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-strategy) - where the production environments are called “live” and “idle” during deployment. This strategy is activated with `mtaDeployParameters: --strategy blue-green --skip-testing-phase` and `deployType=standard`. After deployment, appnames are not appeneded by any suffix like `-live` or `-idle`.
22
-
* [Legacy Blue-Green Deployment](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-legacy) - where the productive environments are called “blue” and “green. Activated by `deployType=blue-green`. After deployment, appnames are appeneded by suffix like `-blue` or `-green`
21
+
The Multiapps Plugin offers 2 different strategies:<br>
22
+
23
+
*[Blue-Green Deployment Strategy](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-strategy) - where the production environments are called “live” and “idle” during deployment. This strategy is activated with `mtaDeployParameters: --strategy blue-green --skip-testing-phase` and `deployType=standard`. After deployment, appnames are not appeneded by any suffix like `-live` or `-idle`.<br>
24
+
*[Legacy Blue-Green Deployment](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-legacy) - where the productive environments are called “blue” and “green. Activated by `deployType=blue-green`. After deployment, appnames are appeneded by suffix like `-blue` or `-green`
25
+
26
+
Following table summarizes the different combinations of the step parameters `deployType` and `deployTool` and their impact.
27
+
Parameter `buildTool` is used to differentiate between MTA and Non MTA applications. If `buildTool` is not available in the environment, user will have to provide `deployTool` explicitly.
28
+
29
+
#### Deployment Strategy Comparison
30
+
31
+
This table compares deployment strategies for MTA and Non-MTA applications.
32
+
33
+
| deployType | MTA Applications | Non MTA Applications |
|**standard**| deployTool = mtaDeployPlugin <br> Uses MTA plugin, <br> Command run `cf deploy`| deployTool = cf_native <br> cf CLI used <br> Command `cf push` <br> Requires Manifest file and app name <br> appname can be provided via config or manifest file. |
36
+
|**blue-green**| deployTool = mtaDeployPlugin, <br> Uses MTA plugin <br> Command run `cf deploy bgdeploy`| Deprecated. <br> **Alternative:** Rolling deployment strategy by setting <br> `cfNativeDeployParameters = '--strategy rolling'`|
37
+
||**deployDockerImage not supported**|**deployDockerImage supported**<br>Docker credentials can only be provided as Jenkins environment variable. |
23
38
24
39
!!! note
25
40
Due to [an incompatible change](https://github.com/cloudfoundry/cli/issues/1445) in the Cloud Foundry CLI, multiple buildpacks are not supported by this step.
Copy file name to clipboardExpand all lines: resources/metadata/cloudFoundryDeploy.yaml
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,14 @@ metadata:
3
3
description: "Deploys an application to Cloud Foundry"
4
4
longDescription: |
5
5
Deploys an application to a test or production space within Cloud Foundry.
6
+
This step supports two deployment types:
7
+
8
+
* in a standard way
9
+
* in a zero-downtime manner using a [blue-green deployment approach](https://martinfowler.com/bliki/BlueGreenDeployment.html)
10
+
11
+
The step achieves this via following deploy tools
12
+
* [cf CLI](https://docs.cloudfoundry.org/cf-cli/) - used as default for Non MTA apps
13
+
* [MTA CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) - used as default for MTA apps
6
14
spec:
7
15
inputs:
8
16
secrets:
@@ -98,11 +106,11 @@ spec:
98
106
- name: deployDockerImage
99
107
type: string
100
108
description: "Docker image deployments are supported
101
-
(via manifest file in general)[https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#docker].
109
+
[via manifest file in general](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#docker).
102
110
If no manifest is used, this parameter defines the image to be deployed.
103
111
The specified name of the image is passed to the `--docker-image` parameter of the cf CLI and must
104
112
adhere it's naming pattern (e.g. REPO/IMAGE:TAG).
105
-
See (cf CLI documentation)[https://docs.cloudfoundry.org/devguide/deploy-apps/push-docker.html]
113
+
See [cf CLI documentation](https://docs.cloudfoundry.org/devguide/deploy-apps/push-docker.html)x`x`
106
114
for details.
107
115
Note: The used Docker registry must be visible for the targeted Cloud Foundry instance."
108
116
scope:
@@ -113,7 +121,7 @@ spec:
113
121
mandatory: false
114
122
- name: deployTool
115
123
type: string
116
-
description: "Defines the tool which should be used for deployment."
124
+
description: "Defines the tool which should be used for deployment. Mandatory if `buildTool` is not found in pipeline environment"
117
125
scope:
118
126
- PARAMETERS
119
127
- STAGES
@@ -136,10 +144,9 @@ spec:
136
144
- name: deployType
137
145
type: string
138
146
description:
139
-
"Defines the type of deployment, for example, `standard` deployment which results in a system
140
-
downtime, `blue-green` deployment which results in zero downtime for mta deploy tool.
141
-
- For mta build tool, possible values are `standard`, `blue-green` or `bg-deploy`.
142
-
- For cf native build tools, possible value is `standard`. To eliminate system downtime, an alternative is to pass '--strategy rolling' to the parameter `cfNativeDeployParameters`."
147
+
"Defines the type of deployment -`standard` or `blue-green` deployment.
148
+
For mta build tool, possible values are `standard`, `blue-green` or `bg-deploy`.
149
+
For cf native build tools, possible value is `standard`. To eliminate system downtime, an alternative is to pass '--strategy rolling' to the parameter `cfNativeDeployParameters`."
143
150
scope:
144
151
- PARAMETERS
145
152
- STAGES
@@ -199,7 +206,7 @@ spec:
199
206
mandatory: false
200
207
- name: manifest
201
208
type: string
202
-
description: "Defines the manifest to be used for deployment to Cloud Foundry."
209
+
description: "Defines the manifest file name to be used for deployment to Cloud Foundry. Defaults to `manifest.yml`"
0 commit comments