Setup Menus in Admin Panel

How to deploy war in cloud environment?

A cloud provider is a company that offers some component of cloud computing – typically Infrastructure as a Service (IaaS), Software as a Service (SaaS),Platform as Service(Paas), there many cloud provider for Java Technologies such as

CloudServiceProvider

There are many cloud providers, but in our example we demonstrate using OpenShift is Red Hat’s Platform-as-a-Service (PaaS) that allows developers to quickly develop, host, and scale applications in a cloud environment and it allow you to create 1 free instance without need of your card information.

OpenShift Runtime Environments

OpenShift Online supports a variety of technologies through use of cartridges, including Java (Wildfly, JBossEAP, Tomcat), PHP,Node.jsPythonPerlMySQLPostgreSQLMongoDBJenkinsCron, and JBoss xPaaS Services (Fuse, BPM Suite, BRMS, Data Virtualization, Aerogear, and more).

OpenShift-Specific Terminology

There is some basic terminology that is specific to OpenShift to describe the platform. It is important to clarify these terms since they will be used throughout your interactions with OpenShift:

Application

This is your typical web application that will run on OpenShift. At this time, OpenShift is focused on hosting web applications. With this in mind, and to try to provide some security for your applications, the only ports exposed to incoming traffic are HTTP (80), HTTPS (443), and SSH (22). OpenShift also provides beta WebSocket support on HTTP (8000) and HTTPS (8443).

Gear/RAM

A gear is a server container with a set of resources that allows you to run their applications. Your gears run on OpenShift in the cloud. There are currently three gear types on OpenShift Online: small, medium, and large. Each size provides 1 GB of disk space by default. The large gear has 2 GB of RAM, the medium gear has 1 GB of RAM, and the small and small.highcpu gears have 512 MB of RAM.

Cartridge

To get a gear to do anything, you need to add a cartridge. Cartridges are the plug-ins that houses the framework or components that can be used to create and run an application. One or more cartridges run on each gear, and the same cartridge can run on many gears for clustering or scaling. There are two kinds of cartridges:

Standalone/Server

These are the languages or application servers that are set up to serve your web content, such as JBoss, Tomcat, Python, or Node.js. Having one of these cartridges is sufficient to run an application.

Embedded

An embedded cartridge provides functionality to enhance your application, such as a database or Cron, but cannot be used on its own to create an application.

For some of the OpenShift partner cartridges in the Marketplace, the cartridges only install environment variables that make it easier to connect to the partner hosted service.

 

Scalable application

Application scaling enables your application to react to changes in traffic and automatically allocate the necessary resources to handle your increased demand. The OpenShift infrastructure monitors incoming web traffic and automatically brings up new gears with the appropriate web cartridge online to handle more requests. When traffic decreases, the platform retires the extra resources.

Client tools, Web Console, or Eclipse plug-ins

You can interact with the OpenShift platform via RHC client command-line tools you install on your local machine, the OpenShift Web Console, or a plug-in you install in Eclipse to interact with your application in the OpenShift cloud. The only time you must use these tools is when you are managing the infrastructure or components of your application. For example, you would use these tools when creating an application or embedding a new cartridge. The rest of your work with your application will happen through Git and SSH.

What is cost for openshift cloud service?

FREE PLAN BRONZE PLAN SILVER PLAN
BASE PRICE Free Free $20/month
APPLICATION IDLING 24 hours Never Never
INCLUDED GEARS 3 small gears 3 small gears 3 small gears
MAX GEARS 3 16 16+
SCALING Yes (3 min / 3 max) Yes (3 min / 16 max) Yes (3 min / 16 max)
GEAR SIZES small small ($0.02/hour)
small.highcpu ($0.025/hour)
medium ($0.05/hour)
large ($0.10/hour)
small ($0.02/hour)
small.highcpu ($0.025/hour)
medium ($0.05/hour)
large ($0.10/hour)
STORAGE 1GB per gear 1GB per gear; $1.00/month per additional GB 6GB per gear; $1.00/month per additional GB
SSL Shared For custom domains For custom domains
TEAMS Not included Up to 15 Up to 15
JBOSS EAP 6 Included 3 gears free; $0.03/hr per additional gear 3 gears free; $0.03/hr per additional gear
SUPPORT FROM Community Community Red Hat & Community
SIGN UP UPGRADE UPGRADE

Step 1. Go to link https://www.openshift.com/app/account/new and add the mandatory information

And confirm your email id for full access to Cloud service.

Signup_page

 

Step 2) Click on OpenShift logo and Go to My Accountà Openshift WEB CONSOLE and system will redirect to url https://openshift.redhat.com/app/login?then=%2Fapp%2Fconsole

Provide the user and password used during signup process.

Sign_IN_Credentails

Step 3) once successfully logged-in to the system, it will redirect to home page. Now click on “Create your first application now” hyper link.

Create_app

 

Step 4) after clicking on “Create your first application now” and choose tomcat 7 for war deploying and system will redirect to https://openshift.redhat.com/app/console/application_type/cart!jbossews-2.0.

 

Choose_application_tomcat_7

 

Step 5) Provide the necessary information such as domain name i.e. beta-pradeepit .rhcloud.com

And choose the auto scale on to scale your application max to 3 gear and click on “create application” and system will take few minutes to create a virtual system and install a Tomcat 7 server.

Tomcat_Info

 

SERver_creation_load

 

Step 6) Click on “Not Now, Continue” and your able to see HAProxy instance is started and Tomcat is installed.

Server_installed_ContinueTomcat_Sever_PORT_Change Tomcat_Server_haProxy

 

 

Step 7) Click on Tomcat Home Page to see home page of tomcat.

Example: http://beta-pradeepit.rhcloud.com/

Step 8) Click on public key to get the guide for access the tomcat instance in local machine.

I .To create a public key and Private key see the document

Step_1_Pub

 

II.After click on above link it will take you to https://developers.openshift.com/en/managing-remote-connection.html#keys and scroll down until you get putty download link i.e. “PuTTY download page.”

III.Download the putty with name “putty-0.66-installer.exe” from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

IV. Install the “putty-0.66-installer.exe” and finish the installation.

Step_3_Pub

 

Step_4_Pub

V. Go to Windows  a start menu , click on all program and choose the Putty and select

Step_5_Pub

VI.Click on Puttygen and click on generate for generating the Private and public key

Step_6_Pub

Note: You have to mouse over on empty window for fast generation of key or else it will keep getting the message as generating

Step_7_Pub

VII. After generating the key copy the public key to openshift public key file section i.e https://openshift.redhat.com/app/console/keys/new

Step_8_Pub

Copy the public key as mentioned above screen and provide the meaningful for Key name*, I have given as beta.pradeepit.publicKey and Click on create button.

Step_9_Pub

VIII.System will take you to https://openshift.redhat.com/app/console/settings;

Click on “Applications” and Click on “Web Load Balancer, Tomcat 7 (JBoss EWS 2.0)” to see the GIT URL at source code section as highlighted below.

Step_10_Pub

Now we can access the Tomcat webapp folder using git client ex: SourceTree or TortoiseGit .

January 8, 2016

1 responses on "How to deploy war in cloud environment?"

Leave a Message

Your email address will not be published. Required fields are marked *

© Pradeep Academy.  Design & Developed by