๐ช โจ Customize resource names when provisioning infrastructure for push work pools
In the past few releases, we've added the ability to provision infrastructure for push work pools via the CLI. This release adds the ability to customize the name of the resources created in your cloud environment when provisioning infrastructure for push work pools so you can follow your organization's naming conventions.
To customize your resource names when provisioning infrastructure for a push work pool, follow the interactive prompts:
bash
? Proceed with infrastructure provisioning with default resource names? [Use arrows to move; enter to select]
โโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ Options: โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ โ Yes, proceed with infrastructure provisioning with default resource names โ
โ > โ Customize resource names โ
โ โ Do not proceed with infrastructure provisioning โ
โโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
? Please enter a name for the resource group (prefect-aci-push-pool-rg): new-rg
? Please enter a name for the app registration (prefect-aci-push-pool-app): new-app
? Please enter a prefix for the Azure Container Registry (prefect): newregistry
? Please enter a name for the identity (used for ACR access) (prefect-acr-identity): new-identity
? Please enter a name for the ACI credentials block (new-work-pool-push-pool-credentials): new-aci-block
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Provisioning infrastructure for your work pool new-work-pool will require: โ
โ โ
โ Updates in subscription: Azure subscription 1 โ
โ โ
โ - Create a resource group in location: eastus โ
โ - Create an app registration in Azure AD: new-app โ
โ - Create/use a service principal for app registration โ
โ - Generate a secret for app registration โ
โ - Create an Azure Container Registry with prefix newregistry โ
โ - Create an identity new-identity to allow access to the created registry โ
โ - Assign Contributor role to service account โ
โ - Create an ACR registry for image hosting โ
โ - Create an identity for Azure Container Instance to allow access to the registry โ
โ โ
โ Updates in Prefect workspace โ
โ โ
โ - Create Azure Container Instance credentials block: new-aci-block โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Proceed with infrastructure provisioning? [y/n]: y
Creating resource group
Resource group 'new-rg' created successfully
Creating app registration
App registration 'new-app' created successfully
Generating secret for app registration
Secret generated for app registration with client ID '03923189-3151-4acd-8d59-76483752cd39'
Creating ACI credentials block
ACI credentials block 'new-aci-block' created in Prefect Cloud
Assigning Contributor role to service account
Service principal created for app ID '25329389-3151-4acd-8d59-71835252cd39'
Contributor role assigned to service principal with object ID '483h4c85-4a8f-4fdb-0394-bd0f0b1202d0'
Creating Azure Container Registry
Registry created
Logged into registry newregistry1702538242q2z2.azurecr.io
Creating identity
Identity 'new-identity' created
Provisioning infrastructure. โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
Your default Docker build namespace has been set to 'newregistry1702538242q2z2.azurecr.io'.
Use any image name to build and push to this registry by default:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโ example_deploy_script.py โโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ from prefect import flow โ
โ from prefect.deployments import DeploymentImage โ
โ โ
โ โ
โ flow(log_prints=True) โ
โ def my_flow(name: str = "world"): โ
โ print(f"Hello {name}! I'm a flow running on an Azure Container Instance!") โ
โ โ
โ โ
โ if __name__ == "__main__": โ
โ my_flow.deploy( โ
โ name="my-deployment", โ
โ work_pool_name="my-work-pool", โ
โ image=DeploymentImage( โ
โ name="my-image:latest", โ
โ platform="linux/amd64", โ
โ ) โ
โ ) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Infrastructure successfully provisioned for 'new-work-pool' work pool!
Created work pool 'new-work-pool'!
Using a push work pool with automatic infrastructure provisioning is a great way to get started with a production-level Prefect set up in minutes! Check out our [push work pool guide](https://docs.prefect.io/latest/guides/deployment/push-work-pools/) for step-by-step instructions on how to get started!
See the following pull requests for implementation details:
- https://github.com/PrefectHQ/prefect/pull/11407
- https://github.com/PrefectHQ/prefect/pull/11381
- https://github.com/PrefectHQ/prefect/pull/11412
๐ ๐ An updated date time input on the workspace dashboard
We've added a new date and time filter to the workspace dashboard that gives greater control over the dashboard. You can now filter by days, hours, and even minutes. You can also specify a specific date and time range to filter by. You can also go backwards and forwards in time using that time window, for example, you can scroll through by hour.
See it in action!
[![Demo of updated time input in the Prefect UI](https://github.com/PrefectHQ/prefect/assets/40272060/045b144f-35ff-4b32-abcd-74eaf16f181c)
](https://www.loom.com/share/ca099d3792d146d08df6fcd506ff9eb2?sid=70797dda-6dc6-4fe6-bf4a-a9df2a0bf230)
See the following pull requests for implementation details:
- https://github.com/PrefectHQ/prefect-ui-library/pull/1937
- https://github.com/PrefectHQ/prefect-design/pull/1048
๐ฅ Enhancements
- Add the ability to publish `KubernetesJob` blocks as work pools โ https://github.com/PrefectHQ/prefect/pull/11347
- Add setting to configure a default Docker namespace for image builds โ https://github.com/PrefectHQ/prefect/pull/11378
- Add the ability to provision an ECR repository for ECS push work pools โ https://github.com/PrefectHQ/prefect/pull/11382
- Add ability to provision an Artifact Registry repository for Cloud Run push work pools โ https://github.com/PrefectHQ/prefect/pull/11399
- Add ability to provision an Azure Container Registry for Azure Container Instance push work pools โ https://github.com/PrefectHQ/prefect/pull/11387
- Add support for `is_schedule_active` to `flow.deploy` and `flow.serve` โ https://github.com/PrefectHQ/prefect/pull/11375
- Allow users to select relative and fixed date ranges to filter the dashboard โ https://github.com/PrefectHQ/prefect/pull/11406
- Add support for arbitrary sink types to `prefect.utilities.processutils.stream_text` โ https://github.com/PrefectHQ/prefect/pull/11298
- Update the Prefect UI deployments page to add run activity and separate out the deployment and flow names โ https://github.com/PrefectHQ/prefect/pull/11394
- Update Prefect UI workspace dashboard filters to use new date range - https://github.com/PrefectHQ/prefect-ui-library/pull/1937
๐งฐ Fixes
- Fix bug where a pause state reused an existing state ID โ https://github.com/PrefectHQ/prefect/pull/11405
๐งช Experimental
- Build out API for creating/reading/deleting flow run inputs โ https://github.com/PrefectHQ/prefect/pull/11363
- Integrate flow run input and schema/response mechanics into pause/suspend โ https://github.com/PrefectHQ/prefect/pull/11376
- Add typing overloads for pause/suspend methods โ https://github.com/PrefectHQ/prefect/pull/11403
- Use bytes for `value` in `create_flow_run_input` โ https://github.com/PrefectHQ/prefect/pull/11421
- Validate run input when resuming flow runs โ https://github.com/PrefectHQ/prefect/pull/11396
- Run existing deployments via the `Runner` webserver โ https://github.com/PrefectHQ/prefect/pull/11333
๐ง Documentation
- Add instructions for automatic infrastructure provisioning to the push work pools guide โ https://github.com/PrefectHQ/prefect/pull/11316
- Fix broken links in states concept doc and daemonize guide โ https://github.com/PrefectHQ/prefect/pull/11374
- Update agent upgrade guide to include `flow.deploy` and examples โ https://github.com/PrefectHQ/prefect/pull/11373
- Update block document names in Moving Data guide โ https://github.com/PrefectHQ/prefect/pull/11386
- Rename `Guides` to` How-to Guides` โ https://github.com/PrefectHQ/prefect/pull/11388
- Add guide to provision infrastructure for existing push work pools โ https://github.com/PrefectHQ/prefect/pull/11365
- Add documentation for required permissions for infrastructure provisioning โ https://github.com/PrefectHQ/prefect/pull/11417
- Add docs for managed execution open beta โ https://github.com/PrefectHQ/prefect/pull/11397, https://github.com/PrefectHQ/prefect/pull/11426, and https://github.com/PrefectHQ/prefect/pull/11425