Transcript

The  Silence  of  the  Installers  

How  silent  installers  help  you  automate  IBM  Connec:ons  

deployments  

About  me  

–  IBM  So>ware  Consultant  at  Fritz  &  Macziol  – Specialized  in  the  IBM  Connec:ons  and  IBM  Domino  Infrastructure  

– Bavarian  – Linux  and  Scrip:ng  Lover,  Blogger  – Speaker  at:  

3  

About  me  

– System  Architect@WebGate  – Specialized  in  IBM  Connec:ons  and  IBM  Same:me  

– Swiss  Bavarian  – Linux  and  Scrip:ng  Lover,  Blogger  – Speaker  at:  

4  

Goal  •  Give  you  an  idea  on  how  to    automate  a  single    box  installa:on  (Linux)  

Prerequisites  for  the  Automa:on  

•  Needed  Linux  libraries  already  installed  

•  Create  a  well    structured  install  folder  with  all  needed  source  files    

Connec:ons  Prerequisites  

•  IBM  Installa:on  Manager  (IIM)  •  IBM  WebSphere  Applica:ons  Server  8.5.5.2  (including  IHS  and  needed  Fix)  

•  Configure  WAS  (Dmgr,  LDAP,  security…)  •  IBM  DB2  10.1  FP4  (import  license)  •  Create  users  and  DBs  (codepage  1208)  •  IBM  TDI  7.1.1  (including  Fixpack  3)  •  Configure  LDAP-­‐Profile  mapping  •  Populate  Profiles    

Connec:ons  Installa:on  

•  IBM  Connec:ons  5  •  IBM  Connec:ons  5  CR1    

Post-­‐Installa:on  

•  Configure  IHS  •  Create  keystores  and  certs  •  Exchanging  cer:ficates  •  Configure  IHS  for  SSL  •  Configure  Connec:ons:  –  Configure  Admins  –  IHS  –  File  downloads  –  Dic:onaries…  

Silent  Installs  

•  Command  Line  •  Define  all  install  parameters  through:  – Command  line  arguments/op:ons  – Templates/Response  Files  – Combina:on  

Example:  ./imcl -input /opt/InstallFiles/ResponseFiles/install_conn5.xml -log /opt/InstallFiles/log/Conn5.xml -silent -acceptLicense -showProgress

How  to  install  IIM  silently  

•  We  only  want  to  define  Installa:on  Directory  and  log  path  

•  Can  be  easily  done  with  command  line  arguments  hap://www-­‐01.ibm.com/support/knowledgecenter/api/content/SSDV2W_1.8.0/com.ibm.silen:nstall12.doc/topics/r_silent_inst_cmd_arg.html  

 ./installc -log /opt/InstallationFiles/log/IIM.log -acceptLicense -installationDirectory /opt/IBM/IIM –showProgress

Always  use  the  latest  32bit  IIM  version  (1.8  as  of  today)  

How  to  install  WAS  silently  

•  Has  to  be  installed  with  IIM  •  A  lot  of  parameters  have  to  be  defined    (paths,  install  files,  …)  

•  Not  all  of  them  can  be  provided  by  command  line  arguments  

-­‐>  We  will  use  a  response  file    •  But  first  we  have  to  create  the  response  file  

Create  a  response  file  for  WAS  

Can  only  be  done  through  GUI  /opt/IBM/IIM/eclipse/IBMIM -record /opt/InstallFiles/ResponseFiles/install_WAS.xml -skipInstall /opt/InstallFiles/Skipped

Create  a  response  file  for  WAS  

•  Define  what  should  be  installed  (WAS  will  directly  be  installed  with  FP2)  

Create  a  response  file  for  WAS  

•  Select  the  fix  

Create  a  response  file  for  WAS  Iden:fy  all  variables  which  should  be  customisable    <?xml version='1.0' encoding='UTF-8'?> <agent-input> <variables> <variable name='sharedLocation' value='/opt/IBM/IMShared'/> </variables> <server> <repository location='/opt/InstallFiles/WAS/Server'/> <repository location='/opt/InstallFiles/WAS/FixPacks/FP0000001'/> <repository location='/opt/InstallFiles/WAS/Fixes/8.5.5.1-ws-was-ifpm94437.zip'/> <repository location='/opt/InstallFiles/WAS/Fixes/8.5.5.1-ws-wasprod-ifpi15998.zip'/> <repository location='/opt/InstallFiles/WAS/Fixes/8.5.5.1-ws-wasprod-ifpm91417.zip'/> <repository location='/opt/InstallFiles/WAS_Suppl/Fixpacks/FP0000001'/> <repository location='/opt/InstallFiles/WAS_Suppl/Server'/> </server>          

