https://flyte.org logo
#ask-the-community
Title
# ask-the-community
a

Andrew

01/09/2024, 4:11 PM
Hi, I’ve been trying to figure out the development workflow for using projects and domains, but I’m not finding it in the docs so far. What is the usual process for switching between projects and domains for local development, and also how can you set the project and domain for a launchplan when it is created?
y

Yee

01/09/2024, 5:24 PM
for sanity, you should keep the project/domain of any launch plan equal to that of the underlying workflow that it points to. this is how it works by default and is what happens if you write a standard normal launch plan and go through the standard normal registration flow.
typically what we’ve seen is projects to be used for different teams.
flyte leverages underlying k8s namespace resource isolation which is done by default along project lines
a

Andrew

01/09/2024, 5:30 PM
Ok, that’s good to know. We’re small enough, we’d probably us 1 project for now. However, I was thinking we’d use development when we kick off runs as we develop, and then have the launchplan run in production (in terms of the domain). But I’m unsure how to do that. We’d also want to run some in staging for testing purposes, as we push code through staging -> production
y

Yee

01/09/2024, 5:30 PM
i’d register everything in dev and tweak there
when the code is in the state that you want, re-register to stg/prod
re-registering creates brand new object, replicating everything, but this is what you want. the space it takes to store this is tiny.
you can configure the different domains to have different default task resources and limits.
a

Andrew

01/09/2024, 5:35 PM
How do I register it in a specific domain? That’s what I’m not sure about
y

Yee

01/09/2024, 5:49 PM
the
-d
switch should do just fine.
let us know if that’s not working.
a

Andrew

01/09/2024, 5:51 PM
Oh ok, I’ll give that a try
Ok, that did it, thanks, sorry I missed that. One more question. What would you recommend for this situation: When we get the code to a new state that we’re happy with, we’ll merge it into a staging branch. Then we’re wanting to kick off each workflow (with inputs to make it a test run) in the staging environment, to make sure they all run correctly. What would be the best way to do this? Just do a
pyflyte run
call for each? Or is there a good way to kick off a run from a certain launch plan, without activating the launchplan?
y

Yee

01/09/2024, 7:27 PM
you can run a launch plan if there’s an un-active schedule on it. in fact we recommend only activating schedules in one domain, ideally production. you can kick them all off manually yes, though it’s probably worth it to invest in some automation here.
a

Andrew

01/09/2024, 7:29 PM
Yeah, we use gitlab, so the idea would be to kick them all off whenever code is merged into staging, to test them. What’s the recommended command to kick off a run from a launch plan on the command line?
y

Yee

01/09/2024, 7:32 PM
pyflyte run
or
flytectl create execution
you can take a look at the ux for both. flytectl may make more sense cuz it’s a compiled go binary.
thus bypassing the need for a python env, but the input is a yaml file.
a

Andrew

01/09/2024, 7:33 PM
Ok perfect, I’ll look into those. Thanks for the help!
2 Views