Apache Airflow includes a web interface that you can use to manage workflows (DAGs), manage the Airflow environment, and perform administrative actions. For example, you can use the web interface to review the progress of a DAG, set up a new data connection, or review logs from previous DAG runs. Each Cloud Composer environment has a web server that runs the Airflow web interface.
Before you begin
The following permission is required to access the Airflow webserver in the Cloud Composer environment:
composer.environments.get. For more information, see Cloud Composer Access Control.
During environment creation, Cloud Composer configures the URL for the webserver that runs the Airflow web interface. The URL is non-customizable.
Accessing the web interface
The Airflow Webserver service is deployed to the
appspot.com domain and provides access to the Airflow web interface. Cloud Identity-Aware Proxy
protects the interface, guarding access based on user identities.
After creating a new Cloud Composer environment, it takes up to one hour for the web interface to finish hosting and become accessible.
Accessing the web interface via the Google Cloud Platform Console
To access the Airflow web interface from the Google Cloud Platform Console:
- To view your existing Cloud Composer environments, open the Environments page.
- In the Links column, click the new window icon for the environment whose Airflow web interface you want to view.
- Log in with the Google account that has the appropriate permissions.
Retrieving the web interface URL via the
gcloud command-line tool
You can access the Airflow web interface from any web browser. To get the URL for the
web interface, enter the following
gcloud composer environments describe ENVIRONMENT_NAME / --location LOCATION
ENVIRONMENT_NAMEis the name of the environment.
LOCATIONis the Compute Engine region where the environment is located.
gcloud command shows the properties of a Cloud Composer
environment, including the URL for the web interface. The URL is
airflowUri: https://uexamplebcd3fff-tp.appspot.com/ dagGcsPrefix: gs://us-central1-example-environment-00a47695-bucket/dags gkeCluster: projects/example-project/zones/us-central1-a/clusters/us-central1-example-environment-00a47695-gke nodeConfig: diskSizeGb: 100 location: projects/example-project/zones/us-central1-a machineType: projects/example-project/zones/us-central1-a/machineTypes/n1-standard-1 network: projects/example-project/global/networks/default oauthScopes: - https://www.googleapis.com/auth/cloud-platform serviceAccount: N13597NNN465email@example.com nodeCount: 3 softwareConfig: imageVersion: composer-0.5.1-airflow-1.9.0 createTime: '2018-05-19T02:13:36.749Z' name: projects/example-project/locations/us-central1/environments/example-environment state: RUNNING updateTime: '2018-05-19T02:30:21.387Z' uuid: 66bd6a28-5b48-4da3-a0aa-898199b569da
Proxying Airflow webserver access
Currently, direct access to the Airflow web interface is unsupported in Australia, New Zealand, and India. Consider the following alternatives for accessing the Airflow webserver:
If you require direct access to the Airflow webserver, you can use an HTTP proxy (preferably hosted in US). The following instructions describe one method for setting up an HTTP/SOCKS proxy on GCP:
Obtain the name of the Compute Engine instance to route your traffic through. You can use an existing instance or create a new one.
For example, to create a new instance named
gcloud compute instances create --zone us-west1-a tunnel
On your local machine, start an SSH tunnel that connects to your compute instance.
For example, to start a tunnel on local port
5000that connects to the Compute Engine instance on its SSH port
gcloud compute ssh --zone us-west1-a tunnel -- -N -p 22 -D localhost:5000
In this example, your proxy host is
localhostand port is
Set up the proxy for your local machine.
The proxy settings vary by operating system and web browser or both. For information about using an SSH tunnel or setting up the proxy, see Set up SSH tunnel for private browsing using Compute Engine.