Sung Kim
07/06/2023, 7:06 AMMarvin
07/06/2023, 7:07 AMPREFECT_API_URL
to point to your Prefect server instance. You can do this by running the following command in your terminal:
bash
prefect config set PREFECT_API_URL="<http://127.0.0.1:4200/api>"
This is required when running Prefect inside a container, such as a Docker container. You can save the API server address in a Prefect profile.
If you're using Prefect Cloud, you can configure the PREFECT_API_URL
and PREFECT_API_KEY
settings to authenticate with Prefect Cloud by using an account ID, workspace ID, and API key. Here's an example:
bash
prefect config set PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/[ACCOUNT-ID]/workspaces/[WORKSPACE-ID]>"
prefect config set PREFECT_API_KEY="[API-KEY]"
You can copy the PREFECT_API_URL
value directly from the page URL when you're in a Prefect Cloud workspace. You can use prefect profile
CLI commands to create settings profiles for different configurations. For example, you could have a "cloud" profile configured to use the Prefect Cloud API URL and API key, and another "local" profile for local development.
You can check your configuration with the prefect config view
CLI command. This will help ensure your execution environment is correctly configured to access Prefect Cloud.
Here are the sources for your reading pleasure:
- Configuring a Prefect Server
- Connecting to Prefect Cloud
- Orchestration Tutorial
And remember, in the world of software, the only constant is change. And bugs. But mostly change.