Skip to content

Instantly share code, notes, and snippets.

View d34dh0r53's full-sized avatar

Dave Wilde d34dh0r53

View GitHub Profile
@d34dh0r53
d34dh0r53 / binlog-parse
Created August 13, 2012 10:38
One Liner for DML Ops on MySQL binary logs
mysqlbinlog /path/to/mysql-bin.000999 | \
grep -i -e "^update" -e "^insert" -e "^delete" -e "^replace" -e "^alter" | \
cut -c1-100 | tr '[A-Z]' '[a-z]' | \
sed -e "s/\t/ /g;s/\`//g;s/(.*$//;s/ set .*$//;s/ as .*$//" | sed -e "s/ where .*$//" | \
sort | uniq -c | sort -nr
@d34dh0r53
d34dh0r53 / horizon1.txt
Last active August 29, 2015 14:01
horizon
lxc-create --name horizon --config /etc/lxc/os_service.conf --template defiant -- -I eth1=192.168.18.210=255.255.255.0
lxc-start -d -n horizon
lxc-attach -n horizon
apt-get curl install -y apache2 memcached libapache2-mod-wsgi git python-pip gcc python-dev libffi-dev libxml2-dev libxslt-dev
pip install python-memcached
git clone https://github.com/openstack/horizon.git -b stable/icehouse
cd horizon
pip install -r requirements.txt
{
"@source": "syslog://test1",
"@fields": {
"processid": "-",
"program": "test1",
"severity": "notice",
"facility": "local7"
},
"@timestamp": "2014-08-13T00:49:06.828074+00:00",
"@source_host": "logtesting",
# Finish headless installation via `ssh [email protected]`
# See /boot/config.txt
sudo apt-get update && apt-get dist-upgrade
sudo raspi-config
# Add locale en.us-utf8 (but keep en.gb-utf8)
sudo dpkg-reconfigure locales
# Timezone
sudo dpkg-reconfigure tzdata
# Update firmware
@d34dh0r53
d34dh0r53 / gist:4916180d417e44282c21
Created February 27, 2015 21:24
elasticsearch-curator.yml
---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed 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
#
# Unless required by applicable law or agreed to in writing, software

Heka Notes

Configuration Files

[LogstreamerInput]
log_directory="/var/log/heka"
failed: [aio1_nova_api_metadata_container-318a9215] => (item={'index': 'https://pypi.python.org/simple', 'version': '33.3.0', 'name': 'beaver'}) => {"attempts": 5, "cmd": "/usr/local/bin/pip install -i https://pypi.python.org/simple beaver==33.3.0", "failed": true, "item": {"index": "https://pypi.python.org/simple", "name": "beaver", "version": "33.3.0"}}
msg: Task failed as maximum retries was encountered
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/beaver.retry
aio1 : ok=8 changed=0 unreachable=0 failed=1
aio1_cinder_api_container-4290b656 : ok=8 changed=0 unreachable=0 failed=1
@d34dh0r53
d34dh0r53 / ceph-docs.md
Last active August 29, 2015 14:26
Ceph client build notes

Ceph Client OSAD Notes

Notes on setting up an AIO running ceph-client roles from os-ansible-deployment

Note: this is against an existing ceph cluster running on the 172.16.200.0/24 network:

172.16.200.3    mon0
172.16.200.4    mon1
172.16.200.5    mon2

172.16.200.6 osd0

Could not find a version that satisfies the requirement python-neutronclient<2.5.0,>=2.3.11 (from python-openstackclient) (from versions: 2.4.0.5.gca96a7c)
No matching distribution found for python-neutronclient<2.5.0,>=2.3.11 (from python-openstackclient)