I am using Cloud Composer and I noticed that it selects the version of Apache Airflow and Python (2.7.x) for me. I want to use a different version of Airflow and/or Python. How can I change this?
Cloud Composer deploys the latest stable build of Airflow. New versions of Airflow are usually deployed by Composer within a a few weeks of their stable release. The Airflow version deployed and the Python version installed cannot be changed at this time. A future release of Cloud Composer may offer the ability to select the Airflow and/or Python version for new environments.
If you want to deploy a specific version of Airflow you will need to use the gcloud CLI tool in order to specify this. It is not currently possible to do this from the web front end.
Have a look at the follow page to see the available versions https://cloud.google.com/composer/docs/concepts/versioning/composer-versions
If you would like to deploy say Airflow 1.10 and Python 3 to your environment you would use the
--image-version
--python-version
flags in order to set this. For example if you used the following it would install with Composer 1.4.1, Airflow 1.10 and Python 3
gcloud beta composer environments create ENV_NAME --image-version composer-1.4.1-airflow-1.10.0 --python-version 3
You will need to specify all the other parameters and arguments required for the environment as well. The above only shows the two arguments to set the Airflow and Python versions.
© 2022 - 2024 — McMap. All rights reserved.