Chris Gunderson
12/30/2022, 7:55 PMNate
12/30/2022, 8:01 PMCan we have Prefect 1 and Prefect 2 on the same Linux box?yep! you'd just need to make sure the python env / interpreter you're using to start each agent is appropriate for the version
It doesn't need to be prefect-agent.service, right? It could be prefect2-agent.service, right?right! afaik there's nothing special about the name of your systemd config file, most important things are that each one has its own
Environment
variables and that the ExecStart
command uses the appropriate prefect agent start
command for the versionChris Gunderson
12/30/2022, 8:02 PMNate
12/30/2022, 8:02 PMprefect agent start
command you should be fine
you'll have a ~/.prefect
folder where config files from each version are present, but there shouldn't be any filename overlaps there
and on that second point, you could change the `PREFECT_HOME` setting to avoid any possibility of overlapChris Gunderson
12/30/2022, 8:11 PMNate
12/30/2022, 8:12 PMChris Gunderson
12/30/2022, 9:12 PMNate
12/30/2022, 9:52 PMprefect agent start
cmd
but now in prefect 2 that's something you would specify in your `DockerContainer` infrastructure block (there's a volumes attr) and then attach to a deployment, which the agent would submit. Prefect 2 agents are more general, and are capable of submitting flow runs on any type of infrastructure (as long as the host machine supports it)Chris Gunderson
12/30/2022, 9:55 PMNate
12/30/2022, 9:59 PMRight, I was more concerned with installing prefect on the linux server in the venv.ahh apologies if I misunderstood, feel free to ask more questions here if you have trouble doing so
Chris Gunderson
12/30/2022, 10:00 PMNate
12/30/2022, 10:00 PM