Reputation: 341
My team is relatively new to Drupal. One thing we have struggled to understand is how to work with it from a DevOps point of view. I realize this is too large a subject for one question so I have a more specific question that gets at the heart of the matter.
How does one provision a Drupal instance? By "provision", I mean create a provisioning script that builds my CMS (we're only using Drupal for that purpose) starting with a clean virtual machine with only OS and web server. The script would install and configure Drupal and its modules and connect to an existing database containing my content. Or perhaps I can even have it add my content to Drupal instance with an empty database. I'm just not sure what makes sense.
What I am trying to avoid is the uncertainty and non-reproducability that comes with doing everything interactively via Drupal's UI. I realize that Drupal has lots of techniques for exporting various things but there doesn't appear to be any coherent overall picture. Every bit of advice is of the form, "If you want to do (some specific thing), this is how you might do it." Or, even worse, "This worked for me." Neither of these things gives me much confidence or, more importantly, gives decent "best practices" advice that tells us what Drupal's designers intended.
There are some Drupal "best practices" articles but they don't go much beyond advice such as, "Do a backup before changing anything." I need more useful advice.
Upvotes: 0
Views: 51
Reputation: 50
Drupal is a Database driven application and in that case snapshot of db has to be released as well. Pre-deployment step would be to create db and dump the snapshot. You can run post-deployment scripts to configure environment specific configuration.
Upvotes: 0
Reputation: 4873
Yes, in Drupal 7 the Features module allow configuration export to code. Then on deployment, a single command (executable from CLI using Drush) can be used to sync. the in-database configuration from the code.
The features is now native in Drupal 8 and is called configuration management.
Upvotes: 1