Build and Deploy Multiple Applications with a Single Click

TL;DR: Deploying 100s of applications manually would be time-consuming. You can set up one click deployment and builds through the use of Application groups.

a year ago   •   4 min read

By Rishabh Tayal
Table of contents

Let's say you’ve made a small configuration change in your application. The current application you are managing consists of multiple microservices which are deeply interlinked. To be able to make a small change that is as minor as adding PDB or tweaking configMap, which is mounted in all your applications, modification in replica count, etc., one has to perform a fresh round of deployment across all the microservices for this infra-level change to take effect.

You don’t want to go into every microservice and perform deployments. This is a troublesome and painstaking process that all my fellow developers must go through now and then. Considering the plight of the open-source community, we at Devtron have built a feature called application groups that can automate your config change throughout the application in one go, thus saving multiple hours of redeployments.

What are Application Groups?

Application groups are logical sets of your Devtron Apps deployed in a particular environment. Using Application groups, you can build and deploy multiple applications in a go. You can filter out certain applications and save those filters, making subgroups.

Why Do I Need to Create an Application Group?

Application grouping is a best practice that can simplify performing deployment at scale. Let us take two examples to understand how it works on the ground.

Use Case 1: A development team running 20 tightly coupled microservices (interdependent) will need to redeploy all microservices if one is updated.

Use Case 2: Due to config changes in Kafka broker(s), you might need to redeploy all of your consumer applications.

A developer's life would be very difficult in the two cases above as they do this manually daily. Teams using Devtron can automate this rudimentary manual process with Devtron’s Application Groups.

You can see in the image below what exactly your application groups page will look like. We will then go to the test application group and create a subgroup.

Application Groups
Application Groups

In the image below, we can see that test-1 and test-3 have been filtered out. We can now save this filter from the Save Selection as a filter option.

Let’s save the filter by the name test-odd.

Save selection as filter
Save selection as a filter

How To Use Grouping to Deploy Multiple Applications at Once?

Devtron allows users to perform lifecycle operations on multiple applications, saving a developer hundreds of hours over a month.  The process is simple and can be done through the overview panel, where one must select the designated group.

Step-1: Select Groups from the Overview panel

The overview provides brief information about the particular Application Group. The image below gives detailed info about the environment, applications, deployed status, and much more about the Application Group selected.

NOTE: We have selected the filter above, i.e., test-odd.

Custom groups
Custom groups

Step-2: Trigger Build & Deployment

This section allows users to trigger multiple builds for different applications in that environment and deploy those applications in a single go. Here we can see we have only selected two applications so that we can see the pipelines of those two applications.

Build & Deploy
Build & Deploy

After selecting the applications shown above in the green oval, select the checkbox for Select all apps and click Build Image. All the applications you selected will be listed on the left side. You can go to individual apps to select the git commit with which you want to build. Then finally, click on Start Build.

Bulk Build

Similarly, in case of bulk deployment, select all apps and click Deploy on the bottom right. Another window will pop up where you can iterate through applications and select the image you want to deploy. By default, the Latest Image would be selected.

Step-3: Review Build & Deployment History

Switching to the tab Build History with the selected app filter (test-odd), it gives details of the build such as logs, build audits, source code for which it was built, security results if image scanning is enabled, and much more, as seen in the image below. Here in Application Groups, we can directly navigate to different applications to check build details from the same dashboard.

Build History

Similar to Build History, we can check out the details of the deployment history from the same dashboard and navigate to multiple applications for the deployment history. It gives detailed info about deployments and builds, just like we have in a Devtron App when it is being deployed.

Step-4: Override Configurations if needed

Under Configurations, we can modify the Deployment template, ConfigMaps, and Secrets associated with the selected application’s environment. The catch is you can do so only if you have overridden the environment. You need to Allow Override to make any changes in configurations.

Configurations
Configurations

Summary

Overall, Application Groups is a powerful feature of Devtron that can help you manage your applications more efficiently for any specific environment. Organizing your applications into groups simplifies your deployments, manages workflows easily, and improves your overall DevOps experience.

To further enhance your knowledge of Kubernetes, check out this post on stateful sets.

Spread the word

Keep reading