Skip to content

Instantly share code, notes, and snippets.

@numericillustration
numericillustration / README.md
Created June 28, 2020 20:07 — forked from mgerdts/README.md
Triton on Linux KVM

Triton on Linux KVM

I have a beefy Linux box that I use for development. One of the things this box does is run KVM instances that run a Triton headnode and several compute nodes.

Configuration

Networking

I have a single gigabit link to the outside world. All networks are able to reach the outside world via NAT.

@numericillustration
numericillustration / .kitchen.yml
Created December 22, 2016 21:28
Test Kitchen yml file I was using playing with kitchen-joyent
---
driver_plugin: joyent
driver_config:
joyent_username: admin
joyent_keyname: joyZoneRoot
joyent_keyfile: /root/.ssh/id_rsa
joyent_url: https://192.168.40.5
joyent_version: ~7.0
require_chef_omnibus: true
sudo: false
@numericillustration
numericillustration / post_pkgtrans_bash_oneliner.sh
Created October 7, 2016 21:11
after you pkgtrans a package, this will fix the symlinks
base_dir=$(cd .. && pwd); for i in $(grep '1 s' pkgmap | awk '{print $4}'); do symlink=$(basename ${i%%=*}); this_path=$(dirname ${i%%=*}); symlimk_target=${i##*=}; cd ${base_dir}/chef/reloc/${this_path} && ln -s $symlimk_target $symlink; done; cd $base_dir
@numericillustration
numericillustration / gist:e9dca1332cb7bcafc2db040967ac99ab
Created August 13, 2016 04:47
mdb -k ::prtusb -v output from a non-xhci system with a USB keyboard
[root@Fornost01 (Lakeside) ~]# mdb -k
Loading modules: [ unix genunix specfs dtrace mac cpu.generic uppc pcplusmp scsi_vhci ufs ip hook neti sockfs arp usba mm stmf_sbd stmf zfs sd lofs idm sata crypto random cpc logindmux ptm kvm sppp nsmb smbsrv nfs ]
> ::prtusb -v
INDEX DRIVER INST NODE VID.PID PRODUCT
1 ehci 0 pci1849,1c2d 0000.0000 No Product String
Device Descriptor
{
bLength = 0x12
bDescriptorType = 0x1
@numericillustration
numericillustration / sha56_is_not_md5.txt
Created February 17, 2016 21:34
old manta is not new manta
sha256 key signatures give manta-sync indigestion when using the newer style id generation
MANTA_KEY_ID=$(ssh-keygen -l -f ~/.ssh/id_rsa.pub | awk '{print $2}' | tr -d '\n')
manta-sync fails to sync files with:
/for/each/file... unknown error: SHA256:<sig> not found in: <user key path>/.ssh (1/n)
...
/for/each/file... unknown error: SHA256:<sig> not found in: <user key path>/.ssh (m/n)
...
/for/each/file... unknown error: SHA256:<sig> not found in: <user key path>/.ssh (n/n)
sync list built, 0 files staged for syncing (took 13ms)
@numericillustration
numericillustration / osx_pkgsrc_npm_man_path_fun.txt
Created September 11, 2015 17:06
npm module man pages and pkgsrc man pages have path issues
pkgsrc man pages get installed to /opt/pkg/man/ such as the one for the nmap package I just installed via
sudo pkgin install nmap
/opt/pkg/man/man1/nmap.1
The manpage for node itself in in the same path
/opt/pkg/man/man1/node.1
I have also installed some npm packages for working with Joyent stuff such as the manta tools. I am installing them globally as the
npm docs say "If you want to use it as a command line tool, something like the grunt CLI, then you can want (sic) to install it globally.”
src: https://docs.npmjs.com/getting-started/installing-npm-packages-globally
#!/usr/bin/env ruby
require 'logger/colors'
class MultiLogger
def initialize(*targets)
@targets = targets
end
%w(debug info warn error fatal unknown).each do |m|
@numericillustration
numericillustration / gist:0dd0fb03652033c6a958
Created February 10, 2015 22:37
io redirection with knife ssh from gem
def knifeSSH( search_string, command, env, region, environment_config )
Chef::Config.from_file( File.expand_path($chef_conf) )
kssh = Chef::Knife::Ssh.new
kssh.name_args[0] = search_string
kssh.name_args.push( command )
Chef::Config[:environment] = env
Chef::Config[:knife][:yes] = true
kssh.config[:region] = region
kssh.config[:attribute] = 'cloud.local_ipv4'
@numericillustration
numericillustration / dtruss_mtr_0.85
Created July 9, 2014 15:53
output of 'sudo dtruss -flesal -n mtr' during crash resulting from 'sudo mtr --tcp 8.8.8.8' with mtr 0.85
21292/0x150a4e: 723 74 0 thread_selfid(0x0, 0x1DC0, 0x7FFF6D3CF550) = 1378894 0
dyld`__thread_selfid+0xa
dyld`mach_init+0x13
dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*)+0x15b
dyld`_dyld_start+0x36
mtr`0x3
21292/0x150a4e: 739 3 0 csops(0x0, 0x0, 0x7FFF584DC354) = 0 0