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

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

问题描述

我所工作的公司似乎总是与客户的服务器环境作斗争.

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.

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

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?

此致,

Linus,瑞典系统开发人员

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.

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

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天全站免登陆