By AngelicLight on
Hi, there,
I'm planning on going live soon with 6.latest and I think it's pretty easy to just import the database and FTP the folders over.
But I'm lost as to what the best way is to add to your own site if you still continue on a dev installation. Do you just drop the db and re-import everything again? There has to be the "least downtime" method, and I'm sure that's NOT it, but if it's the only way to do it....
Comments
This is a problem I have
This is a problem I have recently been struggling with as well. I'm the lead dev at my work, and I'm looking to revamp their process, and I want to do a "best practice" approach. I've been looking into the Deployment module, the Context/features/spaces stack, and Git, but I can't seem to come to a "best approach."
Git: Absolutely great for anything that lies within code. Updating Drupal core, modules, themes etc etc, but what do you do about the database? The vast majority of the meat and potatoes of a Drupal site resides in the database not the code, i.e. all of the configuration, content types, content, etc etc. How do you deal with this in a Git environment? Most of what I've read has people simply using phpMyAdmin to dump the test DB and push that live. If it's a site where you control when content gets added 100%, such as a site you maintain for a client, or where you do the blog updates etc, then this is a fine solution. But what about a site with a blog with comments, or a forum, where outside users could generate new content, or edit existing content at any time?
Context/Features/Spaces: This seems to be the best solution, but it is complex. You can get a primer on it here: http://developmentseed.org/blog/2009/jul/09/development-staging-producti...
That article specifically talks about the problem we are having. The downside is that not every module is exportable, though most of the big ones are. So again, this would work well, but with the caveat that you are using modules that support it.
Deployment: I just found out about this one today, and it seems to be a great way to push configuration and content live between sites. The question I have is how deep does it run? I have to do more research on it to find out. Can I push content types? Can I push any module's configs? Etc. This module, combined with Git might be a great way to go.
What are some of you out there using?
Ryan Armstrong
Senior Software Architect
NVIDIA
This looks interesting
http://drupal.org/node/942540
Interesting article and a
Interesting article and a good approach. The biggest downside is that new content cannot be added to the site while updates are being made. This is fine for a site where all content creation is within your control, but for any site that has any form of community driven content creation, this approach wouldn't work. great read though!
Ryan Armstrong
Senior Software Architect
NVIDIA
Site Offline
Yes, but wouldn't you take the site offline for at least the database update part of the process? If ever here seemed to be a good occasion to take the site down, it would be when you are editing the database.
(This is my way of trying to contribute more to the dialog than "Subscribe!")
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
The issue is that once you
The issue is that once you dump the live site into a dev site, and during the time it takes to do all of the dev work, new content will be added to the live site unless you have full control over the submission of content. If it's just a client site, this isn't much of a problem, seeing as new content isn't added very often. But if you run a site that has a forum, you can't just shut down the site while you dev new features, and the problem then becomes when you need to roll the new changes back to the live site, what's the best approach? You can't just push the dev site live because it won't have the latest forum posts, comments, etc. in it's database. Usually you have to go into the live site and redo all the changes you made on the dev site which means shutting down the live site for however long that takes. It also means that you could missing something as well. Hence the problem.
http://developmentseed.org/blog/2009/jul/09/development-staging-producti... is a really good description of the problem we're talking about.
Ryan Armstrong
Senior Software Architect
NVIDIA
This is how I do it, it may
This is how I do it, it may not be suited for every situation but it works for me.
I have three environments: Dev, Test, and Prod
I use Dev for development, Test for testing new development on a cloned prod environment, and Prod which is Live.
I categorize my db tables into two types: prod tables that should never be overwritten by dev or test, and test tables that are pushed up to prod. The test tables I push up to the prod hold system settings and data that should not be altered on the prod site such as system, blocks, some module tables, etc. Prod tables that should never be overwrittem by dev include user created content tables such as nodes, comments, etc.
I use MySQL Admin to create backups of the dev tables I want to push up to prod. I like MySQL Admin because it allows you to create a template which saves which tables you want to backup. Then I'll take the prod site offline, and run the SQL generated by MySQL Admin which will drop those tables from prod and reinsert them.
For the code, I created a few command line scripts that create backups of prod, and automatically overwrites prod code with my test environment code (make sure not to overwrite the files directory, settings.php or .htaccess).
I'll then do some testing to make sure everything transferred over correctly after refreshing the cache, then turn the site back online.
Assuming things go according to plan and there isn't anything I need to set up on prod after doing this update, it only takes 5 minutes to update the production site.
Lead Developer and Founder of StreamRiot.com
That's something I've been
That's something I've been noodling with and trying to setup. If you could effectively isolate what is user generated (either via admins or community) content and everything else, you could then push everything that gets stored in the database like content types etc live without touching content on the live server that needs to remain the same.
Any resources you have that show how to set up an environment like that?
Ryan Armstrong
Senior Software Architect
NVIDIA