Here's how we do it: We have 2 production servers 1, and the second, where the environments for each developer and the "intermediate" environment are located. The code is stored in Git, and we constantly keep a leading and live branch.
In a nutshell: the live database is exported and distributed to developers using drush. Configuration and settings are "saved" using both functions hook_update () and hook_install () . We use Feeds
After the depolation, We have a very simple script shell that uses drush to copy a live database from a live server to a stage on the Dev server, and the developers use the same simple shell script to pull out the intermediate db in their own environment.
The configuration and development that takes place in the database is exported through Features and / or through interception of installation and upgrade. Using these three methods, we can easily deploy about 99% of all settings, content types, and other designs that usually exist only in the database. The last 1% are things that are easier to handle with the deployment setup step, rather than writing requests to hook_install and hook_update. 100% deployment is possible, but sometimes it’s not worth the effort.
Finally, there are times when content needs to be deployed from the scene in order to live. This module includes the Feeds module. Using feeds and a simple csv import file, we have successfully created and exported large taxonomic sets and even complex nodes and node sets. Using channels is also useful when you need a standard set of “test” data to populate development databases.
When the time comes to deploy new features or settings, we merge the developer’s changes into the main branch, deploy and test at the stage in which update.php is usually required to run, and then “import” the changes from the new or updated function. If everything passes tests and QA, the changes are merged into a direct branch and deployed to the production environment.
The biggest lessons we learned:
- while you can get it all in a function or upgrade and install it, it’s usually not worth it.
- The easiest way is to bypass the developer database in development and then export when the dust settles, rather than try to export every small change.
- using the diff module along with functions, saved our ass many times.
mirzu source share