In prefect 1, when starting a local agent from a c...
# prefect-community
j
In prefect 1, when starting a local agent from a container, I pass prefect agent local start -k <api key value>. Is doing the same thing possible for prefect 2? Reading the docs, it doesn't look that passing an api key is an option for agent start.
1
m
Hey @Jehan Abduljabbar for prefect 2 you would set the API key and Cloud URL in your profile settings, either manually you can follow the process in this discourse article https://discourse.prefect.io/t/prefect-1-0-prefect-2-0-user-configurations-to-configuration-profiles/1299, or automatically with this command
Copy code
prefect cloud login --key api_keyxxxxxxxxxxxxxxxx
from there when you're starting an agent you would just specify a workqueue the agent is tied to with this command this discourse article does a good job of explaining some of the major differences https://discourse.prefect.io/t/migration-using-a-local-agent-and-runtime-in-prefect-1-0-and-2-0/1305
Copy code
prefect agent start -q "workqueue-name"
🙌 1