Alexander
10/16/2020, 12:11 PMprefect server start
does not let you to detach?? It has so much control on how whole prefect server is deployed yet you cant use on anything rather then local console. Also i found that there was no actual documentation on all services of prefect server and how to connect them to each other. I was able to understand it only by reverse-engineering docker compose file and prefect server cli source code π Other than that there is no really fancy stuff here, just regular compose file with some variables defined.
3. There is a big security hole in the whole setup called apollo. UI (read: your web browser) need access to apollo endpoint. There is no auth in both UI and apollo, which means you have to put the whole service behind the VPN, at least.
4. Then i have this nifty little dockerfile wich defines flow execution and registration environment. Nothing fancy too, except you have to somehow forward an apollo endpoint address. It also uses the same image as used by docker agent as its base.
5. On every commit i run this code:
docker build -t hs-databricks:build_runtime -f flows/Dockerfile --build-arg APOLLO_PUBLIC_URL=$APOLLO_PUBLIC_URL .
# Register all flows
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -e APOLLO_PUBLIC_URL=$APOLLO_PUBLIC_URL hs-databricks:build_runtime \
python /src/hs-databricks/flows/registry.py
6. And there is a central flow registration script, which scans ./flows folded for python files, extracts flows from them, builds docker storage and registers the flows. It has no comments, but i wrote it just yesterday βΊοΈ
My plans are, since this all is running in docker, try to deploy the prefect server + agent + flow storage in AWS Fargate, so i dont need to maintain any EC2 at all.
Hope this will help anyone πSpencer
10/16/2020, 2:00 PMenvironment
to each flow.
I originally used the same environment for all flows but have since iterated and made an internal library that translates placeholder objects (non-functional environments) with the production environments at registration. (These "dummy environments" are used to specify if the flow needs more or less resources or other configurations)Billy McMonagle
10/16/2020, 7:24 PMAsif Imran
10/16/2020, 8:54 PMYuri Caruso
01/16/2021, 9:41 PM