Skip to content

Instantly share code, notes, and snippets.

View bryanwb's full-sized avatar

Bryan Berry bryanwb

View GitHub Profile
@bryanwb
bryanwb / gist:5532697
Last active December 17, 2015 01:59
btrfs usage
hitman@hiroko:~/cycle/cookbooks/cassandra$ sudo btrfs fi df /var
Data: total=4.00GB, used=3.39GB
System, RAID1: total=32.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=256.00MB, used=199.51MB
hitman@hiroko:~/cycle/cookbooks/cassandra$ sudo btrfs fi show
failed to read /dev/sr0
Label: none uuid: d9a07ffc-ac96-4b37-8aeb-e826e219d420
Total devices 2 FS bytes used 3.71GB
@bryanwb
bryanwb / gist:5454029
Created April 24, 2013 17:43
cassandra .kitchen.yml
---
driver_plugin: lxc
driver_config:
base_container: ubuntu
overlay: /var/lib/lxc/overlay
require_chef_omnibus: true
username: root
password: password
platforms:
#
cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=yes
PEERDNS=yes
IPV6INIT=no
DHCP_HOSTNAME="\$(if [ ! -z \`cat /etc/hostname\` ] ; then cat /etc/hostname ; else hostname ; fi )"
@bryanwb
bryanwb / lxc-centos
Last active December 16, 2015 10:18 — forked from hagix9/lxc-centos
#!/bin/bash
#
# template script for generating CentOS container for LXC
#
#
# lxc: linux Container library
# Authors:
@bryanwb
bryanwb / gist:5404197
Created April 17, 2013 13:14
sample test-kitchen yaml
---
driver_plugin: ec2
driver_config:
region: us-east-1
availability_zone: us-east-1d
flavor_id: m1.small
groups:
- default
require_chef_omnibus: true
image_id: ami-xxxxxx
#!/bin/bash
# file: /usr/share/lxc/templates/lxc-ubuntu-cycle
#
# template script for generating ubuntu container for LXC
#
# This script consolidates and extends the existing lxc ubuntu scripts
#
# Copyright © 2011 Serge Hallyn <serge.hallyn@canonical.com>
# Copyright © 2010 Wilhelm Meier
@bryanwb
bryanwb / gist:5317347
Last active December 15, 2015 20:19
hangops song
where do you go when you want to be cool?
Hangops! Hangops!
where do you go when your servers are blue?
Hangops! Hangops!
Momma didn't raise no fool!
Hangops! Hangops!
hangops - eee yoouuuu!
# /etc/init/test_app.conf
# Task to automatically start the test application service for demo
# dependant on mysql service
author "Darren Watt"
description "Test App"
expect fork
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
#kill timeout 10 # this causes stop to fail
# run as non privileged user
# add user with this command:
require 'ohai'
ohai = Ohai::Systen.new
ohai.all_plugins
ram = ohai["memory"]["total"]