简体   繁体   中英

How to deploy a project in GCP?

my project consists of ingesting and processing a file with dataflow when a file arrives in the cloud storage bucket. this works for me as I develop the pipeline.py that reads the file that reaches the bucket and stores it in a BigQUery table. I also capture the event when the file arrives with the pub / sub service, this capture is done with my listener.py file.

My question is, how do I deploy the project that is developed in python in the GCP cloud, if I need the dataflow to be activated once the file reaches the bucket? what services do you recommend? is there any guide to do this?

If you want to deploy a project made in Python and run it, you need to use “App Engine”.

You can see this tutorial about how to deploy your project in GCP.

In case you want to deploy a python code which you want to execute in your bucket that triggers something, you can see this documentation .

You can see these examples to deploy a python code that triggers in the event “google.storage.object.finalize” in your bucket.

gcloud functions deploy hello_gcs \
--runtime python39 \
--trigger-resource YOUR_TRIGGER_BUCKET_NAME \
--trigger-event google.storage.object.finalize

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM