ZK on PaaS Clouds: Heroku and OpenShift Express"
Line 22: | Line 22: | ||
= Deploying ZK to Heroku & OpenShift Express = | = Deploying ZK to Heroku & OpenShift Express = | ||
Traditionally the "standard way" to deploy an application to the cloud, is to package a war file and then upload to the cloud. Whenever there is a change, we will have to update the war file locally again, and then re-upload the file. | Traditionally the "standard way" to deploy an application to the cloud, is to package a war file and then upload to the cloud. Whenever there is a change, we will have to update the war file locally again, and then re-upload the file. | ||
− | Heroku and OpenShift both integrated Maven and GitHub, offers the ability to | + | Heroku and OpenShift both integrated Maven and GitHub, offers the ability to source code version controlling. User will be able to push source code to cloud service and then build the project on cloud automatically. |
A simplified flow chart is shown as follows: | A simplified flow chart is shown as follows: | ||
Line 32: | Line 32: | ||
<div style="margin-left:10px;"> | <div style="margin-left:10px;"> | ||
== Heroku == | == Heroku == | ||
− | + | # Have Ruby, Git, and Heroku Gem installed and registration for Heroku. | |
− | + | # Create a maven project with Jetty or Tomcat server embedded. | |
− | + | # Deploy the whole maven project to Heroku with '''git push heroku master''' command. | |
− | For more details on running ZK on | + | For more details on running ZK on Heroku, please refer to the [[ZK_Installation_Guide/Setting_up_Servers/Heroku|Installation Guide]]. |
</div> | </div> | ||
<div style="margin-left:10px;"> | <div style="margin-left:10px;"> | ||
== OpenShift Express== | == OpenShift Express== | ||
− | + | # Get Your OpenShift Ready | |
− | + | # Create an OpenShift domain name | |
− | + | # Create a Maven Application | |
− | You are able to | + | #: You are able to modify the project after you have created the maven application. You can choose to |
− | * Import into Eclipse IDE (Optional) | + | #* Import into Eclipse IDE (Optional) |
− | and then you have to | + | #: and then you have to |
− | + | # Push the whole maven project to OpenShift with '''git push origin master''' command | |
− | + | For more details on running ZK on OpenShift, please refer to the [[ZK_Installation_Guide/Setting_up_Servers/Red_Hat_OpenShift_Express|Installation Guide]]. | |
− | For more details on running ZK on OpenShift, please refer to the Installation Guide. | ||
</div> | </div> | ||
Line 57: | Line 56: | ||
|+ align="bottom" style="text-align:right" | ''Modified from [http://www.slideshare.net/simbo1905/zk-mvvm-spring-jpa-on-two-paas-clouds-10610874 Simon Massey's slideshare]'' | |+ align="bottom" style="text-align:right" | ''Modified from [http://www.slideshare.net/simbo1905/zk-mvvm-spring-jpa-on-two-paas-clouds-10610874 Simon Massey's slideshare]'' | ||
|- style="background-color:#7FC9FF;" | |- style="background-color:#7FC9FF;" | ||
− | ! style="text-align:center; padding:3px; width:200px" | Features | + | ! style="text-align:center; padding:3px; width:200px" | Features |
− | ! style="text-align:center; padding:3px; width:200px" | Heroku | + | ! style="text-align:center; padding:3px; width:200px" | Heroku |
− | ! style="text-align:center; padding:3px; width:200px" | OpenShift | + | ! style="text-align:center; padding:3px; width:200px" | OpenShift Express |
|- | |- | ||
! style="padding:3px; background-color:#7FC9FF;" | Deploy from source | ! style="padding:3px; background-color:#7FC9FF;" | Deploy from source | ||
Line 74: | Line 73: | ||
|- | |- | ||
! style="padding:3px; background-color:#7FC9FF;" | Datebase | ! style="padding:3px; background-color:#7FC9FF;" | Datebase | ||
− | | style="padding:3px;" | NoSql add- | + | | style="padding:3px;" | NoSql add-ons, PostgreSQL |
− | | style="padding:3px;" | MySQL | + | | style="padding:3px;" | MySQL, PDO SQLite, MongoDB |
|- | |- | ||
! style="padding:3px; background-color:#7FC9FF;" | For ZK application | ! style="padding:3px; background-color:#7FC9FF;" | For ZK application |
Revision as of 01:51, 4 January 2012
Vincent Jian, Engineer, Potix Corporation
January 2, 2012
ZK5+
PaaS Cloud
Platform as a service (PaaS) is a kind of cloud computing services that provide a computing platform and a solution stack as a service. Instead of hosting and maintaining server by themselves, many companies start to take advantage of PaaS services as the offerings could be extensive and will include a total cycle of application hosting, development, testing, and deployment environment, along with a complete options of integrated services that consist of scalability, maintenance, and more. Here we will introduce how to deploy ZK applications on two popular PaaS platforms - Heroku and OpenShift Express.
Heroku
Heroku, owned by Salesforce.com currently supports six languages: Ruby, Java, Node.js, Scala, Clojure and Python cloud PaaS. It also provides a lot of add-ons, such as Heroku Scheduler, ClearDB MySQL Database, NoSql related database, and so on.
OpenShift Express
OpenShift is a free, auto-scaling platform-as-a-service for Java, Ruby, PHP, Perl and Python applications provided by Ret Hat. It also supports MySQL, MySQLi, PDO MySQL, PDO SQLite, and Amazon-RDS database.
Deploying ZK to Heroku & OpenShift Express
Traditionally the "standard way" to deploy an application to the cloud, is to package a war file and then upload to the cloud. Whenever there is a change, we will have to update the war file locally again, and then re-upload the file. Heroku and OpenShift both integrated Maven and GitHub, offers the ability to source code version controlling. User will be able to push source code to cloud service and then build the project on cloud automatically. A simplified flow chart is shown as follows:
Even though both Heroku and OpenShift supports Maven and Git, there are some differences in the steps and design. The brief steps for running ZK on Heroku and OpenShift are as follows:
Heroku
- Have Ruby, Git, and Heroku Gem installed and registration for Heroku.
- Create a maven project with Jetty or Tomcat server embedded.
- Deploy the whole maven project to Heroku with git push heroku master command.
For more details on running ZK on Heroku, please refer to the Installation Guide.
OpenShift Express
- Get Your OpenShift Ready
- Create an OpenShift domain name
- Create a Maven Application
- You are able to modify the project after you have created the maven application. You can choose to
- Import into Eclipse IDE (Optional)
- and then you have to
- Push the whole maven project to OpenShift with git push origin master command
For more details on running ZK on OpenShift, please refer to the Installation Guide.
The Differences
Let's see more detail features about Heroku and OpenShift with the table below:
Features | Heroku | OpenShift Express |
---|---|---|
Deploy from source | Git + Maven | Git + Maven |
Deploy from existing war | No | Yes |
Container | Embedded Jetty or Tomcat | JBossAS 7.0 |
Datebase | NoSql add-ons, PostgreSQL | MySQL, PDO SQLite, MongoDB |
For ZK application | Yes[1][2] | Yes[3][4] |
Conclusion
I have tried to deploy ZK Sandbox to both Heroku and OpenShift, and I've managed to complete the procedure in less than 3 hours which means it is easy to learn and use. The resulting performance is also satisfying. Whether to use Heroku or OpenShift or a different PaaS solution depends on ... but these options will definitely benefit application developers so that we can focus more on the project itself rather than worrying about deployment issues.
Reference
Following the links for more detailed steps to deploy ZK applications.
Comments
Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License. |