Sunday, August 12, 2018

Windows App/Prcs Service Management

Tools 8.56.07 and HCM 9.2 installed via classic method (non-DPK)

Created one PS_CFG_HOME pointing to E:\pscfg
Under this I have 
appserv
appserv\DEV
appserv\TST
appserv\prcs\DEV
appserv\prcs\TST

So if I use PS_HOME\appserv\psadmin to create service for the above config then it will create one service for both the application servers and process schedulers. So if I need to start/stop one domain or just the app or prcs of one domain then its not possible.

The service created via psadmin runs the command
PS_HOME\bin\server\winx86\psntsrv.exe "E:\pscfg"
which basically applies to all domains under PS_CFG_HOME.

So I used Ruby which is packaged with the DPK installables to create 4 unique services so that I can start/stop each service individually. I had downloaded PUM26 DPK so used the setup folder and PT-DPK-WIN-8.56.07-1of2.zip and PT-DPK-WIN-8.56.07-2of2.zip from that location. 
Ran the following command in my CMD session as admin


psft-dpk-setup.bat --env_type midtier --domain_type appbatch

The initial part will install the puppet software, which is what we need. Quit the installation once that was done.

Created appserver_win_service.rb under each application server domain and prcs_win_service.rb under each process scheduler domain. Took the one created for PUM as a sample and then editted that accordingly.

Then create the service manually in the CDM session.

Application Server

sc create PsftAppServerDomain{name_of_domain}Service DisplayName= PsftAppServerDomain{name_of_domain}Service binpath= "C:\PROGRA~1\PUPPET~1\Puppet\sys\ruby\bin\ruby.exe E:\pscfg\appserv\{name_of_domain}\appserver_win_service.rb" group= Network

sc description PsftAppServerDomain{name_of_domain}Service "PeopleSoft AppServer Domain {name_of_domain} Service"

Process Scheduler 

sc create PsftPrcsDomain{name_of_domain}Service DisplayName= PsftPrcsDomain{name_of_domain}Service binpath= "C:\PROGRA~1\PUPPET~1\Puppet\sys\ruby\bin\ruby.exe E:\pscfg\appserv\prcs\{name_of_domain}\prcs_win_service.rb" group= Network

sc description PsftPrcsDomain{name_of_domain}Service "PeopleSoft Prcs Domain {name_of_domain} Service"


Start application server and process scheduler manually first via the classic psadmin method. Once both start cleanly shutdown both via psadmin and then attempt to start via service.

My new service executes a command like below
Path_to_ruby.exe E:\pscfg\appserv\{name_of_domain}\appserver_win_service.rb

I created the config file appserver_win_service.rb which is a text file with ruby commands which in turn uses psadmin command line to start/stop service.

So I have 4 .rb files for each service.

3 comments:

  1. Thanks Deepak.

    Could you share your prcs_win_service.rb file also?

    ReplyDelete
  2. What should the command to just create service or install service?

    ReplyDelete
    Replies
    1. Via CMD, type sc /? to get more info.
      SC is a command line program used for communicating with the Service Control Manager and services

      Delete