Bryan
11/11/2023, 6:56 AMMarvin
11/11/2023, 6:58 AMflow_name/deployment_name
. [^1^]
2. You can deploy specific deployments by specifying its flow name like so:
bash
$ prefect deploy --name my_flow/deployment-1 --name my_other_flow/deployment-1
To deploy all deployments you can use the --all
flag:
bash
$ prefect deploy --all
To deploy deployments that match a pattern you can run:
bash
$ prefect deploy -n my-flow/* -n *dev/my-deployment -n dep*prod
The above command will deploy all deployments from the flow my-flow
, all flows ending in dev
with a deployment named my-deployment
, and all deployments starting with dep
and ending with prod
. [^1^]
3. Repositories can be referenced directly through interactive prompts with prefect deploy
or in a prefect.yaml
. When authentication is needed, Secret or Credential blocks can be referenced, and in some cases created automatically through interactive deployment creation prompts. [^2^]
Please note that these instructions are based on Prefect 2.14.2 documentation. Make sure to check the latest documentation for any updates or changes.
[^1^]: Prefect Deploy Guide
[^2^]: Prefect Storage Guide
[^3^]: Prefect Deployments and FlowsBryan
11/11/2023, 7:01 AMMarvin
11/11/2023, 7:01 AMprefect deploy
from within a git repository and create a new deployment. You will see a series of prompts. Select that you want to create a new deployment, select the flow code entrypoint, and name your deployment.
2. Prefect will detect that you are in a git repository and will prompt you to select the branch you want to use for this deployment. You can select the appropriate branch for each deployment.
Please note that these instructions are based on Prefect 2.14.2 documentation. Make sure to check the latest documentation for any updates or changes.
For more detailed information, you can refer to the Prefect Storage Guide.Marvin
11/11/2023, 7:01 AMprefect deploy
from within a git repository and create a new deployment. You will see a series of prompts. Select that you want to create a new deployment, select the flow code entrypoint, and name your deployment.
2. During the deployment creation process, you will be asked to specify the git repository and branch. Here, you can dynamically set the branch based on the deployment.
3. Prefect will then use the specified branch for that particular deployment.
Please note that these instructions are based on Prefect 2.14.2 documentation. Make sure to check the latest documentation for any updates or changes.
For more information, you can refer to the Prefect Storage Guide.Bryan
11/11/2023, 7:04 AMMarvin
11/11/2023, 7:05 AMprefect deploy
from within a git repository and create a new deployment. You will see a series of prompts.
2. When asked "Would you like your workers to pull your flow code from its remote repository when running this flow?", select "y".
3. You will then be asked to confirm the URL of your git repository. For example, if your repository is hosted on GitHub, the prompt will look something like this: "Is https://github.com/my_username/my_repo.git the correct URL to pull your flow code from?". Confirm this by selecting "y".
4. Next, you will be asked to confirm the branch name. The prompt will look something like this: "Is main the correct branch to pull your flow code from?". Here, instead of confirming "main" as the branch, you can enter the name of the branch you want to use for this particular deployment.
5. If the repository is private, you will be asked "Is this a private repository?". If it is, select "y" and provide the necessary token to access the repository.
This way, you can dynamically set the branch for each deployment during the deployment creation process.
Please note that these instructions are based on Prefect 2.14.2 documentation. Make sure to check the latest documentation for any updates or changes.
For more information, you can refer to the Prefect Storage Guide.