Live data from Hacker News

Poll: How often do you deploy to production?

news.ycombinator.com

21–30 of 64 posts

Re: Poll: How often do you deploy to production?

#21

Depends on whether or not I'm actively working on a new part of the site. It varies from 10+ times to 1-2 times an hour. However, with all these people talking about deployment, I just wanna hijack (sorry!) and ask if anybody can help with my current deployment setup: - Branch into a new feature (refactor-javascript for example) - Commit constantly - Rebase with master then merge into master - Push to remote repo - S…

> Push to remote repo - SSH to server, and then pull from the same repo

I have a server setup with a headless git repo and non-headless one. When I push to the headless repo, the post-receive hook goes to the other repo, pulls from the headless, runs tests and restarts the server

So to deploy I just do

    git push deploy master
And get instant feedback that all the tests passed and server was restarted

Re: Poll: How often do you deploy to production?

#22

Depends on whether or not I'm actively working on a new part of the site. It varies from 10+ times to 1-2 times an hour. However, with all these people talking about deployment, I just wanna hijack (sorry!) and ask if anybody can help with my current deployment setup: - Branch into a new feature (refactor-javascript for example) - Commit constantly - Rebase with master then merge into master - Push to remote repo - S…

Check out

https://github.com/capistrano/capistrano

and

http://rubygems.org/gems/fabric

Re: Poll: How often do you deploy to production?

#23

Depends on whether or not I'm actively working on a new part of the site. It varies from 10+ times to 1-2 times an hour. However, with all these people talking about deployment, I just wanna hijack (sorry!) and ask if anybody can help with my current deployment setup: - Branch into a new feature (refactor-javascript for example) - Commit constantly - Rebase with master then merge into master - Push to remote repo - S…

> Push to remote repo - SSH to server, and then pull from the same repo I have a server setup with a headless git repo and non-headless one. When I push to the headless repo, the post-receive hook goes to the other repo, pulls from the headless, runs tests and restarts the server So to deploy I just do git push deploy master And get instant feedback that all the tests passed and server was restarted

That's kind of what I do at the moment but I ended up just ditching the hook as it's not usually needed. I use a headless repo on the server that is then pulled into the live folder.

I always found that the hook never really worked for some bizarre reason. Even something as simple as:

cd /home/deployer/wordpress/wp-content/themes/my-theme && git pull origin master

failed.

Re: Poll: How often do you deploy to production?

#24

Depends on whether or not I'm actively working on a new part of the site. It varies from 10+ times to 1-2 times an hour. However, with all these people talking about deployment, I just wanna hijack (sorry!) and ask if anybody can help with my current deployment setup: - Branch into a new feature (refactor-javascript for example) - Commit constantly - Rebase with master then merge into master - Push to remote repo - S…

We never rebase like that, and instead use git merge master --no-ff We also never SSH into a server, and instead use Capistrano to handle this for us. Capistrano works great with Rails, but even other frameworks have plugins to handle this. And if you're new to capistrano, take a look at http://capo.io (shameless plug: we built this) for readily available recipes for all kinds of tasks. We use Capo for all our projec…

I love capistrano! Sadly, most of the deployment happens on a wordpress theme at the moment.

Re: Poll: How often do you deploy to production?

#25
post #5

With my employer we deploy several times a day. We have 2 SVN repos. One dev, one live. To make a change live you commit your change to the live repo and it is auto-synced. I am not sure how we came to have this. When I first joined there was a code reviewer who manually pushed changes live. He quit and the server admin made it auto. I wouldn't recommend this set up. I am incredibly competent. I make maybe 1 minor mi…

Out of interest, how big is the team?

Re: Poll: How often do you deploy to production?

#26
At work... lots of red tape. Lucky to see one deployment a month, but uat, into, dev are continually deployed following build and tests passing.

Personally anywhere from a few times an hour to a day or so. I try to keep all development tasks small enough to deploy on the hour if possible.

Re: Poll: How often do you deploy to production?

#27
Sometimes I like to edit things direct on the live server, then again, I'm not running a public facing website, so I'm allowed :)

I'd wager many people here missed "the good old days" when it wasn't uncommon to debug a live website over ftp.

Re: Poll: How often do you deploy to production?

#28
Nowadays it is every couple of hours.

But, I used to work for departments of the UK and US governements and it wasn't unusual to have such locked-down and managed environments that it would take 6 months to release some code. It was also expensive (the sponsor department would have to pay for validation and testing by a third party).

The consequence of this is that we really only deployed every 1-2 years.

Re: Poll: How often do you deploy to production?

#29

Earlier quoted context omitted.

> Push to remote repo - SSH to server, and then pull from the same repo I have a server setup with a headless git repo and non-headless one. When I push to the headless repo, the post-receive hook goes to the other repo, pulls from the headless, runs tests and restarts the server So to deploy I just do git push deploy master And get instant feedback that all the tests passed and server was restarted

That's kind of what I do at the moment but I ended up just ditching the hook as it's not usually needed. I use a headless repo on the server that is then pulled into the live folder. I always found that the hook never really worked for some bizarre reason. Even something as simple as: cd /home/deployer/wordpress/wp-content/themes/my-theme && git pull origin master failed.

Strange, it might be to do with GIT_WORK_TREE and GIT_DIR being set (they are set automatically in hooks I think).

My hook is:

    cd $REPO_DIR
    
    unset GIT_DIR
    unset GIT_WORK_TREE
    
    git checkout deploy && \
    git stash && \
    git pull

Re: Poll: How often do you deploy to production?

#30

Depends on whether or not I'm actively working on a new part of the site. It varies from 10+ times to 1-2 times an hour. However, with all these people talking about deployment, I just wanna hijack (sorry!) and ask if anybody can help with my current deployment setup: - Branch into a new feature (refactor-javascript for example) - Commit constantly - Rebase with master then merge into master - Push to remote repo - S…

> Push to remote repo - SSH to server, and then pull from the same repo I have a server setup with a headless git repo and non-headless one. When I push to the headless repo, the post-receive hook goes to the other repo, pulls from the headless, runs tests and restarts the server So to deploy I just do git push deploy master And get instant feedback that all the tests passed and server was restarted

I'll reply here again: Thanks for that! I'll check it out now
Post reply on HN