Skip to content

Instantly share code, notes, and snippets.

View iversond's full-sized avatar

Dan Iverson iversond

View GitHub Profile
$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}\""
}
@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'));
@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 / psadmin.conf.2018.yaml
Last active July 28, 2022 15:52
psadmin.conf 2018
---
title: 'psadmin.conf'
version: '2018'
description: 'The only conference for PeopleSoft Administrators.'
long_description: >
psadmin.conf is a conference specifically for PeopleSoft Administrators.
The conference features talks from expert admins on a variety of topics.
The goal of the conference is to expand your knowledge of PeopleSoft
Administration and network with admins from around the country.
@iversond
iversond / app.rb
Created March 2, 2018 20:17
Custom facter fact to return the first 2 characters as the Fact `app`
Facter.add(:app) do
setcode do
app = Facter.value(:hostname)[0..1]
if app.downcase.match(/lm/)
app = "hr"
end
app.downcase
end
@iversond
iversond / psadmin.conf.2018.md
Last active April 23, 2018 18:56
psadmin.conf 2018 Session Descriptions

Implementing DPK To Build PeopleSoft Servers at Capella University

Peyton Colburn

(Sunday Session)

This session will cover seven lessons we learned from implementing the Deployment Packages. We will discuss how we got management buy-in, how we work collaboratively on the DPK, what resourses we used to learn Puppet, how we structured our Hiera data, and how to bring the entire PS Admin team up to speed.

Running a PeopleSoft Elasticsearch Cluster on Kubernetes

@iversond
iversond / fixRubyGems.ps1
Created March 26, 2018 00:17
Script to download the updated CA file to RubyGems on Windows will work. From the blog post: http://wragg.io/using-puppet-modules-forge-and-r10k/
$CACertFile = Join-Path -Path $ENV:AppData -ChildPath 'RubyCACert.pem'
If (-Not (Test-Path -Path $CACertFile)) {
"Downloading CA Cert bundle.."
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri 'https://curl.haxx.se/ca/cacert.pem' -UseBasicParsing -OutFile $CACertFile | Out-Null
}
"Setting CA Certificate store set to $CACertFile.."
$ENV:SSL_CERT_FILE = $CACertFile
@iversond
iversond / applyPT856Upgrade.ps1
Created August 31, 2018 14:20
Powershell script to run the PeopleTools 8.56 Upgrade job headlessly. A few assumptions with the script: All manual steps are marked as complete.; your PT Client installs are at c:\client-8.xx.xx
<#PSScriptInfo
.SYNOPSIS
Apply the PeopleTools 8.56 Upgrade Project
.DESCRIPTION
Automate the Change Assistant job that applies the PTU856 project to a database.
.PARAMETER DATABASE
Which database to encrypt the password
.PARAMETER PT_VERSION
PeopleTools version to apply
.PARAMETER CA_BASE
@iversond
iversond / common.yaml
Created January 22, 2019 21:16
Common configuration shared across all DPK environments
---
ensure: present
env_type: midtier
server_type: "%{::ps_role}"
domain_type: "%{::ps_role}"
region: "%{::region}"
peoplesoft_base: c:/psft
peoplesoft_base_norm: "c:\\psft"
unicode_db: false
@iversond
iversond / domains.yaml
Last active November 21, 2021 00:57
Default domain configuration for the DPK. Used with Hiera Hashing to allow environments to overrride/add to the defaults
---
# TNSnames.ora
tns_admin_list:
"%{hiera('db_name')}":
db_host: "%{hiera('db_server')}"
db_port: "%{hiera('db_port')}"
db_protocol: TCP
db_service_name: "%{hiera('db_name')}.psadmin.io"
# Application Servers