Skip to content

Instantly share code, notes, and snippets.

View jburwell's full-sized avatar

John Burwell jburwell

View GitHub Profile
@jburwell
jburwell / jsonHelper.py
Last active December 11, 2015 16:09
Cloudstack single zone devcloud configuration with S3 (credentials omitted)
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@jburwell
jburwell / create-s3-patch.sh
Last active December 18, 2015 10:49
Creates a squashed patch from a Git feature branch. This example was used create he S3-backed Secondary Storage patch for CloudStack This script does not rebase/merge with the REF_BRANCH upstream. It is expected these operations will be performed as needed before this script is executed.
#!/bin/bash
WORK_HOME=/Users/jburwell/Documents/projects/cloudstack/src/cloudstack-basho
REF_BRANCH=master
FEATURE_BRANCH=s3-secondarystorage
WORK_BRANCH="$FEATURE_BRANCH-prep"
PATCH_FILE=$1
COMMIT_MSG=$2
if [ -z $PATCH_FILE ]; then
@jburwell
jburwell / s3xen_test.py
Created August 1, 2013 03:58
Test harness for the s3xen plugin. In order to use it, comment out the XenAPIPlugin imports, make the log method only print the message, and the if block at the bottom pass. Finally, create a symlink in the same directory named s3xen.py to the s3xen script.
#!/usr/bin/env python
from s3xen import S3Client
import traceback
S3_CREDENTIALS = {
'access_key': '<insert access key here>',
'secret_key': '<insert secret key here>',
'end_point' : 's3.amazonaws.com',
'use_https' : "true"
@jburwell
jburwell / 00problem_description.txt
Last active August 29, 2015 14:02
Duplicate Node Name in Riak 2.0 Ansible
I have run into the following error when upgrading the ansible-riak project to support Riak 2.0 using the Vagrantfile in the examples directory:
root@riak-01:~# riak console
config is OK
-config /var/lib/riak/generated.configs/app.2014.06.17.14.30.16.config -args_file /var/lib/riak/generated.configs/vm.2014.06.17.14.30.16.args -vm_args /var/lib/riak/generated.configs/vm.2014.06.17.14.30.16.args
Exec: /usr/lib/riak/erts-5.10.3/bin/erlexec -boot /usr/lib/riak/releases/2.0.0beta7/riak -config /var/lib/riak/generated.configs/app.2014.06.17.14.30.16.config -args_file /var/lib/riak/generated.configs/vm.2014.06.17.14.30.16.args -vm_args /var/lib/riak/generated.configs/vm.2014.06.17.14.30.16.args -pa /usr/lib/riak/lib/basho-patches -- console
Root: /usr/lib/riak
{error_logger,{{2014,6,17},{14,30,17}},"Protocol: ~tp: the name [email protected] seems to be in use by another Erlang node",["inet_tcp"]}
{error_logger,{{2014,6,17},{14,30,17}},crash_report,[[{initial_call,{net_kernel,
@jburwell
jburwell / Vagrantfile
Created July 28, 2014 18:03
packagecloud.io missing curl error
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$script = <<SCRIPT
wget https://packagecloud.io/install/repositories/basho/riak/script.deb -O /tmp/basho-repo.sh
bash /tmp/basho-repo.sh
SCRIPT
@jburwell
jburwell / 00test_plan.md
Last active August 29, 2015 14:04
Metrics Performance Test Plan

As we review replacing Folsom with Exometer for metrics collection within Riak and Riak Core, we must verify that Exometer's performance overhead is less than or equal to Folsom. We also need to understand the impact of Exometer's measurements as load increases to ensure that its overhead remains constant. In order to measure their respective overhead, Riak will be configured in the following manner to isolate metrics collection operations from other Riak work (e.g. GETs, PUTs, DELETEs, handoffs, etc):

  • Ring size: 32
  • Backend: yessir
  • AAE, Search, Yokozuna, and Strong Consistency disabled

In order to measure overhead, one instance of Basho Bench (b_b) executed the metrics_punisher configuration attached to this gist against a Riak cluster. A second instance of b_b will simultaneously execute the stats_query configured attached to this gist against the cluster querying the stats endpoint. Based on discussions with Rus

@jburwell
jburwell / exometer_stats.json
Created August 6, 2014 21:52
Missing Exometer Stats
{"object_merge":0,"object_merge_total":0,"object_map_merge":0,"object_map_merge_total":0,"object_merge_time_mean":0,"object_merge_time_median":0,"object_merge_time_95":0,"object_merge_time_99":0,"object_merge_time_100":0,"vnode_map_update_time_mean":0,"vnode_map_update_time_median":0,"vnode_map_update_time_95":0,"vnode_map_update_time_99":0,"vnode_map_update_time_100":0,"vnode_gets":2099433,"vnode_gets_total":61899662,"vnode_puts":298254,"vnode_puts_total":8815441,"vnode_index_reads":0,"vnode_index_reads_total":0,"vnode_index_refreshes":0,"vnode_index_refreshes_total":0,"vnode_index_writes":0,"vnode_index_writes_total":0,"vnode_index_writes_postings":0,"vnode_index_writes_postings_total":0,"vnode_index_deletes":0,"vnode_index_deletes_total":0,"vnode_index_deletes_postings":0,"vnode_index_deletes_postings_total":0,"object_map_merge_time_mean":0,"object_map_merge_time_median":0,"object_map_merge_time_95":0,"object_map_merge_time_99":0,"object_map_merge_time_100":0,"node_gets":699813,"node_gets_total":20633221,"
@jburwell
jburwell / collectd.conf.template
Created November 19, 2014 14:34
Riak collectd Configuration Templates
#
# Config file for collectd(1).
# Please read collectd.conf(5) for a list of options.
# http://collectd.org/
#
##############################################################################
# Logging #
#----------------------------------------------------------------------------#
# Plugins which provide logging functions should be loaded first, so log #
@jburwell
jburwell / keybase.md
Created March 17, 2015 17:29
keybase.md

Keybase proof

I hereby claim:

  • I am jburwell on github.
  • I am jburwell (https://keybase.io/jburwell) on keybase.
  • I have a public key whose fingerprint is 0235 C79E 8CEF 4635 5768 67BD 53DC 9F7E AD87 71BF

To claim this, I am signing this object:

{default, [
{giddyup_host, "localhost:5000"},
{giddyup_user, "user"},
{giddyup_password, "password"},
{rt_max_wait_time, 600000},
{rt_max_receive_wait_time, 600000},
{rt_retry_delay, 1000},
{rt_harness, rtdev},
{rt_stop_on_fail, false},
{rt_scratch_dir, "/Users/jburwell/tmp/riak-2.0_test_scratch"},