Skip to content

Commit 85777d1

Browse files
authored
Merge pull request #30211 from bergerhoffer/GitHub-27639
GitHub-27639: Switching blue and green references
2 parents 282a2b2 + 91d69cf commit 85777d1

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

applications/deployments/route-based-deployment-strategies.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for more on the basic strategy types.
1818
====
1919
////
2020

21-
The most common route-based strategy is to use a _blue-green deployment_. The new version (the blue version) is brought up for testing and evaluation, while the users still use the stable version (the green version). When ready, the users are switched to the blue version. If a problem arises, you can switch back to the green version.
21+
The most common route-based strategy is to use a _blue-green deployment_. The new version (the green version) is brought up for testing and evaluation, while the users still use the stable version (the blue version). When ready, the users are switched to the green version. If a problem arises, you can switch back to the blue version.
2222

2323
A common alternative strategy is to use _A/B versions_ that are both active at the same time and some users use one version, and some users use the other version. This can be used for experimenting with user interface changes and other features to get user feedback. It can also be used to verify proper operation in a production context where problems impact a limited number of users.
2424

modules/deployments-blue-green.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[id="deployments-blue-green_{context}"]
66
= Blue-green deployments
77

8-
Blue-green deployments involve running two versions of an application at the same time and moving traffic from the in-production version (the green version) to the newer version (the blue version). You can use a rolling strategy or switch services in a route.
8+
Blue-green deployments involve running two versions of an application at the same time and moving traffic from the in-production version (the blue version) to the newer version (the green version). You can use a rolling strategy or switch services in a route.
99

1010
Because many applications depend on persistent data, you must have an application that supports _N-1 compatibility_, which means it shares data and implements live migration between the database, store, or disk by creating two copies of the data layer.
1111

@@ -21,41 +21,41 @@ Blue-green deployments use two `DeploymentConfig` objects. Both are running, and
2121
Routes are intended for web (HTTP and HTTPS) traffic, so this technique is best suited for web applications.
2222
====
2323

24-
You can create a new route to the new version and test it. When ready, change the service in the production route to point to the new service and the new (blue) version is live.
24+
You can create a new route to the new version and test it. When ready, change the service in the production route to point to the new service and the new (green) version is live.
2525

26-
If necessary, you can roll back to the older (green) version by switching the service back to the previous version.
26+
If necessary, you can roll back to the older (blue) version by switching the service back to the previous version.
2727

2828
.Procedure
2929

3030
. Create two independent application components.
31-
.. Create a copy of the example application running the `v1` image under the `example-green` service:
31+
.. Create a copy of the example application running the `v1` image under the `example-blue` service:
3232
+
3333
[source,terminal]
3434
----
35-
$ oc new-app openshift/deployment-example:v1 --name=example-green
35+
$ oc new-app openshift/deployment-example:v1 --name=example-blue
3636
----
3737
+
38-
.. Create a second copy that uses the `v2` image under the `example-blue` service:
38+
.. Create a second copy that uses the `v2` image under the `example-green` service:
3939
+
4040
[source,terminal]
4141
----
42-
$ oc new-app openshift/deployment-example:v2 --name=example-blue
42+
$ oc new-app openshift/deployment-example:v2 --name=example-green
4343
----
4444

4545
. Create a route that points to the old service:
4646
+
4747
[source,terminal]
4848
----
49-
$ oc expose svc/example-green --name=bluegreen-example
49+
$ oc expose svc/example-blue --name=bluegreen-example
5050
----
5151

52-
. Browse to the application at `example-green.<project>.<router_domain>` to verify you see the `v1` image.
52+
. Browse to the application at `example-blue.<project>.<router_domain>` to verify you see the `v1` image.
5353

54-
. Edit the route and change the service name to `example-blue`:
54+
. Edit the route and change the service name to `example-green`:
5555
+
5656
[source,terminal]
5757
----
58-
$ oc patch route/bluegreen-example -p '{"spec":{"to":{"name":"example-blue"}}}'
58+
$ oc patch route/bluegreen-example -p '{"spec":{"to":{"name":"example-green"}}}'
5959
----
6060

6161
. To verify that the route has changed, refresh the browser until you see the `v2` image.

0 commit comments

Comments
 (0)