https://pulumi.com logo
e

early-intern-90238

04/02/2020, 11:47 PM
Anyone setup a Pulumi stack using Vagrant?
s

salmon-account-74572

04/02/2020, 11:49 PM
I'm a bit confused as to what the use case would be...?
e

early-intern-90238

04/02/2020, 11:49 PM
to spin up a dev environment quickly for my developers
I'm open to alternatives
s

salmon-account-74572

04/02/2020, 11:51 PM
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

early-intern-90238

04/02/2020, 11:52 PM
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

salmon-account-74572

04/02/2020, 11:54 PM
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

early-intern-90238

04/02/2020, 11:55 PM
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

salmon-account-74572

04/02/2020, 11:56 PM
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

early-intern-90238

04/02/2020, 11:56 PM
so bypass the Pulumi stack for that?
s

salmon-account-74572

04/02/2020, 11:57 PM
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

early-intern-90238

04/02/2020, 11:57 PM
yeah I know the Pulumi stack is completely built out
s

salmon-account-74572

04/02/2020, 11:57 PM
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

early-intern-90238

04/02/2020, 11:57 PM
Right now how I have everything setup is Pulumi builds our Kubernetes Stack in GCP
yes
s

salmon-account-74572

04/02/2020, 11:58 PM
Do the devs just need K8s locally?
e

early-intern-90238

04/02/2020, 11:58 PM
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

salmon-account-74572

04/02/2020, 11:58 PM
Have you looked at Docker Desktop,
kind
, or Minikube for that?
e

early-intern-90238

04/02/2020, 11:58 PM
yes Minikube is where we started
s

salmon-account-74572

04/02/2020, 11:59 PM
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

early-intern-90238

04/02/2020, 11:59 PM
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

salmon-account-74572

04/03/2020, 12:00 AM
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

early-intern-90238

04/03/2020, 12:00 AM
I had absolutely no idea you could do the login --local lol
that solves that problem I think
s

salmon-account-74572

04/03/2020, 12:01 AM
OK, good. LMK how you get on!
e

early-intern-90238

04/03/2020, 12:01 AM
yeah the rest I would need to mess with Ansible or Packer or something I guess
e

enough-kite-69616

04/03/2020, 11:56 AM
@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

early-intern-90238

04/03/2020, 1:18 PM
not sure what you mean...We use nothing but docker containers
e

enough-kite-69616

04/03/2020, 3:52 PM
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.
6 Views