https://prefect.io logo
Title
j

justin

06/18/2020, 9:19 PM
Hello Friends I am going through the first flow tutorial: https://docs.prefect.io/orchestration/tutorial/first.html#write-flow. Here is what my flow script looks like
#prefect_test.py
import prefect
from prefect import task, Flow

@task
def hello_task():
    logger = prefect.context.get("logger")
    <http://logger.info|logger.info>("Hello, Cloud!")

flow = Flow("hello-flow", tasks=[hello_task])
flow.register()
flow.run_agent()
I've got my prefect server running. I started with the following command:
prefect server start --hasura-port=3050
. So I then see that when I run the prefect_test.py file above it submits the flow and I have a url where I want to go run the flow. Something like this:
<http://localhost:8080/flow/6e437b8f-9fc2-41c1-9862-311d9a423442>
I follow this link to use the UI to run the flow and I have an empty screen. Anything obvious I am missing?
n

nicholas

06/18/2020, 9:20 PM
Hi @justin - where are you running Prefect Server? Is it on your local machine?
j

justin

06/18/2020, 9:21 PM
Its on a server in a vpn
not quite local
n

nicholas

06/18/2020, 9:22 PM
That would be why - localhost refers to just that, your localhost. If you've correctly set your
endpoint
var in
config.toml
, that's where prefect is registering flows
You'll need the address of your server, the UI will be available on port
8080
by default (this port will also need to be exposed)
In the thread with Lewis above (which I believe you were part of), I outlined the steps you'll need to take both locally and on your server; let me know if you have some trouble after following those
j

justin

06/18/2020, 9:28 PM
I am confused by the locally part actually
I am running everything on the remote server
n

nicholas

06/18/2020, 9:28 PM
That's where you're registering your flows from as well?
j

justin

06/18/2020, 9:28 PM
yes
n

nicholas

06/18/2020, 9:28 PM
Ok then the only part that applies is the UI setup that I described
Your browser still needs to know where to go, which in this case is NOT localhost
j

justin

06/18/2020, 9:29 PM
so in conig.toml I am pointing it to
x.x.x.x:8080?
n

nicholas

06/18/2020, 9:30 PM
No, that's where the UI is being served
j

justin

06/18/2020, 9:30 PM
[server]
  [server.ui]
  graphql_url = "<http://0.0.0.0:4200/graphql>"
[endpoint]
  ui = "<http://0.0.0.0:8080>"
oh ok
n

nicholas

06/18/2020, 9:30 PM
That looks fine, assuming you're replacing the 0.0.0.0 with an actual IP
j

justin

06/18/2020, 9:31 PM
let me try
do I need to have [endpoint.ui] as a entry in the toml?
n

nicholas

06/18/2020, 9:32 PM
No, you don't
j

justin

06/18/2020, 9:33 PM
upon modification shall I run
prefect backend server
or how does it acknowledge updates?
n

nicholas

06/18/2020, 9:34 PM
You'll want to stop server and restart it
j

justin

06/18/2020, 9:34 PM
I see
n

nicholas

06/18/2020, 9:34 PM
Should also run that if you haven't already
@justin it might be good to start with Prefect Cloud if you continue to have issues - it's trivial to get set up and Prefect Server requires a fairly large amount of networking and deployment knowledge
j

justin

06/18/2020, 9:35 PM
I see
Thank you for the suggestion
I do see that my local Private IP has propagated to the graphql status modal
n

nicholas

06/18/2020, 9:37 PM
But it's not connecting? Is the
/graphql
route included?
j

justin

06/18/2020, 9:37 PM
correct
by local I mean local to the vpn
n

nicholas

06/18/2020, 9:38 PM
Can you access the API in your browser at the 4200 port?
j

justin

06/18/2020, 9:38 PM
yes
same issue as lewis balls
n

nicholas

06/18/2020, 9:38 PM
What are you seeing when you try to access them?
j

justin

06/18/2020, 9:38 PM
GET query missing.
n

nicholas

06/18/2020, 9:39 PM
Can you provide a full screenshot of both tabs? Including the URLs? that'll help me debug a little.
j

justin

06/18/2020, 9:41 PM
n

nicholas

06/18/2020, 9:41 PM
And the UI?
j

justin

06/18/2020, 9:41 PM
oh snap its up
shoot we're good!
thanks a ton
n

nicholas

06/18/2020, 9:43 PM
Glad to hear it 🙂
j

justin

06/18/2020, 9:44 PM
thank you so much!
😄 1
fwiw, we do a ton of work on the cloud but we are trying to do something like a sagemaker on an nvidia dgx so we are trying out prefect