Installing Custom Plugins

This page describes how to install custom plugins in your Cloud Composer environment.

You can install custom plugins, such as custom in-house Apache Airflow operators, hooks, sensors, or interfaces, in your Cloud Composer environment.

When you create an environment, Cloud Composer creates a Cloud Storage bucket and associates the bucket with your environment. You use the plugins folder in the associated bucket to install custom plugins. To determine the Cloud Storage bucket attached to your environment, see Adding and Updating DAGs.

Before you begin

  • This installation method applies only to Airflow plugins. For example, you cannot use this method to install common Python modules or other libraries.

  • Plugins must conform to the Airflow plugins template guidelines.

Installing a plugin

To install a custom plugin into your Cloud Composer environment, copy the plugin code to the plugins folder in the Cloud Storage bucket attached to your Cloud Composer environment.

To install a plugin, choose an option:

gcloud beta composer environments storage plugins import --environment ENVIRONMENT_NAME --source PATH_TO_LOCAL_FILE (--destination PATH_IN_GCS_BUCKET)

where:

  • --destination is an option to upload a plugin to a subfolder in the plugins folder

Viewing a list of plugins

To view a list of plugins, choose an option:

gcloud beta composer environments storage plugins list --environment ENVIRONMENT_NAME

Deleting a plugin

To delete a plugin from your Cloud Composer environment, delete the plugin code from the plugins folder in the Cloud Storage bucket attached to your Cloud Composer environment.

To delete a plugin, choose an option:

gcloud beta composer environments storage plugins delete --environment ENVIRONMENT_NAME PLUGIN_TO_DELETE

Downloading plugins

To download plugins, choose an option:

gcloud beta composer environments storage plugins export --environment ENVIRONMENT_NAME --destination PATH_TO_LOCAL_DESTINATION (--source PATH_IN_GCS_BUCKET)

where:

  • --source is an option to download only one plugin

What's next

Send feedback about...

Cloud Composer