简体   繁体   English

将Java Web应用程序部署到Amazon

[英]Deploying a Java web application to Amazon

I am sure this question has been asked and answered before multiple times. 我确信这个问题已经被问过并回答过多次了。 But unfortunately, I am still not clear. 但不幸的是,我仍然不清楚。 Here is my issue. 这是我的问题。

I have a JSP, Servlet application which uses MySQL as the database. 我有一个使用MySQL作为数据库的JSP,Servlet应用程序。 I have built the WAR file as well. 我也建立了WAR文件。 Now I am in need of deploying this so it can be accessed online by anyone. 现在,我需要部署它,以便任何人都可以在线访问它。

I looked into lot of areas including normal web hosting. 我研究了很多领域,包括普通的网络托管。 However even though the services like DailyReazor are highly secured, they provide little for MySQL, around 250 MB for the package I selected. 但是,即使像DailyReazor这样的服务受到高度保护,它们也无法为MySQL提供任何服务,我选择的软件包只有250 MB。

Now I am looking into Amazon AWS. 现在,我正在研究Amazon AWS。 In AWS I am expecting to deploy my aplication and make it available online.The MySQL server should not contain limits like 250MB. 我希望在AWS中部署我的应用程序并使其在线可用.MySQL服务器不应包含250MB之类的限制。

But I have never ever used this service AWS before. 但是我以前从未使用过此服务AWS。 By reading various posts, I know that Elastic Beanstalk is the easiest way to go, but still not convinced about how to deploy it properly with database access and all. 通过阅读各种文章,我知道Elastic Beanstalk是最简单的方法,但仍然不相信如何通过数据库访问及所有操作正确地部署它。 And in the other hand, will they give me a web address like "www.example.com" or will they simply provide an IP address?? 另一方面,他们会给我一个“ www.example.com”这样的网址,还是只是提供一个IP地址? I am also familiar with tomcat so I need to use it. 我也熟悉tomcat,所以我需要使用它。

We will not upload files (images etc) at the moment, so I believe we can manage with around 20$ per month? 我们目前不会上传文件(图片等),所以我相信我们每月可以管理大约20美元?

I really appreciate if someone can provide a clear guidance on deploying java web applications in Amazon, with the requirements I mentioned about MySQL, Global access and so on. 如果有人能够提供明确的指导,以我在上面提到的有关MySQL和全局访问等方面的要求,就可以在Amazon中部署Java Web应用程序提供明确的指导,我将非常感激。

Amazon RDS for MySQL is a Database-as-a-service offerring from AWS. Amazon RDS for MySQL是AWS的数据库即服务产品。 It is scaleable up to 3TB, and has scaleable IO as well. 它可扩展至3TB,并具有可扩展的IO。 Of course it also depends on how much you prepared to pay. 当然,这还取决于您准备支付多少。 they manage the DB for you (backup etc). 他们为您管理数据库(备份等)。 You get a URL to connect, credentials and you are set to go. 您将获得一个要连接的URL,凭据,然后就可以开始使用了。

Amazon Elastic Beanstalk uses Tomcat. Amazon Elastic Beanstalk使用Tomcat。 So you should be familiar with that. 因此,您应该熟悉它。 You upload your WAR file and specify what EC2 flavor you want (CPU/MEM etc). 您上传WAR文件并指定所需的EC2版本(CPU / MEM等)。 They launch a VM that is configured with Jva and Tomcat and deploy the WAR for you. 他们将启动配置有Jva和Tomcat的VM,并为您部署WAR。 You get an IP address. 您将获得一个IP地址。

Amazon Route 53 is the DNS service, where you can assign the IP address to your domain (assuming you have one) Amazon Route 53是DNS服务,您可以在其中为您的域分配IP地址(假设您有一个)

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

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