Fórum

Deploy Liferay in Amazon AWS Elastic Beanstalk

thumbnail
Ryan Terwedo, modificado 13 Anos atrás.

Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 94 Data de Entrada: 31/10/08 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 62 Data de Entrada: 11/11/08 Postagens Recentes
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, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

New Member Postagens: 4 Data de Entrada: 20/10/09 Postagens Recentes
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.
thumbnail
James Falkner, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
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!
thumbnail
James Falkner, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
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.
thumbnail
Ryan Terwedo, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 94 Data de Entrada: 31/10/08 Postagens Recentes
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)
thumbnail
James Falkner, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
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
thumbnail
Ryan Terwedo, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 94 Data de Entrada: 31/10/08 Postagens Recentes
Cool, I will check it out...

Bryan Cheung messaged me that yall decided to launch support for the giant green bean[stalk] 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, modificado 11 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

New Member Mensagem: 1 Data de Entrada: 01/11/12 Postagens Recentes
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
thumbnail
James Falkner, modificado 11 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Liferay Legend Postagens: 1399 Data de Entrada: 17/09/10 Postagens Recentes
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.
thumbnail
Ryan Terwedo, modificado 11 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 94 Data de Entrada: 31/10/08 Postagens Recentes
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.
thumbnail
Ryan Terwedo, modificado 12 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

Junior Member Postagens: 94 Data de Entrada: 31/10/08 Postagens Recentes
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
Arthur Rommes, modificado 10 Anos atrás.

RE: How to Deploy Multiple Liferay Portals on Amazon AWS Elastic Beanstalk

New Member Postagens: 3 Data de Entrada: 08/04/13 Postagens Recentes
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
thumbnail
Luca Lauretta, modificado 10 Anos atrás.

RE: Deploy Liferay in Amazon AWS Elastic Beanstalk

New Member Postagens: 3 Data de Entrada: 10/12/12 Postagens Recentes
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