How to install Websphere Application Server Features using imcl and response file

How to install Websphere Application Server Features using imcl and response file


Purpose – To install and remove WebSphere Application Server ND v9 product features using imcl and response files

Pre-requisites
RHEL or CentOS 7
Feature available for installation –
          EJBDeploy tool for pre-EJB 3.0 modules
Application with pre-EJB 3.0 modules – For enterprise applications containing EJB modules based on specifications before EJB 3.0, which are not supported by Java EE 7, will need to install EJBDeploy tool to generate the deployment code for enterprise beans.
Application with EJB 3.0 modules and latest – For enterprise applications, which are developed using EJB 3.0 modules and later EJBDeploy tool, is not required. WebSphere Application server uses a new feature called JITDeploy, which automatically generates the deployment code for enterprise beans when the application starts.
EJB modules in a Java EE 7 application uses JITDeploy by default even if they are based on specifications before EJB 3.0 if EJBDeploy tool is not installed and utilized.
          Stand-alone thin clients, resource adapters, and embeddable containers
IBM thin clients provide a set of clients for various technologies such as JAX-WS, JAX-RPC, JAX-RS, XML, EJB, JPA, JMS, and more.
IBM resource adapters provide resource adapters for JMS.
Embeddable EJB containers provide a JAR file that can be used to run enterprise beans in stand-alone Java SE environment.
          Sample applications
Contains sample applications for learning and demonstration purpose
Procedure
Here we are going to assume that you have the WebSphere Application Server ND v9 product is installed at following location show below. Also we are going see how we can install a particular feature or a set of features using both imcl utility and using response.
WAS_HOME – /opt/IBM/WebSphere9
ECLIPSE_HOME – /opt/IBM/InstallationManager/eclipse/tools
Step1: List out the features that are currently installed
[root@desktop1 tools]# ./imcl listInstalledPackages
com.ibm.cic.agent_1.8.5000.20160506_1125
com.ibm.java.jdk.v8_8.0.5000.20170906_1259
com.ibm.websphere.ND.v90_9.0.4.20170523_1327
[root@desktop1 tools]# ./imcl listInstalledFeatures com.ibm.websphere.ND.v90
ejbdeploy
embeddablecontainer
thinclient
Step2: Install a particular feature using imcl
Here let’s try to install samples application feature
[root@desktop1 tools]# ./imcl modify com.ibm.websphere.ND.v90 -addFeatures samples -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.ND.v90-installationDirectory /opt/IBM/WebSphere9 -secureStorageFile /opt/IBM/InstallationManager/secureStorageFile.txt
Modified com.ibm.websphere.ND.v90_9.0.4.20170523_1327 in the /opt/IBM/WebSphere9 directory.
[root@desktop1 tools]# ./imcl listInstalledFeatures com.ibm.websphere.ND.v90
ejbdeploy
embeddablecontainer
samples
thinclient
[root@desktop1 tools]# ls -ld /opt/IBM/WebSphere9/samples/
drwxr-xr-x. 3 root root 30 Sep 28 02:05 /opt/IBM/WebSphere9/samples/
Step3: Uninstall a particular feature using imcl
Let us try to uninstall two features ‘embeddablecontainer’ and ‘thinclient’ now using imcl
[root@desktop1 tools]# ./imcl modify com.ibm.websphere.ND.v90 -removeFeatures thinclient,embeddablecontainer -repositories http://www.ibm.com/software/repositorymanager/com.ibm.websphere.ND.v90 -installationDirectory /opt/IBM/WebSphere9 -secureStorageFile /opt/IBM/InstallationManager/secureStorageFile.txt
Modified com.ibm.websphere.ND.v90_9.0.4.20170523_1327 in the /opt/IBM/WebSphere9 directory.
[root@desktop1 tools]# ./imcl listInstalledFeatures com.ibm.websphere.ND.v90
ejbdeploy
samples
Step4: Install a particular feature using response file
Now, let try to install the removed features using a response file
Response File –
[root@desktop1 tools]# cat install_features.txt
<?xml version=”1.0″ encoding=”UTF-8″?>
<agent-input clean=’true’ temporary=’true’>
<server>
<repository location=”http://www.ibm.com/software/repositorymanager/com.ibm.websphere.ND.v90″ />
</server>
<install modify=’true’>
<offering id=’com.ibm.websphere.ND.v90′
  profile=’IBM WebSphere Application Server V9.0′
  features=’thinclient,embeddablecontainer’/>
