如何使用Nant/TeamCity跨DMZ进行部署? [英] How to use Nant/TeamCity to Deploy across DMZ?

查看:107
本文介绍了如何使用Nant/TeamCity跨DMZ进行部署?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我们的域内有构建服务器(这一定是因为它还与域中的其他服务器通信),以及在DMZ中的Web服务器.

I have build server inside our domain (and it needs to be because it also talks to other boxes in the domain), and a webserver that is in the DMZ.

作为构建脚本的一部分,我想使用Nant复制任务将网站部署到DMZ中的Web服务器.问题是,Nant是从在构建服务器上的System帐户下运行的TeamCity调用的,我找不到找到使DMZ Web服务器目录访问构建服务器系统帐户的方法. (无论如何,这可能不是一个好主意.)

As part of our build scripts, I would like to deploy websites to the webserver in the DMZ, using the Nant copy task. The problem is, that Nant is invoked from TeamCity which runs under the System account on the build server, and there is no way that I can find to give the build server system account access to the DMZ webserver directories. (It probably isn't a good idea anyway).

总有办法告诉Nant在其他Windows用户下运行特定任务,还是有解决我问题的另一种方法?

Is there anyway to tell Nant to run a specific task under a different windows user, or is there another solution to my problem?

我遇到的另一个限制是我无法创建新的域帐户(嗯,至少要经过批准程序才能这样做).我可以创建本地计算机帐户,但是在那种情况下,运行方式似乎无法在DMZ上正常工作.

One other restriction I am running under is that I can't create new domain accounts (well, at least not without going through an approval process). I can create local machine accounts, but in that case, it doesn't seem that runas will work across the DMZ.

推荐答案

几个选项可能是:

  1. 使用简单命令运行器执行类似于 runas ,它指定在不同用户帐户下运行的nant.exe. .
  2. 更改TeamCity服务器的运行帐户;就像有权访问DMZ的受限特权用户一样.
  3. 尝试使用 > (安全副本)任务由 NAntContrib 提供.
  4. 使用nant > 任务来调用ftp程序,将文件放置在DMZ上.
  1. Use the Simple Command Runner to exec out to something like runas, specifying nant.exe running under a different user account.
  2. Change the account in which the TeamCity server runs as; like a limited privileged user that has access to DMZ.
  3. Attempt to use the <scp> (secure copy) task provided by NAntContrib.
  4. Use the nant <exec> task to call an ftp program, that places the files up on the DMZ.

希望这会提供一些帮助.祝你好运!

Hopefully this provides a little help. Good luck!

这篇关于如何使用Nant/TeamCity跨DMZ进行部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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