Skip to content

Instantly share code, notes, and snippets.

View juliandunn's full-sized avatar

Julian C. Dunn juliandunn

View GitHub Profile
@juliandunn
juliandunn / aix-chef-client-known-issues.md
Last active April 7, 2016 18:50
Currently known issues for Chef Client 12 & AIX.

Known Issues in Chef Client 12.0 & AIX

  • Our standard bootstrap procedure doesn't work (not that I think many folks on AIX will use it). A couple problems:
    • Omnitruck doesn't understand BFFs and has invalid syntax for uname: chef/omnitruck#72
    • Bootstrap SSH fails with SSH debug returns "cipher_init: EVP_CipherInit: set key failed for aes128-cbc (when running in -VV) -- it will also fail to negotiate other cipher suites like 3des-cbc
      • Only fix I've found so far is to installp -u security.pkcs11. The one suggested by IBM does not work: http://www-01.ibm.com/support/docview.wss?uid=isg3T1019142
      • Maybe there's a patch for this. My LPAR is 7100-02-04-1341 which isn't the latest SP.
      • security.pkcs11 is safe to remove as it has to do with hardware encryption devices (a rare use case). Customers can contact IBM if they have a hardware crypto device and need this package
    • Bootstrap assumes bash is available on the system so you get something like `k
@juliandunn
juliandunn / awsha.rb
Last active January 25, 2018 12:15
Demo script for AWSAdvent 2014 blog post
#!/usr/bin/ruby
require 'fog'
require 'json'
require 'open-uri'
module AWSAdvent
class Demo
attr_reader :instance, :compute, :server
---------------------------------------------------------------------------
LABEL: CORE_DUMP
IDENTIFIER: A924A5FC
Date/Time: Tue Dec 2 16:17:18 CST 2014
Sequence Number: 1229
Machine Id: 00F905A14C00
Node Id: l5a1vp050_pub
Class: S
Type: PERM
@juliandunn
juliandunn / aix-limits.txt
Created November 26, 2014 21:28
limits that are needed for building Chef on AIX
# cat /etc/security/limits
*
* Sizes are in multiples of 512 byte blocks, CPU time is in seconds
*
* fsize - soft file size in blocks
* core - soft core file size in blocks
* cpu - soft per process CPU time limit in seconds
* data - soft data segment size in blocks
* stack - soft stack segment size in blocks
@juliandunn
juliandunn / ppc64-linux-omnibus.sh
Last active August 29, 2015 14:10
How to get omnibus build environment on ppc64 linux
#!/bin/sh
sudo yum -y install git
sudo yum -y install gcc gcc-c++ patch
wget -O /tmp/ruby-install-v0.4.3.tar.gz https://codeload.github.com/postmodern/ruby-install/tar.gz/v0.4.3
cd /tmp && tar zxvf ruby-install-v0.4.3.tar.gz
sudo yum remove libyaml # cloud-init on IBM PDP conflicts, but we don't care if that's removed now
cd ruby-install-0.4.3
sudo make install
sudo /usr/local/bin/ruby-install ruby 2.1.2 # TODO: put flags from https://github.com/opscode-cookbooks/omnibus/blob/master/libraries/ruby_install.rb#L53-L59 in here
@juliandunn
juliandunn / postgresql-on-aws-tips.md
Last active September 27, 2022 10:55
Notes on PostgreSQL performance optimization on RDS

Deep Dive: PostgreSQL on AWS

When loading data

  • disable backups (backup_retention=0)
  • disable multi-AZ and autovacuum
  • pg_dump -Fc (compressed) and pg_restore -j (parallel)
  • Increase maintenance_work_mem
@juliandunn
juliandunn / pryhandler.rb
Created November 14, 2014 22:09
Handler for running Pry in the report handler phase of Chef
require 'chef/log'
require 'pry'
module ChefSoftware
class CookbookVersionsHandler < Chef::Handler
def report
Chef::Log.info('Pausing in handler to run pry; type "exit" to leave pry')
binding.pry
end
-module(christmas_handler).
-behaviour(cowboy_http_handler).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-record(state, {}).
init(_, Req, _Opts) ->
@juliandunn
juliandunn / aix-unicode.md
Last active March 22, 2022 15:35
Adding EN_US to AIX LPAR

Chef Client 12 uses the UTF-8 locale. By default, BOS doesn't include it so Chef will throw warnings. Here's how you install it.

You need at least the AIX media (first disc), or copy all the files in /installp/ppc/*EN_US* somewhere on your LPAR. Let's say it's /tmp/rte

It's recommended that you use smit to install this charset so any WPARs you have also get the charset applied.

From a root shell type:

` $ smit lang

Starting Chef Client, version 12.2.0.dev.0
resolving cookbooks for run list: ["chef-client::config", "chef-client::service", "chef-client::delete_validation"]
Synchronizing Cookbooks:
- cron
- chef-client
- logrotate
- windows
- chef_handler
Compiling Cookbooks...
Converging 12 resources