</install>
<uninstall modify=’true’>
<offering id=’com.ibm.websphere.ND.v90′
  profile=’IBM WebSphere Application Server V9.0′
  features=’samples’/>
</uninstall>
<profile id=’IBM WebSphere Application Server V9.0′
  installLocation=’/opt/IBM/WebSphere9′>
<data key=’eclipseLocation’ value=’/opt/IBM/InstallationManager/eclipse/tools’/>
<data key=’user.import.profile’ value=’false’/>
<data key=’cic.selector.nl’ value=’en’/>
</profile>
</agent-input>
[root@desktop1 tools]# ./imcl -acceptLicense input /opt/IBM/InstallationManager/install_features.txt -secureStorageFile /opt/IBM/InstallationManager/secureStorageFile.txt
Modified com.ibm.websphere.ND.v90_9.0.4.20170523_1327 in the /opt/IBM/WebSphere9 directory.
[root@desktop1 tools]# ./imcl listInstalledFeatures com.ibm.websphere.ND.v90
ejbdeploy
embeddablecontainer
thinclient
As you can see, we have removed the samples feature and installed thinclient and embeddablecontainer
Step5: Uninstall a particular feature using response file
Now lets try to uninstall the thinclient feature
Response File –
[root@desktop1 tools]# cat uninstall_features.txt
<?xml version=”1.0″ encoding=”UTF-8″?>
<agent-input clean=’true’ temporary=’true’>
<server>
<repository location=”http://www.ibm.com/software/repositorymanager/com.ibm.websphere.ND.v90″ />
</server>
<uninstall modify=’true’>
<offering id=’com.ibm.websphere.ND.v90′
  profile=’IBM WebSphere Application Server V9.0′
  features=’thinclient’/>
</uninstall>
<profile id=’IBM WebSphere Application Server V9.0′
  installLocation=’/opt/IBM/WebSphere9′>
<data key=’eclipseLocation’ value=’/opt/IBM/InstallationManager/eclipse/tools’/>
<data key=’user.import.profile’ value=’false’/>
<data key=’cic.selector.nl’ value=’en’/>
</profile>
</agent-input>
[root@desktop1 tools]# ./imcl -acceptLicense input /opt/IBM/InstallationManager/uninstall_features.txt -secureStorageFile /opt/IBM/InstallationManager/secureStorageFile.txt
Modified com.ibm.websphere.ND.v90_9.0.4.20170523_1327 in the /opt/IBM/WebSphere9 directory.
[root@desktop1 tools]# ./imcl listInstalledFeatures com.ibm.websphere.ND.v90
ejbdeploy
embeddablecontainer
Please note, the list of the files that get generated once you install thinclient, embeddablecontainer
Features
[root@desktop1 tools]# ls -ltr /opt/IBM/WebSphere9/runtimes/*thinclient*
-rw-r–r–. 1 root root 51643118 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.jaxws.thinclient_9.0.jar
-rw-r–r–. 1 root root 27194482 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.webservices.thinclient_9.0.jar
-rw-r–r–. 1 root root 12040839 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.jpa-2.1.thinclient_9.0.jar
-rw-r–r–. 1 root root 11398715 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.jaxrs2.0.thinclient_9.0.jar
-rw-r–r–. 1 root root 10011633 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.jpa-2.0.thinclient_9.0.jar
-rw-r–r–. 1 root root  3256884 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.jaxrs1.1.thinclient_9.0.jar
-rw-r–r–. 1 root root 21206568 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.ejb.thinclient_9.0.jar
-rw-r–r–. 1 root root 17396877 Sep 28 02:53 /opt/IBM/WebSphere9/runtimes/com.ibm.xml.thinclient_9.0.jar
[root@desktop1 tools]# ls -ltr /opt/IBM/WebSphere9/runtimes/*embeddableContainer*
-rw-r–r–. 1 root root 18583589 Sep 28 02:24 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.ejb.embeddableContainer_nls_9.0.jar

-rw-r–r–. 1 root root 15706320 Sep 28 02:24 /opt/IBM/WebSphere9/runtimes/com.ibm.ws.ejb.embeddableContainer_9.0.jar


Hope you enjoyed reading this article. Thank you.