I would like to see something called Drupal Deployment Description in the next major Drupal release or if possible, in the current release.
What do I mean by Deployment Description? A way to extract all configuration and settings from a running Drupal site and restoring it at another place.
Let me start by specifying a simple usecase:
A user sets up a Drupal test site to develop his website. He downloads, installs and configures all needed modules. He adds custom node types, configures the menu etc... Adds some content: static pages, comments and other - possibly custom - node types.
The user builds a Drupal Deployment Description out of his test setup. Chooses which modules to include in the description. Chooses which content types, content categories or individual content items to include. The Drupal system builds a file containing all this information.
On the production server, the user installs the basic Drupal system and tells it to read in the file generated previously. The production system will first download all modules specified in the file. It will then apply the configuration directives specified in the file and restore the content from the file.
The new production site is up and running.
Here ends the usecase. There are many other usecases possible. Drupal could start offering these deployment files on the site. There could be deployment descriptions for blogging, photo albums, forum websites etc. Users could contribute there own deployment descriptions. A deployment description could be used as a backup. The downloading of modules would allow a rapid restore method.
Including content in the deployment description is not really needed. The concept may be cleaner if only configuration and module information is included in the file. Yet there should be a way to get those static pages from the usecase on to the new server.
A possible problem I see is module and core versions. If the configuration was extracted from a modules with version x and stored for a long time, think backup, it won't be easy to download version x if the module is currently at version y. Version y will probably not be able to import x's settings.
The deployment description files could be XML. This would allow module developers to include all information they need in the format they need.
Comments
Comment #1
2houseplague commentedExcellent idea. It would be nice to install Drupal, deploy the Deployment Description, and have either A) a site very much like another site which you have effectively duplicated, or B) a way to push an existing site "back" to a restore point, by building it up to that point from scratch. Sorta like a backup of the site. Since we all customize so much and combine and configure so many modules, a significant amount of work is bound up in the mere "setup". If this could be made to work, it would be a Godsend. My only concern regards the basic feasibility of this. I'm not sure it's possible for all the work, it would take, versus taking other steps to be able to restore or recreate a site quickly. It's exciting to think of the ways this might be done, however. In a sense, you would need to have a kind of snapshot of all the modules that are installed and all their settings, include the ones with inter-dependencies. Reall, this could be done as a form of "spidering" script that would note settings then write them to an external file, but I'm just thinking out loud here...
http://profitlabinc.com
Comment #2
pasquallecreate an install profile from the actual system? this has to be a contrib module first..
Comment #3
mdupontThere is currently no 100% reliable way to do that. The contrib module Features can help a lot but there are still some shortcomings in Drupal core. This is being addressed in D8 through the Configuration Management Initiative (http://groups.drupal.org/build-systems-change-management/cmi). Marking as duplicate since the discussion and work already happen in other places.