Skip to content

Instantly share code, notes, and snippets.

View rch317's full-sized avatar
🎯
Focusing

Rob Hough rch317

🎯
Focusing
  • Indianapolis, IN
View GitHub Profile
@rch317
rch317 / ecmApp_post_deploy.sh
Last active November 22, 2017 03:51
ecmApp_post_deploy.sh
#!/bin/sh
echo "Starting post-deploy script"
sudo yum update -y
sudo yum groupinstall "infrastructure-server-environment" -y
sudo yum install epel-release -y
sudo yum install open-vm-tools git jq python-pip2 -y
exit 0
@rch317
rch317 / db_restore.md
Created November 20, 2017 18:40
Restore DB2-HADR

DB2-HADR: Restore DB

From the primary server, issue a takeover hadr on each db as the db2inst1 user. Below is a for loop that I used to do make sure everything is where it should be:

for db in $(db2 list db directory|grep alias |awk -F\= '{print $NF}')
  do
    db2 takeover hadr on db ${db}
 done
@rch317
rch317 / mkTemplate.sh
Last active July 8, 2023 22:11
Prep RHEL VM for vmware template
# some variables
export ADMIN_USER="rch"
export ADMIN_PUBLIC_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBggbj+a3e/k5BuG9taMTj4BYCvIDfWFUn5QdotYGZDC"
# install necessary and helpful components
yum -y install net-tools deltarpm wget bash-completion yum-plugin-remove-with-leaves yum-utils
# install VM tools and perl for VMware VM customizations
yum -y install open-vm-tools perl
@rch317
rch317 / readme.md
Created October 28, 2017 15:48
SDS install error

Received the following error:

Monday 07 August 2017  10:00:03 -0400 (0:00:05.968)       0:01:03.655 *********
fatal: [TDS_1]: FAILED! => {"changed": true, "cmd": ["./imcl", "-showProgress", "-acceptLicense", "input", "/opt/IBM/ansible_assets/SDS/sds_install.xml"], "delta": "0:01:35.615521", "end": "2017-08-07 10:01:23.446326", "failed": true, "rc": 1, "start": "2017-08-07 09:59:47.830805", "stderr": "ERROR: Error during \"install\" phase:\n  ERROR: GLPINS008E An error occurred while installing GSKIT package.", "stderr_lines": ["ERROR: Error during \"install\" phase:", "  ERROR: GLPINS008E An error occurred while installing GSKIT package."], "stdout": "                 25%

Had to remove gskit and re-install. I believe this was due to an earlier failed installation attempt:

[root@sd00062linvweb ~]# rpm -qa | grep -i gsk

First, commented out all items. Added a data source for the datacenter

data "vsphere_datacenter" "datacenter" {
  name = "${var.vsphere_datacenter}"
}

Re-ran the plan:

terraform plan --out plan.out
@rch317
rch317 / db2_notes.md
Last active October 3, 2017 14:25
DB2 Tips, Tricks and Other Random Stuff...

SQL1015N The database is in an inconsistent state. SQLSTATE=55025

db2 restart database ${db_name}

[db2inst1@SD00039LINVDAT ~]$ db2 drop database ${db_name}

  • SQL1031N The database directory cannot be found on the indicated file system.*
  • SQLSTATE=58031*
db2 uncatalog database ${db_name}
@rch317
rch317 / readme.md
Last active November 10, 2017 03:15
Notes for setting up a new mac

macOS Setup

A collection of tips & tricks I've used to setup my Mac after. Feel free to use whatever you want, or none at all. I'm no export mac user. This is just stuff that works for me.

Preferences

  • Keyboard > Text > Disable "Correct spelling automatically".

Join Linux to Active Directory (RHEL/CentOS)

Below is what an admin would do manually. You will need to adjust the variables to work for you, obviously. These steps are similar in debian based Linux distributions, but with a twist. I didn't document that here, as I didn't see the need. They are relatively minor changes.

  1. Export some variables that we'll need.
### Set your domain
export adauth_domain=YOURDOMAIN.LAB
@rch317
rch317 / readme.md
Created July 17, 2017 14:48
Updating Vault

Updating Vault

  1. Pull existing data from vault vault read -format=json secret/some/vault | tee backup-$(date +%s).json update.json

  2. Edit the update.json to include new data, remove unneeded data.

{
		"USER1": "passw0rd",
 "USER2": "s3cr37",
@rch317
rch317 / sds_silent_install_response.xml
Created May 25, 2017 23:57
Silent install response file for SDS
<?xml version="1.0" encoding="UTF-8"?>
<!--The "acceptLicense" attribute has been deprecated. Use "-acceptLicense" command line option to accept license agreements.-->
<agent-input acceptLicense='true' clean='true' temporary='true'>
<server>
<repository location='/mnt/cdrom/ibm_sds'/>
<repository location='/mnt/cdrom/entitlement/ibm_sds_ent'/>
</server>
<profile id='IBM Security Directory Server' installLocation='/opt/ibm/ldap/V6.4'>
<data key='eclipseLocation' value='/opt/ibm/ldap/V6.4'/>
<data key='user.import.profile' value='false'/>