Scaling PHP in the Cloud
HasGeek’s seventh event, focusing on the challenges of scaling from single to multi-server deployments for PHP-based websites.
Jul 2011
4 Mon
5 Tue
6 Wed
7 Thu
8 Fri
9 Sat 09:30 AM – 05:30 PM IST
10 Sun
On the benefits of using Git
or other version control software to deploy software, instead of traditional rsync
, scp
or ftp
.
This is a brief discussion (~15 minutes) on using Git, Mercurial or other distributed version control software to deploy software to servers. It works when you have one or two servers and rapid iterations.
Traditionally, software is deployed by simply copying it to the server over FTP or SFTP. More clued-in developers use rsync for its ability to update only changed files. There are two problems with this approach:
No version control for deployments. You may have versioning in your development environment, but you’re missing it in your deployment. It’s not easy to roll back if something breaks.
You have to separate your development configuration files from your production configuration files. You could accidentally overwrite production config with development config, breaking the site.
Distributed version control systems provide a better way to manage deployments. They already understand how to ignore certain files (specified in .gitignore
or .hgignore
) an allow committing a change and pushing it to a remote location that isn’t necessarily the central repository. You can commit a change and push it to a test server. On the production server, you can pull changes from the repository and Git/Mercurial will automatically ensure that config files are not clobbered.
This approach is trivial to setup and makes for much peace of mind when deploying rapid iterations.
During the session I’ll present on how I manage my deployments and then we’ll discuss how you do yours.
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}