开发者

Play Framework application deployment

开发者 https://www.devze.com 2023-03-02 05:53 出处:网络
it\'s been a long time working on a play app & now comes the time to deploye it. that my first time so i\'m kind of lost. which hosting compagny is the best & offer 开发者_如何学编程good prici

it's been a long time working on a play app & now comes the time to deploye it. that my first time so i'm kind of lost. which hosting compagny is the best & offer 开发者_如何学编程good pricing ?


I'll probably post a detailed instruction of what I did, but here's a quick 2-min general idea.

Buy an Amazon Micro Instance Virtual Server (costs around $11/mo) with a debian squeeze (6.0) image

$> sudo apt-get install sun-java6-jdk6
$> sudo apt-get install mysql5
~: wget <playDownloadURL>
~: unzip *.zip
~: set path to java, play

sftp/scp your source code to /var/www/<yourApp>
$> cd /var/www/<yourApp>
$> play start 
~: (not actual commands but the concept)

and you are in business.


The creator company of Play Framework, Zenexity, propose a hosting solution dedicated to Play applications: PlayApps

It's probably the best choice since it is native Play hosting.


Otherwise, you can export your Play application as a classic war:

play war yourapp -o yourapp.war

Then, this war can be deployed on every Java server (Tomcat, Glassfish, etc.). For hosting a Java application server, you'll probably need a dedicated or virtualized server.


Another solution is to deploy your app on Google App Engine. But for that, you have to developp your Play application in a specific way. In particular, you can't use classic persistence. You have to use the Siena Play module to manage your entities for Google App Engine.

I don't know if Play apps can easily be deployed on other cloud structures. Maybe on Cloud Foundry since it supports Java application but I did not tested it and there are not deploy plugins yet for this platform.


You can look at this direction Heroku


Cloudbees, http://cloudbees.com, is an excellent choice. There is even a Play Framework Module for it.

http://www.playframework.org/modules/cloudbees-0.1/home


All of my Play! apps are hosted on Google App Engine, which is free for small sites. But you can host Play! apps on any Java web hosting provider.


In this question Experiences on free and low-cost hosting for play framework applications?

there are several cloud options for play framework...


There are a number of cloud hosting solutions supported by Play. There is a module for Stax, and the message boards have mentioned success on several others. A quick search for 'deploy' on the google groups will show a number of options.

I would recommend PlayApps though, It is actually hosted on Ghandi (i think!) and the pricing plan is the same, so the Zenexity guys actually make no money from this. They have set it up to be a convenience to us developers.

GAE is an option, but it restricts what you can do with Play. The WAR file deployment option, allowing to deploy to any java servlet container is also an option, but adds the overhead and resource of the container unnecessarily, so again, not the best option.


You could try Play! Manager. It's a Manager for Play Applications much like the Tomcat Manager. Worth trying:

https://github.com/mbarbieri/playmanager


Lately I've been playing around with openshift for hosting playframework application

It looks really good, you have mysql, phpmyadmin, mongodb, mongorock, jenkins, and what's even more important, you get 5 applications with 500MB op data space for each one... for free...

I'm also using this play module to ease deployment to openshift

https://github.com/opensas/openshift/blob/master/documentation/manual/home.textile

have a look at these articles:

playlatam.wordpress.com

detailed github tutorial

article found at openshift's site


If anyone is interested on uploading on Linode please follow this thread.

Linode 512 and play! framework


I advise you to have a look at http://www.playframework-cloud.com

This PaaS platform can automatically scale up and down your application regarding your traffic. You can also finely customize if you want vertical, horizontal or both types of scalability. The consequence of this scaling is that you pay as you go : you only pay for your real consumption and not the potential one.

Deployment via git.

Non AWS, hosted in tier-4+ datacenters.

Free trial !


For AWS Boxfuse offers a very easy solution.

With Boxfuse's native Play 2 support you can now simply execute

boxfuse run my-play-app-1.0.zip -env=prod

and this will automatically:

  • create a minimal AMI tailor-made for your Play 2 app
  • create an elastic IP
  • create a security group with the correct permissions
  • launch an instance of your app

All future updates are performed as blue/green deployments with zero downtime.

This also works with Elastic Load Balancers and Auto-Scaling Groups and the Boxfuse free tier is designed to fit the AWS free tier, which effectively means that you can deploy your app at no cost.

You can read more about it here: https://boxfuse.com/blog/playframework-aws

Disclaimer: I'm the founder and CEO of Boxfuse


I would look into cloud hosting.

If you developed your application in .NET, look into Windows Azure.

Otherwise, check out Amazon EC2.

Little confusing to setup if your a firs-timer, but they have guides and stuff to help you through it, and you get 100% scalability going with the cloud.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号