Managing WebSphere Application Server with Puppet

Now you can use Puppet to install and configure IBM's WebSphere Application Server (WAS). What is WAS? It is a middleware framework developed by IBM as a web application server for Java applications in a J2EE environment.

IBM provides two methods with which you can install and manage WAS. For a simpler streamlined deployment of WAS, there is WAS Liberty. Liberty offers flexibility and streaming fix packs for updates.

For more complicated installations that take advantage of the full API and admin console, administrators would typically opt for traditional WAS. Traditional WAS, while more fully featured and powerful, requires a more hands-on approach in deployment. Installing and managing traditional WAS is where our new Puppet Supported WebSphere Application Server module comes into play.

What does the module do?

If you’re a Puppet Enterprise user and interested in deploying traditional WAS, the module supports the installation and configuration of the base WAS software and fix pack management. In addition to the software, the module can also manage and deploy the various node types that comprise a WAS cell. (Not sure what a WAS cell is? See the section "What is a WAS cell?" below.) Have multiple WAS cells to manage? Each cell running a different version of WAS? No problem, the module is built to handle multiple instances and unique installations on each instance.

Getting started

To get started with managing WAS with this Puppet module, simply declare the base class:

class { 'websphere_application_server':
  user     => 'webadmin',
  group    => 'webadmins',
  base_dir => '/opt/IBM',
}

This sets up the base directory and user information with which we’ll start managing your WAS instances.

To create a WAS instance:

websphere_application_server::instance { 'WebSphere85':
  target       => '/opt/IBM/WebSphere85/AppServer',
  package      => 'com.ibm.websphere.NDTRIAL.v85',
  version      => '8.5.5000.20130514_1044',
  profile_base => '/opt/IBM/WebSphere85/AppServer/profiles',
  repository   => '<path to WAS install dir>/repository.config',
}

The module also supports installing WAS via a response file:

websphere_application_server::instance { 'WebSphere85':
  profile_base => '/opt/IBM/WebSphere/AppServer/profiles',
  response     => '<path to WAS install dir>/was85_response.xml',

}

At this point, you now have a base installation to begin deploying a WAS cell.

What is a WAS cell?

A WAS cell is composed of a cluster of services, typically consisting of a Deployment Manager and one or more application servers. A WAS Cell can be deployed on a single physical server or on many servers. Our module can handle either situation, through the management of WAS profiles.

The Deployment Manager is a service that provides centralized administration of Application Servers, in addition to hosting the admin console. With our module, creating a Deployment Manager profile is the first step.

websphere_application_server::profile::dmgr { 'PROFILE_DMGR_01':
  instance_base => '/opt/IBM/WebSphere85/AppServer',
  profile_base  => '/opt/IBM/WebSphere85/AppServer/profiles',
  cell          => 'CELL_01',
  node_name     => 'dmgrNode01.example.com',
}

With a Deployment Manager profile in place, we can create a cluster and start managing application servers.

websphere_application_server::cluster { 'MyCluster01':
  profile_base => '/opt/IBM/WebSphere85/AppServer/profiles',
  dmgr_profile => 'PROFILE_DMGR_01',
  cell         => 'CELL_01',
  require      => Websphere_application_server::Profile::Dmgr['PROFILE_DMGR_01'],
}

Application servers are where the work happens. In a WAS deployment, each application server represents a service that runs a Java runtime environment, handling requests to Java applications that perform business logic. Creating an application server profile is as simple as it was creating the profile for the deployment manager.

websphere_application_server::profile::appserver { 'PROFILE_APP_001':
  instance_base  => '/opt/IBM/WebSphere85/AppServer',
  profile_base   => '/opt/IBM/WebSphere85/AppServer/profiles',
  cell           => 'CELL_01',
  dmgr_host      => 'dmgrNode01.example.com',
  node_name      => 'appNode01',
}

Then you can add that application server to the cell cluster as a member.

websphere_application_server::cluster::member { 'AppServer01':
  ensure       => 'present',
  cluster      => 'MyCluster01',
  node_name    => 'appNode01',
  cell         => 'CELL_01',
  profile_base => '/opt/IBM/WebSphere85/AppServer/profiles',
  dmgr_profile => 'PROFILE_DMGR_01',
  require      => Websphere_application_server::Profile::Appserver['PROFILE_APP_01'],
}

As a middleware framework, WAS provides flexibility in how you want to deploy your J2EE environment. Perhaps you want to attach your application server to an external JDBC data source, manage or use a specific Java SDK, or install the IBM HTTP Server to serve static content. Whatever you want to do, the module has the features to support it.

Fix pack management

Those familiar with IBM WAS are likely familiar with the concept of fix packs. For those who are not, fix packs are product update packages, typically provided as ZIP files that are installed by IBM’s proprietary installation manager. To aid in managing these fix packs, we’ve also built a companion module called puppetlabs-ibm_installation_manager that handles the installation of IBM Installation Manager as well as providing a custom type to define and manage IBM packages such as WAS fix packs. This module installs not only the base WAS software, but also any defined fix packs that are required.

For example, to define and apply an IBM fix pack in the example installation shown above:

ibm_pkg { 'WebSphere_8554':
  ensure        => 'present',
  package       => 'com.ibm.websphere.NDTRIAL.v85',
  version       => '8.5.5004.20141119_1746',
  target        => '/opt/IBM/WebSphere85/AppServer',
  repository    => '/mnt/myorg/was_8554/repository.config',
  package_owner => 'wsadmin',
  package_group => 'wsadmins',
  require       => Websphere_application_server::Instance['WebSphere85'],

}

Where can I get this module?

The puppetlabs-websphere_application_server module is available on the Puppet Forge for Puppet Enterprise customers running 2015.2.0 and newer. The module has been tested with WebSphere Application Server version 8.5.x and is supported on RedHat 6, RedHat 7, Ubuntu 14.04, and Ubuntu 16.04 operating systems.

Parting words

We’re excited to offer this module as a way to simplify deployments of complex enterprise software. We have targeted the traditional WAS deployments as a pain point and hope we have provided an easier way to deploy WAS, and retire those old setup scripts.

Bryan Jen is a senior software engineer at Puppet.

Learn more

Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.