14

I have a web application developed with Struts2, JSP, JPA, Spring and MySql. I want to move this application to Amazon Cloud. I have not done a cloud deployment before or know how to do it. Can anyone help me on a step by step process or a procedure to follow or a document that will guide me in doing this. Thanks for your help.

Uchenna Nwanyanwu
  • 3,174
  • 3
  • 35
  • 59

3 Answers3

12

Upload your project's .war in elastic bean stalk and deploy project.

The steps to create a new application in beanstalk is -

1) Create a new application say "test app" in Elastic beanstalk, chose the region which best suits your requirement.

2) Create a new environment in the application "test app", select the application server you like to have i.e, tomcat 6 32/64 or tomcat732/64.

3) upload the .war in the newly created environment.

4) You can provide a custom Cname through which you can access you webapplication from browser.

5) Finally based on your requirements you can set the healthcheck status time interval, scaling unit

Sangram Anand
  • 10,526
  • 23
  • 70
  • 103
  • what about the mysql database. how do i manage that. Can mysql or oracle database be installed in the environment. Can i use different databases for different clients? Or how best can i manage multiple clients data. thanks for the swift response. – Uchenna Nwanyanwu Mar 20 '12 at 07:20
  • if you want to go for a relational database AWS RDS is at your service. You can opt for the new Amazon AWS Dyanamo DB if you want to go for a Non-Relational DB. For AWS RDS you have an option of selecting either mysql or oracle, you need to set a master user and password. You will have a public url for the RDS you have selected, so that you can mention in you jdbc connection the url, master username & password. Please let me know if you need additional info. – Sangram Anand Mar 22 '12 at 04:55
  • Wow thanks so much for your prompt response. It is very accurate. I don't really understand some concepts about application management on the cloud. Does different clients or users of your application use the same database n application instance or are they going to run on different instances of database and application for each user or client. Thanks once more – Uchenna Nwanyanwu Mar 22 '12 at 17:40
  • I have a question for you - the java webproject you want to deploy in the cloud, is it for production i mean you want multiple users to access the webapplication. Assuming that as the requirement, you can just have a single environement of the beanstalk and deploy the war file in it, and in elastic loadbalancing mentioned the no. of instances you want to run for the app, inorder the balance the load, For DB, Amazon RDS offers relational DB using mysql/oracle,so you can chose any one & having a additional support(instance) for RDS depends on your DB structure i.e, no. of records, tables etc., – Sangram Anand Mar 23 '12 at 13:51
  • Thanks for your response. Let me explain fully. This is an application that companies use. Currently, the application is installed on a company's server, and users from the company that will use the application are created. The application knows how to manage its users. So every company that needs this application, buys a server and the application is deployed on the server. Now i want to move this application to the cloud, how do i go about the deployment. I have not done a cloud thing before and don't really know much about deployment on it. I am going to use mysql. Thanks – Uchenna Nwanyanwu Mar 23 '12 at 14:40
  • 1
    In future, please can you use just *one* answer instead of several? – Kev Jun 11 '12 at 14:04
11

Got it... thanks for the detailed description. You can make it in two ways

  1. Create a singleBeanstalk application.

create different environments for each company within the created application, and in every environment deploy the .war file and provide the resources as per your requirement such as tomcat 6/7, minimum number of instances & maximum number of instances for Auto scaling. Health check monitor interval, no. of times to check before timeout etc.,. and finally assign the cname (i.e, the url by which you access the application) associated with the company name, like if the webapp is for xyz company then provide cname as xyz.elasticbeanstalk.com.

2 . Create multiple Beanstalk applications i.e., one for every company and in each application you can create multiple environments like Development, Beta, Staging and live - based on your requirement.

And coming to DB

Go for RDS if your DB is relational DB. Two ways to plan for multiple company's is

1) Create a single RDS and create multiple schema's in it i.e., one schema for one organization.

2) Create separate RDS for every organization - recommended if DB records are more

Let me know if you have any queries. Happy to help...:)

Sangram Anand
  • 10,526
  • 23
  • 70
  • 103
  • I think your response have made me happier than ever. Your response is straight to the point. And believe me, that is the best answer ever. A lot of people around here has been wondering how to do this, but you did it. guess i'm lucky. Thanks so much. With regards to the single and separate beanstalk n DB which option will be cost effective. Thank you so much. One more thing, does the same apply for other providers like openshift, jelastic etc – Uchenna Nwanyanwu Mar 28 '12 at 13:26
  • Cost effective in beanstalk is all about the type and the number of instances you choose. Every environment requires a minimum of one instance, therefore its upto you which AMI you would like to, whether micro/small/medium/large. – Sangram Anand Mar 31 '12 at 17:41
1

please find me inline comments in bold.

Currently, the application is installed on a company's server, and users from the company that will use the application are created.

How is the installation done, and what is the architecture(x86/x64) and platform(windows   
server/linux) of the server

The application knows how to manage its users. So every company that needs this application, buys a server and the application is deployed on the server.

Buys a server in the sense - you guys are providing the application and they are 
launching in their server, i mean in their own infrastructure.

The facts i understood from your reply is, that you guys provide a web application to 
different company's. And those company's deploy your webapplication in their 
application server and DB in their DB server. 

Correct me if am wrong

Sangram Anand
  • 10,526
  • 23
  • 70
  • 103
  • How it is deployed: It is a Java web application. We install tomcat and mysql on the client's server. Run the necessary database scripts specific to the client. The server is started and other configurations like create users, roles etc is done.You are absolutely right. That's how it has been working all these while. We deploy both on X86 and X64 and on both Linux and Windows depending on what the client has. What i want is to host this application on the cloud so that instead of going to each company's server, each company will point to the cloud for the application. Hope you understand this. – Uchenna Nwanyanwu Mar 27 '12 at 12:56