I have heard it talked about in various pod casts from places like the lollabots and Dojo. But I have not seen any practical example of work flow from start to finish (downloading drupal, install, module building, then going live). While I have experience in a few different IDE's like Zen Studio & Eclipse W/ PDT working with SVN is new to me (no real experience with CVS either). I have read up on SVN quite a bit and I can do all the basic function I need to in Eclipse with the SVN plugin. But I don't understand the best way to setup and test and deploy.
My current dev process is simple. I use Dreamweaver (don't flame, its got code coloring, code folding and OMG simple FTP, something I cant get in freaking eclipse). Its so simple and fast to work in plus I have a local copy of the files to work on if I am off line. When I am online I simply open the file, edit hit ctrl+s and refresh Firefox and find out if it worked.
I guess the big question is whats the easy way to setup a environment where I can use SVN to track changes but still be able to easily run my code in the site to test if it works. Is there anyway to track database changes? I would prefer to work in either Zend Studio or Eclipse.
I know this is a vague question but I am open to any ideas, examples, suggestions or links. Books are very welcome if they go over this topic as it relates to websites. Most I have found pertain to app programing and things that don't really translate into web.
Comments
bump...
bumping with hope :)
-RM
More interest for this
I am very interested in this topic as well. The organization that I work for will be using drupal to develop a new web site. However we need a practical method to manage production, test, and development instances. I would figure SVN would be of great help, but I"m not sure what the best approach is.
If anyone can provide some feedback, it would really be appreciated.
I'm also interested in what
I'm also interested in what others have to say about this as well. I've recently started using SVN for my development sites on my local machine, but I'm not sure what would be best for the production site.
Barry
You're going to have to dig deeper
SVN is a great tool for a whole bunch of things, but you really can't rely on the GUI front end tools, at least not on the deployment side. Eclipse does a fair job of checking in the changes, but doesn't have a good method to get the files to their final destination. Also keep in mind that Eclipse and the like is not going to be much of a help once a project gets to a certain complexity (for example repositories inside of other repositories). In a production environment, the shell is your friend.
What I've done in the past is just to check the entire drupal install (minus all your project specific files) into an svn repository with a tag, then do an svn switch statement in the final environment. It doesn't do the database backup that you'd like, but you should be taking database snapshots anyway (provided what you are really worried about data loss, and/or database portability). When you do the svn switch, it will not touch any of your site specific files (themes/modules), and all of the updates when drupal updates from 5.x to 5.x+1 take place.
Doing it this way makes keeping drupal up to date easy, but doesn't completely solve the portability problem. You end up doing a checkout somewhere, then either embedding another repository in your sites directory, or scp/ftp-ing files from development into the production sites directories to solve the portability issue.
Dreamweaver, SVN and Drupal
Hi,
Well, I don't claim that what I do is best practice, but anyway... I use Dreamweaver and Subversion to work on sites and track the changes, but I still publish (FTP) manually.
I have a local development server (actually my dev machine) which is pretty much a copy of the remote production server. So I can use the built-in features of DW to switch between local/remote servers in the site files window.
I don't have DW configued to commit automatically to SVN, as I prefer to check in changes once I've tested them thoroughly on the local server. If I'm happy that they work, I commit the latest changes before uploading the modified files to the production server. The SVN repository gives me milestones to which I can rollback fairly easily.
I found an extension for DW called 'Cloak SCM' that will make DW ignore all those .svn folders when doing synchronizing a site, and you can also tweak the Subversion config to ignore all the DW '_notes' folders that store sync info. I find those 2 little things make life a lot easier.
My SVN repository lives on a different server to my production server, but I'm thinking about investigating 'post commit hooks' to automatically publish committed files to the live site. At the moment though, the extra step of ftp'ing them gives me another chance to check that I'm not doing anything stupid.
As another commenter mentioned, it's a good idea to also get your database structure under version control so that you can roll that back (or restore it) as well. You could automate this, with a cron job to do an SQL dump, or just make sure you do it regularly (or before any major change to your site).
I haven't - yet - bothered to grab Drupal core updates via SVN. At the moment, they're infrequent enough that it's as easy to download the latest version and replace my local files before testing and deploying. So, overall, SVN is useful to me for creating rollback points and doubles as an off-site backup, should anything nasty happen to my dev machine.
Hope that helps...
Matthew
The Drupal Migraine script
The Drupal Migraine script is constructed to help in these matters: http://shearersoftware.com/software/server-administration/migraine/
Try it out and please do post back your experiences using it.
Cheers!
Regarding Deployment
I want to transfer my Drupal project from my local machine onto a Server machine. I dumped the MySQl database into a file and transferred it onto the server database. I also copied the entire Drupal folder. But it's showing errors related to /includes/menu.inc(theme.inc) files saying 'undefined reference to a function'. Do I need to make any changes in these files except the path , the Mysql password and the database name? Please reply.