Application Groups
Last updated
Last updated
Application groups in Devtron streamline the deployment of microservices by enabling you to build and deploy multiple applications simultaneously. This feature is particularly beneficial when your microservices are interdependent, as a change in one service often triggers the need to redeploy others.
Only one application group would exist for each environment. You cannot group applications belonging to different environments.
From the left sidebar, go to Application Groups
You will see a list of environments. Select the environment to view the application group.
The application group would contain the applications meant for deployment in the chosen environment.
As you can see, it has similar options as available under Applications:
Overview
Build & Deploy
Build history
Deployment history
Configurations
Users need to have View only permission or above (along with access to the environment and applications) to view all the applications within a group.
First, we will walk you through the key features of Application Groups, followed by additional features that will help you perform bulk actions.
The Build & Deploy tab of your application group enables you to trigger the CI builds of one or more applications in bulk.
Select the applications using the checkboxes and click the Build Image button present at the bottom.
The Build image
screen opens. Select the application and the commit for which you want to trigger the CI build.
Adding image labels can help you quickly locate the container image from the list of images shown in Application Groups.
Similar to application, you can also pass build parameters in application groups before triggering the build.
Go to the Parameters tab.
Click + Add parameter.
Enter your key-value pair as shown below.
You may follow the above steps for other applications too, and then click Start Build.
The builds will initiate, following which, you can close the Build image
screen.
Users need to have Build and deploy permission or above (along with access to the environment and applications) to trigger the build
The Configurations tab of your application group allows you to configure the following:
As shown below, you can handle the configurations of more than one application from a single screen.
Users need to have Admin role or above (along with access to the environment and applications) to change their configuration. Please note, you might not be able to change the values of locked keys in deployment template. Refer Lock Deployment Configuration to know more.
The Build & Deploy tab of your application group helps you deploy one or more applications in bulk.
Select the applications using the checkboxes and click the Deploy button present at the bottom.
Select the desired container image that you want to deploy for respective application.
Repeat the step for other applications too, and then click Deploy.
The deployment will be initiated, following which, you can close the screen as shown below.
Once the deployment is successful, the pipelines will show Succeeded
.
Users need to have Build and deploy permission or above (along with access to the environment and applications) to initiate the deployment
This feature aims at helping the user clone existing CI/CD pipelines for new target environments in multiple applications. The configurations present in the given CI/CD pipeline also get copied to the cloned pipelines (refer the below table).
Use Case: Let's say you have 'n' number of apps deployed to a development environment named dev-env
. Later, a few testers joined your team, thus necessitating the addition of a testing environment (test-env
) with those same apps deployed. Manually creating the pipelines and configuring them for test-env
environment in each app might be impractical. Therefore, we recommend you to use the cloning feature.
This feature gives you two methods of cloning:
New Workflow: Creates a new workflow and clones the source CI and CD pipeline. Gives you the flexibility to tweak the cloned CI (e.g., changing code branch for build) too.
Source Workflow: Uses the same workflow and clones only the source CD pipeline, thus keeping the original CI pipeline unchanged.
Go to Application Groups and click the source environment from the list.
Select the applications whose pipelines you wish to clone and click Clone Pipeline Config.
From the dropdown, select the target environment for which pipelines should be created for selected applications.
Select the workflow where you wish to create deployment pipeline: New Workflow or Workflow as source environment. Refer Methods of Cloning to know which option will fulfill your requirement.
Click Clone in new workflow or Clone in source workflow (depending on the option you selected in the previous step).
Users need to have Build & deploy permission or above (along with access to the environment and application) to hibernate or unhibernate applications.
Since every application comes with an option to hibernate, the same is true for application groups. Using application group, you can hibernate one or more applications belonging to the same environment if you do not want them to consume resources (replica count will be set to 0).
In other words, you can hibernate running applications or unhibernate hibernated applications as per your requirement.
In the Overview
page of your application group, use the checkboxes to choose the applications you wish to hibernate, and click the Hibernate button.
Confirm the hibernation.
Hibernation will initiate as shown below. You may close the window.
Your applications pods would be scaled down and would stop incurring costs.
In the same Overview
page, you can use the checkboxes to choose the hibernated applications you wish to unhibernate, and click the Unhibernate button.
Confirm the unhibernation.
Unhibernation will initiate as shown below. You may close the window.
Your applications would be up and running in some time.
Users need to have Build & deploy permission or above (along with access to the environment and application) to restart workloads in bulk.
Restarting workloads might be necessary if you want your new code or configuration to come into effect, or you are experiencing issues like crashing of pods.
Using application group, you can select the workloads (i.e., Pod, Deployment, ReplicaSet, etc.) of specific applications and restart them.
Use the checkboxes to choose the applications whose workloads you wish to restart, and click the Restart Workload button.
Next to the application, click the workload dropdown to view all the individual workloads of an application. Choose only the ones you wish to restart.
Moreover, you can easily select, deselect, or choose multiple workloads as shown below.
Click Restart Workloads.
Restarting workloads might take time depending on the number of applications.
Assume you have multiple applications (maybe 10, 50, 100, or more) showing up in an application group. If you want to limit your operations (build/deploy/other) to a specific set of applications, the filter feature will help you narrow down the list. Thus, you will see only those applications you select from the filter (be it on the Overview
page, Build & Deploy
page, and so on.)
Click the filter next to the application group as shown below.
The filter will show all the applications present in the group. Click to select the relevant ones.
The filter narrows down the list of applications as shown below.
(Optional) If required, you can save the filter for future use by clicking Save selection as filter.
Add a name and description to the filter to help you know its purpose, and click Save.
Now when you access the application group, your saved filter will be visible on top.
1. Creating a filter
Users can create a filter if they have Admin/Manager access on all selected applications.
Case 1: User has Admin/Manager access on all selected applications
User will be able to create a filter with all selected applications.
Case 2: User does not have Admin/Manager access on all selected applications
User will not be able to create a filter.
Case 3: User selected 4 applications but has Admin/Manager access for only 2 of them
User should be able to create filter with these 2 applications.
2. Editing a saved filter
Users can edit a saved filter if they have Admin/Manager access on all applications in the saved filter.
3. Deleting a saved filter
Users can delete a saved filter if they have Admin/Manager access on all applications in the saved filter.
Users need to have Admin role or above (along with access to the environment and applications) to update their branch.
Assume you have a few applications whose build pipelines fetch from the main
branch of your code repository. However, you decided to maintain a master
branch, and you want all the upcoming CI builds to consider the master
branch as the source. Devtron provides you the option to change the branch at both levels—individual application as well as application group.
In the Build & Deploy tab of your application group, select the intended applications and click the Change Branch button present at the bottom.
Enter the new branch name. If your build pipeline has Branch Regex
as the Source Type, you must ensure your new branch name matches the regex (regular expression) provided in that build pipeline. Once done, click Update Branch.
Passing build parameters feature is only available in
Configuration Item | Cloning Behavior |
---|---|
Clones the source’s workflow CI as it is
Cloned, including Pre-CD and Post-CD scripts/plugins
Cloned, including Deployment Template (DT), ConfigMap (CM), and Secret
Not cloned
Cloned if at pipeline level; ignored if global
Not cloned (handled globally)
Cloned (handled at pipeline level)
Cloned
Not cloned
Mandatory Plugin
Not cloned
Cloned at pipeline level; ignored if global
Not cloned
Not cloned
Not cloned
Not cloned