-
Nov 16th, 2009, 08:44 AM
#1
Multiple applications on the same AMI instance
It seems Cloudfoundry will launch a new AMI instance for each application I deploy. Is there a way to deploy multiple applications to the same AMI instance via cloudfoundry?
This will really help me cut down cost as I don't have to run AMI multiple instances when the load can be handled by one instance, plus, I need both applications to run on the same instance as they share database, and jms resources via activemq.
Any help will be appreciated
-
Nov 18th, 2009, 12:54 PM
#2
It depends on what you define as a single application. If you create separate applications in Cloud Foundry, you will not be able to launch them on the same instance. However, each application can be comprised of multiple web applications (multiple WAR files), each with its own context root. This way, you can deploy multiple web applications in a single application server instance. Hope this helps.
Charles
-
Nov 23rd, 2009, 01:35 PM
#3
I am not sure I understand what you are saying. From what I can see from the cloudfoundry deployment page, it asks for the location of a WAR file, so how can I package multiple WARs together within a single WAR? From my understanding, only an EAR can contain multiple WARs and cloudfoundry doesn't allow me to upload a WAR.
Please clarify.
-
Nov 23rd, 2009, 01:44 PM
#4
Hello,
Enter the path and context root for the first war.
Then click the "add war" button: another set of input fields will apppear.
Enter the path for the next war, and so on....
Chris
-
Jan 19th, 2010, 02:58 PM
#5
will it create and use the database specified in DataSource.groovy for each application respectively?
-
Jan 19th, 2010, 06:03 PM
#6
No. Cloud Foundry creates a single database using the id/password/schema name specified by the Cloud Foundry application. You could, however, tell Cloud Foundry to execute one or more SQL scripts that configure additional users, databases etc.
-
Jan 19th, 2010, 06:07 PM
#7
that would work perfect, thank you
-
Jan 22nd, 2010, 12:03 PM
#8
Thank you!
Thanks Chris. You are a life saver! Things work perfectly now.
-
Feb 10th, 2010, 11:30 AM
#9
Is there a simple way of supporting multiple domains to point to the same EC2 server?
An an example, say I upload two WARs to two different contexts (/app1 and /app2). Say I also have two domains, domain1.com and domain2.com, where domain1.com should point to /app1 and domain2.com should point to /app2, without having to append /app1 or /app2 on the URL.
Currently I only have one app deployed to ROOT context, and CNAME setting on my domain provider works. With two WARs, each with its own context, is there an easier way other than to write a third app (deployed to ROOT) that forwards to the correct context?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules