IBM WebSphere 8.5 Configure and Deploy Project (v4.0)
An IBM WebSphere project to configure a target cell with a cluster and dependencies and then deploy and run an enterprise java application to the cluster
Here is a summary of what this project will achieve.
This project is designed to configure a cluster, database, virtual host and other standard WebSphere configuration items on a target WebSphere cell and then deploy a Java enterprise application (EAR file) into the configured cluster.
If the cluster does not exist, it is created. If it exists, it is updated.
The server in the project is Linux, but can be cloned to Windows if required.
The project is preconfigured with three target environments, Dev, Test and Prod.
Specific configuration items are changed between environments, by use of Data Dictionary items.
- A running WebSphere 8.5 Cell on Linux with a Deployment Manager and a federated nodeagent. Ideally this will have been created using the previous WebSphere demo projects.
- 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.
What is preconfigured and demonstrated
- One to three Target server for Linux. The user will need to configure the actual hostname for each of these logical server definitions.
- 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 environment 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 configuration and applications to the cell
How to use this project.
- Download the project to your desktop by clicking on one of the links. The file will be saved as WebSphere-85-Configure-Deploy-JPetstore-40.zip
- Log into your RapidDeploy instance as mvadmin.
- Navigate to Resources-> Projects.
- In the top right hand corner click on the Upload Project button.
- Select the zip file you downloaded in step 1.
- 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.
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 Targets 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 Dictionary -> Data Dictionary. Seach for the @@wasDmHome@@ key. Change the value to match the profile root of your Deployment Manager profile. Save the setting. Check and change if necessary the following additional keys: @@cellName@@ to match the name of the cell and @@nodeName@@ to match the node that the cluster runs on, 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 payload ( 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 ), one of aws-linux-sudo-midvisionWASND. 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).
- Now you can run a new job to the environment of your choice.
- Navigate to Jobs-> New Job.
- Double click on the 'Empty' project job box, and select the project you created earlier from the droplist.
- Select the Target you want to deploy from the droplist.
- Select the Version (package version) 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 Run button in the bottom right corner, enter a comment for this run and click and click Yes .
- The deployment is started. Click on the Running Jobs icon in the top right corner and you see the tasks executed and job log in real time.
Testing the result
The project has a post-deployment test script that checks connectivity to the application. You can also access the JPetstore application by going to this URL:
- IBM WebSphere Application Server version 8.5 plugin
- Jython deployment framework
- Jython framework advanced use
- Search and Replace using the SearchReplaceTask
- WebSphere best practice Scenarios