Live data from Hacker News

Vagrant Push – One Command to Deploy Any Application

vagrantup.com

11–20 of 34 posts

Re: Vagrant Push – One Command to Deploy Any Application

#11
post #3

I'm having a hard time understanding what this does and what it buys me. If I am understanding correctly, they have added a new subcommand, but you pretty much have to make it do anything useful yourself (if you fall outside of their limited set of plugins). Is this a correct assessment?

This is correct. The benefit is technology abstraction for the developer. To use our own tools as an example: our open source docs is deployed to Heroku, our binaries go to Bintray, our services go to Atlas. Now every developer at HashiCorp knows that you `git clone` any project in the company, and `vagrant push` to deploy. It doesn't matter how it works under the covers. Example: We just changed Vagrant itself to `v…

> Now every developer at HashiCorp knows that you `git clone` any project in the company, and `vagrant push` to deploy. It doesn't matter how it works under the covers.

We already have a standard for that. It's called "make" to build, and "make deploy" to deploy. Put a Makefile next to your Vagrantfile like you should have done in the first place. :)

Re: Vagrant Push – One Command to Deploy Any Application

#12
post #2

What happened to "one thing and well"? Vagrant is exceptional in what it does but I can't see why anybody should use it as their deployment tool among myriad of deployment tools.

>What happened to "one thing and well"?

1) It was never that great an idea in the first place. It's OK-ish for command line, text based interfaces, but its tedious and limiting for more complicated stuff and it results in tools that lack a coherent story to work together, especially if each of the tools is made by a different entity, with different APIs, flags, etc.

2) It's still here for Vagrant. Vagrant doesn't try to do the deployment. Just provides a command that can call your preferred deployment tool that just does "deployment well".

Re: Vagrant Push – One Command to Deploy Any Application

#15
I've watched the videos and read the docs, but I'm still a little confused about this feature. How does it know what files to push? Does it diff the base vagrant image? If my application has package dependencies, does it push those too? What about if I need to restart a service as part of the push?

Re: Vagrant Push – One Command to Deploy Any Application

#16
FTP and SFTP are unrelated protocols, the "secure" version of FTP is FTPS. Sorry to be pedantic, but it is a little confusing. Does 'secure = true' enable FTPS or SFTP (which is actually a protocol over SSH)? I'm hoping SFTP, but then how do you enable FTPS?

Re: Vagrant Push – One Command to Deploy Any Application

#17

FTP and SFTP are unrelated protocols, the "secure" version of FTP is FTPS. Sorry to be pedantic, but it is a little confusing. Does 'secure = true' enable FTPS or SFTP (which is actually a protocol over SSH)? I'm hoping SFTP, but then how do you enable FTPS?

Good question, it is SFTP. The reason we made them look similar is that we did some user testing and end users are used to FTP clients having just a checkbox for "Secure" (which is typically SFTP). We followed that model.

Under the covers, it is a completely different protocol.

Re: Vagrant Push – One Command to Deploy Any Application

#18

I've watched the videos and read the docs, but I'm still a little confused about this feature. How does it know what files to push? Does it diff the base vagrant image? If my application has package dependencies, does it push those too? What about if I need to restart a service as part of the push?

Good question. It does a few heuristics depending on the strategy in use. But it has some VCS detection in it so if you're using Git it'll only upload files in the Git index (staged/committed/not ignored). There are also glob-based include/exclude filters you can specify. If all else fails, then yes, it uploads everything.

Re: Vagrant Push – One Command to Deploy Any Application

#19
post #11

Earlier quoted context omitted.

This is correct. The benefit is technology abstraction for the developer. To use our own tools as an example: our open source docs is deployed to Heroku, our binaries go to Bintray, our services go to Atlas. Now every developer at HashiCorp knows that you `git clone` any project in the company, and `vagrant push` to deploy. It doesn't matter how it works under the covers. Example: We just changed Vagrant itself to `v…

> Now every developer at HashiCorp knows that you `git clone` any project in the company, and `vagrant push` to deploy. It doesn't matter how it works under the covers. We already have a standard for that. It's called "make" to build, and "make deploy" to deploy. Put a Makefile next to your Vagrantfile like you should have done in the first place. :)

Sure :), but that's yet-another-thing you need to manage. You could put all that logic in a Vagrantfile. It's about reducing the number of touch points.

I definitely see your side of the argument, and we certainly have Makefiles in our projects too. Vagrant Push provides a way for an organization or team to choose what is best for them and lower the barrier to entry for developers on a project.

Re: Vagrant Push – One Command to Deploy Any Application

#20

I've watched the videos and read the docs, but I'm still a little confused about this feature. How does it know what files to push? Does it diff the base vagrant image? If my application has package dependencies, does it push those too? What about if I need to restart a service as part of the push?

To build on what mitchellh said, you can also specify paths outside of the current working directory to include in the push with the `include` flag. It can be specified multiple times in the DSL as well.
Post reply on HN