Deploying Java Web Applications on CloudSwing Open PaaS

Development and deployment are slow in traditional environments due to issues with team synchronisation across regions, software version and licensing management (for proprietary products), backup and disaster-recovery management, and access to the required computing, storage and network resources. Cloud computing provides various ways to address these challenges; one of these is PaaS (Platform-as-a-Service). This article explains CloudSwing, a solution that lets you deploy any application on any technology stack to any cloud.

PaaS is application middleware (Web servers, application servers and databases) offered as a service which would otherwise have to be added to the basic infrastructure in a virtual machine on the cloud. Thus, PaaS provides a platform for the quick and flexible deployment and management of business applications, with standardised middleware services. This is done by leveraging standard, pre-built technology stacks. Leading organisations are already using cloud PaaS services.
The PaaS market is growing fast. In 2011, Gartner’s special report: PaaS Road Map: A Continent Emerging’ included the following prediction, All major software vendors including IBM, Oracle, Microsoft, SAP, Red Hat, salesforce.com, Google and VMware will deliver new and notable technology in this market, making 2011 the Year of PaaS. However, most offerings will require additional investment to reach maturity. At the start of 2011, most vendors active in the cloud application platform as a service (aPaaS) market were cloud specialists (e.g., salesforce.com and Google). By the end of 2011, the market had changed dramatically IBM, Oracle, Red Hat, SAP and VMware announced plans for aPaaS offerings.

Java PaaS offerings
Java PaaS has matured in the past few months with product offerings evolving rapidly. Google App Engine was a solitary Java PaaS provider. Most PaaS offerings were for platforms like Ruby and Python, but fortunately, that has started to change. In the past year or so, quite a few commercial providers have entered the Java PaaS space—CloudSwing, CloudBees, Amazon Elastic Beanstalk, Cloud Foundry, Heroku, and Red Hat OpenShift. This makes sense, since Java developers are one of the biggest developer groups in the world.

The Java platform is well-suited for PaaS, since the JVM, application server, and deployment archives (e.g., WARs and EARs) provide isolation for Java applications, allowing several developers to deploy applications on the same infrastructure.

CloudSwing: Deploying to the cloud within minutes
Conventional PaaS offerings limit the user’s choice to the service provider’s offerings. Open PaaS eliminates this lock-in by letting users customise technology stacks, components and versions, and choose cloud service providers or deployment models to optimise performance, scalability, security and costs for each application. CloudSwing, from OpenLogic, is a flexible and open PaaS cloud solution, offering cost-tracking and complete customisation of technology stacks. It also lets you deploy any application on any technology stack to any cloud (as of now, Amazon and RackSpace), creating a flexible Platform-as-a-Service. It includes pre-built open source stacks for Java, Ruby, JavaScript, PHP and other languages. Users can modify or customise these stacks to include any software components they choose, including open source and proprietary software.

CloudSwing offers a free plan for up to three members, in which you can deploy up to five concurrent applications; each user can be a member of one or more CloudSwing accounts.
The pre-built platform options are LAMP, Tomcat, Rails, Node.js and NGinX. OpenLogic provides support for over 600 open source packages. Developers can choose language and platform stacks, and pick all the stack components from the Web framework and the application server to the database.

Built-in management and monitoring of the health of your cloud-based applications comes via OpenLogic’s partnering with New Relic; all the pre-built CloudSwing stacks include New Relic monitoring agents. A Cost Management module tracks cloud costs to ensure you stay within your budget.
CloudSwing will offer a choice of infrastructure (cloud, OS and virtualisation technology), though as of now, OS and virtualisation technology choices are not available at least in free usage. Portability features allow developers to move data, scripts and applications to other PaaS or IaaS offerings.

PaaS is application middleware (Web servers, application servers and databases) offered as a service—which would otherwise have to be added to the basic infrastructure in a virtual machine on the cloud. Thus, PaaS provides a platform for the quick and flexible deployment and management of business applications, with standardised middleware services. This is done by leveraging standard, pre-built technology stacks. Leading organisations are already using cloud PaaS services.
The PaaS market is growing fast. In 2011, Gartner’s special report: PaaS Road Map: A Continent Emerging included the following prediction, All major software vendors including IBM, Oracle, Microsoft, SAP, Red Hat, salesforce.com, Google and VMware will deliver new and notable technology in this market, making 2011 the Year of PaaS. However, most offerings will require additional investment to reach maturity. At the start of 2011, most vendors active in the cloud application platform as a service (aPaaS) market were cloud specialists (e.g., salesforce.com and Google). By the end of 2011, the market had changed dramatically IBM, Oracle, Red Hat, SAP and VMware announced plans for aPaaS offerings.

Java PaaS offerings
Java PaaS has matured in the past few months with product offerings evolving rapidly. Google App Engine was a solitary Java PaaS provider. Most PaaS offerings were for platforms like Ruby and Python, but fortunately, that has started to change. In the past year or so, quite a few commercial providers have entered the Java PaaS space CloudSwing, CloudBees, Amazon Elastic Beanstalk, Cloud Foundry, Heroku, and Red Hat OpenShift. This makes sense, since Java developers are one of the biggest developer groups in the world.
The Java platform is well-suited for PaaS, since the JVM, application server, and deployment archives (e.g., WARs and EARs) provide isolation for Java applications, allowing several developers to deploy applications on the same infrastructure.

