Must-know wsadmin commands for IBM Connections

it’s important to know where IBM WebSphere Application Server (WAS) is installed and more importantly where the profiles are located. For more on WAS terminology see WebSphere terminology for newcomers. Think of the profiles as data directories for a partioned IBM Domino Server. You will in all deployments of IBM Connections have at least two profiles – one for the Deployment Manager (controlling everything incl. configuration) and one for the actual application server running the IBM Connections applications. In smaller deployments of IBM Connections you’ll normally have them on the same node (again see the terminology).

Below we’ll assume that WAS is installed in C:\IBM\WebSphere\AppServer on Windows and /opt/IBM/WebSphere/AppServer on *nix (Linux and AIX). The profiles will by default be in the “profiles” subdirectory (e.g. /opt/IBM/WebSphere/AppServer/profiles) although they may be in other locations (I normally do that). We will also assume that the Deployment Manager profile is called “dmgr01”.

A word on wsadmin. All configuration files in wsadmin must be checked out and in in the same session. This means that you should not exit wsadmin to make the changed but leave the command running in the terminal. This is easy in a GUI like Windows but harder on *nix. On *nix one approach could be to send wsadmin to the background while doing the edit like this:

  • Check out the config from wsadmin (see more below)
  • Press Ctrl-Z on the keyboard (will send current command to the background and will show the job name on the screen:
    [1]+ Stopped ./wsadmin.sh …
  • Do the edits using editor e.g. vi
  • Bring wsadmin to the front again using the fg command: fg <job number> (above this is 1)
    fg 1
  • Check the configuration back in

Now a cheat-sheet of commands…

  • Start wsadmin
    • Change to “bin” directory in the Deployment Manager profile directory
      • Windows: C:\IBM\WebSphere\AppServer\profiles\dmgr01\bin
      • *nix: /opt/IBM/WebSphere/AppServer/profiles/dmgr01/bin
    • Setup command line
      • Windows: setupCmdLine(.bat)
      • *nix: ./setupCmdLine.sh
    • Start the wsadmin tool specifying the programming language to use (Jython) and username and password of an admin (normally wasadmin)
      • Windows: wsadmin(.bat) -lang jython -user wasadmin -password <password>
      • *nix: ./wsadmin.sh -lang jython -user wasadmin -password <password>
  • Work with Connections configuration
    • Outsite of wsadmin find a temp-directory e.g. c:\temp\wsadmin on Windows and /tmp/wsadmin on *nix
    • Init IBM Connections configuration service: execfile(“connectionsConfig.py”
    • Get the cell name: AdminControl.getCell()
    • Checkout configuration to temp-directory for cell (assume cell is called “LCCell01”)
      • Windows: LCConfigService.checkOutConfig(“c:/temp/wsadmin”, “LCCell01”)
      • *nix: LCConfigService.checkOutConfig(“/tmp/wsadmin”, “LCCell01”)
    • Edit file (LotusConnections-Config.xml) in temp-directory. As a matter of habit always update the timestamp at the button of the file (format is yyyyMMdd.HHmmss)
    • Check configuration back in
      • Windows: LCConfigService.checkInConfig(“c:/temp/wsadmin”, “LCCell01”)
      • *nix: LCConfigService.checkInConfig(“/tmp/wsadmin”, “LCCell01”)
  • Work with general proxy configuration
    • Init Connections config service: execfile(“connectionsConfig.py”)
    • Checkout configuration as above but use the command to check out the proxy configuration: LCConfigService.checkOutProxyConfig(“/tmp/wsadmin”, “LCCell01”)
    • Edit file (/tmp/wsadmin/proxy-config.tpl) and save back.
    • Check configuration back in: LCConfigService.checkInProxyConfig(“/tmp/wsadmin”, “LCCell01”)
  • Work with Profiles or Communities widgets configuration
    • Init communities admin service: execfile(“communitiesAdmin.py”)
    • Checkout configuration widget config: CommunitiesConfigService.checkOutWidgetsConfig(“/tmp/wsadmin”, “LCCell01”)
    • Edit file (/tmp/wsadmin/widgets-config.xml) and save back.
    • Check configuration back in: CommunitiesConfigService.checkInWidgetsConfig(“/tmp/wsadmin”, “LCCell01”)
  • Work with notification configuration
    • Init Connections config service: execfile(“connectionsConfig.py”)
    • Checkout notification configuration: LCConfigService.checkOutNotificationConfig(“/tmp/wsadmin”, “LCCell01”)
    • Edit file (/tmp/wsadmin/notification-config.xml) and save back.
    • Check configuration back in: LCConfigService.checkInNotificationConfig(“/tmp/wsadmin”, “LCCell01”)
  • Sync WAS nodes from wsadmin
    • Read the complete node name of “myAppNode” into variable: Sync1 = AdminControl.completeObjectName(‘type=NodeSync,node=myAppNode,*’)
    • Do the sync: AdminControl.invoke(Sync1, ‘sync’)