An IBM WebSphere project to deploy and run an enterprise java application to a predefined cluster

Project overview

Here is a summary of what this project will achieve.

This project is designed to deploy a Java enterprise application (EAR file) into a configured cluster. Application, but not container, dependencies will also be configured.

The server in the project is Linux, but can be cloned to Windows if required.

The project is preconfigured with one target environment.

Specific application specific configuration items are changed between environments, by use of Data Dictionary items.

Prerequisites

  • A running WebSphere 8.5 Cell on Linux with a Deployment Manager and a federated nodeagent.
  • You should have gathered the URL, Username and password of the Deployment Manager server admin service
  • You should have the ability to connect to the target server hosting the Deployment Manager as root, or be able to sudo to root once connected as another user.
  • A preconfigured cluster you want to deploy to. You should have the name of the cluster to hand.

What is preconfigured and demonstrated

The project demonstrates the following configurations:
  • One target server for Linux. The user will need to configure the actual hostname for this logical server definition.
  • Use of the SSH plugin. If deploying to Windows the you’ll probably want to change this to use the agent.
  • An Ear file, as payload
  • WebSphere enterprise application configuration, parameterised per environment with Data Dictionary properties.
  • Search/Replace inside the Ear file per environment, at deployment time to configure environment specific values (in this case @@appName@@)
  • SearchReplaceTask task to perform dictionary value replacements insie the Ear file at deployment time
  • WebSphere85ClusterStateChangeTask task to stop/start the cluster
  • EARExpanderWebSphereTask task to unzip and zip the Ear file
  • WebSphere85DeploymentTask task to deploy the application and its specific configuration to the cell
  • Use of the Template form to amend Data Dictionary items.

 

How to use this project

  1. Download the project to your desktop by clicking on one of the links. The file will be saved as WebSphere-85-Deploy-JPetstore.zip
  2. Log into your RapidDeploy instance as mvadmin.
  3. Navigate to Resources -> Projects.
  4. In the top right hand corner click on the Upload Project button.
  5. Select the zip file you downloaded in step 1.
  6. You are guided through a project import wizard. The important thing to check and change (if necessary) here is the path to the project storage directory.
  7. Once the project is imported, there are a couple of things you’ll need to do.
    • Firstly, you will need to change the path to your Dmgr installation on the target server. Navigate to  Resources -> Projects and edit the project. Navigate to the Environments tab and click the edit button (pencil icon) on the  Action  menu to the right of the environment. In the Edit Environment page, from the menu bar choose Template -> Template Form. Search for the  WebSphere Deployment Manager Profile Root. Change the value to match the profile root of your Deployment Manager profile. Save  the setting. Check and change if necessary the following additional fields:  Cell Name  to match the name of the cell, Node Name to match the node that the cluster runs on,  and Cluster Name  to match the cluster to deploy to. Then click Save Changes.
    • Secondly, navigate to  Resources -> Projects  and edit the project. Navigate to the Packages tab and click the Create Package button. A new package is created with a version number. This is the package you’ll deploy later, containing all the environment definitions, actions and paylod ( jpetstore.ear ) to allow the jobs to be run on all defined servers.
    • By default this job will run on preconfigured hosts that you do not have access to. You will need to edit each of the server definitions to add your own  Hostname.
    • To do this navigate to Resources -> Targets -> Servers. Select the server with the logical name ( Display Name ), of was85dev. Change the Hostname hostname from the current value  to the IP, DNS or resolvable hostname you actually want to connect to. You might also need to change the Transport tab to use either SSH or the MidVision remote agent plugin. The imported server definitions are set up to use SSH to an AWS instance running WebSphere. If you are running your deployment to a WebSphere instance on Amazon Web Services you will only need to amend the IP address and your SSH key (.pem file).
  8. Navigate to Project-> Targets Tab.
    • Select the Play button next to the target.
    • Select the package you want to deploy from the droplist.
    • Since there is only one package, it is preselected. The latest package will always be preselected by default.
    • Click on the  Yes  button in this dialog.
    • The deployment is started and you are taken to the running jobs panel where you see the tasks executed and job log in real time.

Further Reading

Reviews

There are no reviews yet.

Be the first to review “IBM WAS Application Blueprint”