开发和测试环境最佳实践?

时间:2023-01-12 23:26:13

This question is for ASP.NET and SQL Server developers. What are your best practices with respect to setting up your development and test environment? I'm interesting in the following issues:

这个问题适用于ASP.NET和SQL Server开发人员。在设置开发和测试环境方面,您有哪些最佳实践?我对以下问题感兴趣:

  1. How many tiers do you recommend and what goes on on each tier? Just dev, test, and production or perhaps dev, test, staging, and production?
  2. 您推荐多少层,每层上发生了什么?只是开发,测试和生产,或者开发,测试,升级和生产?

  3. Which types of applications and/or servers should run on actual physical hardware and which can get away with a VM?
  4. 哪些类型的应用程序和/或服务器应该在实际的物理硬件上运行,哪些类型的应用程序和/或服

  5. What are your strategies for loosely coupling users from web sites, web developers from their web/app/DB servers, and DB developers from their DB servers?
  6. 您从网站,Web开发人员,他们的Web / app / DB服务器以及DB开发人员从他们的数据库服务器松散耦合用户的策略是什么?

  7. How do developers stay "DRY?" (no deodorant jokes, please ;)
  8. 开发商如何保持“干”? (请不要除臭笑话;)

  9. What are the pros and cons to putting web, app, and DB servers on their own machines? Does putting servers on separate machines in order to minimize contention for a machine's resources trump any NIC and network latencies that might be introduced by putting them on different machines?
  10. 将Web,app和DB服务器放在自己的机器上有什么优缺点?将服务器放在不同的计算机上以最大程度地减少对计算机资源的争用是否会将可能通过将它们放在不同计算机上引入的任何NIC和网络延迟问题?

  11. How do you configure your web apps to minimize contention for resources (e.g. virtual directories, separate application pools, etc.)
  12. 如何配置Web应用程序以最大限度地减少对资源的争用(例如虚拟目录,单独的应用程序池等)

  13. How and how often do you refresh your databases on each tier? Do you just refresh the data or both the data and objects?
  14. 您在每个层上刷新数据库的方式和频率如何?您只是刷新数据或数据和对象吗?

Thanks.

1 个解决方案

#1


2  

I can't comment on all of these but here's what i've found to work best in my experience.

我不能评论所有这些,但这里是我发现在我的经验中最好的工作。

1) Depends on your resources but ideally i like to have 4.

1)取决于你的资源,但理想情况下我喜欢4。

Dev is hyper flexible and owned by your dev team. It can get updated whenever they feel is best or as features are completed.

Dev非常灵活,由您的开发团队拥有。只要感觉最好或功能完成,它就可以更新。

QA is updated on a scheduled or delivery basis depending on your process. If you do waterfall its updated when your in the testing phase, if you do iterative agile its updated each iteration. It should mimic prod as closely as possible but you may be able to get away with some compromise (see #2)

质量保证会根据您的流程按计划或交付进行更新。如果你在测试阶段做瀑布更新,如果你做迭代敏捷,它会更新每次迭代。它应该尽可能地模仿产品,但你可能会有所妥协(参见#2)

Staging should be identical in every way to prod. It should even use real production data if possible (potentially restored from a recent backup of the true production environment.) It should be used for acceptance testing prior to any release.

分段应该在每种方式都相同。它甚至应该尽可能使用真实的生产数据(可能从最近的真实生产环境备份中恢复。)它应该在任何发布之前用于验收测试。

& Prod

2) Dev can be on a VM usually. QA can too most of the time. Staging and prod should match. I've seen folks run prod on VMs before, it depends on your resources and the demand for your app.

2)Dev通常可以在VM上。 QA在大多数情况下都可以。分期和刺激应该匹配。我之前看到人们对虚拟机运行,这取决于你的资源和你的应用程序的需求。

3) Our devs use a backup of prod on local SQL servers for development. This keeps everyone off of a central dev SQL server. Dev web and dev sql are separate boxes (just out of necessity they manage a bunch of projects.) same with QA, Staging and Prod.

3)我们的开发人员在本地SQL服务器上使用prod备份进行开发。这使每个人都不在*开发SQL服务器上。 Dev web和dev sql是单独的框(只是出于必要,他们管理一堆项目。)与QA,Staging和Prod相同。

