Skip to content

Commit

Permalink
Updated readme created new routes
Browse files Browse the repository at this point in the history
  • Loading branch information
malacourse committed Oct 25, 2017
1 parent baa0c2a commit 072b34f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
6 changes: 4 additions & 2 deletions blue-green-spring/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# A Sample OpenShift Pipeline for Blue Green deployments

This example demonstrates how to implement a full end-to-end Jenkins Pipeline for a Java application in a Blue/Green deployment in the OpenShift Container Platform. This sample demonstrates the following capabilities:
This example demonstrates how to implement a full end-to-end Jenkins Pipeline for a Java application in a Blue/Green deployment in the OpenShift Container Platform. The pipleine will create two instances of the applicaiton in the Production namespace. There will be three routes in the namespace; a blue, green and blue-green route. The blue-green route will switch to the latest deployment when the pipeline completes. This allows for tesing of the new deployment prior to switching live traffic. Also, the previous deployment can be used to compmare the previous deployment.

This sample demonstrates the following capabilities:

* Deploying an integrated Jenkins server inside of OpenShift
* Running both custom and oob Jenkins slaves as pods in OpenShift
Expand Down Expand Up @@ -118,7 +120,7 @@ This template should be instantiated once in each of the lower level namespaces
A production blue/green_deploy template_ is provided at `deploy/simple-spring-boot-template-prod.yml` that defines all of the resources required to run the openjdk8 application. It includes:

* Two `Service's`
* A `Route`
* Three `Route's` a blue route, green route and main route that switches between the two deployments/services.
* Two `ImageStream's`
* Two `DeploymentConfig's`
* A `RoleBinding` to allow Jenkins to deploy in each namespace.
Expand Down
30 changes: 29 additions & 1 deletion blue-green-spring/deploy/simple-spring-boot-template-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ objects:
kind: Route
metadata:
annotations:
description: Route for application's http service.
description: Current live route for application's http service.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
Expand All @@ -54,6 +54,34 @@ objects:
host: ${HOSTNAME_HTTP}
to:
name: ${APPLICATION_NAME}-blue
- apiVersion: v1
id: ${APPLICATION_NAME}-http
kind: Route
metadata:
annotations:
description: Route for the blue deployment.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-blue
namespace: ${NAMESPACE}
spec:
host: ${HOSTNAME_HTTP}
to:
name: ${APPLICATION_NAME}-blue
- apiVersion: v1
id: ${APPLICATION_NAME}-http
kind: Route
metadata:
annotations:
description: Route for green deployment.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-green
namespace: ${NAMESPACE}
spec:
host: ${HOSTNAME_HTTP}
to:
name: ${APPLICATION_NAME}-green
- apiVersion: v1
kind: ImageStream
metadata:
Expand Down

0 comments on commit 072b34f

Please sign in to comment.