I've just come across Pulumi. It looks super inter...
# general
q
I've just come across Pulumi. It looks super interesting. I was wondering if it's possible for each of my services to have their own Pulumi code in their own repo, but have an
infrastructure
repo that could pull in their resources for a single deployment mechanism? Would anyone advise against that?
w
Totally possible - and a very reasonable approach. Indeed, because you can use NPM (or pip) packages, you could have your services publish real NPM packages and then consume those from your
infrastructure
repo (instead of just `git clone`ing the service repo - though that would work fine too). Packages provide a native way to do versioning and dependency management.
q
Is there an example of this approach? Something simple, like a repo consuming a bucket creation from another package? I couldn't see any dependency stuff in the exampes on GitHub šŸ™‚
Thanks for your comments, I'm excited that I'm not walking down the wrong path šŸ˜„
s
@quiet-wolf-18467 you can check out the aws-infra repo for that
Iā€™ll find a link when I get to a computer unless someone else does first
q
I'll take a look. Thanks
b
I'll just mention an alternative pattern that I've seen users be successful with, because publishing/consuming packages and managing versions can be a little tricky for simple cases. You can always use Git submodules for this. Have N repos, and then just aggregate them all in your infrastructure repo within submodules. Git submodules are certainly not without their flaws, but this can be a quick and easy way to get up and running.
s
Importing as git references to a particular commit SHA or tag probably is a nicer workflow too than publishing packages to npm
I wonder if part of the pulumi service shouldnā€™t be a ā€˜privateā€™ npm registry šŸ¤”
q
Has anyone attempted "GitOps" pipelines with Pulumi?
Also, is there GitLab support / integrations in the roadmap? šŸ™‚
w
Has anyone attempted ā€œGitOpsā€ pipelines with Pulumi?
Yes - many Pulumi users are using a GitOps style deployment pipeline. See https://pulumi.io/reference/cd.html for details on CI integration.
is there GitLab support / integrations in the roadmap?
Yes! Definitely interested in co-developing with users on this. Cc @square-apartment-28429.
w
I'll +1 attest to that. I've got Pulumi GitOps pipelines as well.
q
Anything you can share, @wooden-toddler-96888?
w
I'd say my only current fear/pain point is pressing "Ctrl+C" when something's happening on my local env, and then having to manually reconcile the stack. So I occasionally fear what happens if some operation times out when Travis CI is running the update. I'm pretty sure at some point the various modules can get the state in the cloud for what resources are pending, completed, etc. But for simple websites, or pushes to S3, etc. it's a lot better than Github->CodeBuild->AWS CLI->S3 + manually configured S3 bucket + manually pointed CloudFront distro, etc.
I personally love solutions that for some segments are a slam dunk + have rough edges for others (vs solutions that are just mediocre for everything.) For me Pulumi is solving for ALL my low-hanging fruit and it works 100%. That's such a huge relief.