4) A lot of testing and communication. If you have one small / medium team this isnt that hard. If you have lots of teams look at something like scrum, formal code reviews, something to keep communication going between teams. Don't treat DRY issues like suggested fixes, treat them like bugs, that need to be fixed. You'll spend way more time maintaining the code than writing it up front so treat maintenance as a 1st class citizen and make sure management is on board with that.

4)大量的测试和沟通。如果你有一个小型/中型团队,这并不难。如果你有很多团队看到像scrum,正式的代码审查,以及在团队之间保持沟通的东西。不要将DRY问题视为建议的修复,将它们视为错误,需要修复。您将花费更多的时间来维护代码而不是预先编写代码,因此将维护视为一等公民,并确保管理层参与其中。

5 & 6) Not really qualified to comment

5&6)没有资格发表评论

7) Dev whenever the teams need to, QA and up on a schedule depending on deployments. QA is every iteration / sprint, Staging and Prod is every release.

7)每当团队需要时,开发人员,以及根据部署的时间表进行开发。 QA是每次迭代/冲刺,Staging和Prod是每次发布。

#1


2  

I can't comment on all of these but here's what i've found to work best in my experience.

我不能评论所有这些,但这里是我发现在我的经验中最好的工作。

1) Depends on your resources but ideally i like to have 4.

1)取决于你的资源,但理想情况下我喜欢4。

Dev is hyper flexible and owned by your dev team. It can get updated whenever they feel is best or as features are completed.

Dev非常灵活,由您的开发团队拥有。只要感觉最好或功能完成,它就可以更新。

QA is updated on a scheduled or delivery basis depending on your process. If you do waterfall its updated when your in the testing phase, if you do iterative agile its updated each iteration. It should mimic prod as closely as possible but you may be able to get away with some compromise (see #2)

质量保证会根据您的流程按计划或交付进行更新。如果你在测试阶段做瀑布更新,如果你做迭代敏捷,它会更新每次迭代。它应该尽可能地模仿产品,但你可能会有所妥协(参见#2)

Staging should be identical in every way to prod. It should even use real production data if possible (potentially restored from a recent backup of the true production environment.) It should be used for acceptance testing prior to any release.

分段应该在每种方式都相同。它甚至应该尽可能使用真实的生产数据(可能从最近的真实生产环境备份中恢复。)它应该在任何发布之前用于验收测试。

& Prod

2) Dev can be on a VM usually. QA can too most of the time. Staging and prod should match. I've seen folks run prod on VMs before, it depends on your resources and the demand for your app.

2)Dev通常可以在VM上。 QA在大多数情况下都可以。分期和刺激应该匹配。我之前看到人们对虚拟机运行,这取决于你的资源和你的应用程序的需求。

3) Our devs use a backup of prod on local SQL servers for development. This keeps everyone off of a central dev SQL server. Dev web and dev sql are separate boxes (just out of necessity they manage a bunch of projects.) same with QA, Staging and Prod.

3)我们的开发人员在本地SQL服务器上使用prod备份进行开发。这使每个人都不在*开发SQL服务器上。 Dev web和dev sql是单独的框(只是出于必要,他们管理一堆项目。)与QA,Staging和Prod相同。

4) A lot of testing and communication. If you have one small / medium team this isnt that hard. If you have lots of teams look at something like scrum, formal code reviews, something to keep communication going between teams. Don't treat DRY issues like suggested fixes, treat them like bugs, that need to be fixed. You'll spend way more time maintaining the code than writing it up front so treat maintenance as a 1st class citizen and make sure management is on board with that.

4)大量的测试和沟通。如果你有一个小型/中型团队,这并不难。如果你有很多团队看到像scrum,正式的代码审查,以及在团队之间保持沟通的东西。不要将DRY问题视为建议的修复,将它们视为错误,需要修复。您将花费更多的时间来维护代码而不是预先编写代码,因此将维护视为一等公民,并确保管理层参与其中。

5 & 6) Not really qualified to comment

5&6)没有资格发表评论

7) Dev whenever the teams need to, QA and up on a schedule depending on deployments. QA is every iteration / sprint, Staging and Prod is every release.

7)每当团队需要时,开发人员,以及根据部署的时间表进行开发。 QA是每次迭代/冲刺,Staging和Prod是每次发布。