Anyone setup a Pulumi stack using Vagrant?
# general
e
Anyone setup a Pulumi stack using Vagrant?
s
I'm a bit confused as to what the use case would be...?
e
to spin up a dev environment quickly for my developers
I'm open to alternatives
s
If you're trying to set up an environment so the developers can use Pulumi, then have a look here for an example: https://github.com/scottslowe/learning-tools/tree/master/pulumi/sandbox
Does that help?
e
Yes I think so...
The directions for creating a full dev environment for us are very long, and very detailed and most of the time someone does something wrong...or has only partial piece of their dev environment working...So I am hoping to resolve this by automating the process of building out an entire dev platform
s
So, it actually sounds like you're wanting to use Pulumi yourself to set up a dev environment for your developers. If that's the case, then those links I sent you will help you get Pulumi running, but you'll still have to write the code that Pulumi will use to instantiate your development environment.
e
well for local dev environment
we have dev/stage/prod environment on GCP
but we also need local dev environment for each dev
and that's what I am struggling with setting up
I can't seem to figure out a good way to do this...
s
I'm not sure Pulumi will be a good fit for a local development environment. For that, you'll probably want to look at Vagrant (to create local VMs) with the Ansible provisioner.
e
so bypass the Pulumi stack for that?
s
Pulumi is mostly centered on automating public cloud resources and things like Kubernetes. I don't know that it would add a lot of value here.
e
yeah I know the Pulumi stack is completely built out
s
If it were me (my 2 cents, take it for what it's worth, YMMV, etc., etc.), I'd go with Vagrant and Ansible (or Puppet or Salt or Chef, pick your poison).
So, you're using Pulumi now to handle the dev/stage/prod stuff on GCP?
e
Right now how I have everything setup is Pulumi builds our Kubernetes Stack in GCP
yes
s
Do the devs just need K8s locally?
e
but having multiple devs use Dev in GCP is problematic
yes
but I somehow need to deploy the pulumi stack to their local k8s
s
Have you looked at Docker Desktop,
kind
, or Minikube for that?
e
yes Minikube is where we started
s
As long as you have a K8s API server, then you should (disclaimer: haven't tested this) apply your Pulumi stack against that target.
e
the part I am struggling with is how to get Pulumi to deploy to a stack for each dev
but ontop of that....How to automate the entire thing
Yeah I mean we could have a seperate stack for each dev...
s
Ah. Let's see...maybe if you used the local file store for Pulumi (
pulumi login --local
), then the "state" of the stack is local to each system. As for automating it...you'll probably have to experiment with Ansible or the like.
e
I had absolutely no idea you could do the login --local lol
that solves that problem I think
s
OK, good. LMK how you get on!
e
yeah the rest I would need to mess with Ansible or Packer or something I guess
e
@early-intern-90238 Have you thought about dockerizing your development environments? It has the added benefit of making sure it runs the same on everyone's box and no custom tweaks
e
not sure what you mean...We use nothing but docker containers
e
I mean making your actual development environment a Docker container with all of the build tools. Just have it map the source from the local filesystem into the container and have the build tools watching for file changes. Then the developer machine doesn't need anything installed except Docker.