简体   繁体   English

Play 框架应用部署

[英]Play Framework application deployment

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.我可能会发布我所做的详细说明,但这里有一个 2 分钟的快速总体思路。

Buy an Amazon Micro Instance Virtual Server (costs around $11/mo) with a debian squeeze (6.0) image购买带有 debian 挤压 (6.0) 映像的 Amazon 微型实例虚拟服务器(成本约为 11 美元/月)

$> 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 Play Framework 的创建者Zenexity提出了一个专用于 Play 应用程序的托管解决方案: PlayApps

It's probably the best choice since it is native Play hosting.这可能是最好的选择,因为它是原生 Play 托管。


Otherwise, you can export your Play application as a classic war:否则,您可以将 Play 应用程序导出为经典战争:

play war yourapp -o yourapp.war

Then, this war can be deployed on every Java server (Tomcat, Glassfish, etc.).然后,可以在每个 Java 服务器(Tomcat、Glassfish 等)上部署这场战争。 For hosting a Java application server, you'll probably need a dedicated or virtualized server.要托管 Java 应用程序服务器,您可能需要专用或虚拟化服务器。


Another solution is to deploy your app on Google App Engine .另一种解决方案是在Google App Engine上部署您的应用程序。 But for that, you have to developp your Play application in a specific way.但为此,您必须以特定方式开发您的 Play 应用程序。 In particular, you can't use classic persistence.特别是,您不能使用经典的持久性。 You have to use the Siena Play module to manage your entities for Google App Engine.您必须使用Siena Play 模块来管理 Google App Engine 的实体。

I don't know if Play apps can easily be deployed on other cloud structures.我不知道 Play 应用程序是否可以轻松部署在其他云结构上。 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.也许在Cloud Foundry上,因为它支持 Java 应用程序,但我没有对其进行测试,并且该平台还没有部署插件。

You can look at this direction Heroku可以看这个方向Heroku

Cloudbees, http://cloudbees.com , is an excellent choice. Cloudbees http://cloudbees.com是一个很好的选择。 There is even a Play Framework Module for it.甚至还有一个 Play Framework Module。

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

All of my Play, apps are hosted on Google App Engine.我所有的 Play 应用程序都托管在 Google App Engine 上。 which is free for small sites.这对于小型网站是免费的。 But you can host Play!但是您可以主持 Play! apps on any Java web hosting provider.任何 Java web 托管服务提供商上的应用程序。

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. Play 支持多种云托管解决方案。 There is a module for Stax, and the message boards have mentioned success on several others. Stax 有一个模块,并且留言板已经在其他几个模块上提到了成功。 A quick search for 'deploy' on the google groups will show a number of options.在 google 群组上快速搜索“部署”将显示许多选项。

I would recommend PlayApps though, It is actually hosted on Ghandi (i think,) and the pricing plan is the same.不过,我会推荐 PlayApps,它实际上托管在 Gandi 上(我认为),并且定价计划是相同的。 so the Zenexity guys actually make no money from this.所以 Zenexity 的家伙实际上并没有从中赚钱。 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. GAE 是一个选项,但它限制了您可以使用 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. WAR 文件部署选项,允许部署到任何 java servlet 容器也是一种选择,但会不必要地增加容器的开销和资源,因此再次强调,这不是最佳选择。

You could try Play.你可以试试玩。 Manager.经理。 It's a Manager for Play Applications much like the Tomcat Manager: Worth trying:它是 Play 应用程序的管理器,非常类似于 Tomcat 管理器:值得一试:

https://github.com/mbarbieri/playmanager https://github.com/mbarbieri/playmanager

Lately I've been playing around with openshift for hosting playframework application最近我一直在玩 openshift 来托管 playframework 应用程序

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... 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我也在使用这个播放模块来简化对 openshift 的部署

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

have a look at these articles:看看这些文章:

playlatam.wordpress.com playlatam.wordpress.com

detailed github tutorial 详细github教程

article found at openshift's site 在 openshift 的网站上找到的文章

If anyone is interested on uploading on Linode please follow this thread.如果有人对在 Linode 上上传感兴趣,请关注此线程。

Linode 512 and play! Linode 512 和玩! framework 框架

I advise you to have a look at http://www.playframework-cloud.com我建议你看看http://www.playframework-cloud.com

This PaaS platform can automatically scale up and down your application regarding your traffic.这个 PaaS 平台可以根据您的流量自动扩展和缩减您的应用程序。 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.这种缩放的结果是您按原样付费 go:您只需为实际消费而不是潜在消费付费。

Deployment via git.通过 git 部署。

Non AWS, hosted in tier-4+ datacenters.非 AWS,托管在第 4 层以上的数据中心。

Free trial !免费试用 !

For AWS Boxfuse offers a very easy solution.对于AWS ,Boxfuse提供了一个非常简单的解决方案。

With Boxfuse's native Play 2 support you can now simply execute有了 Boxfuse 的原生 Play 2 支持,您现在可以简单地执行

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为您的 Play 2 应用程序量身定制一个最小的 AMI
  • create an elastic IP创建弹性 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 .这也适用于 Elastic Load Balancer 和 Auto-Scaling Groups,Boxfuse 免费套餐旨在适应 AWS 免费套餐,这实际上意味着您可以免费部署您的应用程序。

You can read more about it here: https://boxfuse.com/blog/playframework-aws您可以在此处阅读更多相关信息: https://boxfuse.com/blog/playframework-aws

Disclaimer: I'm the founder and CEO of Boxfuse免责声明:我是 Boxfuse 的创始人兼 CEO

I would look into cloud hosting.我会研究云托管。

If you developed your application in .NET, look into Windows Azure .如果您在 .NET 中开发应用程序,请查看Windows Azure

Otherwise, check out Amazon EC2 .否则,请查看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.如果您是第一个计时器,设置起来有点混乱,但他们有指南和东西可以帮助您完成它,并且您可以通过云获得 100% 的可扩展性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM