-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the-dev-staging-prod way? #22
Comments
There are many ways to go about implementing a CI/CD pipeline using Pulumi, and we should definitely provide more documentation, guidance and examples for how to do it. (Though we don't want to be too opinionated since each team has different needs.) Anyways, here's a standard setup for having a separate First, you would create three separate stacks. One for each environment. This would also create three separate
Those stack-specific And then, you could update You then just need to have the right CI/CD scripts determine which stack to select and deploy based on the current branch. For example:
You'll want to modify your scripts to also use the right credentials as well, since you likely will have your You can see our documentation for Continuous Delivery for a little more information. But if there is anything that isn't clear, or we could add to improve the docs please let me know. |
How does one do this in a trunk based deployment flow where people avoid branches per environment? For kubectl, I solve this with folders and a patch per cluster. For pulumi does this mean I stop using stacks entirely since pulumi forces changed inside main.py to be visible to all stacks? I can't do something like "stack staging uses version 1.2 and stack prod uses version 1.1" inside stacks? |
Is it in scope for this project to also describe dev, staging, and prod workflows? For the moment, (I believe) this repo suggests only a PR -> prod workflow.
Assuming the current repo structure (under
gcp/
):I'm puzzled about what "the Prod Way" of supporting a workflow with independent dev, staging and prod environments would look like.
Assuming a branch per environment, e.g.
dev
,staging
,prod
, then thePulumi.<stack-name>.yaml
files will (should) differ in at leastsecretsprovider
andencryptedkey
across the three branches (at least for self-managed backends) and possibly also forconfig/gcp:project
. So there will always be merge conflicts when promoting features from one environment's branch to another, which opens the door for human error at exactly the points where you want to be reducing the potential for human error (i.e. when graduating from dev to staging or from staging to prod).I quite liked how identity bootstrapping was described as a series of actions in #13 (comment). If we could come up with an analagous description here to at least spec out a future PR, that would be a pretty great outcome.
The text was updated successfully, but these errors were encountered: