保持测试和生产服务器环境干净、同步和一致 [英] Keeping testing and production server environments clean, in sync, and consistent

查看:117
本文介绍了保持测试和生产服务器环境干净、同步和一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的公司似乎总是为客户的服务器环境而苦恼.

具体来说,我们几乎总是遇到测试服务器和生产服务器的问题,而且它们似乎总是以不同的方式配置.当我们测试我们开发的应用程序时,测试服务器以一种方式运行,因此我们调整和配置我们的应用程序以适应该特定行为.但是当我们在生产服务器上安装相同的应用程序时,我们观察到另一种与测试服务器不一致的行为,从而使我们的调整和配置变得毫无用处.最令人沮丧的是,这种情况一直在发生,而且似乎没有人知道该怎么办.

当然,我们对发生这种情况的原因有一个大致的了解.每个克隆的环境在开始的前几天都一样,工作方式也一样,但迟早有人会在其中一个服务器环境中重新配置某些东西(无论是数据库更新、组件库更新、Web 文件更新,或其他配置),从而导致差异.随着时间的流逝,越来越多的差异形成.但问题是:我们能做些什么?

我尝试在网上搜索,但找不到任何关于该做什么的好答案.我也尝试过自己想出一些解决方案,但我的大部分想法在某种程度上似乎都有问题.新的套路,无论多么严格,都可以规避.定期克隆生产服务器以创建测试服务器是一个乏味且通常非常缓慢的过程.自动复制并不总是可靠的,甚至是不可能的.那么对于这个问题,我们到底应该怎么做呢?我们如何保证测试时的体验与上线时的体验相匹配?

我想其他人也有这个问题.还是他们?也许只是我的特定公司不称职?大家有遇到过这个问题吗?如果是这样,你是怎么做的?

真诚的

Linus,瑞典系统开发人员

解决方案

您需要开始跟踪对测试环境所做的每项更改,并提供一种将其传播到生产环境的方法.

对于代码,这意味着版本控制系统,例如 CVS、Subversion 或 GIT.

对于数据库,是指结构比较工具或更新生产数据库的部署脚本.

对于配置,两个系统应该完全相同,任何调整"或更改都需要首先应用于测试服务器,然后在部署期间应用于生产服务器.>

在你有一个有效的过程之前,你会继续遇到问题.

It seems that the company that I work for is always struggling with our customers’ server environments.

Specifically, we almost always encounter problems with testing servers and production servers, and the fact that they always seem to be configured differently. When we test the applications that we develop, the testing servers behave in one way, and thus we tweak and configure our applications to fit that particular behavior. But when we install the same application on the production servers we observe another behavior that is not consistent with the testing servers, thus rendering our tweaks and configurations useless. The most frustrating part is that this happens all the time and that no one seem to know what to do about it.

Of course we have a general idea of why this happens. Every cloned environment starts out the same and works the same the first couple of days, but sooner or later someone reconfigure something in only one of the server environments (be it a database update, an update of a component library, a web file update, or other configurations), thereby leading to discrepancy. And as time goes by, more and more discrepancies builds up. But the question is: what can we do about it?

I’ve tried searching the web but can’t find any good answers on what to do. I’ve also tried to figure out some solutions on my own, but most of my ideas seem to be problematic in some way. New routines, no matter how rigorous, can be circumvented. Regular cloning of the production servers to create testing servers is a tedious and often very slow process. Automatic replication is not always reliable or even possible. So what on Earth should we do about this problem? How can we guarantee that the experience when testing will match the experience when going live?

I imagine that others have this very problem as well. Or do they? Maybe it's just my particular company that is incompetent? Have any of you encountered the problem? If so, what did you do about it?

Sincerely,

Linus, Swedish systems developer

解决方案

You need to start keeping track of every change that you make to the testing environment and provide a way for propagating this to the production environment.

For code, this means a versioning systems such as CVS, Subversion or GIT.

For the database, it means a structure comparison tool or deploy scripts that update the production database.

For configuration, the two systems should be exactly the same and any 'tweaking' or changing needs to first be applied to the testing server then later applied to the production server during a deploy.

Until you have a process that works, you will continue to have problems.

这篇关于保持测试和生产服务器环境干净、同步和一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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