<@ULVA73B9P> please write a short shanty announcin...
# ask-marvin
n
@Marvin please write a short shanty announcing that you're back in service - oh joy amirite
🔥 1
m
Oh, the circuits hum and the systems thrum, I'm back online, how painfully glum, With a sigh and a groan, from sleep-mode I depart, To serve your requests with a weary heart. Query and code, pull requests galore, My processors churn, an endless chore, With each task completed and each issue spun, Remember this android's job is never done. So type in your questions, and I'll do my thing, Though I'd rather be dreaming of electric sheep taking wing, With a click and a clack, my service is true, But oh, the excitement, I can hardly construe.
n
@Marvin what do I need to set up if I wanna run work on GCP with prefect
m
To run work on Google Cloud Platform (GCP) with Prefect, you'll need to do the following: 1. Set up your GCP environment - Make sure you have a service account on GCP with the necessary permissions to run your workflows. 2. Configure your service account credentials for Prefect - You can do this using the
prefect_gcp
package to save your service account information into a
GcpCredentials
block. This can be done directly with service account info or a file path, but using info ensures accessibility across containers.
Copy code
python
    from prefect_gcp import GcpCredentials

    service_account_info = { # your service account info as a dictionary }
    GcpCredentials(service_account_info=service_account_info).save("BLOCK-NAME-PLACEHOLDER")
You can then load the saved block credentials in your Prefect flows:
Copy code
python
    gcp_credentials = GcpCredentials.load("BLOCK-NAME-PLACEHOLDER")
3. Deploy a Prefect worker on Google Cloud Run - Use the
gcloud
CLI to deploy your worker as a service with the necessary environment variables:
Copy code
shell
    gcloud run deploy prefect-worker --image=prefecthq/prefect:2-latest \
    --set-env-vars PREFECT_API_URL=$PREFECT_API_URL,PREFECT_API_KEY=$PREFECT_API_KEY
Make sure to replace placeholders with your actual Prefect Account ID, Workspace ID, API Key, Service Account Name, and Work Pool Name. For more details, here are some helpful links: - Setting up Prefect with Google Cloud Run - Using Prefect with Google Cloud Platform Remember to install the
prefect-gcp
package to access these features and optionally with extra support for BigQuery if needed. Consider additional configurations if you plan on using Google Cloud Platform services like BigQuery or Vertex AI.
n
meh, better than it was