如何将我的 .NET 应用程序部署到 Amazon EC2?
我有一个 .NET Windows 服务和一个 .NET Web 应用程序,我想将其部署到我的 Amazon EC2 Windows 2008 实例。此时,我需要做的就是将压缩文件复制到 EC2 盒子,并将远程桌面复制到 EC2 实例并完成部署。
为了做到这一点,我尝试了 LogMeIn Hamachi2 创建 P2P VPN 并使用 RoboCopy 复制文件,但似乎 Hamachi 不适用于 Windows EC2。
将 .NET 应用程序部署到 Windows EC2 实例的解决方案是什么?我想避免在服务器上运行 FTP 服务器只是为了将文件上传到服务器上,并且没有运行 VPN 服务器(如 OpenVPN)来运行基于云的 VPN 解决方案。
也许我可以找到一种使用 Amazon S3 作为策略的简单方法?有什么想法吗?建议?
I have a .NET Windows service and a .NET Web Application that I would like to deploy to my Amazon EC2 Windows 2008 instances. At this point, all I need to do is to copy the zipped files across to the EC2 box and remote desktop to the EC2 instance and finish the deployment.
In order to do this, I have tried LogMeIn Hamachi2 to create a P2P VPN and use RoboCopy to copy the files, however it seems Hamachi doesn't work on Windows EC2.
What is your solution for deploying your .NET apps to Windows EC2 instances? I want to avoid running an FTP server on the box just to get my files up on the server and don't have a VPN server (like OpenVPN) running to run a cloud based VPN solution.
Perhaps I can find a simple way of using Amazon S3 as a strategy? Any ideas? Suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我们使用 http://filezilla-project.org/。您可以使用 SFTP 并在备用端口上运行,这应该不会太糟糕。
理论上,您可以使用 S3 客户端,例如 WebDrive。我已经将 WebDrive 用于 WebDAV,效果非常好。 S3还没试过。
我想这让我有了另一种选择。您可以使用 IIS 运行 WebDAV [ http://learn.iis.net/page.aspx/350/installing-and-configuring-webdav-on-iis-7/]。 WebDAV 可以通过 HTTPS 运行,因此应该相当安全。
编辑
还有如何访问远程桌面中的本地文件...。然后,您可以使用Beyond Compare来推送您的更改。请注意,Beyond Compare 也支持 FTP 比较。
We use http://filezilla-project.org/. You can use SFTP and run on an alternate port, and that shouldn't be too bad.
Theoretically you can use an S3 client like WebDrive. I've used WebDrive for WebDAV and it works very well. Haven't tried it for S3.
Which I guess, brings me to another option. You can run a WebDAV with IIS [ http://learn.iis.net/page.aspx/350/installing-and-configuring-webdav-on-iis-7/ ]. WebDAV can be run over HTTPS so that should be reasonably secure.
EDIT
Also How to gain access to local files in a remote desktop.... You can then use Beyond Compare to push your changes. Note that Beyond Compare supports FTP compares too.
我目前正在研究这个问题,并且有很多项目正在部署到 Amazon(Windows 服务 X2、IIS 网站 X 3(开发、测试、生产)、MSSQL Server 等),我们正在考虑使用 RSync 进行部署。目前,RSync 服务器位于每个盒子上,但计划是拥有一个小型 Linux 盒子(可能是免费的)并将文件推送到其中。然后使用 samba 共享,我们应该能够从服务器拉取。
我的计划是批处理或 PowerShell 文件将终止 Windows 服务,从 Linux 盒子复制文件,然后启动 Windows 服务。
I am looking into this currently, and have quite a few projects we are deploying to Amazon (Windows Service X2, IIS Web Sites X 3 (Dev, Test, Prod), MSSQL Server, etc) and we are looking at RSync for the deploy. At the moment, the RSync server lives on each of the boxes, but the plan will be to have a Small Linux box (free teir probably) and push files to that. then using a samba share, we should be able to pull from the server.
My plan would be that a batch or PowerShell file will kill the windows service, copy the files from the linux box, and then start the windows service.
我最终选择了基于 JungleDisk 的解决方案,使用 S3 存储桶作为两端的驱动器。
I finally settled for a solution based on JungleDisk using an S3 bucket as a drive on both ends.
我们在 Elastic Beanstalk 上运行 Web 应用程序,并使用 awsdeploy.exe。它使得使用 AutoScaling 部署到环境变得轻而易举,这可能很困难,因为您不知道 IP您的所有服务器。它还使您的环境管理和监控变得更加容易。请参阅此处之前的讨论。
部署Windows服务更加复杂。我们使用 PowerShell 远程处理 停止服务,然后Web Deploy 在服务器之间同步文件,然后 Remoting 启动所有服务。
We're running our web apps on Elastic Beanstalk and deploy to it using awsdeploy.exe. It makes deploying to environments using AutoScaling a breeze which can be difficult cuz you don't know the IPs of all of your servers. It also makes management and monitoring of your environment much easier. See a previous discussion on that here.
Deploying windows services is more complicated. We use PowerShell Remoting to stop the services, then Web Deploy to synch files between the servers, then Remoting to start all services.