Create  a  response  file  for  WAS  <profile id='IBM HTTP Server V8.5' installLocation='/opt/IBM/HTTPServer'> <data key='eclipseLocation' value='/opt/IBM/HTTPServer'/> <data key='user.import.profile' value='false'/> <data key='cic.selector.os' value='linux'/> <data key='cic.selector.arch' value='x86'/> <data key='cic.selector.ws' value='gtk'/> <data key='user.ihs.http.server.service.name' value='none'/> <data key='user.ihs.httpPort' value='80'/> <data key='user.ihs.installHttpService' value='false'/> <data key='cic.selector.nl' value='en'/> </profile> <install modify='false'> <!-- IBM HTTP Server for WebSphere Application Server 8.5.5.1 --> <offering profile='IBM HTTP Server V8.5' id='com.ibm.websphere.IHS.v85' version='8.5.5001.20131018_2242' features='core.feature,arch.64bit' installFixes='none'/> </install>

Create  a  response  file  for  WAS  <profile id='IBM WebSphere Application Server V8.5' installLocation='/opt/IBM/WebSphere/AppServer'> <data key='eclipseLocation' value='/opt/IBM/WebSphere/AppServer'/> <data key='user.import.profile' value='false'/> <data key='cic.selector.os' value='linux'/> <data key='cic.selector.arch' value='x86'/> <data key='cic.selector.ws' value='gtk'/> <data key='cic.selector.nl' value='en'/> </profile> <install modify='false'> <!-- 8.5.5.1-WS-WAS-IFPM94437 --> <offering profile='IBM WebSphere Application Server V8.5' id='8.5.5.1-WS-WAS-IFPM94437'/> <!-- 8.5.5.1-WS-WASProd-IFPI15998 --> <offering profile='IBM WebSphere Application Server V8.5' id='8.5.5.1-WS-WASProd-IFPI15998'/> <!-- 8.5.5.1-WS-WASProd-IFPM91417 --> <offering profile='IBM WebSphere Application Server V8.5' id='8.5.5.1-WS-WASProd-IFPM91417'/> <!-- IBM WebSphere Application Server Network Deployment 8.5.5.1 --> <offering profile='IBM WebSphere Application Server V8.5' id='com.ibm.websphere.ND.v85' version='8.5.5001.20131018_2242' features='core.feature,ejbdeploy,thinclient,embeddablecontainer,com.ibm.sdk.6_64bit' installFixes='none'/> </install>

Create  a  response  file  for  WAS   <profile id='Web Server Plug-ins for IBM WebSphere Application Server V8.5' installLocation='/opt/IBM/WebSphere/Plugins'> <data key='eclipseLocation' value='/opt/IBM/WebSphere/Plugins'/> <data key='user.import.profile' value='false'/> <data key='cic.selector.os' value='linux'/>

<data key='cic.selector.arch' value='x86'/> <data key='cic.selector.ws' value='gtk'/> <data key='cic.selector.nl' value='en'/> </profile> <install modify='false'> <!-- Web Server Plug-ins for IBM WebSphere Application Server 8.5.5.1 --> <offering profile='Web Server Plug-ins for IBM WebSphere Application Server V8.5' id='com.ibm.websphere.PLG.v85' version='8.5.5001.20131018_2242' features='core.feature,com.ibm.jre.6_64bit' installFixes='none'/> </install>

Create  a  response  file  for  WAS  <preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='${sharedLocation}'/> <preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>

<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='45'/> <preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/> <preference name='offering.service.repositories.areUsed' value='true'/> <preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>

<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>

<preference name='http.ntlm.auth.kind' value='NTLM'/> <preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/> <preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/> <preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/> <preference name='PassportAdvantageIsEnabled' value='false'/>

<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='false'/> <preference name='com.ibm.cic.agent.ui.displayInternalVersion' value='false'/> <preference name='com.ibm.cic.common.sharedUI.showErrorLog' value='true'/> <preference name='com.ibm.cic.common.sharedUI.showWarningLog' value='true'/>

