Skip to content

Instantly share code, notes, and snippets.

View bdha's full-sized avatar
☂️
ಠ_ಠ

Bryan Horstmann-Allen bdha

☂️
ಠ_ಠ
View GitHub Profile
#!/bin/bash -e
# This script translates a Solaris SVR4 Chef Omnibus package into a tarball.
# It parses the pkgmap to set up required symlinks, tars, and drops the file in
# /var/tmp.
CHEF_VERSION=12.3.0-1
PKG_ROOT=/var/tmp/chef-$CHEF_VERSION
@bdha
bdha / gist:8628477
Last active October 13, 2016 18:06
Set up Graphite and Panoptimon on SmartOS

Install Graphite

pkgin up
pkgin in py27-graphite-web ap22-py27-wsgi

If pkgin says the package cannot be found, do this:

#!/usr/bin/env perl
use File::Basename;
my $WORKDIR=$ENV{PWD};
my $PKGDIR=$WORKDIR . "/chef";
chdir $PKGDIR;
my $file = "pkgmap";
open my $fh, '<', $file or die "Could not open '$file' $!";
/opt/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': ld.so.1: ruby22: fatal: relocation error: file /opt/local/lib/ruby/2.2.0/x86_64-solaris2.11/openssl.so: symbol SSLv2_method: referenced symbol not found - /opt/local/lib/ruby/2.2.0/x86_64-solaris2.11/openssl.so (LoadError)
admin@ip-172-31-2-30:~$ sudo su - operable
operable@ip-172-31-2-30:~$ ./setup.sh
Loading environemnt variables from /home/operable/cog.vars.
Erlang installed...../usr/local/bin/erl
Elixir installed...../usr/local/bin/iex
Mix installed...../usr/local/bin/mix
Make installed...../usr/bin/make
Git installed...../usr/bin/git
Erlang dirty CPU schedulers supported.....Yes
Prequisite checks completed.
"filesystems": [
{
"source": "/opt/chef",
"target": "/opt/chef",
"options": [ "ro" ],
"type": "lofs"
},
10:58 < helen> you know how bryan gets if you disturb his pancakes.
10:58 < rjbs> Actually, I have no idea.
10:59 < rjbs> I can't recall ever seeing Bryan in the same room as a pancake.
[root@headnode (nyc-1) ~]# zpool status -v
pool: zones
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
zones ONLINE 0 0 0
c3t5000CCA0153E92E9d0 ONLINE 0 0 0
logs
zfs set atime=off zones
zfs set compression=on zones
zfs create -V 131055mb zones/dump
zfs create zones/config
zfs set mountpoint=legacy zones/config
mount -F zfs zones/config /mnt
cp -p /etc/zones/* /mnt
umount /mnt
{
"v": "1",
"creator_uuid": "00000000-0000-0000-0000-000000000000",
"uuid": "4166453a-9408-11e5-9b45-f73b5f117b18",
"name": "omnios",
"version": "r151016",
"description": "OmniOS",
"state": "active",
"public": true,
"disabled": false,