Darragh
05/14/2020, 10:20 AMDylan
flow.register
2. Are you building a docker container locally? If so, where are you pushing the image?
3. Make sure that apollo’s port is exposed on your Prefect Server instance
4. Would you mind sharing your .prefect/config.toml
configuration that points to your remote Prefect Server instance on your machine?Dylan
[server]
[server.ui]
graphql_url = "INSERT_ENDPOINT_HERE:4200/graphql"
Darragh
05/14/2020, 1:28 PMDylan
Simon Basin
05/14/2020, 2:27 PMDylan
Simon Basin
05/14/2020, 2:47 PMDylan
Dylan
Dylan
Simon Basin
05/14/2020, 3:04 PMSimon Basin
05/14/2020, 3:06 PMDarragh
05/14/2020, 3:17 PMDylan
Darragh
05/14/2020, 3:20 PMpip install prefect
right?Darragh
05/14/2020, 3:20 PMDylan
Dylan
[server.ui]
that interact with prefect server, you’ll need to update the config.toml
on the machine where you’re running Prefect ServerDylan
Dylan
Darragh
05/14/2020, 3:26 PM~./prefect/config.toml
[presumably this overrides the one instaled with Prefect?] with it’s own IP in it for the graphql endpoint?
• Local machine - flow.register() - what do I need to alter in my local Prefect installation to get that flow registered with http://EC2_BOX ??Darragh
05/14/2020, 3:26 PMnicholas
config.toml
installed with the package, you'll only need to modify the one at `~/.prefect/config.toml`; this may not be created automatically so you may have to mkdir ~/.prefect && touch ~/.prefect/config.toml
2. You're correct that your EC2 Prefect installation will need its own ~/.prefect/config.toml
(the one you just created), in which you'll override the graphql_url
in the way @Dylan posted above. As you said, this will be the IP address of the EC2 you've installed the stack on (basically it'll direct the UI to itself)
3. On your local machine, you'll run prefect backend server
and point prefect to your remote installation. You can do this by running export PREFECT___CLOUD__API=<http://EC2_BOX>_
Darragh
05/14/2020, 3:39 PMDarragh
05/14/2020, 3:40 PMnicholas
nicholas
<http://123.456.789.1111:4200/graphql>
instead of <tel:1234567891111|123.456.789.1111>:4200/graphql
• if you're spinning up the Prefect Server docker network anywhere but locally, including in a VM or a remote machine with AWS, GCP, Azure etc, you'll need to let the Prefect Server installation know where it's installed so that when you access the UI in your browser (the client), it knows where to look for its APISimon Basin
05/14/2020, 3:49 PMPREFECT__CLOUD__API=_
nicholas
PREFECT___CLOUD___API
, Slack likes to interpret my underscores as italics <.<Simon Basin
05/14/2020, 4:06 PMSimon Basin
05/14/2020, 4:08 PMSimon Basin
05/14/2020, 4:09 PMnicholas
Simon Basin
05/14/2020, 4:11 PMSimon Basin
05/14/2020, 4:11 PMnicholas
nicholas
nicholas
nicholas
nicholas
nicholas
prefect agent start --name "Super Awesome Local Agent" --label Nicholas-Little-Mac.local
Simon Basin
05/14/2020, 4:16 PMnicholas
prefect backend server
and it'll know to poll localhost:4200/graphql
Simon Basin
05/14/2020, 4:19 PMSimon Basin
05/14/2020, 4:20 PMnicholas
--verbose
flag? That way we can see the outputSimon Basin
05/14/2020, 4:39 PMSimon Basin
05/14/2020, 4:40 PMnicholas
Waiting flow flow runs...
line?Simon Basin
05/14/2020, 4:45 PMSimon Basin
05/14/2020, 4:47 PMDylan
nicholas
[2020-05-14 16:40:55,812] DEBUG - Version Group Tests | Verbose logs enabled
[2020-05-14 16:40:55,812] DEBUG - Version Group Tests | Environment variables: []
[2020-05-14 16:40:55,812] DEBUG - Version Group Tests | Max polls: None
[2020-05-14 16:40:55,812] DEBUG - Version Group Tests | Agent address:
[2020-05-14 16:40:55,812] DEBUG - Version Group Tests | Prefect backend: server
[2020-05-14 16:40:56,155] DEBUG - Version Group Tests | Import paths: []
[2020-05-14 16:40:56,155] DEBUG - Version Group Tests | Show flow logs: False
____ __ _ _ _
| _ \ _ __ ___ / _| ___ ___| |_ / \ __ _ ___ _ __ | |_
| |_) | '__/ _ \ |_ / _ \/ __| __| / _ \ / _` |/ _ \ '_ \| __|
| __/| | | __/ _| __/ (__| |_ / ___ \ (_| | __/ | | | |_
|_| |_| \___|_| \___|\___|\__| /_/ \_\__, |\___|_| |_|\__|
|___/
[2020-05-14 16:40:56,155] INFO - Version Group Tests | Starting LocalAgent with labels ['Nicholas-Little-Mac.local', 'NicholaittleMac.fios-router.home', 'azure-flow-storage', 'gcs-flow-storage', 's3-flow-storage']
[2020-05-14 16:40:56,156] INFO - Version Group Tests | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
[2020-05-14 16:40:56,156] INFO - Version Group Tests | Agent connecting to the Prefect API at <https://localhost:4200/graphql>
Simon Basin
05/14/2020, 4:56 PMDylan
Simon Basin
05/14/2020, 5:32 PMDylan
Dylan
Simon Basin
05/14/2020, 6:55 PMDylan
Dylan
Dylan
Darragh
05/14/2020, 7:43 PMnicholas
:4200/graphql
; that port (4200) will need to be opened to outside traffic.
As for logging, perfect server start
has a lot of output, including network traffic to the APi, which should prove useful. Unfortunately I don't believe the .register
command has any additional loggingDarragh
05/14/2020, 7:51 PMnicholas
nicholas
Darragh
05/14/2020, 7:55 PMnicholas
Dylan
Dylan
Darragh
05/14/2020, 8:10 PMDarragh
05/18/2020, 3:34 PMDylan
378 Flow: <http://localhost:8080/flow/87adb8df-c3d1-4745-af0b-31752f1091b3>
has localhost in the URLDylan
http://{IP dotted quad}/flow/{uuid}
Dylan
Dylan
nicholas
Darragh
05/18/2020, 4:05 PMDarragh
05/18/2020, 4:35 PMnicholas
PREFECT_CLOUD_API
. 2) Since this is using server, the output of flow.regsiter
is based on the prefect.config.server.ui.endpoint
var, which defaults to localhost
. This isn't a true reflection of where the UI is deployed though, since Prefect has no way of knowing unless that variable is explicitly set.nicholas
Darragh
05/18/2020, 4:40 PMDarragh
05/18/2020, 4:41 PMnicholas
nicholas
graphql_url
variable before starting it), you should be able to see the flow thereDarragh
05/18/2020, 4:45 PMDarragh
05/18/2020, 6:01 PMDarragh
05/18/2020, 6:01 PMnicholas
Darragh
05/18/2020, 6:05 PMnicholas