您使用什么来编写复杂服务器产品的脚本部署?

时间:2022-06-05 00:27:50

What are you using to script deployments for complex server products?

您使用什么来编写复杂服务器产品的脚本部署?

Imagine we've got some slick new code (or maybe version 42 of slick code) and have ship it. Now, of course we have the basics in place here - databases build and upgrade themselves. We have nice "packages" (zip files) But there is a lot in between "shiny new server" and "OK, now hit the go button" - from service accts, to 3rd party software, to fonts.

想象一下,我们有一些光滑的新代码(或者可能是光滑的代码版本42)并且已经发布了它。现在,我们当然已经掌握了基础知识 - 数据库构建和自我升级。我们有很好的“软件包”(zip文件)但是“闪亮的新服务器”和“好的,现在点击按钮”之间有很多 - 从服务代理到第三方软件,再到字体。

We're an MS shop, by the way: IIS, ASP.NET, MSSQL. We're mostly deploying our own servers. As the product gets bigger and scales horizontally, updating a lot of servers is getting heavy.

顺便说一句,我们是MS商店:IIS,ASP.NET,MSSQL。我们主要部署自己的服务器。随着产品变得更大并且水平扩展,更新大量服务器变得越来越重。

Enlighten me as to how to do this easily and well with answer to any of the following ...

通过回答以下任何一个问题,让我轻松地了解如何做到这一点......

  • What's your favorite solution(s) to server deployment?
  • 您最喜欢的服务器部署解决方案是什么?

  • How often do you fall back to manual steps (add this x to IIS)?
  • 您多久回到手动步骤(将此x添加到IIS)?

  • Does anyone really use the Website Setup projects in Visual Studio?
  • 有没有人真正使用Visual Studio中的网站安装项目?

  • Is it cheaper to buy an intern than script it?
  • 购买实习生比脚本便宜吗?

  • If you script it, what are you using - and did you like it? (Someone here just made a compelling installer out of MSBUILD. After .NET - installs, it's always there.)
  • 如果你编写脚本,你在使用什么 - 你喜欢它吗? (这里的某个人刚刚从MSBUILD中找到了一个引人注目的安装程序。在.NET安装之后,它始终存在。)

  • Have you learned to love WMI? How?
  • 你学会了爱WMI吗?怎么样?

  • Have you achieved deployment transcendance. A mere glance at the shiny new server deploys the code and all its dependencies? How?
  • 你有没有实现部署超越。只需看一眼闪亮的新服务器就可以部署代码及其所有依赖项?怎么样?

2 个解决方案

#1


We use NAnt build files for building & packaging (into zips) our projects. Powershell scripts deploy the package to the target machines, including web applications & windows services. RedGate's SQL Compare / SQL Data Compare, scripted using PowerShell, for updating database schemas & static data. All driven by JetBrain's TeamCity continuous integration server.

我们使用NAnt构建文件来构建和打包(拉链)我们的项目。 Powershell脚本将程序包部署到目标计算机,包括Web应用程序和Windows服务。 RedGate的SQL Compare / SQL Data Compare,使用PowerShell编写,用于更新数据库模式和静态数据。全部由JetBrain的TeamCity持续集成服务器驱动。

The same scripts are used for deploying to our Test, QA & Production environments and everything is kept in source control of course.

相同的脚本用于部署到我们的测试,QA和生产环境,当然,所有内容都保存在源代码管理中。

#2


We use NANT for the uploading of new versions to production. We have modified it to our needs and it works ok. We hardly ever need to make manual changes except for changes to web.config which we do manually. We upload a new version on a weekly basis and in some cases we upload daily. We have the option to roll back to previous version, we can select which servers to upload to, we upload different branches to different servers, everything that we needed to do we were able to build on top of it.

我们使用NANT将新版本上传到生产中。我们已根据我们的需求对其进行了修改,并且工作正常除了我们手动执行的web.config更改之外,我们几乎不需要进行手动更改。我们每周上传一个新版本,在某些情况下我们每天上传。我们可以选择回滚到以前的版本,我们可以选择要上传的服务器,我们将不同的分支上传到不同的服务器,我们需要做的所有事情我们都可以在它之上构建。

I recommend writing some upload script. This is the best way you can make sure that you don't forget anything, that you can easily roll back and that you know exactly what's going on on your servers.

我建议写一些上传脚本。这是确保您不会忘记任何事情,您可以轻松回滚以及您确切知道服务器上发生了什么的最佳方式。

#1


We use NAnt build files for building & packaging (into zips) our projects. Powershell scripts deploy the package to the target machines, including web applications & windows services. RedGate's SQL Compare / SQL Data Compare, scripted using PowerShell, for updating database schemas & static data. All driven by JetBrain's TeamCity continuous integration server.

我们使用NAnt构建文件来构建和打包(拉链)我们的项目。 Powershell脚本将程序包部署到目标计算机,包括Web应用程序和Windows服务。 RedGate的SQL Compare / SQL Data Compare,使用PowerShell编写,用于更新数据库模式和静态数据。全部由JetBrain的TeamCity持续集成服务器驱动。

The same scripts are used for deploying to our Test, QA & Production environments and everything is kept in source control of course.

相同的脚本用于部署到我们的测试,QA和生产环境,当然,所有内容都保存在源代码管理中。

#2


We use NANT for the uploading of new versions to production. We have modified it to our needs and it works ok. We hardly ever need to make manual changes except for changes to web.config which we do manually. We upload a new version on a weekly basis and in some cases we upload daily. We have the option to roll back to previous version, we can select which servers to upload to, we upload different branches to different servers, everything that we needed to do we were able to build on top of it.

我们使用NANT将新版本上传到生产中。我们已根据我们的需求对其进行了修改,并且工作正常除了我们手动执行的web.config更改之外,我们几乎不需要进行手动更改。我们每周上传一个新版本,在某些情况下我们每天上传。我们可以选择回滚到以前的版本,我们可以选择要上传的服务器,我们将不同的分支上传到不同的服务器,我们需要做的所有事情我们都可以在它之上构建。

I recommend writing some upload script. This is the best way you can make sure that you don't forget anything, that you can easily roll back and that you know exactly what's going on on your servers.

我建议写一些上传脚本。这是确保您不会忘记任何事情,您可以轻松回滚以及您确切知道服务器上发生了什么的最佳方式。