<preference name='com.ibm.cic.common.sharedUI.showNoteLog' value='true'/> </agent-input>

Create  a  response  file  for  WAS  Replace  all  variables  with  placeholders  and  add  them  to  the  beginning  of  the  response  file  … <agent-input acceptLicense='true'> <variables> <variable name='HTTP'/> <variable name='WAS_DIR'/> <variable name='WAS_PLUGIN_DIR'/> <variable name='WAS_TOOL_DIR'/> <variable name='IIM_SHARED'/> <variable name='INSTALL_PATH'/> </variables> … …<repository location='${INSTALL_PATH}WAS\WASND_v8.5.5'/>… …<profile id='IBM HTTP Server V8.5' installLocation='${HTTP}’> <data key='eclipseLocation' value='${HTTP}'/>.. …<profile id='IBM WebSphere Application Server V8.5' installLocation='${WAS_DIR}’> <data key='eclipseLocation' value='${WAS_DIR}'/>…  

Run  a  silent  install  of  WAS  Now  run  a  silent  install  with  the  template  and  provide  all  needed  variables  (one  line)    /opt/IBM/IIM/eclipse/tools/imcl -input /opt/InstallFiles/ResponseFiles/install_WAS.xml -acceptLicense -showProgress -variables HTTP=/opt/IBM/HTTPServer,WAS_DIR=/opt/IBM/WebSphere/AppServer,WAS_PLUGIN_DIR=/opt/IBM/WebSphere/Plugins,WAS_TOOL_DIR=/opt/IBM/WebSphere/Toolbox,IIM_SHARED=/opt/IBM/IMShared,INSTALL_PATH=/opt/InstallFiles/

 

Configure  WAS  •  Create  Cell  (Dmgr,  AppServer)  •  Configure  LDAP  •  Define  Admin  •  Enable  Applica:on  security  •  Define  SSO  domain    Will  be  done  with  some  python  scripts  and  wsadmin  -­‐>  Use  Connec:ons  Community  Scripts  to  speed  up  installa:on,  configura:on  and  documenta:on  

Configure  -­‐  Example,  create_dmgr.py  print 'Create Deployment Manager' subprocess.call(WAS_DIR + '/bin/manageprofiles.sh -create -profileName ' + PROFILE_NAME +' -profilePath ' + WAS_PROFILE_DIR + '/' + PROFILE_NAME + ' -templatePath ' + WAS_DIR + '/profileTemplates/cell/dmgr -nodeName ' + NODE_NAME + ' -cellName ' + CELL_NAME + ' -hostName ' + HOST + ' -adminUserName ' + ADMIN_USER + ' -adminPassword ' + ADMIN_PASSWORD + ' -appServerNodeName ' + APP_NODE_NAME + ' -enableAdminSecurity true -nodeProfilePath ' + WAS_PROFILE_DIR + '/' + NODE_PROFILE_NAME + ' -omitAction "samplesInstallandConfig defaultAppDeployAndConfig"', shell=True) print 'Create Node' subprocess.call(WAS_DIR + '/bin/manageprofiles.sh -create -profileName ' + NODE_PROFILE_NAME + ' -profilePath' + WAS_PROFILE_DIR + '/' + NODE_PROFILE_NAME + ' -templatePath ' + WAS_DIR + '/profileTemplates/cell/default -nodeName ' + NODE_NAME + ' -cellName ' + CELL_NAME + ' -hostName ' + HOST + ' -adminUserName ' + ADMIN_USER + ' -adminPassword ' + ADMIN_PASSWORD + ' -appServerNodeName ' + APP_NODE_NAME + ' -dmgrProfilePath ' + WAS_PROFILE_DIR + '/' + PROFILE_NAME + ' -enableAdminSecurity true -omitAction "samplesInstallandConfig defaultAppDeployAndConfig"', shell=True) print 'Preparing the Scripts with variables' shutil.copy2(INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap_template.py', INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap.py') replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap.py','@LOGIN_PROPERTIES@', LOGIN_PROPERTIES) replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap.py','@LDAP_HOST@', LDAP_HOST) replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap.py','@LDAP_BIND_USER@', LDAP_BIND_USER) replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr_ldap.py','@LDAP_BIND_PASSWORDR@', LDAP_BIND_PASSWORD) shutil.copy2(INSTALL_PATH + 'InstallScripts/configure_dmgr_template.py', INSTALL_PATH + 'InstallScripts/configure_dmgr.py') replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr.py','@ADMIN_DN@', ADMIN_DN) replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr.py','@ADMIN_UID@', ADMIN_UID) replaceText(INSTALL_PATH + 'InstallScripts/configure_dmgr.py','@SSO_DOMAIN@', SSO_DOMAIN) print 'starting DMGR' subprocess.call(WAS_DIR + '/bin/startManager.sh', shell=True) subprocess.call(WAS_DIR + '/bin/wsadmin.sh -lang jython -username ' + ADMIN_USER + ' -password ' + ADMIN_PASSWORD + ' -f ' + INSTALL_PATH +'InstallScripts/configure_dmgr_ldap.py', shell=True) print 'stopping DMGR' subprocess.call(WAS_DIR + '/bin/stopManager.sh -username ' + ADMIN_USER + ' -password ' + ADMIN_PASSWORD, shell=True) print 'starting DMGR' subprocess.call(WAS_DIR + '/bin/startManager.sh', shell=True) subprocess.call(WAS_DIR + '/bin/wsadmin.sh -lang jython -username ' + ADMIN_USER + ' -password ' + ADMIN_PASSWORD + ' -f ' + INSTALL_PATH +'InstallScripts/configure_dmgr.py', shell=True) print 'stopping DMGR' subprocess.call(WAS_DIR + '/bin/stopManager.sh -username ' + ADMIN_USER + ' -password ' + ADMIN_PASSWORD, shell=True) print 'starting DMGR' subprocess.call(WAS_DIR + '/bin/startManager.sh', shell=True) subprocess.call(WAS_PROFILE_DIR + '/' + NODE_PROFILE_NAME + '/bin/syncNode.sh ' + HOST + ' -username ' + ADMIN_USER + ' -password ' + ADMIN_PASSWORD, shell=True)

