Tuesday, November 26, 2019

imcl and manageProfile: some examples to work with IBM products from linux command line

Working on linux servers could "force" System Engineers to work with command line for several reasons:
  • automation (eg Ansible playbooks)
  • because it's quicker
  • security policy
  • GUI not available
and many more..

I thinked to blog some examples of this command because could be useful to be launched from shell or cold be integrated inside script/playbooks.

Installation Manager , has a dedicated shell utility available inside

/opt/IBM/InstallationManager/eclipse/tools/


IBM Installation manager setup and update from public repo

setup with logfile

./installc -log log_file -acceptLicense

update to the last release from IBM public repo


./imcl install com.ibm.cic.agent
Updated to com.ibm.cic.agent_1.9.1000.20191001_1228 in the /opt/IBM/InstallationManager/eclipse directory.

List Available package

imcl sintax is based on product name and protuct level included in the package.
Use the following command to extract this infos from repository in zip format or from repository.xml included ::
/imcl listAvailablePackages -repositories WAS_V9.0_SUP_HTTPSVR.zip
com.ibm.websphere.IHS.v90_9.0.0.20160526_1854

in this case IBM   IHS 9.0 FP0


Combined setup

In case of WAS 9,x components (WASND,IHS;IHS_PLG) its required a combined setup because the component needed must be installed together the Java JDK.

the following example you could setup IHS 9.0 with JDK 8.0

./imcl install com.ibm.websphere.IHS.v90_9.0.0.20160526_1854 com.ibm.java.jdk.v8_8.0.3000.20160526_1317
 -repositories WAS_V9.0_SUP_HTTPSVR.zip,SDKJAVA_TM_TE_V8.0_LINUX.zip -acceptLicense
Installed com.ibm.websphere.IHS.v90_9.0.0.20160526_1854 to the /opt/IBM/HTTPServer directory.
Installed com.ibm.java.jdk.v8_8.0.3000.20160526_1317 to the /opt/IBM/HTTPServer directory.


Rollback
Installation manager keep track of the sw version installed and permit to roolback to previous version with a single command


./imcl listInstalledPackages -rollbackVersions

com.ibm.websphere.IHS.v90_9.0.11.20190312_2048 : 9.0.9.20180906_1004,9.0.6.20171205_1311,9.0.5.20170918_1844,9.0.0.20160526_1854
the output of this command say we have 

IHS 9 FP11, that coudl be rolled back to FP9,FP6, FP5, FP0

the following comamnd rollback IHS from FP11 to Fp9

./imcl rollback com.ibm.websphere.IHS.v90_9.0.11.20190312_2048 9.0.9.20180906_1004

Fixpack setup

The following example will upgrade WebSphere Plugin to FP10 from local repo

./imcl install com.ibm.websphere.PLG.v90_9.0.10.20181119_1807 
-repositories /data/fp10/IHS/repository.xml -acceptLicense
Updated to com.ibm.websphere.PLG.v90_9.0.10.20181119_1807 in the /opt/IBM/WebSphere/Plugins directory.


WebSphere Cell
DMGR
from WAS bin directory  use the following example to create  a cell with a DMGR profile


./manageprofiles.sh -create 
-profileName WasND 
-profilePath /opt/IBM/WebSphere/AppServer/profiles/WasND 
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/management 
-serverType DEPLOYMENT_MANAGER 
-cellName cellName -nodeName NodeName -hostName FQDN 
-enableAdminSecurity true -adminUserName was9admin -adminPassword Password

Custom AppServer profile creation and federation

from WAS bin directory create an appserver profile

./manageprofiles.sh -create -defaultPorts -profileName AppSrv01 
-profilePath /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 
-templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/managed 
-hostName FQDN -nodeName nodeName -federateLater true

at this point DMGR should be tourned on and reachable and with following command  (launched from AppServer bin)  proceed with the federation

./addNode.sh dmgrFQDN 8879 -user was9admin -password Passw0rd
 Ricordatevi ovviamente di valorizzare in modo corretto i vari, cellName,hosName,nodeName e adminPassword !

All commands in this blogpost could be used on linux and windows with some minor change. 
This examples are showed with minimal options, but you could add a tons of options to imcl and manageProfile to specify all the details  needed.

 I invite you to read more details on official docs:
  

No comments:

Post a Comment