[英]Deploying Spring on AWS Elastic Beanstalk
I am trying to deploy my Spring Application in Java to AWS Elastic Bean stalk. 我正在尝试将Java中的Spring Application部署到AWS Elastic Bean stalk。 But I have a few problems caused by not understand AWS enough and tutorials which are to old (Interface changed etc.) 但是我有一些问题是由于对AWS不够了解以及教程太旧了(接口已更改等)。
Few questions: 几个问题:
I created a Application and it is configured as Tomcat 8 with Java 8 running. 我创建了一个应用程序,并将其配置为运行Java 8的Tomcat 8。
so far so good. 到现在为止还挺好。 When I click on the Configuration menu entry, I wanted to enable a mysql instance / db, but I am not able to modify it (select an instance class etc.) or get access to the database with eg SequelPro. 当我单击“配置”菜单项时,我想启用一个mysql实例/数据库,但是我无法对其进行修改(选择实例类等)或使用例如SequelPro访问数据库。
In "Software" where I can set the environment variables I tried to get a connection to the database, if it worked I don't know because I can not find the log for the spring application deployed and cannot access the database from outside. 在可以设置环境变量的“软件”中,我尝试建立与数据库的连接,如果它有效,我不知道,因为我找不到部署的Spring应用程序的日志,也无法从外部访问数据库。 Connection String looks like this. 连接字符串如下所示。 ("someurl" is the real url ^^): (“ someurl”是实际网址^^):
jdbc:mysql://someurl.com/ebdb
Btw. 顺便说一句。 when I click on the URL of the environment I get an 404. 当我单击环境的URL时,我得到404。
I hope someone can help me deploying. 我希望有人可以帮助我进行部署。
When I click on the Configuration menu entry, I wanted to enable a mysql instance / db, but I am not able to modify it (select an instance class etc.) or get access to the database with eg SequelPro. 当我单击“配置”菜单项时,我想启用一个mysql实例/数据库,但是我无法对其进行修改(选择实例类等)或使用例如SequelPro访问数据库。
Beanstalk is container-based service, you can't run MySQL on same instance, you should start corresponding one from RDS or use a separate EC2 instance. Beanstalk是基于容器的服务,您不能在同一实例上运行MySQL,您应该从RDS启动相应的实例或使用单独的EC2实例。 Beanstalk instances should be stateless as any moment new instance can be added or removed. Beanstalk实例应该是无状态的,因为任何时候都可以添加或删除新实例。
I can not find the log for the spring application deployed 我找不到已部署的Spring应用程序的日志
You can access logs and access the instance via EB CLI https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html Tou should be able to test DB connectivity same way 您可以通过EB CLI https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html访问日志并访问实例Tou应该能够以相同的方式测试数据库连接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.