简体   繁体   English

在AWS VPC上部署应用程序

[英]Deploy application on AWS VPC

I am planning to migrate from Ec2 classic to EC2 VPC. 我计划从Ec2 classic迁移到EC2 VPC。 My application reads messages from SQS, download assets from S3 and perform actions mentioned in the SQS messages and then updates RDS. 我的应用程序从SQS读取消息,从S3下载资产并执行SQS消息中提到的操作,然后更新RDS。 I have following queries 我有以下疑问

  1. Is it beneficial for me to migrate to Amazon VPC from Classic 从Classic迁移到Amazon VPC对我有益吗?
  2. I create my EC2 machines using ruby scripts, and deploy code on them using capistrano. 我使用ruby脚本创建我的EC2机器,并使用capistrano在它们上部署代码。 In classic mode I used the IP address to deploy code using capistrano. 在经典模式下,我使用IP地址使用capistrano部署代码。 But in VPC there is a concept of private IP address and you cannot access a machine inside a subnet.So my question is: How should I deploy code on the EC2 instances or rather how should I connect to them? 但是在VPC中有一个私有IP地址的概念,你无法访问子网内的机器。所以我的问题是:我应该如何在EC2实例上部署代码,或者我应该如何连接它们?

Thank You. 谢谢。

This questions is pretty broad but I'll take stab at it: 这个问题相当广泛,但我会抓住它:

Is it beneficial for me to migrate to Amazon VPC from Classic 从Classic迁移到Amazon VPC对我有益吗?

It's beneficial if you care about security of your data in transit and at rest. 如果您关心数据在传输和静止时的安全性,这将非常有用。 In a VPC none of your traffic is exposed to the outside and you can chose which components you want to expose in case you want to receive traffic/data from the outside. 在VPC中,您的所有流量都不会暴露在外部,您可以选择要公开的组件,以防您希望从外部接收流量/数据。 ie Your ELB or ELBs. 即你的ELB或ELB。

I create my EC2 machines using ruby scripts, and deploy code on them using capistrano. 我使用ruby脚本创建我的EC2机器,并使用capistrano在它们上部署代码。 In classic mode I used the IP address to deploy code using capistrano. 在经典模式下,我使用IP地址使用capistrano部署代码。 But in VPC there is a concept of private IP address and you cannot access a machine inside a subnet. 但在VPC中存在私有IP地址的概念,您无法访问子网内的计算机。 So my question is: How should I deploy code on the EC2 instances or rather how should I connect to them? 所以我的问题是:我应该如何在EC2实例上部署代码,或者我应该如何连接它们?

You can actually assign a public IP to your EC2 machines in a VPC if you choose to. 如果您愿意,您实际上可以将公共IP分配给VPC中的EC2计算机。 You can use that IP to deploy your code from the outside. 您可以使用该IP从外部部署代码。

You can read about it here: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-ip-addressing.html 你可以在这里阅读: http//docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-ip-addressing.html

If you want more security you can always deploy from a machine in your VPC (that has SSH access to the outside). 如果您想要更高的安全性,您始终可以从VPC中的计算机进行部署(具有对外部的SSH访问)。 You can ssh to that machine and then run cap deploy from there. 您可以ssh到该计算机,然后从那里运行cap deploy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM