简体   繁体   English

DevOps,DNS和公共IP

[英]DevOps, DNS and Public IP

I have a devops automation environment. 我有一个devops自动化环境。 Each successful build (web app) in Jenkins triggers a creation of EC2 (Linux) instance in AWS which is set to receive public IP and the app gets deployed on that instance. Jenkins中的每个成功构建(Web应用程序)都会在AWS中触发EC2(Linux)实例的创建,该实例被设置为接收公共IP,并且该应用程序将部署在该实例上。 I'm calling the web application using instance's public IP. 我正在使用实例的公共IP调用Web应用程序。 I need to mask the IP and call the app by custom name. 我需要屏蔽IP并通过自定义名称调用该应用。 I have created a subdomain on Route 53 subdomain.abc.com. 我已经在Route 53 subdomain.abc.com上创建了一个子域。 I have three set of web apps and want to call them like one.subdomain.abc.com, two.subdomain.abc.com etc. 我有三套网络应用程序,想要调用它们像one.subdomain.abc.com,two.subdomain.abc.com等。

Since each time we have a different VM I'm not sure if EIP is an option. 由于每次我们都有不同的VM,所以我不确定是否可以选择EIP。 Can someone please suggest a solution ? 有人可以提出解决方案吗?

Many thanks in advance. 提前谢谢了。

If you are using just one Amazon EC2 instance for each app, then for each app you can: 如果每个应用程序仅使用一个 Amazon EC2实例,则对于每个应用程序,您可以:

  1. Create an Elastic IP address that will be permanently used with the app 创建将与该应用程序永久使用的弹性IP地址
  2. Create an A record in Amazon Route 53 to point to that Elastic IP address (eg app1.example.com ) Amazon Route 53中创建一个A记录以指向该弹性IP地址(例如app1.example.com
  3. When a new instance of the app is launched, re-associate the Elastic IP address with the new instance (assuming your old instance is then terminated) 启动应用程序的新实例后, 将弹性IP地址与新实例重新关联 (假设您的旧实例已终止)

If you wish to serve traffic from app1.example.com to several Amazon EC2 instances, then create an ALIAS record in Route 53 to point to an Elastic Load Balancer and register the EC2 instances with the load balancer. 如果您希望将流量从app1.example.com多个 Amazon EC2实例,请在Route 53中创建一个ALIAS记录,以指向Elastic Load Balancer ,并在负载均衡器中注册EC2实例。

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

相关问题 VPC 对等 - DNS 解析为公共 IP - VPC Peering - DNS resolves to public IP EC2上的Hadoop配置:为什么公共DNS有效但公共IP不起作用? - Hadoop config on EC2: why public DNS works but not public IP? Ubuntu 服务器从公共 IP 工作但不通过 Godaddy DNS 记录 - Ubuntu Server working from public IP but not through Godaddy DNS record 将第三方 DNS 配置为附加到 AWS ElasticBeanStalk 的静态公共 Ip - Configure third party DNS to Static Public Ip attached to AWS ElasticBeanStalk 使用Amazon EC2:IP地址可以正常工作,但公共DNS无法正常工作 - Using Amazon EC2: IP address working fine, but public DNS not 我的EC2实例具有公共IP,但没有公共DNS - My EC2 instance has a Public IP but don't have a Public DNS 在 AWS 中,我需要帮助以通过公共 ip 或公共 dns 拒绝 url 并仅允许通过域(CNAME)访问 - In AWS I need help for deny url by public ip or public dns and to allow only access by domain (CNAME) 使用 AWS 公共 DNS 而不是公共 IP 有什么区别,反之亦然 - What is the difference in using AWS Public DNS instead of Public IP or the vise versa 提供不同内容的IPv4公用IP和公用DNS(IPv4) - IPv4 Public IP and Public DNS (IPv4) serving different content AWS EC2 Public DNS 和 Public ip 显示拒绝在浏览器上连接 - AWS EC2 Public DNS and Public ip show refused to connect on browser
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM