Created
November 11, 2018 18:03
-
-
Save ifuller1/f33541f8c008bd085ffb90c92c20e4d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
if [[ $1 == "" ]]; then | |
echo "Please provide a project id e.g. ./scripts/setup your-project-id" | |
exit | |
fi | |
#define variables | |
PROJECT_ID=$1 | |
COMPOSER_ID="$1-composer" | |
# required for composer | |
gcloud components install kubectl | |
# Setup the project | |
gcloud beta composer environments create --project $PROJECT_ID $COMPOSER_ID --location europe-west1 --image-version=composer-1.3.0-airflow-1.9.0 --python-version=3 | |
# Provide some env variables | |
gcloud composer environments run --project $PROJECT_ID $COMPOSER_ID --location europe-west1 variables -- --set gcp_project $PROJECT_ID | |
gcloud composer environments run --project $PROJECT_ID $COMPOSER_ID --location europe-west1 variables -- --set gce_zone europe-west1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment