CloudBees~ Java Platform as a Service (Sample Application Deployment Process)


CloudBees - Java Platform as a Service

CloudBees – Java Platform as a Service

CloudBees offers the only Platform as a Service that spans the complete develop-to-deploy lifecycle of Java web applications in the cloud – no need to worry about servers or virtual machines.

The CloudBees platform delivers reliable and elastic on-demand resources, unlimited scalability, and a seamless transition from development to production. Pay only for what you use… and many subscriptions are free!

CloudBees - Dev@Cloud and Run@Cloud (Source: CloudBees)

CloudBees – Dev@Cloud and Run@Cloud (Source: CloudBees)

Vision

To provide the leading Java Platform as a Service (PaaS) for both enterprises and ISVs, from development to production.

CloudBees is also the provider of Nectar, a Continuous Integration offering for enterprises built on top of the world’s most popular Continuous Integration server: Jenkins (previously known as Hudson).

Java™ Application Development on Linux® – Free 599 Page eBook

Enterprise Java Virtualization:

Understanding the TCO Implications

InfoWorld’s Java IDE Comparison Strategy Guide:

Java Essential Training

Apache Jakarta Commons: Reusable Java™ Components

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Features

  • First Platform as a Service for Java
  • End-to-end environment, from development through to production
  • work optimally in the cloud’s distributed, online environment

o No waste time maintaining and managing the hardware infrastructure.

  • Deploy any Java web application
  • CloudBees platform runs on Amazon’s IaaS.
  • Designed to allow you to choose your preferred Infrastructure as a Service vendor. You can deploy on a private cloud, public cloud or hybrid cloud.
  • Scale DUO (up, down and out) capabilities
  • High-availability and failover support
  • Based on FOSS and open standards
  • Allows secure multi-tenant deployments, including fully integrated management, monitoring, metering and billing infrastructure
  • Back-end management system ensures maximum performance, uptime and availability
  • Caching
  • Jenkins Continuous Integration (CI) server

DEV@cloud

  • Jenkins as a Service – DEV@cloud is a subscription service for Jenkins servers running in the cloud
  • Private and secure Maven repositories
  • User management features to securely administer your team’s access rights and privileges
  • Private and secure SVN and Git repositories
  • A growing set of integrated partner solutions to instantly extend functionality of the core CloudBees platform

RUN@Cloud

  • RUN@cloud builds on the power of the CloudBees platform to allow developers to quickly and easily deploy Java applications to the cloud.
  • It brings traditional application server functionality to the cloud, providing load balancing, scalability and high availability for web applications, Java EE applications and Spring applications.

CloudBees SDK
The SDK provides command line tools for your workstation to make use of the CloudBees Platform fast and light. Download here.

http://wiki.cloudbees.com/bin/view/RUN/BeesSDK

CloudBees Services

CloudBees Services

Important

Sample Application (Time & Expense) Deployment on CloudBees
1. Signup

https://grandcentral.cloudbees.com/account/signup

CloudBees - Signup

CloudBees – Signup

Successful creation of an account will trigger:

CloudBees - Signup Successful

CloudBees – Signup Successful

2. Login

CloudBees - Login

CloudBees – Login

3. CloudBees Home

CloudBees - Home

CloudBees – Home

4. Before using CloudBees Services, User must subscribe to the services

https://grandcentral.cloudbees.com/services

Click on Add Services

CloudBees - Add Services

CloudBees – Add Services

Click on “Learn more”,

To subscribe for RUN@Cloud service:

CloudBees- subscribe for RUN@Cloud service

CloudBees- subscribe for RUN@Cloud service

To subscribe for DATABASE service which:

CloudBees - subscribe for DATABASE service

CloudBees – subscribe for DATABASE service

5. Now, we are ready to deploy sample application.

6. Create an Application

CloudBees - Create an Application

CloudBees – Create an Application

7. Give Application Name and Select Application Type

CloudBees - Application Name and Application Type

CloudBees – Application Name and Application Type

CloudBees - Application is Deploying

CloudBees – Application is Deploying

CloudBees - Application is Ready

CloudBees – Application is Ready

CloudBees - Application Configuration

CloudBees – Application Configuration

8. We have war file ready for sample application (Time & Expense) so we will upload the war file from local machine.

CloudBees - Upload and Deploy new Web Application

CloudBees – Upload and Deploy new Web Application

CloudBees - Upload and Deploy new Web Application Version

CloudBees – Upload and Deploy new Web Application Version

9. Application is deployed successfully.

CloudBees - Application Devlopment Center

CloudBees – Application Devlopment Center

10. Version History

11. Visit http://timenexp.cleanclouds.cloudbees.net/ to verify the successful Application deployment.

12. Now, we need to create database and change the database setting at application level so application deployed at CloudBees can use it. We will use CloudBees Database for which we have subscribed before.

13. Click on “Add New Database”

Database name: settletest

Username: scott

Password:

CloudBees - Create a MySQL Database

CloudBees – Create a MySQL Database

14. Database Ready (5 MB Free)

CloudBees - MySQL Database

CloudBees – MySQL Database

CloudBees - MySQL Database Configurations

CloudBees – MySQL Database Configurations

15. Connect to following server with mysql Client and run Database Scripts

CloudBees - MySQL- Show Databases

CloudBees – MySQL- Show Databases

CloudBees - MySQL- Run SQL script Remotely

CloudBees – MySQL- Run SQL script Remotely

CloudBees - MySQL- Run SQL script Remotely 1

CloudBees – MySQL- Run SQL script Remotely

CloudBees - MySQL- Run SQL script Remotely 2

CloudBees – MySQL- Run SQL script Remotely

16. Now we need to change the database setting at application level as per

CloudBees - Server Name Port and Username

CloudBees – Server Name Port and Username

17. And Redeploy the application on CloudBees

18. Use CloudBees SDK to deploy the subsequent version of the application since it upload only changes and not the whole Application. (Download CloudBees SDK and use it.)

CloudBees SDK

CloudBees SDK

19. Now use Application @ http://timenexp.cleanclouds.cloudbees.net/ and Enter some details to verify database working.

CloudBees - Run an Application in Browser

CloudBees – Run an Application in Browser

20. Application Operations

CloudBees Application Operations

CloudBees Application Operations

21. Server Logs for Application

CloudBees Application Server Logs

CloudBees Application Server Logs

22. Application Configuration

CloudBees Application Configurations

CloudBees Application Configurations

23. Done!!!

Single Sign-On for Java and Web Applications

Bulletproof Java Code: A Practical Strategy for Developing Functional, Reliable, and Secure Java Code

Transforming a Generic Java IDE to Your Application Specific IDE:

The Java Virtual Appliance—No OS Required

BEA WebLogic® Operations Control: Application Virtualization for Enterprise Java

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

References

http://www.cloudbees.com/company.cb

http://www.cloudbees.com/platform-pricing.cb

http://www.cloudbees.com/eclipse-plugin.cb

http://www.cloudbees.com/platform-resources.cb

https://grandcentral.cloudbees.com/account/signup

http://blog.cloudbees.com/

http://www.youtube.com/watch?v=ZxLsJt8nALY&feature=player_embedded

http://www.youtube.com/watch?v=0N6Ln7-3ck4&feature=player_embedded

http://www.youtube.com/watch?feature=player_embedded&v=ZxLsJt8nALY

http://www.youtube.com/watch?v=0N6Ln7-3ck4&feature=player_embedded

http://www.youtube.com/watch?v=EcqinpKAYOU&feature=player_embedded

http://www.cloudbees.com/support.cb
Related articles

About these ads

Obfuscation in Java with ProGuard


Obfuscation

Obfuscation is the cover up of intended meaning in communication, making communication confusing, deliberately ambiguous, and more complicated to interpret.

Obfuscated code is source code in a computer programming language that is difficult to understand. Programmers may deliberately obfuscate code to conceal its purpose, to prevent reverse engineering, or as a puzzle or recreational challenge for readers.

Obfuscating code to prevent reverse engineering is typically done to manage risks that stem from unauthorized access to source code.

Obfuscation is one technique used in a process called “application hardening”, which also includes such techniques as tamper detection and response, application encryption, and custom virtual machines.

Java™ Application Development on Linux® – Free 599 Page eBook

Enterprise Java Virtualization:

Understanding the TCO Implications

InfoWorld’s Java IDE Comparison Strategy Guide:

Java Essential Training