CloudSwing: Deploying to the cloud within minutes
Conventional PaaS offerings limit the user’s choice to the service provider’s offerings. Open PaaS eliminates this lock-in by letting users customise technology stacks, components and versions, and choose cloud service providers or deployment models to optimise performance, scalability, security and costs for each application. CloudSwing, from OpenLogic, is a flexible and open PaaS cloud solution, offering cost-tracking and complete customisation of technology stacks. It also lets you deploy any application on any technology stack to any cloud (as of now, Amazon and RackSpace), creating a flexible Platform-as-a-Service. It includes pre-built open source stacks for Java, Ruby, JavaScript, PHP and other languages. Users can modify or customise these stacks to include any software components they choose, including open source and proprietary software.
CloudSwing offers a free plan for up to three members, in which you can deploy up to five concurrent applications; each user can be a member of one or more CloudSwing accounts.
The pre-built platform options are LAMP, Tomcat, Rails, Node.js and NGinX. OpenLogic provides support for over 600 open source packages. Developers can choose language and platform stacks, and pick all the stack components from the Web framework and the application server to the database.
Built-in management and monitoring of the health of your cloud-based applications comes via OpenLogic’s partnering with New Relic; all the pre-built CloudSwing stacks include New Relic monitoring agents. A Cost Management module tracks cloud costs to ensure you stay within your budget.
CloudSwing will offer a choice of infrastructure (cloud, OS and virtualisation technology), though as of now, OS and virtualisation technology choices are not available—at least in free usage. Portability features allow developers to move data, scripts and applications to other PaaS or IaaS offerings.
Deploying a simple Java Web application
Here is the procedure to deploy a simple Java Web application created in Struts + Spring + Hibernate:
Register at https://cloudswing.openlogic.com/ to use the free 30 cloud hours to deploy a Java application.
Choose the Platform option to start; select the Tomcat stack to deploy the Java application.
Add the Java Web application and/or other components to the pre-built stack, in the Customise Tomcat Platform step.
Select the cloud service provider, as seen in Figure 1 — currently Amazon and RackSpace are available.
Launch the Virtual Machine. Once the VM is available, get its IP address, and download the SSH key, which is required to access remote resources from your machine.
Navigate to the VM’s IP address in a browser, to check that Tomcat is working.
Use SCP or your preferred transfer method to upload the application WAR file from your local machine to the remote machine.
Connect to the same machine with a MySQL client, and create the database and tables necessary for your application.
Configure your application to use the new database; change the host, user name and password in the database.properties file (or wherever your application expects to find this configuration).
Run the application (after connecting to it in a browser) and check that it works.
Figure 2 shows the CloudSwing Dashboard page, where you can monitor applications, apart from cloud usage and costs.
According to Gartner, enterprise software users and vendors currently without a cloud-computing strategy must anticipate that, during the next three years, PaaS offerings will become a strategic part of their technology portfolio, and hence they should plan accordingly. Although the adoption of PaaS is essential in the long term, investment in it must be done with caution, strategic thinking and tactical decision-making.

References
[1] Gartner Complimentary Research: PaaS 2012 Tactical Risks
and Strategic Rewards
[2] PaaS Road Map: A Continent Emerging: http://www.gxs.co.uk/wp-content/uploads/wp_gartner_paas_road_map.pdf?f92556
[3]    http://www.openlogic.com/cloud/faq.php
[4]    http://www.openlogic.com/cloud/
[5]    http://www.openlogic.com/cloud/about.php
[6] http://www.openlogic.com/cloud/open-paas.php
[7] http://www.infoq.com/articles/paas_comparison
[8] http://wso2.com/download/Selecting-a-Cloud-Platform.pdf
Here is the procedure to deploy a simple Java Web application created in Struts + Spring + Hibernate:
Register at https://cloudswing.openlogic.com/ to use the free 30 cloud hours to deploy a Java application.
Choose the Platform option to start; select the Tomcat stack to deploy the Java application.
Add the Java Web application and/or other components to the pre-built stack, in the Customise Tomcat Platform step.
Select the cloud service provider, as seen in Figure 1 — currently Amazon and RackSpace are available.
Launch the Virtual Machine. Once the VM is available, get its IP address, and download the SSH key, which is required to access remote resources from your machine.
Navigate to the VM’s IP address in a browser, to check that Tomcat is working.
Use SCP or your preferred transfer method to upload the application WAR file from your local machine to the remote machine.
Connect to the same machine with a MySQL client, and create the database and tables necessary for your application.
Configure your application to use the new database; change the host, user name and password in the database.properties file (or wherever your application expects to find this configuration).
Run the application (after connecting to it in a browser) and check that it works.
Figure 2 shows the CloudSwing Dashboard page, where you can monitor applications, apart from cloud usage and costs.
According to Gartner, enterprise software users and vendors currently without a cloud-computing strategy must anticipate that, during the next three years, PaaS offerings will become a strategic part of their technology portfolio, and hence they should plan accordingly. Although the adoption of PaaS is essential in the long term, investment in it must be done with caution, strategic thinking and tactical decision-making.

References
[1] Gartner Complimentary Research: PaaS 2012 Tactical Risks
and Strategic Rewards
[2] PaaS Road Map: A Continent Emerging: http://www.gxs.co.uk/wp-content/uploads/wp_gartner_paas_road_map.pdf?f92556
[3]    http://www.openlogic.com/cloud/faq.php
[4]    http://www.openlogic.com/cloud/
[5]    http://www.openlogic.com/cloud/about.php
[6] http://www.openlogic.com/cloud/open-paas.php
[7] http://www.infoq.com/articles/paas_comparison
[8] http://wso2.com/download/Selecting-a-Cloud-Platform.pdf

  • Buntha

    nice article, I’d like to add some more significant players like Jelastic , Heroku and others.

    I have used jelastic for javaEE deployment and found it super easy and sustainable.

    The documentation and support is huge

    http://jelastic.com/docs/upload-deploy-application

All published articles are released under Creative Commons Attribution-NonCommercial 3.0 Unported License, unless otherwise noted.
Open Source For You is powered by WordPress, which gladly sits on top of a CentOS-based LEMP stack.

Creative Commons License.