Search documentation
karat

+

K

Set Product and Environment maintenance windows

Environment and Product editors can each set maintenance windows as a constraint that Apollo must satisfy before it can perform an action. A Product contact team may not want their team woken up in the middle of the night for failing software and consequently declare a business hours only window in which their Product can be upgraded. Likewise, Environment contact teams may not want services to update during operational hours.

In this task you will set up Product and Environment maintenance windows to produce a resolved Entity maintenance window.

Environment maintenance windows

We will configure the following maintenance window for one of your Environments:

  • No changes happening between 6 AM and 10 PM, Monday through Friday.

To set Environment maintenance windows:

  1. Choose one of your Environments where you have your Helm chart or Nginx installed and open the Environment’s Overview tab.

  2. Note that the Maintenance window block is set to All time. We will set a maintenance window for non-business hours only.

  3. Select Edit settings manually from the Actions dropdown.

  4. Select Edit in the upper right of the Environment settings.

  5. Create a new maintenance window definition on line 5:

    Copied!
    1 2 3 4 5 6 7 8 9 maintenance-windows: my-env-window: time-intervals: - MONDAY/22:00-TUESDAY/06:00 - TUESDAY/22:00-WEDNESDAY/06:00 - WEDNESDAY/22:00-THURSDAY/06:00 - THURSDAY/22:00-FRIDAY/06:00 - FRIDAY/22:00-MONDAY/06:00 time-zone-name: America/New_York
  6. Replace both the downtime and no-downtime values on lines 3 and 4 (currently set to all-time) with my-env-window. Apollo can make changes to Helm charts during either of these windows, so both keys must reference the same maintenance window. The start of your Environment settings should now look like this:

    Copied!
    1 2 3 4 5 6 7 8 9 10 11 12 global-maintenance-windows: downtime: my-env-window no-downtime: my-env-window maintenance-windows: my-env-window: time-intervals: - MONDAY/22:00-TUESDAY/06:00 - TUESDAY/22:00-WEDNESDAY/06:00 - WEDNESDAY/22:00-THURSDAY/06:00 - THURSDAY/22:00-FRIDAY/06:00 - FRIDAY/22:00-MONDAY/06:00 time-zone-name: America/New_York
The Environment settings file with the global maintenance window configuration.

Next you will give your Product (or Nginx) its own maintenance window, so that Apollo only makes changes to it on weekends:

  1. Add a second maintenance window definition under the maintenance-windows section, below my-env-window:

    Copied!
    1 2 3 4 nginx-weekends: time-intervals: - SATURDAY/00:00-SUNDAY/23:59 time-zone-name: America/New_York
  2. Find your Product (or Nginx) - entity-locator block under the managed-helm-charts section of the Environment config.

  3. Add the following lines under the release-channel entry. As with the Environment maintenance window, set both keys to the same maintenance window:

    Copied!
    1 2 3 maintenance-windows: downtime: nginx-weekends no-downtime: nginx-weekends
  4. You are done editing your file, so select Review in the upper right to view a side-by-side comparison of your changes.

  5. Once you are satisfied with the file changes, select Submit.

The Environment settings file with a maintenance window set for a specific Product.
  1. Enter a change request title, such as “Update maintenance window to non-business hours”, and a rationale like “Completing Apollo introduction guide”. Select Submit.

  2. Return to your Environment's Overview tab and note the Maintenance window block has updated to match your configuration change.

  3. Select your Product (or Nginx) in your Environment’s Entities tab. The maintenance window in the right-hand panel (which may need to be opened if it is collapsed) now shows an updated window for this Entity.

Product maintenance windows

I want to prevent Apollo from taking any actions involving my Product between 8PM and 8AM US Eastern Time.

  1. Use a hotkey search to bring up your Product (or Nginx) by hitting Ctrl+K (Windows) or Cmd+K (macOS), entering the Product name, and choosing the correct Product from the list.
  2. From the Actions dropdown, choose Edit product settings....
  3. Select the Upgrades tab in the Product settings window.
  4. In the Product maintenance windows section, choose New York as the timezone.
  5. Set an entry for each day of the week as shown in the image below.
  6. Select Update to create a change request. Ask someone from your team to approve it.
  7. View your changes in the Maintenance window section of the Product details panel on the right side of the screen.
Product maintenance window modal

When evaluating whether to execute any actions on the Nginx Entity in your Environment, Apollo will calculate the resolved maintenance window for each Entity in an Environment based on the declared maintenance windows for the Product and the Environment. The graphic illustrates the resolved maintenance window for Nginx in your Environment.

Resolved maintenance window for these changes

Next → Next steps