Commerce

Managing WebSphere Application Server with Puppet

Manages the deployment and configuration of IBM WebSphere Application Server 7.0 . This module manages the following IBM Websphere cell types:

  • Deployment Managers (DMGR)
  • Application Servers
  • Cell profiles
  • Custom profiles
  • IHS Servers

Beginning with websphere_application_server prereqcheck

To get started, declare the base class on any server that will use this module: DMGR, App Servers, or IHS. We need to complete the prerequisites for creating webspehere I nstance .

class websphere7::prereqcheck {

file { [‘/opt/IBM’,’/opt/IBM/WebSphere’]:

ensure => ‘directory’,

owner => ‘wasadmin’,

group => ‘wasadmin’,

}

user { ‘wasadmin’:

name => ‘wasadmin’,

ensure => ‘present’,

uid   => ‘2001’,

password => ‘$1$UCXtPIXj$euQ4gY8awQQXQdp1uIc6H/’,

notify => File[‘/home/wasadmin/.bash_profile’],

}

file { ‘/home/wasadmin’:

ensure => ‘directory’,

owner => ‘wasadmin’,

group => ‘wasadmin’,

require => User[‘wasadmin’],

}

file { ‘/home/wasadmin/.bash_profile’:

ensure => ‘present’,

replace => false,

subscribe => File[‘/home/wasadmin’],

}

}

Creating a websphere_application_server instance/Base Instalation.

The word “instance” used throughout this module basically refers to a complete installation of WebSphere Application Server. Ideally, you’d just have a single instance /base instalaton  of WebSphere on a given system. This module, however, does offer the flexibility to have multiple installations.

To install WebSphere using an installation zip:

Note: The example below assumes that the WebSphere installation zip file has been downloaded and extracted to /data/ecom/was/WAS/disk2/WAS and contains installable binaries .

Creating Profiles

Once the base software is installed, create a profile. The profile is the runtime environment. A server can potentially have multiple profiles. A DMGR profile is ultimately what defines a given “cell” in WebSphere.. in this below example we are about to creating the dmgr profie.

class websphere7::profile::dmgr (

String $instance_base=”/opt/IBM/WebSphere/AppServer”,

String $template_path=”${instance_base}/profileTemplates/management”,

String $profile_name=dmgr,

String $profile_base=”${instance_base}/profiles”,

String $node_name=’dmgr_node’,

String $host_name=’techaspect48′,

String $cell_name=dmgr_cell,

String $user = ‘root’,

) {

notice (“running dmgr.pp manifest”)

$cmd = “${instance_base}/bin/manageprofiles.sh -create -profileName ${profile_name} -profilePath ${profile_base}/${profile_name} -templatePath ${$template_path} -nodeName ${node_name} -hostName ${host_name} -cellName ${cell_name}”

exec { ‘Dmgr Profile’:

command => $cmd,

cwd     => “${instance_base}/bin”,

creates => “${instance_base}/profiles/${profile_name}/logs/AboutThisProfile.txt”,

user   => $user,

timeout => 0,

}

}

About The Author

Leave a Reply

*