Hi, I tried to install prefect on my local machine...
# ask-community
f
Hi, I tried to install prefect on my local machine to test it. However I am stuck after starting it via docker-compose. I created the docker-compose.yml file via prefect server. However I can not connect to the server with the prefect agent local start command. This exits with a 'message': 'No tenant found.'. Also the UI on localhost is mostly empty. What am I missing? Logs from docker-compose up seem fine.
j
When not starting prefect server through the prefect CLI, you'll need to create a tenant before things will work. This only has to be done once (when the database container is first created), so we don't do it on startup, instead relying on the user to handle things themselves. This isn't needed if you do
prefect server start
, as we handle that for you.
Copy code
prefect server create-tenant --name default --slug default
f
I see. How would I do this if I can not install prefect / python on my server? E.g. If I can just provide the docker-compose.yml
j
You can do this on the same node you run
prefect agent local start
.
It just makes a network request to the server to create a new tenant.
f
Understood. So last question then is, how do I start a node on my server? I just run a docker container with the command prefect agent local start?
j
What do you mean "start a node"?
f
Well I am confused about your terminology as well 🙂
j
By "node" I mean the physical server you're running things on. You have docker running on the machine you're running prefect server on, but your agents don't need to run on that same machine (since they communicate with prefect server over the network).
f
okay understood.
but I have to start the prefect agent somewhere, so I assume I need to run another container on the same node or a different one correct?
j
Yes.
f
Great. Thanks for the quick reply!
👍 1