Apache Jakarta Commons: Reusable Java™ Components

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Java and .NET languages (e.g., Oxygene, C#, Visual Basic) take a different approach to compilation. They are far easier to reverse engineer because they do not compile to machine code, they compile into intermediate code.
Advantages of obfuscation

  • Intellectual property protection
  • Reduced security exposure
  • Size reduction
  • Library linking
  • At best, obfuscation merely makes it time-consuming, but not impossible, to reverse engineer a program. When security is important, measures other than obfuscation should be used
  • Obfuscated code is extremely difficult to debug. Variable names will no longer make sense, and the structure of the code itself will likely be modified beyond recognition.
  • Obfuscated code often depends on the particular characteristics of the platform and compiler, making it difficult to manage if either change
  • Reflection is a set of APIs in various languages that allow an object to be examined or created just by knowing its classname at run-time. Many obfuscators allow specified classes to be exempt from renaming; and it is also possible to let a class be renamed and call it by its new name. However, the former option places limits on the dynamism of code, while the latter adds a great deal of complexity and inconvenience to the system.

Disadvantages of obfuscation
ProGuard is a free Java class file shrinker, optimizer, obfuscator, and preverifier. It detects and removes unused classes, fields, methods, and attributes. It optimizes byte code and removes unused instructions. It renames the remaining classes, fields, and methods using short meaningless names. Finally, it preverifies the processed code for Java 6 or for Java Micro Edition.

  • Creating more compact code, for smaller code archives, faster transfer across networks, faster loading, and smaller memory footprints.
  • Making programs and libraries harder to reverse-engineer.
  • Listing dead code, so it can be removed from the source code.
  • Retargeting and preverifying existing class files for Java 6, to take full advantage of Java 6′s faster class loading.

ProGuard‘s main advantage compared to other Java obfuscators is probably its compact template-based configuration.

How It Works?

Proguard-Obfuscation-Process

  1. In the shrinking step, ProGuard starts from these seeds and recursively determines which classes and class members are used. All other classes and class members are discarded.
  2. In the optimization step, ProGuard further optimizes the code. Among other optimizations, classes and methods that are not entry points can be made private, static, or final, unused parameters can be removed, and some methods may be inlined.
  3. In the obfuscation step, ProGuard renames classes and class members that are not entry points. In this entire process, keeping the entry points ensures that they can still be accessed by their original names.
  4. The preverification step is the only step that doesn’t have to know the entry points.

ProGuard typically reads the input jars (or wars, ears, zips, or directories). It then shrinks, optimizes, obfuscates, and preverifies them. Optionally, multiple optimization passes can be performed, each typically followed by another shrinking step. ProGuard writes the processed results to one or more output jars (or wars, ears, zips, or directories). The input may contain resource files, whose names and contents can optionally be updated to reflect the obfuscated class names.

ProGuard is a command-line tool with an optional graphical user interface. It also comes with plugins for Ant and for the JME Wireless Toolkit.

-injars class_path

Specifies the input jars (or wars, ears, zips, or directories) of the application to be processed.

-outjars class_path

Specifies the names of the output jars (or wars, ears, zips, or directories).

-libraryjars class_path

Specifies the library jars (or wars, ears, zips, or directories) of the application to be processed. The files in these jars will not be included in the output jars.

-keepclasseswithmembers [,modifier,...] class_specification

Specifies classes and class members to be preserved, on the condition that all of the specified class members are present

-printseeds [filename]

Specifies to exhaustively list classes and class members matched by the various -keep options.

-keepattributes [attribute_name,...]

Specifies any optional attributes to be preserved.

-keepclasseswithmembernames class_specification

Short for -keepclasseswithmembers,allowshrinking class_specification

Specifies classes and class members whose names are to be preserved, on the condition that all of the specified class members are present after the shrinking phase.
Example:
To shrink, optimize, and obfuscate the ProGuard application itself, one would typically create a configuration file proguard.pro and then type:

java -jar proguard.jar @proguard.pro

The configuration file would contain the following options:

-injars proguard.jar

-outjars proguard_out.jar

-libraryjars /lib/rt.jar

-printmapping proguard.map

-keep public class proguard.ProGuard {

public static void main(java.lang.String[]);

}
ANT task
ProGuard can be run as a task in the Java-based build tool Ant (version 1.6.0 or higher).

Before you can use the proguard task, you have to tell Ant about this new task. The easiest way is to add the following line to your build.xml file:

<taskdef resource=”proguard/ant/task.properties”

classpath=”/usr/local/java/proguard/lib/proguard.jar” />
Other interesting Java related Posts you may like :-) :
What is Java? (clean-clouds.com)

Object-Oriented Programming Concepts (clean-clouds.com)

Java Language Fundamentals (clean-clouds.com)

Operators, Expressions and Control Structures in Java (clean-clouds.com)

Creating, Compiling and Running a Simple program in Java (clean-clouds.com)

Generics and Collections in Java (clean-clouds.com)

Applet and Swing in Java (clean-clouds.com)

JDBC in Java (clean-clouds.com)

Basic I/O in Java (clean-clouds.com)

Threads in Java (clean-clouds.com)

Packages in Java (clean-clouds.com)

Exceptions in Java (clean-clouds.com)

Using JavaDoc to document your Java Program (clean-clouds.com)

Java Coding Standards (clean-clouds.com)

Open Source ILS: Installation Guide for Koha on Ubuntu 11.10 or Ubuntu 11.04 or Ubuntu 10.10 or Ubuntu 10.04 LTS with MySQL 5 (clean-clouds.com)

REST and OO REST (clean-clouds.com)

Java Application in One JAR (clean-clouds.com)

Obfuscation in Java (clean-clouds.com)

Encryption~Hybrid Approach (clean-clouds.com)

Single Sign-On for Java and Web Applications

Bulletproof Java Code: A Practical Strategy for Developing Functional, Reliable, and Secure Java Code

Transforming a Generic Java IDE to Your Application Specific IDE:

The Java Virtual Appliance—No OS Required

BEA WebLogic® Operations Control: Application Virtualization for Enterprise Java

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Reference:
http://www.dmoz.org/Computers/Programming/Languages/Java/Development_Tools/Obfuscators/

http://proguard.sourceforge.net/

How to change default port in Tomcat?


Open apache-tomcat-7.0.22confserver.xml

Find the block <Service name=”Catalina”>

Locate following block and replace the Old port number (In RED color) with new port number.

<!– A "Connector" represents an endpoint by which requests are received–>
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP  Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
–>
<Connector port=”8080” protocol=”HTTP/1.1″
connectionTimeout=”20000″
redirectPort=”8443″ />

Done!