Combination View Flat View Tree View
Threads [ Previous | Next ]
Ryan Terwedo
Deploy Liferay in Amazon AWS Elastic Beanstalk
February 25, 2011 5:38 AM
Answer

Ryan Terwedo

Rank: Junior Member

Posts: 93

Join Date: October 30, 2008

Recent Posts

In case people are not aware, Amazon launched a new service aimed at Java dev, called elastic beanstalk. It takes care of everything for you, you just need to deploy a war file. Has anyone got this to work? Maybe the LR team could have a production ready war file that we can deploy on aws beanstalk? Any thoughts on efficiency vs doing it on an Linux OS AMI?

Here is the amazon link:
http://aws.amazon.com/elasticbeanstalk/

Here is a link to the war file in question on sourceforge
http://sourceforge.net/projects/lportal/files/Liferay%20Portal/6.0.5/

I saw a note from LR deutch forum about trying to deploy it but it not working. Here is that link (scroll down)
http://tecrepublic.blogspot.com/

Thanks!!!
lsli lsli
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
February 25, 2011 11:44 PM
Answer

lsli lsli

Rank: Junior Member

Posts: 57

Join Date: November 10, 2008

Recent Posts

I'm really interested in this topic, too!

I would think one should be able to run Liferay on Beanstalk after some customizing of the AMI (see http://blog.jetztgrad.net/2011/02/how-to-customize-an-amazon-elastic-beanstalk-instance/). Once someone does this, I hope he or she pastes the instructions on this and/or posts the AMI itself.
Anil Perim Fernandes
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 3:46 AM
Answer

Anil Perim Fernandes

Rank: New Member

Posts: 4

Join Date: October 19, 2009

Recent Posts

I did deploy the Liferay war on Elasticbeanstalk. It gave me a message saying deployed successfully. When I try to access the site it gives me a blank page without any error.
James Falkner
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 6:49 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1222

Join Date: September 17, 2010

Recent Posts

Anil Perim Fernandes:
I did deploy the Liferay war on Elasticbeanstalk. It gave me a message saying deployed successfully. When I try to access the site it gives me a blank page without any error.


Probably some missing libraries in their version of Tomcat. I'll have a go at it, doesn't look too bad!
James Falkner
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 9:47 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1222

Join Date: September 17, 2010

Recent Posts

James Falkner:
Anil Perim Fernandes:
I did deploy the Liferay war on Elasticbeanstalk. It gave me a message saying deployed successfully. When I try to access the site it gives me a blank page without any error.


Probably some missing libraries in their version of Tomcat. I'll have a go at it, doesn't look too bad!


Ok I was able to get an instance of Liferay up and running on Elastic Beanstalk. I'll post a blog with the gory details, but basically I just took the Liferay dependency jars, put them in the main .war file in WEB-INF/lib, tweaked the jvm memory settings of the Tomcat instance it runs under, and changed the liferay.home property to point somewhere that was writable (somewhere in /tmp). And it came up after 5 or 6 minutes, using the "Micro" (read: free) EC2 machine instance profile.

With clever JVM configuration you can probably avoid having to manually inject the dependency jars into the liferay webapp. But I'm not that clever.

I also configured SSH on the machine which makes it much easier to change Tomcat/Liferay configuration than editing war files, and re-uploading via the EC2/Elastic Beanstalk web interface.

Hope my credit card doesn't get charged for all this CPU usage on failed startups!

BTW You can also configure Amazon's RDS if you want to use an external DB. The instance I have running is just using hsql out of /tmp.
Ryan Terwedo
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 1:01 PM
Answer

Ryan Terwedo

Rank: Junior Member

Posts: 93

Join Date: October 30, 2008

Recent Posts

James Falkner:
James Falkner:
Anil Perim Fernandes:
I did deploy the Liferay war on Elasticbeanstalk. It gave me a message saying deployed successfully. When I try to access the site it gives me a blank page without any error.


Probably some missing libraries in their version of Tomcat. I'll have a go at it, doesn't look too bad!


Ok I was able to get an instance of Liferay up and running on Elastic Beanstalk. I'll post a blog with the gory details, but basically I just took the Liferay dependency jars, put them in the main .war file in WEB-INF/lib, tweaked the jvm memory settings of the Tomcat instance it runs under, and changed the liferay.home property to point somewhere that was writable (somewhere in /tmp). And it came up after 5 or 6 minutes, using the "Micro" (read: free) EC2 machine instance profile.

With clever JVM configuration you can probably avoid having to manually inject the dependency jars into the liferay webapp. But I'm not that clever.

I also configured SSH on the machine which makes it much easier to change Tomcat/Liferay configuration than editing war files, and re-uploading via the EC2/Elastic Beanstalk web interface.

Hope my credit card doesn't get charged for all this CPU usage on failed startups!

BTW You can also configure Amazon's RDS if you want to use an external DB. The instance I have running is just using hsql out of /tmp.


This is fantastic! I would love to see the gory details.

I have heard that Amazon RDS is better for read intensive items but a standard instance (ie micro, small, etc) is better for read write.

With this working (and an appropriate AMI etc) it would be possible for LR to have an enterprise ready solution much like the bundles that only goes down when people get on foursquare, netflix and hootsuite too much... ;) (AWS had an outage a few weeks back that took out those sites)
Ryan Terwedo
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 1:02 PM
Answer

