Reputation: 19
Ultimately, what I want to do is have a Python script that runs whenever a HTTP request is created, dynamically. It'd be like: App 1 runs and sends out a webhook, Python script catches the webhook immediately and does whatever it does.
I saw that you could do this in GCP with Composer and Airflow.
But I'm having several issues following these instrutions https://cloud.google.com/composer/docs/how-to/using/triggering-with-gcf:
Running this in Cloud Shell to grant blob signing permissions:
gcloud iam service-accounts add-iam-policy-binding
[email protected]
--member=serviceAccount:[email protected]
--role=roles/iam.serviceAccountTokenCreator
When I put in my project ID, I get a "Gaia id not found for [email protected]"
Is there a better way to do what I'm trying to do (i.e. run Python scripts dynamically)?
Upvotes: 1
Views: 1149
Reputation: 3903
The reason for getting: Gaia id not found for email <project-id>@appspot.gserviceaccount.com
error is not enabling all needed APIs in your project. Please follow the steps:
Menu
-> Products
-> Marketplace
and typing the name of corresponding API.<your-project-id>
:gcloud iam service-accounts add-iam-policy-binding \
<your-project-id>@appspot.gserviceaccount.com \
--member=serviceAccount:<your-project-id>@appspot.gserviceaccount.com \
--role=roles/iam.serviceAccountTokenCreator
I tested the scenario, firstly without enabling APIs and I've retrieved the same error as you. After enabling the APIs, error disappear and IAM policy has been updated correctly.
There is already well described Codelabs tutorial, which shows the workflow of triggering the DAG with Google Cloud Functions.
Upvotes: 1