Lewis Bails
06/18/2020, 5:11 PMnicholas
06/18/2020, 5:13 PM[server.ui]
graphql_url = "<http://10.10.0.40:4200/graphql>"
so that the UI knows where the API is 🙂Lewis Bails
06/18/2020, 5:23 PMnicholas
06/18/2020, 5:28 PMconfig.toml
you're showing on the server? Or on your local machine?Lewis Bails
06/18/2020, 5:29 PMnicholas
06/18/2020, 5:37 PMLewis Bails
06/18/2020, 5:48 PM# debug mode
debug = false
# base configuration directory (typically you won't change this!)
home_dir = "~/.prefect"
backend = "cloud"
[server]
host = "<http://localhost>"
port = "4200"
host_port = "4200"
endpoint = "${server.host}:${server.port}"
[server.database]
host = "localhost"
port = "5432"
host_port = "5432"
name = "prefect_server"
username = "prefect"
# set to "" to generate a random password each time the database starts
password = "test-password"
connection_url = "postgresql://${server.database.username}:${server.database.password}@${server.database.host}:${server.database.port}/${server.database.name}"
volume_path = "${home_dir}/pg_data"
[server.graphql]
host = "0.0.0.0"
port = "4201"
host_port = "4201"
debug = false
path = "/graphql/"
[server.hasura]
host = "localhost"
port = "3000"
host_port = "3000"
admin_secret = "" # a string. One will be automatically generated if not provided.
claims_namespace = "hasura-claims"
graphql_url = "http://${server.hasura.host}:${server.hasura.port}/v1alpha1/graphql"
ws_url = "ws://${server.hasura.host}:${server.hasura.port}/v1alpha1/graphql"
execute_retry_seconds = 10
[server.ui]
host = "<http://localhost>"
port = "8080"
host_port = "8080"
endpoint = "${server.ui.host}:${server.ui.port}"
graphql_url = "<http://localhost:4200/graphql>"
[server.telemetry]
enabled = true
[cloud]
api = "${${backend}.endpoint}"
endpoint = "<https://api.prefect.io>"
graphql = "${cloud.api}/graphql/alpha"
use_local_secrets = true
heartbeat_interval = 30.0
diagnostics = false
# rate at which to batch upload logs
logging_heartbeat = 5
queue_interval = 30.0
[cloud.agent]
name = "agent"
labels = "[]"
# Set to `DEBUG` for verbose logging
level = "INFO"
# Agents require different API tokens
auth_token = ""
# Internal address for agent health checks, etc...
agent_address = ""
[cloud.agent.resource_manager]
# Separate loop interval for resource managers
loop_interval = 60
[logging]
# The logging level: NOTSET, DEBUG, INFO, WARNING, ERROR, or CRITICAL
level = "INFO"
# The log format
format = "[%(asctime)s] %(levelname)s - %(name)s | %(message)s"
# additional log attributes to extract from context
# e.g., log_attributes = "['context_var']"
log_attributes = "[]"
# the timestamp format
datefmt = "%Y-%m-%d %H:%M:%S"
# Send logs to Prefect Cloud
log_to_cloud = false
# Extra loggers for Prefect log configuration
extra_loggers = "[]"
[flows]
# If true, edges are checked for cycles as soon as they are added to the flow. If false,
# cycles are only checked when tasks are sorted (for example, when running or
# serializing the flow). Defaults to false because it can affect the performance of
# large flows.
eager_edge_validation = false
# If true, `flow.run` will run on schedule by default.
# If false, only a single execution will occur (no retries, etc.)
run_on_schedule = true
# If true, tasks which set `checkpoint=True` will have their result handlers called
checkpointing = false
[flows.defaults]
[flows.defaults.storage]
# the default storage class, specified using a full path
default_class = "prefect.environments.storage.Local"
[tasks]
[tasks.defaults]
# the number of times tasks retry before they fail.
# false indicates that tasks should never retry (equivalent to max_retries = 0)
max_retries = false
# the amount of time tasks should wait before retrying, in seconds.
# false indicates that tasks have no default value (users must specify one to set it)
retry_delay = false
[engine]
[engine.executor]
# the default executor, specified using a full path
default_class = "prefect.engine.executors.LocalExecutor"
[engine.executor.dask]
# the default scheduler address for the DaskExecutor.
address = ""
# the default Cluster class to use to create a temporary dask cluster
cluster_class = "distributed.deploy.local.LocalCluster"
[engine.flow_runner]
# the default flow runner, specified using a full path
default_class = "prefect.engine.flow_runner.FlowRunner"
[engine.task_runner]
# the default task runner, specified using a full path
default_class = "prefect.engine.task_runner.TaskRunner"
nicholas
06/18/2020, 5:51 PMLewis Bails
06/18/2020, 6:10 PMjustin
06/18/2020, 6:25 PMbackend.toml
in ~/.prefect
Lewis Bails
06/18/2020, 6:36 PMjustin
06/18/2020, 6:37 PMnicholas
06/18/2020, 6:44 PMbackend.toml
, and @Lewis Bails is correct, this is one you'll need to create yourself.Lewis Bails
06/18/2020, 6:47 PMnicholas
06/18/2020, 6:54 PMpip install prefect
or conda install -c conda-forge prefect
2. Also on the server, create and modify ~/.prefect/config.toml
, which should include the following:
[server]
[server.ui]
graphql_url = "<http://your_server:4200/graphql>"
3. Still on the server, run prefect server start
4. Back to your local machine, also install prefect using the steps above, creating a new config.toml
, which should include the following:
backend = "server" # this would also be set by running `prefect backend server`
[server]
host = "<http://your_server> # tells prefect where your flows should be available after registration
Now when you register a flow from your local machine, it should be registering with your server deployment; it'll display a URL as such. When in the UI, if you've followed the steps above, the API Healthcheck tile should show your server url as the endpoint it's trying to hit.Lewis Bails
06/18/2020, 6:58 PMnicholas
06/18/2020, 6:59 PMLewis Bails
06/18/2020, 7:02 PMnicholas
06/18/2020, 7:03 PMjustin
06/18/2020, 7:03 PMnicholas
06/18/2020, 7:04 PMgraphql_url
to (after you've restarted the server)graphql_url
in this case is a bit of a misnomer; the client is really what we're after from an API-standpoint, which would be the Apollo GraphQL client (at 4200)justin
06/18/2020, 7:05 PMLewis Bails
06/18/2020, 7:05 PM[server]
[server.ui]
graphql_url = "<http://10.10.0.40:4200/graphql>"
nicholas
06/18/2020, 7:19 PMLewis Bails
06/18/2020, 7:19 PMnicholas
06/18/2020, 7:20 PMprefect server start
, you should see a message in the startup output something like "Replacing Graphql references with 10.10.0.40:4200/graphql"Lewis Bails
06/18/2020, 7:22 PMnicholas
06/18/2020, 7:23 PMAnish Chhaparwal
09/10/2020, 7:02 AMnicholas
09/10/2020, 3:53 PMAnish Chhaparwal
09/10/2020, 4:16 PMnicholas
09/10/2020, 4:36 PMHome
page of the UIAnish Chhaparwal
09/10/2020, 5:14 PMnicholas
09/10/2020, 5:17 PMAnish Chhaparwal
09/10/2020, 6:15 PMnicholas
09/10/2020, 6:35 PM