Skip to content

Commit ed6f6a5

Browse files
ashlymatmaxcask
andauthored
Improve CF documentation (#5274)
* Improve CF documentation * Lint fix --------- Co-authored-by: maxcask <[email protected]>
1 parent fb49522 commit ed6f6a5

File tree

3 files changed

+54
-24
lines changed

3 files changed

+54
-24
lines changed

cmd/cloudFoundryDeploy_generated.go

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

documentation/docs/steps/cloudFoundryDeploy.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,37 @@
44

55
### Additional Hints
66

7-
Deployment can be done
7+
#### Standard CF deployments
88

9-
* in a standard way
10-
* in a zero-downtime manner (using a [blue-green deployment approach](https://martinfowler.com/bliki/BlueGreenDeployment.html))
9+
`deployType` parameter defaults to value `standard`.<br>
10+
This means that CF CLI is called by piper and command `cf push` is run by piper
1111

12-
!!! note "Deployment supports multiple deployment tools"
13-
Currently the following are supported:
12+
#### Blue green deployments
1413

15-
* Standard `cf push` and [Bluemix blue-green plugin](https://github.com/bluemixgaragelondon/cf-blue-green-deploy#how-to-use)
16-
* [MTA CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin)
14+
**With CF CLI**
1715

18-
!!! 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**
2020

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 |
34+
|---------------|-----------------|----------------------|
35+
| **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. |
2338

2439
!!! note
2540
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.

resources/metadata/cloudFoundryDeploy.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ metadata:
33
description: "Deploys an application to Cloud Foundry"
44
longDescription: |
55
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
614
spec:
715
inputs:
816
secrets:
@@ -98,11 +106,11 @@ spec:
98106
- name: deployDockerImage
99107
type: string
100108
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).
102110
If no manifest is used, this parameter defines the image to be deployed.
103111
The specified name of the image is passed to the `--docker-image` parameter of the cf CLI and must
104112
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`
106114
for details.
107115
Note: The used Docker registry must be visible for the targeted Cloud Foundry instance."
108116
scope:
@@ -113,7 +121,7 @@ spec:
113121
mandatory: false
114122
- name: deployTool
115123
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"
117125
scope:
118126
- PARAMETERS
119127
- STAGES
@@ -136,10 +144,9 @@ spec:
136144
- name: deployType
137145
type: string
138146
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`."
143150
scope:
144151
- PARAMETERS
145152
- STAGES
@@ -199,7 +206,7 @@ spec:
199206
mandatory: false
200207
- name: manifest
201208
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`"
203210
scope:
204211
- PARAMETERS
205212
- STAGES

0 commit comments

Comments
 (0)