Deployment Window: Execute Controlled Deployments in Kubernetes Environments

TL;DR: Devtron's Deployment Window feature helps you control deployments in Kubernetes, ensuring stability & preventing disruptions during peak hours. Define time slots for planned deployments (Maintenance Windows) or block deployments entirely (Blackout Windows) for critical environments.

5 months ago   •   7 min read

By Bhushan Nemade
In this article

In the fast-paced world of software development, we execute production deployments that contain a new feature, hotfixes, or some updates every second. While facilitating these deployments, ensuring that our services are available during peak demand is critical. Executing deployment when traffic to the business applications is at its peak, introduces the risk of disrupting the running services i.e. causing downtime for the services. To manage this kind of situation and help teams keep executing deployments at lightning speed, Devtron has come up with the Deployment Window, a feature to strike a balance between the stability of services and innovation for your teams. In this blog post, we will be taking a look at Deployment Window and how it facilitates deployment.

Consequences of Deploying Blindly

Imagine a fintech company that has services like payment aggregation for e-commerce and payment applications for end users. During the festive season, they experience a surge in traffic as they run payment services responsible for facilitating every payment without friction. Anticipating the surge, the teams decided to send a hotfix to manage the huge traffic smoothly. However, as the team released the deployment, the services started experiencing multiple issues like downtime in some regions and inability to connect to bank servers.

Consequently, the users of these services started facing issues. Some users faced transaction blockages, while others were unable to complete transactions. To summarize the consequences of this incident and executing deployments blindly are:

  • Inability to complete financial transactions during critical periods like festive seasons.
  • Frustration and dissatisfaction among the user base.
  • Loss of users and damage to the company's reputation.
  • Potential financial losses due to missed revenue opportunities.

The Missing Piece: Effective Release Management

When we look at the above situation, the disruption is caused by the deployment executed at the last moment. Upon analyzing the details we can see a lack of proper communication and planning among teams. The real culprit behind this incident is miscommunication and inefficient planning for the release process.

To manage production server releases and ensure services run smoothly during peak moments, organizations need a mechanism to govern and control releases. The optimal solution for this can be pre-defined time slots, during which deployments are either permitted or restricted for specific services or applications

The pre-defined slots enable teams to plan and schedule their deployments well in advance, ensuring releases are executed before the restricted periods begin. It also encourages teams to proactively collaborate and plan their releases well in advance, promoting better communication and coordination. This proactive approach minimizes the risk of service disruptions during peak business hours or other sensitive periods.

Devtron: Your Gateway to Controlled Deployments

To enhance your deployment workflow and provide you control over deployments, Devtron introduces a feature called "Deployment Window" which allows you to set pre-defined time slots for taking actions. By leveraging the Deployment Window, your team can effortlessly define and enforce deployment windows for applications or services, striking the right balance between stability and innovation. Furthermore, using Deployment Window and scheduling the appropriate time slots, allows your team to prepare and coordinate the necessary resources, testing, and communication efforts ahead of time.

In the Deployment Window feature devtron has two entities, specifically:

  • Black-out Window
  • Maintenance Window

Let's dive in and explore the Deployment Window feature and understand how its capabilities can help us plan deployments, prevent service disruptions during peak business hours, and ensure our services remain operational when customer demand is at its peak.

Blackout Window

The Black-out window feature from Devtron allows blocking deployments to critical environments like production servers. Organizations can utilize this feature by defining a specific time duration during which deployments will be blocked to prevent disruptions during crucial business hours, ensuring service uptime and avoiding disruptions that could result from immediate releases to critical environments. With the Blackout window organizations can achieve stability in the production environments.

For example:

  • Setting of the Blackout Window for the production environments, during the peak business hours, where the services are expected to be fully operational.
  • Setting up the Blackout Window every weekend, to make sure that any new deployment to production environments breaks the systems on weekends.

The blackout window comes with the robust Resource Base Access Control (RBAC), where you can opt-out who can take actions against the blackout window, i.e. only the superadmins or the users with the specific permissions.

Maintenance Window

The Maintenance window in Devtron lets organizations set a specific time duration during which developers can execute deployments to critical environments such as production. This feature enables organizations to execute planned deployments to critical environments within the defined time duration while blocking deployments outside that duration.

For example:

  • The maintenance window can be scheduled for midnight every day, say 11 pm to 1 am for these 2 hrs the developers will be executing new deployments to production.

By implementing a maintenance window, organizations can establish scheduled maintenance times for critical applications and environments, helping manage service uptime and protect crucial business hours.

Similar to the Blackout window, it also comes with a robust RBAC. Where you can opt-out who can take actions against the blackout window, i.e. only the superadmins or the users with the specific permissions.

Let’s dive into the Deployment Window feature and see how you can implement it to achieve production environment stability for your organization.

Step 1: Configuring Maintenance Window

To configure the Maintenance Window navigate to Global Configuration > Deployment Window > Add Window

Deployment Window
[Fig. 1] Deployment Window

Provide a name for the window and also add a description of its purpose. This helps identify the window and its intended use within your system or organization.

Choose between a blackout window or a maintenance window. In this case, we'll be setting up a maintenance window. The process for configuring both types is similar, but the specific type should be selected based on your operational needs.

Configure Deployment Window
[Fig. 2] Configure Deployment Window

Once the window type is selected, set the time duration for the window. The specific window will be active through the defined time duration.

Window Duration
[Fig. 3] Window Duration

Choose who should be able to take actions when the deployment window is active (bypassing the window), i.e. super-admin or any user with specific permissions, and click Save Changes. In this case, we will be selecting Super admin, all the Super admins for this devtron instance will be able to take actions against the window. I.e. if needed they can by-pass the window.

Note: Bypassing the Deployment Window is something we don’t recommend until it's the last resort for critical, high-priority tasks when no other options are available.
Access Control for Bypassing Windows
[Fig. 4] Access Control for Bypassing Windows

Step 2: Applying Deployment Window to Specific Application

To apply our configured deployment window navigate to the Apply to tab.

Maintenance Window Configured
[Fig. 5] Maintenance Window Configured

Select the target application and click Manage Windows. Here, we will be selecting our front-end application.

Applying Window to Specific Application
[Fig. 6] Applying Window to Specific Application

Select the window that you want to apply on the application and click Save, here we will be selecting our frontend maintenance window, which we had configured in step-1.

Window Attached to Application
[Fig. 7] Window Attached to Application

Step 3: Application Overview

Now that we have set the maintenance window for our front-end application, let’s see how it works. Let’s navigate to our frontend application and open the App Details tab. Applications > Devtron Apps > frontend.

Application Overview
[Fig. 8] Application Overview

After setting up the window, the App Details page will display the configured window and a countdown timer. Click Details to view more information about the specific window, which includes:

  • Window details
  • The time duration of the window
  • Users, who are authorized to take action during the active time duration of the window.
Deployment Window Overview
[Fig. 9] Deployment Window Overview

Now, if we try to attempt to deploy a frontend application while the maintenance window is active, the users need proper access to be able to execute deployments during the active window.

Execute Deployments
[Fig. 10] Execute Deployments

Users with appropriate permissions can proceed with deployments but will receive a warning message indicating that they are bypassing the maintenance window.

[Fig. 11] Warning Message

Conclusion

The Deployment Window feature of Devtron comes as a solution for organizations seeking stability in their production environments. The feature allows organizations to balance innovation and stability hand in hand. The Deployment Window comes with two entities, the Maintenance Window and the Blackout Window. By implementing  Maintenance Window and Blackout Window teams can effectively manage when and how deployments are executed, particularly for critical environments like production servers.

Related articles

Spread the word

Keep reading