Hacker News new | ask | show | jobs
by mbreese 4495 days ago
You're over thinking this... None of these are specific to this type of deployment. If you want to do any of the above, you'll have to work around whatever production deployment solution you have.

1) How would you do this for any deployment method? You'd have to be able to ID one specific node in the cluster or make sure that your job could only run on one node with some sort of locking.

2) If you're deploying multiple versions of an application in production, you have other issues.

3) How would you rollback database changes to begin with? Come to think of it, how are you going to deal with any DB schema changes? This isn't just an issue with .deb/.rpm deployments of code - you'll have to figure this out for any application deployment.

1 comments

Well, I suppose I mention some of these as the article likens package deployment to Capistrano in the opening paragraph.

Using Capistrano, for (1) I can just mark a target server as the update server to run these commands. With packages, I assume I either have to have a different version of the package or rely on some sort of environmental variable which the package reacts to?

2) Yep that would be slightly ridiculous for production, but I was thinking more along the lines of UAT, staging and other shared testing/development environments. It's not ideal but I have been in the situation where this was required.

3) True, but with Cap I can just issue a rollback and it will revert to a database snapshot that was taken from the last version. I can't see how we could do something like this with packages alone.

Maybe you mean that these problems are outside the scope of packages and that I should be using packages with something like capistrano to solve them but then why wouldn't I just use Capistrano on its own?