Update or Upgrade New OneOps Code
The two ways to roll out new code are:
- Update: Rollout the new version of your apps in multiple batches with each batch containing only a certain “percentage” number of the total number of nodes.
- Upgrade: Spin up a new parallel hierarchy of nodes and then switch the traffic to this new cluster.
Roll Out a Code Update
Roll out the new version of your apps in multiple batches with each batch containing only a certain “percentage” number of the total number of nodes. This is done by following these steps:
Go to the platform to be updated within an environment in transition view and change the “% Deploy” value in scaling configuration to 25 for this example.
- Change the version number environment variable of the platform to the latest version you want to update to.
- Commit and deploy. You will notice that the deployment plan has only 25% of the nodes in each data center (edc/ndc). Go ahead and complete the deployment.
- At this stage, your 25 nodes in each data center (assuming 100 hundred nodes in each data center) are upgraded with the latest version.
- Change the ‘% Deploy’ value to 50% and then save, commit and deploy. Now you have the next batch of (25%) of your nodes upgraded to the latest version.
- Repeat this until you have completed 100%.
- During this upgrade process, 75% nodes are always available to serve the traffic.
- You must have a proper next version (not same snapshot version) of your application(s) for doing this “update” process.
- Between percentage change from 25% to 100%, there should not be any update in design/transition so that this is the only change propagated to the specified percentage of computes.
- The previous steps can also done by DC.
Roll Out a Code Upgrade
Create a new parallel hierarchy of nodes and then switch the traffic to this new cluster. Here are the steps:
- Go to the design of your assembly.
- Select your Tomcat platform (choose your platform) and click edit.
- Increment its version and save. Here you are telling OneOps that you have a new major version of your product.
- Go to your environment in Transition and pull the design. OneOps is going to add a new platform to your environment.
- Select the redundancy (redundant or singleton) of your new platform.
- There will be two platforms in your environment. One with old version and one with new version.
- Click the new platform and change the “version” variable to the new release maven version of the application.
- Commit and deploy. This creates a brand new cluster of nodes for your application but it does not yet change the dns entries, etc.
- On the environment page, select the drop-down for the new platform and select activate. This changes the DNS entries and all your traffic starts to hit the new nodes.
- You can choose to keep the old nodes and platform for a few days in case you want to switch back to it (by activating it) or you can get rid of it by clicking the “terminate” on the drop-down menu.