sparse-intern-71089
01/29/2024, 4:45 AMicy-controller-6092
01/29/2024, 4:46 AMicy-controller-6092
01/29/2024, 5:26 AMprovider
(or parent
if using component reosurces) - this is way too easy to forget to add
to get around this i wrote a shell script to grab the outputs from the "infra" microstack and then add them to each app microstack using pulumi conig set ...
icy-controller-6092
01/29/2024, 5:29 AMpulumi login file:///...
) and ESC won't work thensalmon-account-74572
01/29/2024, 4:05 PMwhite-balloon-205
localized microstack deployments are much faster, saving a lot of time that was previously wasted on unnecessary chatter with cloud providersI believe you are using the filestate backend (S3 or local)? I would be a bit surprised if there was any material unnecessary chatter with cloud providers outside of state storage - in general we don't have to speak to the cloud providers except when there is an actual CRUD operation to perform on a resource that is changing. And in the Pulumi Cloud state backend, we have some optimizations based on compute on the server to limit the chatter to diffs, which should ensure these costs don't scale with stack size. In general, it is a goal for us to ensure that effectively no performance costs scale with stack size - so would love to undersand whether these costs for you are coming from state store or from resource CRUD operations! (Aside - there are of course other very good reasons to break up large stacks, such as for reduced blast radius, seperate versioning, etc.).
the DX to support a microstack migration is a painful omission... i.e. aAbsolutely - this is something we really want to add to the CLI! As you note - this is tracked in https://github.com/pulumi/pulumi/issues/3389, which is currently the 8th most requested feature in the entire Pulumi open source project, and one we hope to tackle very soon.command for migrating one or more resources would be super handy (tracked in GH issue 3389)pulumi transfer
it couples really well with nx! eachThis is great to hear. We've seen many users moving to NX recently, and have work on improved support for NX that we're expecting to tackle this quarter in https://github.com/pulumi/pulumi/issues/8865.command is wrapped in an nx task, with dependencies modelled using thepulumi up
option so that when bringing up a new environment it knows which order to deploy the microstacks. this also ensures the stack references won't faildependsOn
I've also got the notion of 2 types of stack programs - cloud and local, with the idea that local can be run completely offlineCurious - what do you have in your
local
stacks that doesn't require talking to the cloud? Is this local Kubernetes cluster and/or workload resources? Something else?
to get around this i wrote a shell script to grab the outputs from the "infra" microstack and then add them to each app microstack usingpulumi conig set ...
someone mentioned you can use ESC for this, but for my local stacks im using a local pulumi backend (Yeah - this is a great use case for ESC. It offer the ability to pull configuration out of Pulumi Stack outputs, and then to project it into configuration for a stack. Avoids a ton of copy/paste!) and ESC won't work thenpulumi login file:///...
salmon-account-74572
01/30/2024, 12:39 AMicy-controller-6092
01/30/2024, 1:43 AMredis_conn
and the dependants will use a StackReference to that output, and are completely agnostic to whether the string is an Upstash or local docker image connection.
This means that I can't use ESC to configure default providers, because even if I did use ESC for the Cloud-type stacks I would still require a solution for Local-type stacks and I didn't want to manage that branching, so I just a shell script to copy provider config outputs into the relevant stack yaml files
> in general we don't have to speak to the cloud providers except when there is an actual CRUD operation to perform on a resource that is changing
I use the --refresh
flag when running pulumi up
so the more resources, the more API calls to AWS, Databricks, Upstash, etc. Even without a pre-up refresh the microstack programs still feel much snappier, I suspect this is due to there being a much lower resource count in a microstack versus the number of resources in a monolith stack, plus the benefits you mention are also a huge bonusrhythmic-pharmacist-98468
03/14/2024, 4:18 PM