Tuesday, June 12, 2012

Converting the PeopleTools OVM Template to VirtualBox

This post assumes you already have a working database as described in Converting PeopleSoft OVM Templates to VirtualBox Guests or some other PeopleSoft PT 8.52.03 database. It also assumes that you have the cloned starting point of a base OEL with the OVM functions (steps 1 through 22 from the prior post).

The PeopleTools Image (App, Web, and Prcs)

  1. Run through steps 1 through 3 as listed here. Notice that step 3 gives the PT image the IP address of 192.168.56.51. Update your network settings and hostname to match the /etc/hosts file and make sure it matches what is in the db image.
  2. Add the following to psadm2's .bash_profile (/home/psadm2/.bash_profile):
    # psft env vars
    export PS_APP_HOME=/opt/oracle/psft/pt/apptools
    export PS_CFG_HOME=/home/psadm2/psft/pt/8.52/FSCM912
    
    export ORACLE_BASE=/opt/oracle/psft/pt/oracle-client
    export ORACLE_HOME=$ORACLE_BASE/11.2.0.x
    export ORACLE_SID=FSCM912
    
    export TUXDIR=/opt/oracle/psft/pt/bea/tuxedo
    export LD_LIBRARY_PATH=$TUXDIR/lib:$LD_LIBRARY_PATH:$ORACLE_HOME/lib
    
    . /opt/oracle/psft/pt/tools/psconfig.sh
    
    export PATH=$TUXDIR/bin:$PATH:$ORACLE_HOME/bin
    export LANG=C
    * Special thank you to Nicolas Gasparotto for his Installation Documents. My first handful of times through the script, my app server wouldn't start. I found three issues: TUXDIR, LANG, and PATH. TUXDIR and LANG are both documented in various places on Nicolas's blog.
  3. We need to copy a few files off the PT OVM system disk. Create a mount point for /dev/sdc2, mount it, and copy the files:
    mkdir /tmp/sdc2
    mount /dev/sdc2 /tmp/sdc2
    cp -R -p /tmp/sdc2/opt/oracle /opt/
  4. Create the PS_CFG_HOME directory:
    mkdir -p /home/psadm2/psft/pt/8.52/FSCM912
    chown -R psadm2:oracle /home/psadm2/psft
    
  5. Add the tools disk image to /etc/fstab
    /dev/sdb1              /opt/oracle/psft/pt      ext3    defaults        1 3
  6. Mount the tools disk:
    mount /opt/oracle/psft/pt
  7. Update the ulimits for Weblogic's sake. Add the following to the end of /etc/security/limits.conf. I copied these values out of the system OVM disk image:
    *  hard  nofile  65536
    *  soft  nofile  65536
    *  hard  nproc   65536
    *  hard  nproc   65536
    *  hard  core    unlimited
    *  soft  core    unlimited
    *  hard memlock 50000000
    *  soft memlock 50000000
  8. The scripts will generate an app server domain named APPDOM and a process scheduler domain named PRCSDOM. If that is not preferable to you, then edit /opt/oracle/psft/vm/oraclevm-template-utils.sh. Search for APPSRVDOM=APPDOM AND PRCSDOM=PRCSDOM. Replace APPDOM and PRCSDOM with your preferred values. I just accepted the defaults.
  9. Run the template script (I ran as root): move into the /opt/oracle/psft/vm directory, export DECOUPLE_USR_GROUP, and run oraclevm-template.sh:
    sudo -i
    cd /opt/oracle/psft/vm
    export DECOUPLE_USR_GROUP=appinst
    ./oraclevm-template.sh
  10. Here is the output my system generated when I ran the script. My answers to prompts are in bold.
    [root@fscm912pt vm]# ./oraclevm-template.sh 
    Creating
    ovm_configure_pre
    No
    Current
    
    Do you wish to configure the VM for Demo Purposes [y/n]:y
    
    Do you wish to configure a Decoupled Application Home [y/n]:y
    Default
     
    Do you wish to setup PeopleSoft Application Server on this VM [y|n]: y
    CreateVirtualEnvironment
    Enter the name of the database [TESTDB]:FSCM912
    CreateVirtualEnvironment
    Enter the name of the database [TESTDB]:FSCM912
    Enter the hostname for the database server [fscm912pt]:fscm912db
    Enter the port number for the database host [1521]:
    Are you happy with your answers [y|n] : y
    
    WARN: An
     
    If this VM is connecting to a PeopleSoft database created from an Oracle VM template 
    some additional setup may be required.  We can automate these steps for you.  If you 
    are connecting to a Database that has been used before you may wish to skip this step.
    
    Do you want this additional setup to be performed? [y|n]: y
    ChangeDBUserProfiles
    Running
    Running
    Copying application server configuration files...
    Copying [/opt/oracle/psft/pt/tools/appserv/small.cfx] to [/home/psadm2/psft/pt/8.52/FSCM912/appserv/APPDOM/psappsrv.cfg]
    Stripping Annotations...
    Copying [/opt/oracle/psft/pt/tools/appserv/small.cfx] to [/home/psadm2/psft/pt/8.52/FSCM912/appserv/APPDOM/psappsrv.cfx]
    Copying Jolt repository file...
    Domain created.
    Performing load prechecks ...
    Loading validation table...
      setting DBName=FSCM912
      setting DBType=ORACLE
      setting UserId=VP1
      setting UserPswd=VP1
      setting ConnectId=people
      setting ConnectPswd=peop1e
      setting ServerName=____
      setting Port=7000
      setting Port=9000
      setting Listener Port=9100
      setting Domain ID=APPDOM
      setting Add to PATH=.
    New CFG file written with modified Startup parameters
    
    Log Directory entry not found in configuration file.
    Setting Log Directory to the default... [PS_SERVDIR/LOGS]
    Spawning disabled for server PSAPPSRV.
    WARNING: PSSAMSRV is configured with Min instance set to 1. To avoid loss of service, configure Min instance to atleast 2.
    Configuration file successfully created.
    CFG setting changes completed, loading configuration...
    Domain configuration complete.
    Created
    Performing load prechecks ...
    Loading validation table...
    
    WARNING: PSSAMSRV and PSQRYSRV are configured with Min instance set to 1. To avoid loss of service, configure Min instance to atleast 2.
    Loading new configuration...
    Domain configuration complete.
    Domain
    Starting
    
    Archived a copy of the domain configuration to /home/psadm2/psft/pt/8.52/FSCM912/appserv/APPDOM/Archive/psappsrv.cfg 
    Attempting to boot bulletin board... 
    tmadmin - Copyright (c) 2007-2008 Oracle.
    Portions * Copyright 1986-1997 RSA Data Security, Inc.
    All Rights Reserved.
    Distributed under license by Oracle.
    Tuxedo is a registered trademark.
    No bulletin board exists. Entering boot mode.
    
    > INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting admin processes ...
    
    exec BBL -A :
            process id=4048 ... Started.
    1 process started.
    Attaching to active bulletin board.
    
    > Attempting to boot ... 
    INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting server processes ...
    
    exec PSWATCHSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -ID 141117 -D APPDOM -S PSWATCHSRV :
            process id=4052 ... Started.
    exec PSAPPSRV -o ./LOGS/stdout -e ./LOGS/stderr -s@psappsrv.lst -- -D APPDOM -S PSAPPSRV :
            process id=4053 ... Started.
    exec PSAPPSRV -o ./LOGS/stdout -e ./LOGS/stderr -s@psappsrv.lst -- -D APPDOM -S PSAPPSRV :
            process id=4059 ... Started.
    exec PSQRYSRV -o ./LOGS/stdout -e ./LOGS/stderr -s@psqrysrv.lst -- -D APPDOM -S PSQRYSRV :
            process id=4065 ... Started.
    exec PSSAMSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -D APPDOM -S PSSAMSRV :
            process id=4069 ... Started.
    exec PSANALYTICSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -D APPDOM -S PSANALYTICSRV :
            process id=4072 ... Started.
    exec PSANALYTICSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -D APPDOM -S PSANALYTICSRV :
            process id=4075 ... Started.
    exec PSANALYTICSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -D APPDOM -S PSANALYTICSRV :
            process id=4078 ... Started.
    exec PSBRKHND -o ./LOGS/stdout -e ./LOGS/stderr -s PSBRKHND_dflt:BrkProcess -- -D APPDOM -S PSBRKHND_dflt :
            process id=4081 ... Started.
    exec PSBRKDSP -o ./LOGS/stdout -e ./LOGS/stderr -s PSBRKDSP_dflt:Dispatch -- -D APPDOM -S PSBRKDSP_dflt :
            process id=4084 ... Started.
    exec PSPUBHND -o ./LOGS/stdout -e ./LOGS/stderr -s PSPUBHND_dflt:PubConProcess -- -D APPDOM -S PSPUBHND_dflt :
            process id=4087 ... Started.
    exec PSPUBDSP -o ./LOGS/stdout -e ./LOGS/stderr -s PSPUBDSP_dflt:Dispatch -- -D APPDOM -S PSPUBDSP_dflt :
            process id=4091 ... Started.
    exec PSSUBHND -o ./LOGS/stdout -e ./LOGS/stderr -s PSSUBHND_dflt:SubConProcess -- -D APPDOM -S PSSUBHND_dflt :
            process id=4103 ... Started.
    exec PSSUBDSP -o ./LOGS/stdout -e ./LOGS/stderr -s PSSUBDSP_dflt:Dispatch -- -D APPDOM -S PSSUBDSP_dflt :
            process id=4106 ... Started.
    exec PSMONITORSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -ID 141117 -D APPDOM -S PSMONITORSRV :
            process id=4109 ... Started.
    exec JSL -o ./LOGS/stdout -e ./LOGS/stderr -A -- -n //fscm912pt:9000 -m 5 -M 7 -I 5 -j ANY -x 40 -S 10 -c 1000000 -w JSH :
            process id=4113 ... Started.
    exec JREPSVR -o ./LOGS/stdout -e ./LOGS/stderr -A -- -W -P /home/psadm2/psft/pt/8.52/FSCM912/appserv/APPDOM/jrepository :
            process id=4119 ... Started.
    17 processes started.
    Domain
    Creating Process Scheduler Server for Database PRCSDOM...
    Copying Process Scheduler Server configuration file(s)...
    Stripping Annotations...
    Process Scheduler Server configuration created.
    Loading validation table...
      setting DBName=FSCM912
      setting DBType=ORACLE
      setting UserId=VP1
      setting UserPswd=VP1
      setting ConnectId=people
      setting ConnectPswd=peop1e
      setting ServerName=fscm912db
      setting PrcsServerName=PRCS936
      setting Log/Output Directory=%PS_SERVDIR%/log_output
      setting Add to PATH=.
      setting SQRBIN=%PS_HOME%/bin/sqr/%PS_DB%/bin
    New CFG file written with modified Startup parameters
    
    Log Directory entry not found in configuration file.
    Setting Log Directory to the default... [PS_SERVDIR/LOGS]
    Spawning enabled for server PSDSTSRV.
    WARNING: PSDSTSRV is configured with Min instance set to 1. To avoid loss of service, configure Min instance to atleast 2.
    Configuration file successfully created.
    CFG setting changes completed, loading configuration...
    Process Scheduler Server configuration complete.
    Created
    Loading validation table...
    
    Log Directory entry not found in configuration file.
    Setting Log Directory to the default... [PS_SERVDIR/LOGS]
    Spawning enabled for server PSDSTSRV.
    WARNING: PSDSTSRV is configured with Min instance set to 1. To avoid loss of service, configure Min instance to atleast 2.
    Configuration file successfully created.
    CFG setting changes completed, loading configuration...
    Domain configuration complete.
    Process Scheduler Server configuration complete.
    Domain
    Starting
    
    Archived a copy of the domain configuration to /home/psadm2/psft/pt/8.52/FSCM912/appserv/prcs/PRCSDOM/Archive/psprcs.cfg 
    Attempting to boot bulletin board... 
    tmadmin - Copyright (c) 2007-2008 Oracle.
    Portions * Copyright 1986-1997 RSA Data Security, Inc.
    All Rights Reserved.
    Distributed under license by Oracle.
    Tuxedo is a registered trademark.
    No bulletin board exists. Entering boot mode.
    
    > INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting admin processes ...
    
    exec BBL -A :
            process id=4347 ... Started.
    1 process started.
    Attaching to active bulletin board.
    
    > Attempting to boot ... 
    INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting server processes ...
    
    exec PSMSTPRC -o ./LOGS/stdout -e ./LOGS/stderr -A -- -CD FSCM912 -PS PRCS936 -A start -S PSMSTPRC :
            process id=4351 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=4356 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=4360 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=4364 ... Started.
    exec PSDSTSRV -o ./LOGS/stdout -e ./LOGS/stderr -p 1,600:1,1 -sPostReport -- -CD FSCM912 -PS PRCS936 -A start -S PSDSTSRV :
            process id=4368 ... Started.
    exec PSPRCSRV -o ./LOGS/stdout -e ./LOGS/stderr -sInitiateRequest -- -CD FSCM912 -PS PRCS936 -A start -S PSPRCSRV :
            process id=4373 ... Started.
    exec PSMONITORSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -ID 72323 -PS PRCS936 -S PSMONITORSRV :
            process id=4381 ... Started.
    7 processes started.
    Domain
    
    Do you wish to setup PeopleSoft Pure Internet Architecture on this VM [y|n]: y
    CreateVirtualEnvironment
    Doing PIA silent install
    Setting temporary directory /opt/oracle/psft/pt/tools/tmp/IA.4502
    Executing setup.linux LAX_VM /opt/oracle/psft/pt/tools/jre/bin/java  -i silent -DRES_FILE_PATH=/opt/oracle/psft/pt/tools/tmp/install.properties -DCOMP_NAME=fscm912pt -DPS_UMASK=0022
    Preparing to install...
    Extracting the installation resources from the installer archive...
    Configuring the installer for this system's environment...
    
    Launching installer...
    
    Preparing SILENT Mode Installation...
    
    ===============================================================================
    PeopleSoft Internet Architecture                 (created with InstallAnywhere)
    -------------------------------------------------------------------------------
    
    
    
    
    ===============================================================================
    Installing...
    -------------
    
     [==================|==================|==================|==================]
     [------------------|------------------|------------------|------------------]
    
    Installation Complete.
    
    Enter the connect string for the AppServer domain.  This is the host:port on 
    which the Application Server domain will listen for incoming connections.  
    You may provide failover and load balancing rules using the format described 
    in the PeopleBooks.  Hit Enter to use the default [fscm912pt:9000]: 
    Are you happy with your answers [y|n] : y
    Updated
    Ownership
     
    Attempting to start WebLogic Server PIA
    No activity will be logged to this window.
    Server activity will be logged to /home/psadm2/psft/pt/8.52/FSCM912/webserv/peoplesoft/servers/PIA/logs/PIA_*
    PID for WebLogic Server PIA is: 5065
    PIA
    
    You are running both AppBatch and PeopleSoft Internet Architecture in the 
    same VM.  This means that some additional automated setup can be done. 
    Report Nodes, integrations etc. can be created due to the presence of 
    multiple tiers in the same host. 
    Note:  you may not wish to do this if connecting to an existing database
    This is a step typically taken in demo environment with a clean database
    
    Do you wish for this additional setup to be performed [y|n]: y
    
    User
    SetupPRCSReportNodes
    Running
    Process
    SetupIntegrationBroker
    Running
    Updated
    Integration
    Stopping
    Stopping
    Shutdown will wait for each process to complete current job...
    
    Shutting down all admin and server processes in /home/psadm2/psft/pt/8.52/FSCM912/appserv/prcs/PRCSDOM/PSTUXCFG
    
    Shutting down server processes ...
    
            Server Id = 1 Group Id = MONITOR Machine = fscm912pt:   shutdown succeeded
            Server Id = 101 Group Id = BASE Machine = fscm912pt:    shutdown succeeded
            Server Id = 103 Group Id = BASE Machine = fscm912pt:    shutdown succeeded
            Server Id = 3 Group Id = AESRV Machine = fscm912pt:     shutdown succeeded
            Server Id = 2 Group Id = AESRV Machine = fscm912pt:     shutdown succeeded
            Server Id = 1 Group Id = AESRV Machine = fscm912pt:     shutdown succeeded
            Server Id = 102 Group Id = BASE Machine = fscm912pt:    shutdown succeeded
    
    Shutting down admin processes ...
    
            Server Id = 0 Group Id = fscm912pt Machine = fscm912pt: shutdown succeeded
    8 processes stopped.
    Starting
    Attempting to boot bulletin board... 
    tmadmin - Copyright (c) 2007-2008 Oracle.
    Portions * Copyright 1986-1997 RSA Data Security, Inc.
    All Rights Reserved.
    Distributed under license by Oracle.
    Tuxedo is a registered trademark.
    No bulletin board exists. Entering boot mode.
    
    > INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting admin processes ...
    
    exec BBL -A :
            process id=5846 ... Started.
    1 process started.
    Attaching to active bulletin board.
    
    > Attempting to boot ... 
    INFO: Oracle Tuxedo, Version 10.3.0.0, 64-bit, Patch Level 043
    
    Booting server processes ...
    
    exec PSMSTPRC -o ./LOGS/stdout -e ./LOGS/stderr -A -- -CD FSCM912 -PS PRCS936 -A start -S PSMSTPRC :
            process id=5850 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=5855 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=5859 ... Started.
    exec PSAESRV -o ./LOGS/stdout -e ./LOGS/stderr -- -CD FSCM912 -S PSAESRV :
            process id=5863 ... Started.
    exec PSDSTSRV -o ./LOGS/stdout -e ./LOGS/stderr -p 1,600:1,1 -sPostReport -- -CD FSCM912 -PS PRCS936 -A start -S PSDSTSRV :
            process id=5867 ... Started.
    exec PSPRCSRV -o ./LOGS/stdout -e ./LOGS/stderr -sInitiateRequest -- -CD FSCM912 -PS PRCS936 -A start -S PSPRCSRV :
            process id=5872 ... Started.
    exec PSMONITORSRV -o ./LOGS/stdout -e ./LOGS/stderr -A -- -ID 72323 -PS PRCS936 -S PSMONITORSRV :
            process id=5880 ... Started.
    7 processes started.
    Domain
    ovm_configure_post
  11. The script nfs mounted the apptools directory from the database image. Upon reboot, that mount will disappear. To persist this mount point, add the following to /etc/fstab
    FSCM912DB:/opt/oracle/psft/ptdb/apptools /opt/oracle/psft/pt/apptools nfs    rsize=8192,wsize=8192,timeo=14,intr
  12. If you want to App Designer to connect in 3-tier, then: #1 become psadm2 (sudo -u psadm2 -i), #2 psadmin, #3 configure the domain and turn on option 6, #4 restart the domain.
  13. Add an entry to your Windows hosts file (c:\windows\system32\drivers\etc\hosts) to point to your VBox guest.

When all was said and done, I logged into my PeopleSoft instance, ran XFRWIN, and watched it post. If you used the same names as I did, your server will be running at http://fscm912pt:8000/ps/signon.html.

Seriously, this was the fastest install ever. I didn't have to install Tuxedo, Oracle client, Weblogic. I didn't have to configure report nodes, pub/sub, etc. The script took care of everything.

Please let me know if you have any questions or notice any omissions in my steps. I tried to document as I was executing them, but you know how that goes...

So what next? I was thinking it would be really cool to run these images in lxc. According to this post, Oracle has all the scripts, etc to run OVM images in lxc. Perhaps it can run the JeOS images created by the PeopleTools team?