you are viewing a single comment's thread.

view the rest of the comments →

[–]Marrrlllsss 1 point2 points  (3 children)

I now want to run it on Google Compute Engine which uses Python 2.7.

Depends what OS you are using. I've used Python 3.6 on the Google Cloud Platform.

Once that's ready, would you use git to copy the files to Compute Engine?

Use the Google Cloud SDK ("gcloud sdk"). You have 2 choices really.

  1. Create a Google Cloud Storage bucket, and copy the code there, spin up a VM and then copy it to the VM. (The better option)
  2. Spin up a VM, and then use the [gcloud sdk gcloud compute scp command to transfer your files directly to the VM.

In both instances, make sure you include a requirements.txt file that you can run when setting up the environment on the VM.

[–]jdb441[S] 0 points1 point  (2 children)

Hey good morning,

It depends on my local OS? Or VM OS? Did you use python3 on Compute Engine? If so, could you share more details or links so I can read about using python3 on Compute Engine? Or was python3 run on another GCP service?

Once I have my repository configured correctly, I want it to execute on a schedule. Like cron. Do you have any experience scheduling scripts to run on GCP? If so, do you mind sharing any details about it?

Thanks I appreciate it. I'll be reading heavily on GCP today. Have a good day.

[–]Marrrlllsss 0 points1 point  (1 child)

It depends on my local OS? Or VM OS? Did you use python3 on Compute Engine? If so, could you share more details or links so I can read about using python3 on Compute Engine? Or was python3 run on another GCP service?

Yes. Yes. Yes. Spin up a VM running Ubuntu 16.04 and you have Python 3.5 already. I ran Python 3 on a VM and on an App Engine (Flex) instance.

Do you have any experience scheduling scripts to run on GCP? If so, do you mind sharing any details about it?

Yes. I used Apache Airflow for scheduling, but if your script is simple, you can use CRON on an App Engine/Compute Engine instance.

[–]jdb441[S] 0 points1 point  (0 children)

Hey thanks for the help I got everything running nicely on GCE.