Hello, I can’t seem to find the local development guide in the docs anymore, how do I start prefect server & agent locally for the first time?
k
Kevin Kho
09/14/2021, 7:17 PM
Hey @Raed Shabbir,
prefect server start
and
prefect agent local start
Kevin Kho
09/14/2021, 7:17 PM
In 0.15.5 if you are conencting from different machines to server, you need the
--expose
flag
r
Raed Shabbir
09/14/2021, 7:19 PM
Hey Kevin, prefect server starts the UI correctly, but how can I connect to my K8S deployment with external postgresql as in earlier versions?
Raed Shabbir
09/14/2021, 7:20 PM
Also
prefect agent local start
fails with
Copy code
RuntimeError: Error while contacting API at <https://api.prefect.io>
But why would the local agent have to connect to prefect-cloud? (note we are not using prefect-cloud and initially deployed via this guide
Copy code
<https://www.youtube.com/watch?v=EwsMecjSYEU>
k
Kevin Kho
09/14/2021, 7:22 PM
I think you edit this to point to another postgres db. The agent contacts Prefect Cloud by default. To point it to server, you need to do
prefect backend server
r
Raed Shabbir
09/14/2021, 7:29 PM
I see, so the correct order of operations for purely local development would be
1. prefect backend server
2. prefect server start
3. prefect local agent start
?
k
Kevin Kho
09/14/2021, 7:30 PM
Yep
r
Raed Shabbir
09/14/2021, 7:48 PM
Great and what would be the recommend way to switch from local agent to our K8s deployed server?
Raed Shabbir
09/14/2021, 8:37 PM
Would it be just adding the following lines into the flow file?
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.