Hi guys, hope someone can help me with my current...
# prefect-community
v
Hi guys, hope someone can help me with my current problem. I have two virtual machines. One is running the Prefect server and I try to deploy a flow from the other one. I have started the Prefect server successfully
Copy code
ubuntu in ๐ŸŒ instance-20230102-1221 in ~ via ๐Ÿ…’ prefect took 5m57s 
โฏ prefect config set PREFECT_SERVER_API_HOST=0.0.0.0
Set 'PREFECT_SERVER_API_HOST' to '0.0.0.0'.
Updated profile 'default'.

ubuntu in ๐ŸŒ instance-20230102-1221 in ~ via ๐Ÿ…’ prefect took 3s 
โฏ prefect server  start

 ___ ___ ___ ___ ___ ___ _____ 
| _ \ _ \ __| __| __/ __|_   _| 
|  _/   / _|| _|| _| (__  | |  
|_| |_|_\___|_| |___\___| |_|  

Configure Prefect to communicate with the server with:

    prefect config set PREFECT_API_URL=<http://0.0.0.0:4200/api>

View the API reference documentation at <http://0.0.0.0:4200/docs>

Check out the dashboard at <http://0.0.0.0:4200>
I am able to connect to the Prefect UI in the browser, by replacing
0.0.0.0
with the ip address of the vm. On my second vm, i have done the following:
Copy code
ubuntu in ๐ŸŒ instance-20221129-2229 in yfin-db/yfin_db on ๎‚  main [!?] via ๐Ÿ v3.11.0 via ๐Ÿ…’ main took 6m37s 
โฏ prefect config set PREFECT_API_URL=<http://xxx.yyy.zzz.xxx:4200/api>
Set 'PREFECT_API_URL' to '<http://xxx.yyy.zzz.xxx:4200/api>'.
Updated profile 'default'.

ubuntu in ๐ŸŒ instance-20221129-2229 in yfin-db/yfin_db on ๎‚  main [!?] via ๐Ÿ v3.11.0 via ๐Ÿ…’ main took 6s 
โฏ prefect deployment apply healthcheck-deployment.yaml 
Successfully loaded 'healthcheck'
Deployment 'healthcheck/healthcheck' successfully created with id '52b59be9-fe11-49d1-acad-3257f3fc758d'.
View Deployment in UI: <http://xxx.yyy.zzz.xxx:4200/deployments/deployment/52b59be9-fe11-49d1-acad-3257f3fc758d>

To execute flow runs from this deployment, start an agent that pulls work from the 'test' work queue:
$ prefect agent start -q 'test'
As you can see, I have changed the
PREFECT_API_URL
to the Prefect server running on my first vm. Than I have applied the deployment and Prefect tells me, that the deployment was successfully created. However, the deployment does not appear in the Prefect UI. Did I miss anything?
โœ… 1
One more info. The following popup message appears in my Prefect UI.
j
What is the network configuration for the two vms? This looks like a virtual network misconfiguration.
โœ… 1
v
This is how the ingress rules for my vnc looks like Which ports needs to be opend?
Anyone can help me here? Thanks :-)
t
Copy code
export PREFECT_SERVER_API_HOST="127.0.0.1"
prefect server start --host 0.0.0.0
Maybe try this?
I am not sure whether this is totally appropriate for your problem, but I also set the
PREFECT_API_URL=http://<myipaddress>:4200/api
before I
prefect server start
, where
<myipaddress>
is my network ip address
๐Ÿ™Œ 1
v
Ok. Thanks. Iยดll give it a try.
Solve my problem, by setting both variables on my remove vm, which runs the prefect server
Copy code
prefect config set PREFECT_SERVER_API_HOST=0.0.0.0

prefect config set PREFECT_API_URL=<http://xxx.yyy.zzz.xxx:4200/api>
Where
<http://xxx.yyy.zzz.xxx>
is the ip of my perfect server vm.
โœ… 1
t
Awesome!
247 Views