Skip to content

Instantly share code, notes, and snippets.

View luckymike's full-sized avatar

Michael F. Weinberg luckymike

View GitHub Profile
@luckymike
luckymike / security_group.rb
Last active December 11, 2016 23:46
Managing Security Groups With Rainbows, Unicorns, and Joy
SparkleFormation.dynamic(:security_group_with_rules) do |_name, _config = {}|
## Usage:
##
## Security Group rules are defined via 'ingress' and 'egress'
## hashes of named rules passed in the _config argument. Each rule
## supports the following keys:
##
## :protocol (required) - the protocol ('tcp', 'udp', '-1')
## :ports (required) - an array of 1 or 2 port numbers. If specifying
## a range, the lower port must be first.
Generated at 2016-03-13 23:29:43 +0000
Mixlib::ShellOut::ShellCommandFailed: python_package[uwsgi] (graphite::_web_packages line 40) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python2.7", "-m", "pip.__main__", "install", "uwsgi==2.0.12"] ----
STDOUT: Collecting uwsgi==2.0.12
Downloading uwsgi-2.0.12.tar.gz (784kB)
Installing collected packages: uwsgi
Running setup.py install for uwsgi: started
Running setup.py install for uwsgi: finished with status 'error'
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-LT5SSn/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-IkU90j-record/install-record.txt --single-version-externally-managed --compile:
running install

Keybase proof

I hereby claim:

  • I am luckymike on github.
  • I am luckymike (https://keybase.io/luckymike) on keybase.
  • I have a public key whose fingerprint is EE72 5836 B960 76B1 E2D2 E24E AD1C 66F1 0201 0D43

To claim this, I am signing this object:

@luckymike
luckymike / sparkleworkshop.md
Created August 31, 2015 20:08
SparkleFormation Workshop Abstract

Bootstrap Your Continuous Provisioning with SparkleFormation and Sfn

Infrastructure provisioning templates such as Cloudformation can be powerful elements in a Continuous Provisioning workflow; however, as these are generally composed of static JSON, YAML, or XML, manipulating them in a programmatic fashion is difficult, and resuability is often impossible.

This workshop will provide a working introduction to SparkleFormation, a Ruby DSL for programmatically composing Cloudformation and similar templates for provisioning complete infrastructure stacks. Participants will learn to compose Cloudformation templates using SparkleFormation, abstract template clode into reusable components, and how to provision complex infrastructure from the command line using Sfn.

In addition to learning to use SparkleForamtion, we'll cover basic Cloudformation concepts and best practices for stack-based resource provisioning based on Heavy Water's extensive experience.

@luckymike
luckymike / .kitchen.yml
Created April 30, 2015 16:16
Specifying a Version for Centos fails
suites:
- name: default
run_list:
- recipe[test]
- recipe[chef-server]
- recipe[test::post-install]
attributes:
chef-server:
api_fqdn: 'chef-server-tk.example.com'
version: 12.0.7-1
@luckymike
luckymike / gist:5fb38a012f5997a12670
Created April 29, 2015 22:05
Packagecloud GPG Error
STDOUT:
STDERR: Importing GPG key 0xD59097AB:
Userid: "packagecloud ops (production key) <ops@packagecloud.io>"
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-packagecloud_io
https://packagecloud.io/chef/stable/el/6/x86_64/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
https://packagecloud.io/chef/stable/el/6/x86_64/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from chef_stable_: [Errno 256] No more mirrors to try.
---- End output of yum -q makecache -y --disablerepo=* --enablerepo=chef_stable_ ----
@luckymike
luckymike / BART_Ridership_FY73_FY14.csv
Created April 24, 2015 23:04
Historic BART Ridership Averages
Year Weekday Saturday Sunday
1973 32000
1974 57400
1975 118003
1976 131000
1977 133453
1978 146780
1979 151712
1980 148682
1981 161965
@luckymike
luckymike / BART_Weekday_Ridership_January_2015.csv
Created April 24, 2015 19:38
BART Ridership from SFO and OAK
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 33. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,1059,1002,773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272,144,4
@luckymike
luckymike / BART_Weekday_Ridership_January_2015.csv
Created April 13, 2015 00:29
BART Weekday Ridership January 2015
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 33. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,1059,1002,773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272,144,4
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 46 columns, instead of 31. in line 6.
Exitstations,RM,EN,EP,NB,BK,AS,MA,19,12,LM,FV,CL,SL,BF,HY,SH,UC,FM,CN,PH,WC,LF,OR,RR,OW,EM,MT,PL,CC,16,24,GP,BP,DC,CM,CV,ED,NC,WP,SS,SB,SO,MB,WD,OA
RM,14,133,107,129,459,117,164,165,211,52,99,76,50,38,45,22,26,39,30,13,20,10,9,20,25,310,374,474,351,186,187,38,72,62,18,8,14,8,44,12,33,42,29,8,7
EN,149,20,119,138,966,164,294,499,634,123,148,147,69,57,91,37,44,84,39,22,50,14,14,41,45,891,"1,059","1,002",773,240,195,78,115,103,38,11,38,9,48,30,53,89,63,17,28
EP,115,104,16,72,715,94,141,299,322,77,60,53,31,19,29,10,12,51,19,18,24,13,13,38,19,539,670,427,410,110,58,34,36,43,6,8,25,5,16,9,15,57,29,11,20
NB,127,123,81,21,193,84,104,249,265,76,75,66,35,24,32,12,23,37,21,19,31,13,10,24,20,699,824,459,518,165,101,44,42,33,9,9,17,9,20,7,18,89,39,9,31
BK,500,972,743,216,36,410,471,561,557,266,327,206,173,139,158,84,131,267,145,152,152,89,58,58,108,942,974,855,780,355,287,142,102,115,36,52,109,49,116,31,40,232,150,60,105
AS,113,140,86,86,361,24,105,264,286,81,129,88,47,38,52,26,40,69,25,22,24,10,6,16,33,712,814,514,568,272