Running Admin Sample Scripts

This tutorial walks you through running the Bookstore and Acme administration scripts.

Prerequisites

If you want to run scripts, the installation directory cannot contain one or more spaces. For example, on Windows ActiveMatrix BusinessWorks™ should not be installed in the Program Files folder.

  1. Optional. Install Enterprise Message Service 8.x or higher if you want to run the Acme.com applications.
  2. Optional. Install PostgreSQL 9.3.x if you want to run the Bookstore sample.
  3. On Windows, you must install the latest Cygwin 64-bit version from http://www.cygwin.com/. Scripts must be executed with Cygwin. Install the Utils and Net package which contains the diff.exe and ssh.exe executables.
    • Select the Utils and Net packages and change the option from Default to Install. Refer to the following images that show the Utils and Net packages.
      Utils Package


      Net Package


Procedure

  1. Install ActiveMatrix BusinessWorks™ . For example,
    1. On Unix, install ActiveMatrix BusinessWorks™ into /opt/tibco/bw-6.x as TIBCO_HOME.
    2. On Windows, install TIBCO ActiveMatrix BusinessWorks into /opt/tibco/bw-6.x as TIBCO_HOME.
    From here onwards, the following instructions will use the directory path mentioned above to refer to certain installed files. Replace this path with the install directory of your choice.
    Important: On Windows OS, avoid installing TIBCO ActiveMatrix BusinessWorks in a directory with space. The product binary supports it, however, the scripts in ${BW_HOME}/scripts/admin and ${BW_HOME}/samples/core/admin are bash scripts and work best with directory paths without space.
  2. Install TIBCO Enterprise Administrator 2.0 or compatible version, in the same TIBCO_HOME. When TIBCO Enterprise Administrator installer prompts for JAVA_HOME path, point to /opt/tibco/bw-6.x/tibcojre64/1.7.0 on UNIX. On Windows, point to c:/tibco/bw-6.x/tibcojre64/1.7.0.
    You can install TIBCO Enterprise Administrator in a separate TIBCO_HOME. If you choose to do that, refer to Step 4.
  3. Install TIBCO Enterprise Message Service 8.1, or compatible version, in the same TIBCO_HOME. You can install TIBCO Enterprise Message Service in a separate TIBCO_HOME. If you have installed TIBCO Enterprise Message Service in a separate TIBCO_HOME, refer to Step 4.
  4. On UNIX: If you have installed TIBCO Enterprise Administrator and/or TIBCO Enterprise Message Service in a separate TIBCO_HOME than TIBCO ActiveMatrix BusinessWorks , open /opt/tibco/bw-6.x/bw/6.x/scripts/bashrc.sh in a text editor and adjust TEA_HOME and EMS_HOME to point to where you have installed them.
  5. This step is applicable only to Windows OS. From a proper text editor (Do not use Notepad.exe), open and edit c:/tibco/bw-6.x/bw/6.x/scripts/bashrc.sh.. Search and replace all occurrences of C:/ (or whatever letter drive you have installed TIBCO ActiveMatrix BusinessWorks ) with /cygdrive/c/ (or /cygdrive/<drive-letter-where-you-installed-bw6>).
    Adjust TEA_HOME and EMS_HOME to point to the location, where you have installed them.
  6. Source the bashrc.sh script from your ~/.bashrc or ~/.profile files.
    • On UNIX: Locate your ~/.bashrc or ~/.profile file and add the following line at the end:
      source /opt/tibco/bw-6.x/bw/6.x/scripts/bashrc.sh
    • On Windows: Edit the .bashrc file located at CYGWIN_HOME/home/<UserName> to add the following line at the end:
      source c:/tibco/bw-6.x/bw/6.x/scripts/bashrc.sh
  7. To verify that the environment variables are configured correctly, open a new command line window, navigate to <TIBCO_HOME>/bw/6.x/scripts/admin/, and run ./bw6env.sh. This script prints the required and optional environment variable configurations on the screen.
    Note: The script returns the environment variable configurations only if the environment variables are set correctly.
    The following is a sample output on UNIX:
    Admin@WINAA-2:admin admin$ ./bw6env.sh
    BW 6 Environment Configurations
    
    Required Environment Variables:
      TIBCO_HOME = /opt/tibco/bw-6.x
      BW_HOME    = /opt/tibco/bw-6.x/bw/6.x
      JAVA_HOME  = /opt/tibco/bw-6.x/tibcojre64/1.7.0
    
    Optional Environment Variables:
      TEA_HOME   = /opt/tibco/bw-6.x/tea/2.1
      EMS_HOME   = /opt/tibco/bw-6.x/ems/8.1
    
    Required Binaries on $PATH:
    
    Optional Binaries on $PATH:
    
    
  8. Change to the admin folder by typing: admin
  9. Issue the following command to create the BookStore sample, create the domains for the Acme sample, create the Samples-Domain, and deploy all sample archive files:
    runAll.sh
    Note:
    • Running the runAll.sh script automatically updates the Admin "local" mode to "enterprise" mode.
    • You can use -clean option which cleans TIBCO Enterprise Administrator Server Data Store and ActiveMatrix BusinessWorks™ Domain Data Store.
    • This script may take up to 10 or 15 minutes to complete. To see how long it takes to run the sample, run the time runAll.sh command to measure the time the script takes to complete.
    • If you don't want to run all the samples at the same time, then run the following commands:
      1. bootstrap.sh -clean
        Caution: Running the bootstrap.sh -clean with the -clean option cleans the TIBCO Enterprise Administrator server and the ActiveMatrix BusinessWorks™ domain datastore. Use the -clean option only if you want to clear the TIBCO Enterprise Administrator server and ActiveMatrix BusinessWorks™ domain datastore.
      2. runBookStore.sh - to run REST BookStore sample , or
      3. runSamples.sh - to run other samples
  10. Open a web browser and access the Admin UI at http://localhost:8777/tea
  11. Log in using:
    Username: admin
    Password: admin
  12. Click BusinessWorks in the Products list to see the following domains in the Domain Management screen.
    • Acme-QA-Domain
    • Acme-UAT-Domain
    • BookStore-Domain
    • Samples-Domain
    Drill down into any of the domains to see the created runtime entities, such as AppSpaces, AppNodes, application archives, and applications.