If you’ve got a large, multi-node application running, you’re probably used to updates that run step—by—step, on one node at a time. That process can get tiresome and error-prone if you have to run those manual updates on lots of nodes. In DevOps, we automate that kind of update in a rolling deployment.
I’ve described a few ways to automate rolling deployments in the article Configuring your applications for rolling deployments. All you really need to do to set up your application for rolling deployments is to take your existing processes and set them up so the processes run on only one node at a time. There are lots of ways to do that in IBM® UrbanCode™ Deploy, but I’ve covered two straightforward ways in the article.
One way is to use the For Each Agent loop to update one agent at a time. Here, I’ve got a sample process set up that updates all of my database nodes first, and all of my web application nodes second. The server knows which nodes have database components and which have web application components, and then updates them one by one in the loop:
Another way, that provides a little more flexibility, is to tag your nodes with resource tags in a way that makes sense for your deployment. This is a good way to go when you’ve got several nodes that you want to update simultaneously, like if you have multiple components that need to be updated for each step in the rolling deployment. For example, if you want to update all of the nodes in a geographical area at once, you can tag the nodes with the geographical area. Then you can run the rolling deployment with a For Each Tag loop, which updates all of the nodes that have a particular tag, one tag at a time.
For example, here’s an environment with the nodes in each geographical area tagged:
I set up my application process with the deployment steps inside a For Each Tag loop:
Then I select the tags to run in that loop and the order for them. In this case I’m updating servers in all four geographic areas, starting with Africa and ending with North America:
This is all covered in more detail in Configuring your applications for rolling deployments, and you can let us know if the forums if you’ve got questions about how to get rolling deployments working.