Hibernate development mode environments

Managed Airflow (Gen 3) | Managed Airflow (Gen 2) | Managed Airflow (Legacy Gen 1)

This page explains how to hibernate and resume a development mode environment.

For instructions about creating a development mode environment, see Create environments.

If you want to run an Airflow environment for development purposes locally instead, see Run a local Airflow environment.

About development mode environments

A development mode environment is a type of environment that can be used for development purposes. You can hibernate a development mode environment when you're not using it and resume it later.

Development mode environments have the following constraints:

  • Only Managed Airflow (Gen 3) with Airflow 3.
  • Only standard resilience mode.
  • Small environment size and default resource limits provided by the Small environment preset. It's not possible to change the number of Airflow components or resource limits of a development mode environment.

You can save and load snapshots of development mode environments. In this way, you can transfer your DAGs and other data from and to a development mode environment.

About environment hibernation

An environment in hibernation works in the following way:

  • Airflow components of your environment aren't running. DAG runs won't be created, queued, or scheduled for execution while the environment is hibernated. DAGs won't be parsed or synchronized from the environment's bucket.

  • Pods in the composer-user-workloads namespace don't run while the environment is hibernated.

  • The environment consumes DCUs only for storing the hibernated environment components. Most of the environment costs are reduced to zero.

  • Automatic upgrades within maintenance windows might still occur.

  • It's not possible to update or upgrade a hibernated environment.

Before you begin

Hibernate a development mode environment

Console

To hibernate an environment:

  1. In Google Cloud console, go to the Environments page.

    Go to Environments

  2. In the list of environments, click the name of your environment. The Environment details page opens.

  3. Click Hibernate.

  4. Wait until the environment is hibernated.

gcloud

The gcloud beta composer environments hibernate command hibernates your environment:

gcloud beta composer environments hibernate \
  ENVIRONMENT_NAME \
  --location LOCATION

Replace:

  • ENVIRONMENT_NAME with the name of the environment.
  • LOCATION with the region where the environment is located.

Example:

gcloud beta composer environments hibernate \
  example-environment \
  --location us-central1

API

Construct an environments.hibernate API request:

Example:

// POST https://composer.googleapis.com/v1beta1/projects/example-project/
// locations/us-central1/environments/example-environment:hibernate

Resume a development mode environment

Console

To resume a hibernated environment:

  1. In Google Cloud console, go to the Environments page.

    Go to Environments

  2. In the list of environments, click the name of your environment. The Environment details page opens.

  3. Click Resume.

  4. Wait until the environment is resumed.

gcloud

The gcloud beta composer environments resume command resumes your environment:

gcloud beta composer environments resume \
  ENVIRONMENT_NAME \
  --location LOCATION

Replace:

  • ENVIRONMENT_NAME with the name of the environment.
  • LOCATION with the region where the environment is located.

Example:

gcloud beta composer environments resume \
  example-environment \
  --location us-central1

API

Construct an environments.resume API request:

Example:

// POST https://composer.googleapis.com/v1beta1/projects/example-project/
// locations/us-central1/environments/example-environment:resume

What's next