Introscope Enterprise Manager and APMDB for Mac OS X

Document created by Chris Kline Employee on Jul 11, 2014Last modified by Chris Kline Employee on Oct 10, 2014
Version 2Show Document
  • View in full screen mode

Installing Introscope Enterprise Manager
on Mac OS X

 

While Introscope is not formally supported to run on a Mac OS X platform, it’s just java, and in practice it runs fine.  However, you cannot call for support for Mac. Following are the steps I used to get the Enterprise Manager and APMDB running on Mac.

 

  1. 1.    Install PostgreSQL as a stand-alone application.  It’s far easier than trying to compile or install on your own.  This package comes as an all-in-one.  Download from http://postgresapp.com.
    1. a.    Drag and drop the new app into your Applications folder and start it up.  You’ll see an icon on your menu bar indicating it’s running. If you wish, you can right-click the icon and tell it not to display docs each time it starts and also to start automatically upon boot.
    2. b.    You don't need to create a special user for this method
    3. c.     Databases will be installed at ~/Library/Application Support/Postgres/var/.
    4. d.    Set your path statement to include psql commands for the newly installed app.  Open ~/.profile and add:
      • export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH
      • Source the updated profile:
        1. 1.    . ~/.profile
      • Now you can run psql commands from the prompt
    5. e.   
  2. 2.    Download and install PGAdmin from http://www.pgadmin.org/download/macosx.php.  You can use this to view the database if needed.
  3. 3. Prepare the DB schema files.
    1. a. Unzip the “Mac_OSX_EM_Install[1]” directory/zip file.  Click in the top of Dropbox and choose to download the entire directory as a zip file.  This contains the db scripts exported from a Linux EM (they aren’t available on Windows EM’s), along with files that should be copied by the installer but which fail.
      • If you don’t have the zip file, you can get the db files from a Linux EM installation; they are not included in the generic (otherUnix) distro. Copy the entire database-install/ and lib/ directories under install/ including subdirs.
    2. b.    cd <scripts dir>/database-scripts/unix.  This is where you run the remainder of scripts.
  4. 4.    Create the (empty) database
    1. a.    ./createdb-postgres.sh localhost /Applications/Postgres.app/Contents/MacOS cemdb cnkline <your_login_passwd> admin wily 5432
      • The directory above points to the location of the psql binaries
      • It sets up the cemdb using your user's credentials but the "admin" user owns the db and from that point on that's the only id in use
      • The all-in-one app creates DB's at /Users/<user>/Library/Application Support/Postgres
  5. 5. Create the APMDB Schema (createschema.sh wraps to a java program)
    1. a. Scripts were updated as of 9.6 and changed slightly.
    2. b. This runs on a java program. Make sure you have Java (7) installed.
    3. c. In the createschema.sh wrapper, edit the JavaExe variable to be appropriate before this will run.  Just make it point to “java” since it’s in your path.
    4. d. You might need to edit the database-scripts/common/config/log4j-dbtools.properties to ensure the log4j.appender.logfile.file is pointing to an existing directory
    5. e. The CreateSchema program calls several individual SQL scripts to remove any existing APM database schema objects and create new APM database tables, constraints, indexes, procedures, views, and sequences.
    6. f. When running on mac, it will not create schematools.log, so redirect the command output by hand
    7. g. You can run this with the latest version in the name; it will automatically back rev to the 9.6.0.0 for the initial table create (since that's the latest available)
    8. h. But the doc doesn't say anything about using upgradeschema.sh, however I checked output and there is no upgrade embedded, so you should run that afterwards.
    9. i. Run the following:
      • ./createschema.sh -databaseName cemdb -databaseType Postgres -host 127.0.0.1 -user admin -password wily -port 5432 -releaseVersion 9.6.0.0 -scriptsDir .. >/tmp/createdb.log
      • This will work so long as you run this from the <scripts dir>/database-scripts/unix/ directory.

usage: CreateSchema -databaseName <name> -databaseType <dbtype> -host

<name/ip> -password <pwd> -port <port> -releaseVersion <version>

-scriptsDir <dir> -user <name>

-databaseName <name>        use given name for database name or service

ID

-databaseType <dbtype>      enter Oracle or Postgres

-host <name/ip> use name/ip for db hostname

-password <pwd> use pwd for db password

-port <port> use port for db port

-releaseVersion <version>   use release version for corresponding APM

schema creation, for eg: 5.0.0

-scriptsDir <dir>           use dir for database specific sql scripts

-user <name> use name for db user

 

  1. j.      Look at the /tmp/createdb.log and ensure it all worked fine
  2. 6. Upgrade the DB Schema
    1. a. When running on mac, it will not create schematools.log, so redirect the command output by hand
    2. b. You can run this one again without danger; it will check current schema version prior to attempting any upgrade
    3. c. Edit upgradeschema.sh and change the javaExe variable at the top to just point to “java” and not the builtin version (which doesn’t exist here).
    4. d. Run the following:
      • ./upgradeschema.sh -databaseName cemdb -host 127.0.0.1 -port 5432 -user admin -password wily -is64bit true -databaseType Postgres -desiredVersion 9.5.1.0 -scriptsDir .. > /tmp/upgradedb.log

usage: UpgradeSchema [-connections <connections>] -databaseName <name>

-databaseType <dbtype> -desiredVersion <toVersion> -host <name/ip>

-is64bit <is64bit> -password <pwd> -port <port>

[-postgresInstalldir <postgresInstalldir>] -scriptsDir <dir> -user

<name>

-connections <connections> maximum number of simultaneous

database connections

-databaseName <name> use given name for database

name or service ID

-databaseType <dbtype> enter Oracle or Postgres

-desiredVersion <toVersion> use toVersion for upgrading to

desired release

-host <name/ip> use name/ip for db hostname

-is64bit <is64bit> use to determine if platform

is 32 or 64 bit

-password <pwd> use pwd for db password

-port <port> use port for db port

-postgresInstalldir <postgresInstalldir>   use postgresInstalldir if

upgrading from a Pre APM 9.0

(5.0.0.0) release

-scriptsDir <dir> use dir for database specific

sql scripts

-user <name> use name for db user

 

  1. e. You will see something like this confirming the upgrade path (in the /tmp/upgraded.log):

***************************************************************

Upgrade Path that will be executed between source release: 9.1.0.0 and target release: 9.1.2.0:

  1. 9.1.0.0 --> 9.1.0.1 using<<dbupgrade-apm-postgres-9.1.0.0.sql>> --> 9.1.1.0 using<<dbupgrade-apm-postgres-9.1.0.1.sql>> --> 9.1.1.1 --> 9.1.2.0 using<<upgrade-9.1.1.0.xml>>

***************************************************************

 

  1. 7.    Check the DB version by hand: (make sure the proper psql command is in your path)
    1. a.    PGUSER=admin PGPASSWORD="wily" psql -q -d cemdb -c 'select ts_db_versions from ts_domains;'
  2. 8. Install Generic Unix version of EM (using the java –jar <em.jar.file> syntax), choosing a COMPLETE installation.
    1. a. When it gets to the DB section, select Postegres.
    2. b. Input the address and credentials for the db.
    3. c. You’ll get an error for an unknown platform.  Continue. It seems to not install the DB at all, which is why you did it by hand above.
    4. d. Complete the EM installation. You will end with a NONFATAL_ERROR. This is expected since it failed setting up startup scripts.  You will copy those in manually.
  3. 9.    Copy startup and lax files to the root of the EM install.  These files failed to copy with the installer.
    1. a.    Introscope_Enterprise_Manager
    2. b.    Introscope_Enterprise_Manager.lax
    3. c.     Introscope_ProbeBuilder_Wizard
    4. d.    Introscope_ProbeBuilder_Wizard.lax
    5. e.    Introscope_WebView
    6. f.      Introscope_WebView.lax
    7. g.    lax.jar
  4. 1.    Tell your EM to not spawn another JVM for TESS-related activities (they will fail when the onboard JVM is missing).  Open tess-default.properties and edit:
    1. a.    dailystats.aggregateInSeparateJvm=false
    2. b.    defects.aggregateInSeparateJvm=false
  5. 10. The EM and WebView are ready to go.
  6. 11. If you want the fat-client workstation, you can download from http://bit.ly/apm4mac

 

 

  1. NOTES.
    1. a.    Looks like upgrading using the java -jar will indeed upgrade the schema on an existing apmdb.

 

 

 

 



[1] This is presently hosted on my Dropbox, but may not be there forever.  As an alternative, you can create your own set of files by extracting from a valid Linux EM; I was just saving you time.

Attachments

    Outcomes