4 ms·
Oh wow! I co-lead these efforts at Pulumi. I don't think we expected this to hit HN! :) Happy to answer questions about any of this. Parenthetical, one thing t
by antics 7y ago
Oh wow! I co-lead these efforts at Pulumi. I don't think we expected this to hit HN! :) Happy to answer questions about any of this.
Parenthetical, one thing that didn't make it into this post that I'm particularly optimistic about is the `watch` command, which will continuously watch your code and deploy it to (say) Kubernetes. It looks like this[1]. This is very handy when you're trying to build a thing that has to integrate with a bunch of other services, but there are too many to develop locally on minikube. It basically lets you see instantly if something crashes, or whatever. In general I'm very optimistic about that sort of experience—another product in that space is Tilt[4] which I am personally a big fan of.
Another thing that gets kind of a passing mention that is cooler than it looks here is our streaming `query` stuff. By exposing Kubernetes `watch`es as streaming queries, it becomes very easy to write very cool apps like this one[2] , which helps you debug services. You can actually see a bug in the Deployment controller there—we create two `Deployment`s with the same labels, and deleting one causes the controller to delete _all_ the pods. This would generate a transient 500 for any request hitting that service. I think there are probably lots of bugs in Kubernetes like this, but people don't notice them because this level of visibility previously was quite hard. :) To get an idea of how hard that sort of app is to write, you can see the code we wrote for the prototype of this SDK here[3].
[1]: https://twitter.com/funcofjoe/status/1195411343966236677?s=21 https://twitter.com/funcofjoe/status/1195411343966236677?s=2...
[2]: https://drive.google.com/open?id=1Q2f8CZhswMvTliaLlHZK4vItdMVIXzOD https://drive.google.com/open?id=1Q2f8CZhswMvTliaLlHZK4vItdM...
[3]: https://github.com/carbonql/carbon-ts/blob/master/examples/unix/serviceMonitor/serviceMonitor.ts https://github.com/carbonql/carbon-ts/blob/master/examples/u...
[4]: https://tilt.dev/ https://tilt.dev/
- migueloller 7y agoI’ve been very impressed with what you guys are doing. We’re extremely excited about moving from our collection of YAML, bash, and Helm templates to Pulumi. The big question mark we had was what local development would look like. Tilt and Skaffold were the two big candidates we looked at for sane local development with Kubernetes. Looks like Pulumi’s new `watch` could give us what we need? Are there any plans to have something like rsync support to enable things like hot-reloading apps? Both Tilt and Skaffold have examples showing this capability.
- antics 7y agoWe have a Docker[1] library which allows you to build and push Docker a container—you can plug that directly into the `image` field and it should work. I'm _guessing_ that eventually `watch` will eventually make this more automated, but we don't have any specific plans for that, yet. [1]: https://github.com/pulumi/pulumi-docker https://github.com/pulumi/pulumi-docker
- migueloller 7y agoI’ll look into this. What I think Tilt and Skaffold are doing is just setting up a persistent volume to a local directory and letting all the reloading stuff be handled by the end-user. As long as the persistent volume links the local files to the cluster it should be good to do.
- antics 7y agoYeah, Tilt has a couple of different ways of providing similar functionality. In one mode, they simply rebuild the container and ship update Kubernetes on each file modification. In another mode, they boot a dev container in the pod and then transparently sync the local FS content to the cluster, which means that "time to live" is the amount of time it takes to compile your app in the cluster. `watch` with the Docker library is a direct analog for the first, but we have no analog for the second.
- migueloller 7y agoGotcha, so things like hot-reloading wouldn’t work right now. Still, looks like y’all are going in the right direction. Thanks for all the details! One more question, is there a way to interop Pulumi with Skaffold or Tilt?