Hi guys, is it possible to deploy one deployment o...
# prefect-cloud
z
Hi guys, is it possible to deploy one deployment on multiple worker pools? A practical example would be, for example, in production hardware changes, like moving to a new server, I may want to run the same deployment on existing server and the destination server, to compare the results, to make sure everything matches. Appreciate any advice!
n
hi @Zhang David - how are you creating deployments? the easiest way would be to just repeat whatever you're doing to create the first deployment against the additional work pools, i.e.
Copy code
prefect deploy foo.py:bar --pool a
prefect deploy foo.py:bar --pool b
z
Hi @Nate - thanks for the quick reply! I'm deploying using the yaml file. Since I've using Prefect 2.0 for a while in production, I'm on an old version (2.11.3).
- name: <deployment_name>
version: null
tags: *default_tags
description: "a deployment"
schedule:
cron: 16 09 * * 1-5
timezone: America/New_York
entrypoint: <PYTHON_FILE>.py:FUNC_NAME
parameters:
work_pool:
name: *pool_A
work_queue_name: default
job_variables: {}
like ^
so I wonder if I can add a
pool_B
for the same $deployment_name. Physically, in my case,
pool_A
represent processes on one server, and
pool_B
represent processes on a different server
n
thats a
prefect.yaml
file right? you wouldnt be able to add a second work pool for the same exact deployment definition, but you could add another definition just like that one that points at
pool_B
instead
z
thats a
prefect.yaml
file right?
yes
you wouldnt be able to add a second work pool for the same exact deployment definition, but you could add another definition just like that one that points at
pool_B
instead
so i have to dup it basically
n
yeah > so i have to dup it basically since deployments can only be assigned to one work pool
z
got it! thanks