Ryan Terwedo

Rank: Junior Member

Posts: 93

Join Date: October 30, 2008

Recent Posts

BTW James if you signed up with the free account, it only charges you based on time the server is running... so I would recommend you shut it down to stop the clock if you haven't yet.

Ryan
James Falkner
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
May 3, 2011 1:35 PM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1222

Join Date: September 17, 2010

Recent Posts

Ryan Terwedo:

This is fantastic! I would love to see the gory details.

I have heard that Amazon RDS is better for read intensive items but a standard instance (ie micro, small, etc) is better for read write.

With this working (and an appropriate AMI etc) it would be possible for LR to have an enterprise ready solution much like the bundles that only goes down when people get on foursquare, netflix and hootsuite too much... ;) (AWS had an outage a few weeks back that took out those sites)


Here ya go. In all its gory details emoticon I shut down my instance though. Don't need any unnecessary credit card charges emoticon
Ryan Terwedo
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
June 14, 2011 3:38 PM
Answer

Ryan Terwedo

Rank: Junior Member

Posts: 93

Join Date: October 30, 2008

Recent Posts

Cool, I will check it out...

Bryan Cheung messaged me that yall decided to launch support for the giant green bean at ECS... I asked if there was any recording or notes available as I didnt get the invite till way late and had other commitments.





James Falkner:
Ryan Terwedo:

This is fantastic! I would love to see the gory details.

I have heard that Amazon RDS is better for read intensive items but a standard instance (ie micro, small, etc) is better for read write.

With this working (and an appropriate AMI etc) it would be possible for LR to have an enterprise ready solution much like the bundles that only goes down when people get on foursquare, netflix and hootsuite too much... ;) (AWS had an outage a few weeks back that took out those sites)


Here ya go. In all its gory details emoticon I shut down my instance though. Don't need any unnecessary credit card charges emoticon
Benjamin Huygir
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
November 1, 2012 9:25 AM
Answer

Benjamin Huygir

Rank: New Member

Posts: 1

Join Date: November 1, 2012

Recent Posts

Now that over a year has passed on this topic, AWS has added custom config files to EB so that it should be much easier to customize the Tomcat install. Looks to me that config files could be used as the way to adapt the vanilla Tomcat so that the LR war file could be deployed directly without any customization or building customer AMI.

Has anyone tried this? This would be a much better way, IMO, since it could be done once and then updates would be as simple as all other war uploads.

LR really needs to figure out the simple way to deploy to EB - the cloud market is too big to continue relying on bundles.

bh
James Falkner
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
November 1, 2012 11:23 AM
Answer

James Falkner

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1222

Join Date: September 17, 2010

Recent Posts

