19

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)
Arjan Tijms
  • 36,666
  • 12
  • 105
  • 134
Ryan Fernandes
  • 7,732
  • 7
  • 32
  • 52

5 Answers5

8

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.

KeithL
  • 1,130
  • 10
  • 12
simonlord
  • 4,257
  • 1
  • 16
  • 12
7

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.

Arjan Tijms
  • 36,666
  • 12
  • 105
  • 134
Pascal Thivent
  • 535,937
  • 127
  • 1,027
  • 1,106
5

The Amazon AWS's newly Launched Elastic BeanStalk is here to resolve you concerns. You can deploy Java EE apps on Amazon Ec2 instances via Bean Stalk. All you need to do is create a new applications and create a environment in it and add you WAR file for deploying, AWS has its own version of Tomcat 6/7 with open JDK which can be customized to Sun JDK if required.

Therefore Amazon offers complete Deployment tool to start using your app by just deploying in BeanStalk. BeanStalk offer Auto Scaling & Elastic Load balancing and a lots more to customize your application Environment.

Arjan Tijms
  • 36,666
  • 12
  • 105
  • 134
Sangram Anand
  • 9,494
  • 21
  • 64
  • 102
1

If you start an ebs-booted instance, you do not need to care about persistency after a reboot (see http://aws.amazon.com/about-aws/whats-new/2009/12/03/amazon-ec2-instances-now-can-boot-from-amazon-ebs/) Concerning the deployment of Java EE, I don't see any difference to deploying it on a non-virtual OS.

Arjan Tijms
  • 36,666
  • 12
  • 105
  • 134
elasticsecurity
  • 1,001
  • 1
  • 9
  • 11
0

Boxfuse supports deploying Java EE applications using either Tomcat, TomEE Web Profile or TomEE Plus to AWS with a single command

boxfuse run mytomeeapp-1.0.war -env=prod

This will create an image, provision all necessary AWS infrastructure and launch the instances. It supports blue/green zero downtime updates with Elastic IPs and ELBs.

You can find a tutorial here: https://boxfuse.com/blog/javaee-aws.html

You don't have to worry about maintaining changes to the meta-data as all instances are immutable and contain all necessary app server info.

Disclaimer: I am the founder and CEO of Boxfuse

Axel Fontaine
  • 31,019
  • 13
  • 93
  • 129