Skip to content

Instantly share code, notes, and snippets.

@trentster
trentster / postgresql.conf
Last active December 27, 2015 12:39
zabbix on SmartOS zone with postgres
max_connections = 100
shared_buffers = 512MB
work_mem = 32MB
maintenance_work_mem = 256MB
bgwriter_lru_maxpages = 0
synchronous_commit = off
wal_buffers = 8MB
checkpoint_segments = 32
checkpoint_timeout = 60min
checkpoint_completion_target = 0.9

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/bootstrap.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@trentster
trentster / do-kvm-smartsend.sh
Created July 25, 2013 00:14
To copy a kvm vm via a UUID supplied by $1 to a specific destination
#!/bin/bash
#
# SCRIPT: do-smartsend.sh
# AUTHOR: Mark Slatem
# DATE: 11 APRIL 2012
# REV: 1.0.A
#
# PLATFORM: SmartOS
# REQUIREMENTS: SmartOS
#
@trentster
trentster / do-sm-smartsend.sh
Created July 25, 2013 00:12
To copy a smartmachine via a UUID supplied by $1 to a specific destination
#!/bin/bash
#
# SCRIPT: do-smartsend.sh
# AUTHOR: Mark Slatem
# DATE: 11 APRIL 2012
# REV: 1.0.A
#
# PLATFORM: SmartOS
# REQUIREMENTS: SmartOS
#
java -d64 -server -Xms2G -Xmx2G -Djava.security.egd=file:/dev/random -XX:-UseVMInterruptibleIO -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -jar craftbukkit-beta.jar --nojline
@trentster
trentster / add-disk.json
Last active December 14, 2015 00:49
smartos json snippets
{
"add_disks": [
{
"boot": false,
"model": "virtio",
"size": 10240
}
]
}
@trentster
trentster / do-kvm-dataset.sh
Last active December 13, 2015 23:49
PURPOSE: turn a KVM vm into a dataset
#!/bin/bash
#
# SCRIPT: do-kvm-dataset.sh
# AUTHOR: Mark Slatem
# DATE: 26 January 2013
# REV: 1.0
#
# PLATFORM: SmartOS
# REQUIREMENTS: SmartOS
#
@trentster
trentster / owncloud
Last active August 14, 2017 02:56
smartos nginx guide
____ _ ___ ___
/ ___| | ___ _ _ __| \ \ / (_)____
| | | |/ _ \| | | |/ _` |\ \ /\ / /| |_ /
| |___| | (_) | |_| | (_| | \ V V / | |/ /
\____|_|\___/ \__,_|\__,_| \_/\_/ |_/___|
SmartMachine (base64 1.8.1)
# SmartMachine (base64 1.8.1) #
vi /etc/motd # add above logo
@trentster
trentster / gist:4585343
Created January 21, 2013 11:10
setupfifo.json
{
"zonename": "fifo",
"autoboot": true,
"brand": "joyent",
"image_uuid": "fdea06b0-3f24-11e2-ac50-0b645575ce9d",
"max_physical_memory": 512,
"alias": "fifo",
"quota": "40",
"resolvers": [
"10.1.1.1",
{
"brand": "kvm",
"ram": "512",
"hostname": "pfsense-new",
"alias": "pfsense-new",
"vcpus": "1",
"nics": [
{
"interface": "net0",
"nic_tag": "admin",