Skip to content

Instantly share code, notes, and snippets.

@iversond iversond/loadcache.pp
Last active Oct 28, 2019

Embed
What would you like to do?
This manifest can be used to run the LOADCACHE job on a fresh PeopleSoft Image. In your `psft_customizations.yaml` file, add `Cache Settings/ServerCacheMode: 1` to the app server `config_settings` section.
$ps_home_dir = hiera('ps_home_location')
$gem_home = '/opt/puppetlabs/puppet/bin'
exec { 'install-psadmin_plus':
command => "${gem_home}/gem install psadmin_plus",
}
$appserver_domain_list = hiera('appserver_domain_list')
$appserver_domain_list.each | $domain_name, $app_domain_info | {
$db_settings = $app_domain_info['db_settings']
$db_settings_array = join_keys_to_values($db_settings, '=')
$ps_cfg_home_dir = $app_domain_info['ps_cfg_home_dir']
pt_psae {"LOADCACHE-${domain_name}":
db_settings => $db_settings_array,
run_control_id => 'BUILD',
program_id => 'LOADCACHE',
os_user => 'psadm2',
logoutput => 'true',
ps_home_dir => $ps_home_dir,
}
-> file {"${ps_cfg_home_dir}/appserv/${domain_name}/CACHE/SHARE":
ensure => link,
target => "/home/psadm2/PS_CACHE/CACHE/STAGE/stage"
}
-> exec { "Set-Cache-Mode-${domain_name}":
command => "sed -i 's/^\;ServerCacheMode=0/ServerCacheMode=1/' ${ps_cfg_home_dir}/appserv/${domain_name}/psappsrv.cfg",
path => '/usr/bin',
}
-> exec { "Bounce ${domain_name} App Domain":
command => "${gem_home}/psa bounce app ${domain_name}",
require => Exec['install-psadmin_plus'],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.