Ian
10/27/2020, 8:17 PMprefect server start
2. Is it possible to register an already-built (docker storage) flow? Our product involves deploying to many customer environments that are dynamic, so we would like to be able to build a flow image in CI and deploy it to our customer installations. The question is then, how do you register a flow in an arbitrary number of environments when the build step is before the register step? Does anyone know good patterns to follow here?
Thanks!Jim Crist-Harif
10/27/2020, 8:27 PMDocker
storage, and manually specify the image name/tag/repository, then pass build=False
when calling register. You'd be responsible for getting the flow code into the image and configuring the Docker
storage with the proper flow path
(with stored_as_script=True
).
• Store the flow externally in e.g. s3, and specify your image as part of the flow configuration. This lets you use a static image for multiple flows, as the flow code will be stored elsewhere.Ian
10/27/2020, 8:30 PMJim Crist-Harif
10/27/2020, 8:31 PMregister(build=False)
), this is fairly straightforward, as no docker build step is required.Docker
storage and want to do the docker build step there, you'd need to use some kind of docker-in-docker setup. There's guides elsewhere for doing this, but I don't have anything immediate to point you to (sorry).Ian
10/27/2020, 8:37 PMregister(build=False)
? I am not familiar with what the docker build process stores in the flow container, but if the source code is there, it seems like we could run that?docker run <pre-built-flow-container> /path/to/flow/source/register.py
?Jim Crist-Harif
10/27/2020, 8:39 PMIan
10/27/2020, 8:48 PM