Hi, folks. I got 3 virtual machine(VM1, VM2, VM3) ...
# ask-community
r
Hi, folks. I got 3 virtual machine(VM1, VM2, VM3) with access via corporative VPN. 1. Can I run Prefect Cloud on VM1? 2. How can I run agents on VM2&VM3 for Prefect server on VM1.
j
Hi Ruslan! You're able to configure the api address of the server you want your agents to poll against. https://docs.prefect.io/orchestration/agents/overview.html#prefect-api-address
Depending on how your setup and version you may need to run prefect server with
--expose
https://prefect-community.slack.com/archives/CL09KU1K7/p1633706073066300?thread_ts=1633705819.066200&cid=CL09KU1K7
k
This is a good guide on deploying Prefect Server. Just you clarify, not sure what you mean by number 1. We host Prefect in Prefect Cloud. Do you mean an agent to connect to Prefect Cloud on VM1? Or did you mean server on VM1? This guide will help you set server on VM1 and then on 0.15.5 and above you need the
--expose
flag like Jake suggested. Then you configure VM2 and VM3 to point to the IP of VM1
upvote 2
This will help with the config
r
@Kevin Kho , @Jake Kaplan thanks for reply! I need to run agents on VM2&VM3 for Prefect on VM1. Now I updated Prefect version to 0.15.6 , created config.toml
[server]
endpoint = "VM1_IP:4200/graphql"
[server.ui]
apollo_url = "<http://VM1_IP:4200/graphql>"
and ran
prefect server start --expose
But when I try to run agent on VM2 or VM3
prefect agent local start --api VM1_IP
and got exception
prefect.exceptions.AuthorizationError: No agent API token provided.
and
RuntimeError: Error while contacting API at <http://VM1_IP:4200>
k
authentication is only need for PRefect Cloud. Try doing
prefect backend server
to swtich to the server backend
upvote 1
r
@Kevin Kho Thank you! Also I need to set flow/agent concurrency limits, but only Cloud support this feature. So going back to the original question: 1. Can I run Prefect Cloud on VM1?
k
You can’t. Prefect Cloud is our managed version of Prefect, and it has some other components which are not open source. Only Prefect Server can be self-hosted
upvote 1
🙏 1