Puppet Dell iDRAC control

1 2 3 4 5 6 7 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.

Log compression for Cloudera Manager Hadoop

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

Generate Bacula client cert/key pair via Puppet

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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.

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

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