Benjamin Huygir:
Now that over a year has passed on this topic, AWS has added custom config files to EB so that it should be much easier to customize the Tomcat install. Looks to me that config files could be used as the way to adapt the vanilla Tomcat so that the LR war file could be deployed directly without any customization or building customer AMI.

Has anyone tried this? This would be a much better way, IMO, since it could be done once and then updates would be as simple as all other war uploads.

LR really needs to figure out the simple way to deploy to EB - the cloud market is too big to continue relying on bundles.

bh


Thanks for the nudge Benjamin. This is interesting, I'll take a look and see if it can make Liferay even easier. As far as "continue relying on bundles" -- there are cloud-ready solutions out there now, for example our recent partnership with BitNami (see the press release and their one-click solution). It uses EC2 (BitNami has their own stack) and BitNami's services on top of that. And Standing Cloud is also working on providing cloud-ready Liferay solutions (also using EC2). But I agree, having an easy to deploy EB'd Liferay would be cool.
Ryan Terwedo
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
November 21, 2012 12:17 AM
Answer

Ryan Terwedo

Rank: Junior Member

Posts: 93

Join Date: October 30, 2008

Recent Posts

When I did this, deploying was a pain.. but that could be sorted. The real issue was (and this is a gut guess) permissions.. EB did not let the LR WAR deploy more WARs, so effectively you could not deploy new portlets via admin panel and (I am 95% sure) the only way to get around this was upload entire LR WAR + custom portlets as a single WAR file----each bloody time.

EB has changed but I would venture to guess someone should check that you can deploy first.

Even before the custom config stuff, you could get around it by creating ur own AMI, which is what I did.
Art Rommes
RE: How to Deploy Multiple Liferay Portals on Amazon AWS Elastic Beanstalk
April 9, 2013 5:53 AM
Answer

Art Rommes

Rank: New Member

Posts: 3

Join Date: April 8, 2013

Recent Posts

How could one using AWS ElasticBeanstalk best install and configure Liferay to deliver multiple separate Liferay (portal)websites (with separate domainnames). Can you "re-use" say one Liferay installation (main codebase) and proceed with setting up virtualhosts for the various domainnames thus creating multiple Liferay Portal websites ? Or do you just create 'multiple' individual ElasticBeanstalk ( plus EC2 server instance) environments with a complete Liferay installation on each ElasticBeanstalk environment and domainname ? This last approach however requires a larger number of ElasticBeanstalk environments ( plus EC2 instances! ) whereas in the first scenario the multiple Liferay Portal websites possibly on just one ElasticBeanstalk ( plus EC2 instance) ? Would all the data be saved in one central database with (domainname related) pre-fixes or could one have separate databases one for each Liferay Portal and domainname ?

So far we have only found the following general information and forum postings on Multiple Liferay instance / Portal deployment but - due to limited IT skills and expertise - have problems translating all this into clear step by step instructions to AWS ElasticBeanstalk:
http://content.liferay.com/4.2/doc/installation/liferay_4_installation_guide/multipage/ch06.html
http://www.liferay.com/community/forums/-/message_boards/message/2991808
http://www.liferay.com/community/forums/-/message_boards/message/14543365
http://www.liferay.com/community/forums/-/message_boards/message/12689741
https://www.liferay.com/community/forums/-/message_boards/message/17641086

Maybe an interesting topic for a part 2 to your prior blog post on installing a single Liferay Portal on Elastic Beanstalk and EC2 ?
http://www.liferay.com/web/james.falkner/blog/-/blogs/liferay-on-amazon-elastic-beanstalk-and-ec2
Luca Lauretta
RE: Deploy Liferay in Amazon AWS Elastic Beanstalk
March 23, 2014 7:26 PM
Answer

Luca Lauretta

Rank: New Member

Posts: 3

Join Date: December 10, 2012

Recent Posts

Arthur, I've been looking for the same answer and found this great blog post:
https://www.liferay.com/web/ankitcp/blog/-/blogs/liferay-on-aws-elastic-beanstalk-configure-for-rds-and-s3