https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Shreyansh Pandey

05/21/2020, 8:45 PM
From my understanding of the Prefect ecosystem, I reckon that the latter part of what I asked is possible but I would still love a green light from the community to make sure I got this right. Suppose we have the standard CI/CD flow: • engineer pushed code to the VCS; • our CI/CD agents receive a task; • they spin up a Docker container to run that task; • the Docker container runs
python3 flow.py
(where
flow.py
is the entry-point); • this, in turn, calls
flow.register()
which registers/updates the flow on upstream. If that's that case, what would be the best way to accomplish the dynamic configuration of the Prefect API endpoint? (Env var, etc.) I understand that I can use
PREFECT__CONTEXT__SECRET__<NAME>
to dynamically serialize secrets.
l

Laura Lorenz (she/her)

05/21/2020, 9:12 PM
Hi @Shreyansh Pandey! This seems legit to me, and for configuring the endpoint for your CI/CD tool I would imagine env var is the way to go. Based on your thread above with @Dylan I think as long as your CI/CD is configured with
prefect backend server
that should be
PREFECT__SERVER__ENDPOINT
. Your CI/CD tool will also need to be able to authenticate to whatever backend for the Storage class you pick is as well (ex AWS if you pick s3).