Till
03/09/2021, 9:43 AMTill
03/09/2021, 9:50 AMroot@1864e79a297c:/# prefect server config
Traceback (most recent call last):
File "/usr/local/bin/prefect", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/prefect/cli/server.py", line 394, in config_cmd
subprocess.check_call(["docker-compose", "config"], cwd=compose_dir_path, env=env)
File "/usr/local/lib/python3.7/subprocess.py", line 358, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/local/lib/python3.7/subprocess.py", line 339, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'docker-compose': 'docker-compose'
Jim Crist-Harif
03/09/2021, 2:40 PMprefect
on the node and using prefect server start
, but you can avoid needing prefect (and only require docker-compose
) by pre-generating the docker-compose.yaml
file elsewhere.
# Generate the docker-compose.yaml anywhere you have `prefect` installed
$ prefect server config > docker-compose.yaml
# Copy the docker-compose.yaml to the node you want prefect server to run on
# then run the following in the same directory as the docker-compose.yaml
$ docker-compose up --detach
Jim Crist-Harif
03/09/2021, 2:50 PMprefect server start
), you'll also need to manually create a new tenant after your first startup (to populate the database). This can be done from any node, and only needs to be run once:
prefect server create-tenant --name default --slug default
Till
03/09/2021, 3:20 PMTill
03/09/2021, 3:20 PMTill
03/09/2021, 3:21 PMJim Crist-Harif
03/09/2021, 3:25 PMdocker-compose.yaml
file is here for reference: https://github.com/PrefectHQ/prefect/blob/master/src/prefect/cli/docker-compose.yml. The CLI sets (or templates in) the required configuration environment variables, so it's not really meant to be used on its own.Till
03/09/2021, 3:26 PMTill
03/09/2021, 3:35 PMFlorian Kühnlenz
03/10/2021, 7:23 AMTill
03/10/2021, 8:43 AMdocker run
drops me into a "shell", but then it needs docker-compose
which is not included in the image (probably for good reason). 😄 I created most of what I needed in a pipenv
to limit the impact of a system-wide install.Florian Kühnlenz
03/10/2021, 12:25 PM