How to deploy an embedded server to Elastic-Beanstalk?

China☆狼群 提交于 2019-12-12 15:38:31

问题


We have developed multiple micro-services using DropWirzard to have embedded jetty servers for each micro-service.

Has anyone had experience with deploying an embedded server to elastic-beanstalk for auto-scaling?

-Thanks for your time


回答1:


Did you consider deploying each micro service on a separate docker container and deploying these containers on AWS Elastic Beanstalk? http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.html




回答2:


As of September 2015, Elastic Beanstalk supports plain Java SE environments for Java 7 and 8, so you can "run any Java application, including those that use servers or frameworks such as Jetty or Play and are no longer restricted to using Tomcat as the application server for your Java applications" (Java SE support announcement).

By default EB will start your application with java -jar application_name.jar. Alternatively, you can include a Procfile within your application root, and specify exactly how to start it up with a web: directive on the first line:

web: java -Xms:256m -jar my_dropwizard_app.jar

Check the latest EB developer guide for more detailed info.



来源:https://stackoverflow.com/questions/28120130/how-to-deploy-an-embedded-server-to-elastic-beanstalk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!