Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a Java EE application in the Amazon cloud?

Tags:

Here's the thing: I need to take a certain Java EE web app and deploy it to Amazon EC2 (which I will need to setup first) starting next month (using the http://aws.amazon.com/free/faqs/ AWS Free Tier Usage - hope it supports Tomcat + MySQL/PostgreSQL).


The problem: I have never ever deployed a Java EE app (not even a normal one on a dedicated hosting) nor have I setup an Amazon EC2 enviorment.


Are there any, idiot proof preferably, tutorials/how-to's/whatever on doing it from the very beginning (signing up to Amazon) till the very end (when your app is all up and running)?

I did find some tutorials on how to setup an Amazon EC2 instance, how to normally deploy a Java EE app but what I'm looking for is a single tutorial putting it all together.

like image 770
Mateusz Dymczyk Avatar asked Oct 28 '10 11:10

Mateusz Dymczyk


People also ask

Can we deploy Java application on AWS?

AWS provides several tools for working with Java and Elastic Beanstalk. Regardless of the platform branch that you choose, you can use the AWS SDK for Java to use other AWS services from within your Java application.

How do I deploy an application to AWS cloud?

Sign in to the AWS Management Console and open the CodeDeploy console at https://console.aws.amazon.com/codedeploy . Sign in with the same account or IAM user information that you used in Getting started with CodeDeploy. In the navigation pane, expand Deploy, then choose Applications. Choose HelloWorld_App.

How do you deploy a Java application?

To deploy your Java Web Start application, first compile the source code, package it as a JAR file, and sign the JAR file. Java Web Start applications are launched by using the Java Network Launch Protocol (JNLP). Hence, you must create a JNLP file to deploy your application.


2 Answers

Start with an Ubuntu AMI. Then install tomcat. Now put the WAR file of your J2EE app where tomcat can see it. You can use the AWS console to start/stop your machines, configure firewall rules that allow you to access port 80, etc. There won't be a step by step guide telling you exactly what to do, welcome to being a programmer.

like image 139
Spike Gronim Avatar answered Oct 03 '22 05:10

Spike Gronim


Once we have the instance (like Ubuntu) running http://youtu.be/hJRSti6DsJg then, installs Glassfish (Java EE server) and configure it to work with Java EE. It depends more of the instance itself (Ubuntu) than EC2 Amazon... here a nice video (how to install Glashfish in Ubuntu + Netbeans config) http://youtu.be/CKuoDm6bqRM

Note:

  • Keep in mind both videos are a little old (may some adjustments are necessary)
  • The videos are indirectly related. But my point is: there isn't much info about Amazon AWS and Java EE, but there are a lot info about Amazon AWS and Linux, and Linux and Java EE.

Update You can try Amazon Beanstalk (Deployment & Management) integrated with Netbeans (without Glashfish?) http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.html

SSH to Elastic Beanstalk instance

http://aws.amazon.com/java/ (Amazon + Java)

enter image description here

like image 28
Jaider Avatar answered Oct 03 '22 03:10

Jaider