Create  a  response  files  for  DB2  

Can  be  done  with  DB2  Setup  wizard  Remark:  Start  with  the  Fixpack  from  the  beginning  (don’t  forget  to  import  license  key!)  /opt/InstallFiles/DB2/universal/db2setup

Create  a  response  file  for  TDI/Connec:ons  

Can  be  done  with  TDI  Setup  wizard  ./install_tdiv711_linux_x86_64.bin -r /opt/InstallFiles/ResponseFiles/install_TDI2.rsp

Can  be  done  with  the  IIM  /opt/IBM/IIM/eclipse/IBMIM -record /opt/InstallFiles/ResponseFiles/install_Conn5.xml -skipInstall /opt/InstallFiles/Skipped

Run  a  silent  install  DB2  (one  line):  /opt/InstallFiles/DB2/universal/db2setup -r /opt/InstallFiles/ResponseFiles/install_DB2.rsp -l /opt/IBM/log/db2.log  

TDI  (one  line):  /opt/InstallFiles/TDI/Server/linux_x86_64/install_tdiv711_linux_x86_64.bin -i silent –f /opt/InstallFiles/ResponseFiles/install_TDI.rsp  

Connec:ons  (one  line):  /opt/IBM/IIM/eclipse/tools/imcl -input /opt/InstallFiles/ResponseFiles/install_conn5_template.xml -log /opt/InstallFiles/log/Conn5.xml -silent -acceptLicense -showProgress

 

Configura:on  of  DB2/TDI  

•  Create  Connec:ons  DBs  •  Enable  Online  Backup  •  Schedule  Backups  •  Extract  TDIsol  •  Create  sync  mapping  •  Sync  •  Schedule  sync    

Configura:on  of  IBM  Connec:ons  

•  Define  HIS  •  File  download  through  IHS  •  Heap  Sizes  •  Max/Min  datasources  •  J2EE  security  roles  •  …  

Let  put  this  all  together  Combine  Steps  •  Create  a  Python  script    

for  the  menu  which    combines  all  scripts  

•  Work  with  templates  •  Replace  placeholders  in  

these  templates  through  scrip:ng  and  create  an  actual  response  file  

•  Execute  silent  installers  with  command  line    arguments  and    response  files  


Recommended