Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • Zero Downtime Deployment of BusinessWorks Container Edition with Kubernetes ? Part 4


    Manoj Chaurasia

    Table of Contents

    Blue/Green Strategy


    In my previous three posts (Part 1Part 2, and Part 3)we created and deployed a Micro Service using TIBCO BusinessWorks Container Edition into Kubernetes (I used Minikube), and then upgraded it using the Recreate and Rolling Update strategy.

    In this post, we?re going to take the original deployment of Version 1.0 (which we rolled back to at the end of the second post) and upgrade it again to 1.1, but this time using the Blue/Green strategy.

    A Blue/Green deployment strategy (sometimes also known as Red/Black) allows you to deploy upgraded services alongside your existing services and the two don?t interact in any way. The URL of the Service defined is different so it allows you to test the new deployment before switching over all the traffic.

    I?ve created an example manifest file where the changes I?ve made are pretty minimal and really just add in the keywords ?version: green?. The complete version of the file is here. I?ve also removed the definitions for the Service as we?ll keep the same service as our original application, and later we?ll update the configuration to point to our new green deployment later.

    In my Minikube environment, I still have my version 1.0 running ? so I?ll deploy this new ?Green? version of the deployment using the command:

    Part4_1.png.6ec48c3fc7a179be2d58f52333d2a72d.png

    When the deployment is complete, you?ll see that we now have 2 deployments ? our original deployment, plus our new Green deployment ? each with 2 Pods running.

    Part4_2.png.116b1e6cfc79e5705098532e05da5370.png

    So we have our Green deployment running ? but there?s no traffic there just yet, so we?ve got to create a new Service that points to the new deployment. You can find the service file here, and you can create the service using the following:

    Part4_3.png.e4e0e8f24946fe323a10b33190d5a338.png

    Executing ?minikube service list? shows the below:

    Part4_4.png.edf8e07e8ee29fbb6a980a10e055b26f.png

    Where we can see our two deployments. Our new service can be found at http://192.168.49.2:30092, so we can now do our testing using the new URL.

    So at this stage ? we have both deployments up and running in parallel and our testing is going ahead.

    Part4_5.png.d13ce1f04700b7c03162c44fd4d6d4ec.png

    Now ? we are ready to switch traffic fully over to our Green deployment as our ?Live? deployment and then we can remove our old deployment.

    To do this, I?ve created a new manifest file for the ?Live? service and changes the selector to point to the green-greeting-app and version:green as below:

    part4_6.png.a44a38932a27b76814fcfe52c6595c8c.png

    Issuing the following command modifies the existing greeting-app service to point to the new Green app:

    Part4_7.png.30477ac571572c5ac51e161f5cd4e2c8.png

    Looking at the terminal output below ? you can see that as soon as I issue the update, Live traffic is immediately switched over to the green deployment.

    Part4_8.png.2c618860abf6a1e3808b7f7294fceaf9.png

    It feels like these posts are getting shorter ? once you?ve got your microservice-based application deployed in K8s it really is quite easy to upgrade them using the different strategies.

    As before ? I?ve created a 

     to go along with this post, so feel free to watch and read at the same time!

    In the next and final post in this series, we?ll be looking at the Canary Strategy.


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...