Run Java EE app on EC2

Viewed 10809

Can anyone point me to the steps/resources that describe:

  1. How to deploy a Java EE app on amazon-EC2
  2. Maintain changes to the meta-data of the app server (deploy new applications) after an instance reboot (probably using amazon-ebs)
5 Answers

First check this out if you haven't already ran through it: http://docs.aws.amazon.com/gettingstarted/latest/awsgsg-intro/intro.html
it'll give you an idea of how it all works.

With regard to running a Java EE app on EC2, you have a couple of choices - but they generally come down to the following recipe:

  1. Start an instance
  2. Install a Java EE application server (tomcat/glassfish/websphere/...)
  3. Install your application (war/ear) into the application server

Now you can bundle the above into an ebs ami, or you can write a script (bash/sh/tcl) which applies those changes when your instance starts (which i prefer). The scripts allow you to modify what gets installed/started/moved around without having to rebundle your instance.

There's some great resources here: http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=100

Hope that helps.

How to deploy a Java EE app on amazon-EC2

You still deploy to an application server so it isn't really different. If you have more specific questions, please clarify. But have a look at Running JEE applications on Amazon EC2 and How to deploy a java web application on an ec2 instance.

Maintain changes to the meta-data of the app server (deploy new applications) after an instance reboot (probably using amazon-ebs)

If you use Amazon EBS, then you don't need to worry, Amazon EBS volumes are off-instance storage that persists independently from the life of an instance.

Related