CATCHES NOVATED LEASE COMPANY NEVER TELL YOU

Some knowledges I have accuqired from using novated lease for last 2+ years.

CDH 5.2.0 SPARK HISTORY SERVER ISSUE

5.2.0-1.cdh5.2.0.p0.36 has been released couple of days ago.

It has a small bug with its spark bit, which make unable to start spark history server.

SIMPLE PULL TO REFRESH

1. Get stuffs from https://github.com/zippy1978/jquery.scrollz

2. Add below in head section.

FOREMAN + PUPPET AUTOSIGN.CONF DOESN'T WORK

Issue: 1. Foreman generates auto sign entry when /provision called first time. (boot loader hit) 2. Once OS is done and call puppet agent run, CSR doesn’t get auto-signed. - stays in ‘pending’ status forever

LOG COMPRESSION FOR CLOUDERA MANAGER HADOOP

Cloudera manager uses standard log4j which doesn’t support compression by itself.

PUPPET DELL IDRAC CONTROL

if $::manufacturer == 'Dell Inc.' {
    exec { 'Disable DRAC SNMP':
        command =>; 'racadm config -g cfgOobSnmp -o cfgOobSnmpAgentEnable 0',
        path =>; '/opt/dell/srvadmin/sbin:/bin',
        onlyif =>; '/usr/bin/test `/opt/dell/srvadmin/sbin/racadm getconfig -g cfgOobSnmp -o cfgOobSnmpAgentEnable` -eq 1',
    }
}

Yea, I think onlyif bit is not nice.

GENERATE BACULA CLIENT CERT/KEY PAIR VIA PUPPET

exec {'generate client key file':
command => '/usr/bin/openssl genrsa -out /bacula/bacula-client.key 2048;chmod 600 /bacula/bacula-client.key',
creates => '/bacula/bacula-client.key',
require => Package['bacula-fd'],
}

exec {'generate client cert file':
command => '/usr/bin/openssl req -new -key /bacula/bacula-client.key -x509 -subj "/C=AU/ST=somewhere/L=somewhere/O=something/CN=something" -out /bacula/bacula-client.cert',
creates => '/bacula/bacula-client.cert',
require => [ Package['bacula-fd'], Exec['generate client key file'], ],
}

exec {'combine client key and cert files':
notify => Service["bacula-fd"],
command => '/bin/cat /bacula/bacula-client.key /bacula/bacula-client.cert > /bacula/bacula-client.pem;chmod 600 /bacula/bacula-client.pem',
creates => '/bacula/bacula-client.pem',
require => [ Package['bacula-fd'], Exec['generate client key file'], Exec['generate client cert file'], ],
}

Would be nicer if I can send them to backup location but doesn’t really matter as there’s master key.

CONVERT .XVA TO .QCOW2 (OR RAW)

Figured out while running below work.

Got the hint from: http://jolokianetworks.com/70Knowledge/Virtualization/Converting_from_Citrix_XenServer_to_Xen_open_source/Xenmigrate.py And got modded .py from: http://pastebin.com/MK5Da8CB

RUN CITRIX NETSCALER VPX FROM KVM

1. Download Hyper-V image and extract .vhd

2. Covert it via running: qemu-img convert -O qcow2 NSVPX-ESX-10.1-119.7_nc-disk1.vhd NSVPX-XEN-10.1-119.7_nc.qcow2

BACULA DAILY (OR WEEKLY) EMAIL REPORT FOR POSTGRES DB

This now moved to: https://github.com/logan-han/sysadmin_stuffs/blob/master/bacula_report.sh