Twisha
Twisha

Reputation: 381

Mulitple war deployment on AWS Tomcat 8

I am new to AWS and we are trying to deploy multiple war files on a single instance of AWS Elastic Beanstalk with Tomcat 8. We have multiple services actually and we want to ensure that they are available mostly. So that ways even if there is a change in one, code changes and deployment do not affect the others. We've tried zipping the multiple wars and it works but then it again means other services won't be available in case of a change in any one of the services. Is there a way to implement this without zipping the multiple wars together and then deploying it?

Upvotes: 1

Views: 778

Answers (1)

Gaurav Varshney
Gaurav Varshney

Reputation: 512

If Every War file refers a different web Application then you can deploy these war files using a source bundle .

Make a Source Bundle and add each war file with in it .

Exp : MyApplication.zip
      ->app1.war
      ->app2.war
      ->app3.war
      ->ROOT.war

When Elastic Beanstalk sees that you’ve deployed a file like this it treats it differently than a normal bundle. It takes the WAR file called ROOT.war and deploys that as the root application. The rest of the WAR files are deployed in directories derived from their file names. For example, application1.war would be accessed through the /application1 path.

Now change the extraction script provided by HostManager . find the script in given file :

/opt/elasticbeanstalk/srv/hostmanager/lib/elasticbeanstalk/hostmanager/utils/tomcatutil.rb

OR You can find the script by given command :

grep -i -r ROOT.war /opt/elasticbeanstalk/srv/hostmanager/lib/:

Upvotes: 2

Related Questions