Hacker News new | past | comments | ask | show | jobs | submit login
Discuss HN: How do you deploy?
9 points by chrisacky on June 2, 2012 | hide | past | favorite | 9 comments
I was actually pretty surprised after running a search that this topic hasn't really been discussed in detail.

So let's go over the different methods that many of us use. Please explain the method you use to deploy your latest code releases. Do you use continuous deployment, or do you run out weekly/major cycles only.

It would be useful to provide the following...

--------------

[] Your deployment cycles. (ie Continuous or only major releases)

[] Means that you deploy your code

[] Approximate number of servers you deploy to

[] Version control used (if at all applicable to how you deploy)

[] Web technologies used (if applicable to how you manage your deploy)




To deploy without granting your development environment ssh access to the staging or production environments, I suggest you setup port knocking which triggers a script on the server to checkout the latest code. The command can be as simple as git pull or something more complex like capistrano does with symbolic links.

Check out http://www.zeroflux.org/projects/knock - it is very simple to configure.

I find this method to be very secure because if a hacker somehow figures out that a) you're using port knocking and b) the exact ports that you are using, in the right order, then the worst they can do is trigger a code deployment.


I use Chef or Puppet for provisioning, and Capistrano or Fabric for deployment. The process varies based on the application, but IMHO the process should be entirely automated (i.e. I shouldn't have to SSH onto a production machine).


I think a lot about this. If you automate the process, you still SSH in to production machines, but implicitly.

If done properly, it should be sufficient to make a package known to your environment and use a remote execution manager like Salt[0] to initiate the update process.

[0]: http://saltstack.org/


Why chef or puppet? Do you have a preference? I'd like to learn one so I'm curious.


I like to git push to my CI server and from there build packages for the env I'm working in. Nice and quick roll back, delete package reinstall. Git pull does not scale well and with Fabric in the wrong hands is really slow.


I use Dotcloud (and their hosting) to push my latest code to the servers. Once you have got hang of using dotcloud cli, it's pretty easy to use and saves a lot of time in pushing the code to the servers.


I type `git push staging development:master` to deploy to staging, `git push production master` to deploy to production. Apps are deployed to Heroku. Code is hosted on Github.


Continuous releases for now, probably make it major releases soon

ActiveRecord, Postgresql Database

Git for version control

Deployed to heroku (easy web deployment with just "git push heroku master")





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: