Skip to content

Instantly share code, notes, and snippets.

View iversond's full-sized avatar

Dan Iverson iversond

View GitHub Profile
@iversond
iversond / enableRubyGems.ps1
Last active January 17, 2022 16:34
For DPK installations on Windows, this script will fix the RubyGems CA issue and add the Puppet-based RubyGems location to `PATH`
# Enable RubyGems
#
# The RubyGems included with the DPK can't download from RubyGems.org due to an oudated SSL Certificate
#
# invoke-webrequest https://gist.githubusercontent.com/iversond/e56e608cf8fa65f7160416f4c434da57/raw/43902b10b23efac88c58a78c0be66f701cdec4b1/enableRubyGems.ps1; . $env:TEMP\enableRubyGems.ps1
#
$puppetGemFolder = Resolve-Path 'C:\Program Files\Puppet Labs\Puppet\sys\ruby\lib\ruby\*\rubygems\ssl_certs\'
#Invoke-WebRequest https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/index.rubygems.org/GlobalSignRootCA.pem -OutFile $puppetGemFolder\RubyGemsCA.pem
Invoke-WebRequest https://github.com/rubygems/rubygems/blob/270f8f9f2ea39d2e35cb1063b88dcee26cfaf070/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA.pem -OutFile $puppetGemFolder\RubyGemsCA.pem
@iversond
iversond / SearchDefnSecurity.sql
Created November 10, 2017 19:20
SQL to resolve query access security issues with Search Definitions
-- Shows records in a Search Definition
select recname from PSQRYRECORD where qryname in (
select qrynamechild from PSCONQRSMAP where CONQRSNAME in (
select PTSF_SOURCE_NAME from psptsf_sd where PTSF_SBO_NAME = 'SEARCH_DEFINITION_NAME'));
-- Shows query access groups a user as permission to access
select tree_name, access_group from ps_scrty_acc_grp where tree_name like 'SEARCH%' and classid in (
select classid from psroleclass where rolename in (
select rolename from psroleuser where roleuser = 'USERNAME'));
$domain_user = hiera('domain_user', undef)
$domain_password = hiera('domain_password', undef)
$pia_domain_list = hiera_hash('pia_domain_list')
$pia_domain_list.each |$domain_name, $pia_domain_info| {
$ps_cfg_home_dir_norm = normalize_path($pia_domain_info['ps_cfg_home_dir'])
exec { "${domain_name}-user":
command => "C:\\Windows\\System32\\cmd.exe /c sc.exe config \"PsftPIADomain${domain_name}Service\" obj= \"${domain_user}\" password= \"${domain_password}\""
}
Start-Process -FilePath c:\ProgramData\chocolatey\bin\nssm.exe -ArgumentList 'install logstash-5.6.3 "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-command "& { c:\elastic\logstash\bin\startLogstash.ps1 }"" ' -NoNewWindow -Wait
$env:logstash_home = "c:\elastic\logstash"
cd $env:logstash_home
.\bin\logstash -f .\pipeline.conf -r -l .\logs\logstash.log --config.reload.automatic
$env:kibana_home = "c:\elastic\kibana"
Set-Location $env:kibana_home
.\bin\kibana
Start-Process -FilePath c:\ProgramData\chocolatey\bin\nssm.exe -ArgumentList 'install kibana-5.6.3 "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "-command "& { c:\elastic\kibana\bin\startKibana.ps1 }"" ' -NoNewWindow -Wait
@iversond
iversond / response.cfg
Created August 15, 2017 21:11
Sample 8.56 DPK Bootstrap Response File
psft_base_dir = "c:/psft"
env_type = "fulltier"
db_name = "PSFTDB"
db_service_name = "PSFTDB"
db_host = "localhost"
admin_pwd = "Passw0rd#"
connect_pwd = "peop1e"
access_pwd = "SYSADM"
opr_pwd = "PS"
# domain_conn_pwd = "P@ssw0rd#"
@iversond
iversond / custom_web_profile.pp
Created July 28, 2017 13:31
Puppet manifest to update the WebProfile in configuration.properties
$pia_domain_list = hiera('pia_domain_list')
if $pia_domain_list {
$pia_domain_list.each |$domain_name, $pia_domain_info| {
$baseWebPath = "${pia_domain_info['ps_cfg_home_dir']}\\webserv\\${domain_name}\\applications\\peoplesoft\\PORTAL.war"
$root_signon_url = $pia_domain_info['root_signon_url']
$pia_site_list = $pia_domain_info['site_list']
$pia_site_list.each |$site_name, $site_info| {
@iversond
iversond / sample_acm_customizations.yaml
Created July 24, 2017 12:44
Sample psft_customizations.yaml file using the ACM to configure Elasticsearch
component_postboot_setup_list:
searching:
run_control_id: searching
os_user: "%{hiera('domain_user')}"
db_settings:
db_name: "%{hiera('db_name')}"
db_type: "%{hiera('db_platform')}"
db_opr_id: "%{hiera('db_user')}"
db_opr_pwd: "%{hiera('db_user_pwd')}"