开发者

Several apps (i.e war files) on same Beanstalk instance

In order to be conservative on resources (and costs), I would like to put more than 1 war file (representing different apps) on the same EC2 beanstalk instance.

I would like then to have appl A mapping to myapp.elasticbeanstalk.com/applA using warA and appl B mapping to myapp.elasticbeanstalk.com/applB using warB

But, the console allows you to upload a single and on开发者_StackOverflowly war for any instance.

1) So, I understand that its not possible with the current interface. Am I right ?

2) Though, is is possible to achieve this via "non-standard" ways: uploading warA via interface and copying / updating warB to /tomcat6/webapps via ssh, ftp, etc ?

3) With (2), my concern is that B will be lost each time BT health checker decides to terminate the instance (successive failed checks for example) and restart a new one. I would then have to make warB as part of my customized AMI used by applA and create a new version of this AMI each time i update warB

Please, help me

regards

didier


You are correct ! You can not (yet ) have multiple war in beanstalk.

Amazon Forum answer is here https://forums.aws.amazon.com/thread.jspa?messageID=219284


There is a workaround though, but not using Beanstalk, but plain EC2:

https://forums.aws.amazon.com/thread.jspa?messageID=229121

http://blog.jetztgrad.net/2011/02/how-to-customize-an-amazon-elastic-beanstalk-instance/

Shameless plug: While not related directory, I've made a plugin for Maven 2 to automate Beanstalk deployments and Elastic MapReduce as well. Check out http://beanstalker.ingenieux.com.br/


This is an old question but it took me some time to find a more up to date answer so I thought I'd share my findings.

Multiple WAR deployment is now supported natively by Elastic Beanstalk (and has been for some time).

Simply create a new zip file with each of your WAR files inside of it. If you want one of them to be available at the root context name it ROOT.war like you would if you were deploying to Tomcat manually.

Your zip file structure should looks like so:

MyApplication.zip

├── .ebextensions

├── foo.war

├── bar.war

└── ROOT.war

Full details can be found in the Elastic Beanstalk documentation.

The .ebextensions folder is optional and can contain configuration files that customize the resources deployed to your environment. See Elastic Beanstalk Environment Configuration for information on using configuration files.


There another hack which allows you to boot an arbitrary jar by installing java and using a node.js boot script:

http://docs.ingenieux.com.br/project/beanstalker/using-arbitrary-platforms.html

Hope it helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