Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am wolstena on github.
  • I am wolstena (https://keybase.io/wolstena) on keybase.
  • I have a public key whose fingerprint is BB34 D3BE 66E6 003A 2A88 A269 7FE5 2126 5155 B2BF

To claim this, I am signing this object:

@wolstena
wolstena / run_tests
Created January 29, 2015 21:18
Varnish integgration tests using varnishtest
varnishtest -v v_purge12.vtc
# or
python /usr/local/bin/vtctrans.py -v v_purge12.vtc
@wolstena
wolstena / console redirection
Created January 14, 2015 22:25
HP DL 360 Console Redirection
Embeded Serial
-com1
Virtual Serial
-com3
Bios Serial Console
-auto
Bios Serial Console Baud Rate
-115200
EMS Console
-com2
From 2012Q1 to 2012Q2, assuming 32-bit dataset (i386)
# Update repositories.conf for pkgin, and set $PKG_PATH for pkg_add
REPO=http://pkgsrc.joyent.com/sdc6/2012Q2/i386/All
echo ${REPO} >/opt/local/etc/pkgin/repositories.conf
export PKG_PATH=${REPO}
# Update core packages manually
pkg_add -u bootstrap-mk-files bmake
@wolstena
wolstena / create_zone.sh
Last active August 29, 2015 14:11
Automated VirtualBox SmartOS installs
imgadm sources -a https://updates.joyent.com
imgadm import 14a960b0-614e-11e4-a095-eb789315ae39
vmadm create -f lxtest_64.json
pfexec /opt/local/bin/pkgin -y in libtool-base autoconf \
automake scmgit-base gcc47 \
gnupg gmake libevent icu \
py27-expat snappy erlang-15.1.3.1 \
subversion-base
pfexec wget -O /opt/local/bin/repo http://commondatastorage.googleapis.com/git-repo-downloads/repo
pfexec chmod a+x /opt/local/bin/repo
pfexec mkdir /opt/couchbase
pfexec chown trond /opt/couchbase
2014-10-01T22:17:03+00:00 localhost varnishd[14375]: [ID 232431 local0.error] Child (15221) Panic message:#012Assert error in vwe_cond_modadd(), waiter/cache_waiter_epoll.c line 98:#012 Condition((epoll_ctl(vwe->epfd, 3, fd, &sp->ev)) == 0) not true.#012errno = 2 (No such file or directory)#012thread = (cache-epoll)#012ident = -smalloc,-smalloc,-hcritbit,epoll#012Backtrace:#012 4430e0: pan_ic+0xd0#012 471886: vwe_thread+0x616#012 fffffd7fff1e481a: _END_+0xfffffd7ffed3e47a#012 fffffd7fff1e4b30: _END_+0xfffffd7ffed3e790#012#012
@wolstena
wolstena / zone_path_fix.wiki
Last active August 29, 2015 14:06
SmartOS: Rename zonepath

Rename Zonepath

First of all don't arbitrarilly change the zonepath to the zone name when creating zones. Most of the tools assume the uuid is being used. But if you do ignore everyones advice and do it. This is how you can correct it.

  1. Shutdown the zone:

  vmadm stop <zone_uuid>

  1. Backup and clone the file system

@wolstena
wolstena / Vagrantfile.multi
Created May 9, 2014 21:14
Vagrant mulit host file
# -*- mode: ruby -*-
# vim: set ft=ruby :
# vim: set smartindent
# vim: set tabstop=2
# vim: set shiftwidth=2
provision = true
project_name = "Varnish"
boxes = [
@wolstena
wolstena / Vagrantfile
Last active August 29, 2015 14:01
Smartos Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# Does not support multiple zones yet.
zones = [
{ :name => :node, :image => 'dc0688b2-c677-11e3-90ac-13373101c543', :memory => 1024, :ssh_port => 2221, :cpus => 1, :memory => 512, :disk_size => 5 },
{ :name => :redis, :image => 'dc0688b2-c677-11e3-90ac-13373101c543', :memory => 1024, :ssh_port => 2221, :cpus => 1, :memory => 512, :disk_size => 5 },