在开发,暂存和生产之间同步Drupal站点 [英] Syncing Drupal site between dev, staging and production

查看:189
本文介绍了在开发,暂存和生产之间同步Drupal站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Drupal(6.x)网站启动后,我经常有人开始注册并输入自己的内容。每当需要升级时,生产上的数据库都复制到dev,然后开发在dev上完成,之后被推送到临时环境以供客户批准。



当网站最终准备上线时,有一个问题。生产服务器具有最新的用户输入内容,开发和分期具有最新的功能。在生产上简单地覆盖数据库将不起作用。我通常做的是写下已经做了什么,而不是按照步骤去执行再次在生产。随着系统越来越大,生产中的一个错误可能会导致业务丢失。我不能关闭网站几个小时。我不能告诉有多少人在给定的时间使用该网站,即使这样也不可能等到没有人在网站上进行升级的时间。



提前感谢。

解决方案

您需要了解两个概念:第一个是可导出,通常一种导出给定模块的所有配置的方法。第二个是功能(可怕的命名,是的),这是一种将一组Exportable



为了说明,许多模块实现了自己的Exportables方法,我在上面链接到的是方法的版本控制,更新,部署,回滚等。可导出模块。这里有一个更广泛的策略 - http:/ /www.sthlmconnection.se/tips-and-tweaks/exportable-configuration-your-drupal-module-ctools


Often after a Drupal (6.x) site is launched, I have people starting to sign up and enter their own content. Whenever there is need for an upgrade, the database on production is copied to dev and then the development is done on dev, later get pushed to staging for client's approval.

When the site is eventually ready to go live, there is a problem. Production server has the latest user inputted content, dev and staging have the latest functionality. Simply overwriting the database on production won't work. What I usually do is to write down what has been done to dev and than follow the steps to go though the implementations again on production. As the system grows bigger, one single mistake on production may cause lost of business. I can't shutdown the site for several hours. I can't tell how many people are using the site at a given time, even so it's impossible to wait for a time where nobody is on the site to make the upgrade.

Has anyone have any good idea?

Thanks in advance.

解决方案

There are two concepts you need to look into: The first is "Exportables" which is generally a way of exporting all the configuration of a given module. The second is "Features" (terribly named, yes) which is a way of grouping a set of Exportables into a given changeset for version control, updating, deployment, rollback, etc.

For clarification, many modules implement their own "Exportables" methodology what I linked to above was the Exportables module. Here's a wider strategy for it - http://www.sthlmconnection.se/tips-and-tweaks/exportable-configuration-your-drupal-module-ctools

这篇关于在开发,暂存和生产之间同步Drupal站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