Skip to content

Instantly share code, notes, and snippets.

@mattstratton
mattstratton / spec_error.txt
Created May 19, 2015 04:24
ServerSpec user matcher error on Windows guest
Failures:
1) Firewall Rule User "vagrant" should exist
Failure/Error: it {should exist}
TypeError:
no implicit conversion of Symbol into Integer
ls /etc/coreos/update.conf
#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">ls : Cannot find path 'C:\etc\coreos\update.conf' because it does not exist._x000
D__x000A_</S><S S="Error">At line:1 char:1_x000D__x000A_</S><S S="Error">+ ls /etc/coreos/update.conf_x000D__x000A_</S><S S="Error">+ ~~~~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S
@mattstratton
mattstratton / ado_infra_as_code.md
Last active August 29, 2015 14:18
ADO Infrastructure as Code Episode

ADO Infrastructure as Code Episode

The intent of this episode is to discuss, from a tools-agnostic perspective, the concepts of Infrastructure as Code. Right now I've listed "areas of interest", which will turn into a more organized "agenda" at some point.

Areas of interest

  • Storing configuration in source control
  • Testing infra code for consistency and reliability
  • Using principles of CI and CD for infra code
  • Aligning infracode with app code
  • Lessons learned from real-world implementations
@mattstratton
mattstratton / gist:61d1f3112356e42b4dc8
Created March 27, 2015 00:14
kitchen error with serverspec and windows
I, [2015-03-26T16:57:52.531791 #2361] INFO -- default-windows-2008r2-chef12: -----> Creating <default-windows-2008r2-chef12>...
I, [2015-03-26T16:57:55.100443 #2361] INFO -- default-windows-2008r2-chef12: Bringing machine 'default' up with 'virtualbox' provider...
I, [2015-03-26T16:57:55.553873 #2361] INFO -- default-windows-2008r2-chef12: ==> default: Importing base box 'win2k8r2'...
I, [2015-03-26T16:58:57.126608 #2361] INFO -- default-windows-2008r2-chef12:
Progress: 10%
Progress: 80%
Progress: 90%
==> default: Matching MAC address for NAT networking...
I, [2015-03-26T16:58:57.927813 #2361] INFO -- default-windows-2008r2-chef12: ==> default: Setting the name of the VM: kitchen-traceone_base-default-windows-2008r2-chef12_default_1427407137886_98715
I, [2015-03-26T16:58:58.577154 #2361] INFO -- default-windows-2008r2-chef12: ==> default: Clearing any previously set network interfaces...
@mattstratton
mattstratton / tdi.md
Last active August 29, 2015 14:17
CJ's comments about TDI/ChefSpec/ServerSpec, etc

Original link - http://www.reddit.com/r/devops/comments/2xsq5d/having_a_difficult_time_wrapping_my_head_around/cp3ijba by @charlesjohnson

Because Chef / Puppet are declarative languages, and because every resource type is a test/repair loop, that means that you're already running tests constantly in the language itself.

This can make it feel like you don't need to do further testing, but of course you do. Puppet Labs & CHEF just make sure that their products do what they say on the tin: That is, if I say package 'foo' then it will install package foo with the proper package provider. Think of Chef / Puppet as black box interpreters. You have to test 3 things when working with them:

  • Signal in: Did I send a properly formed piece of code to the interpreter?
  • Signal processing: Was my well-formed signal properly interpreted?
  • Signal out: Did my well-formed code, correctly interpreted, actually achieve the thing I set out to do?
@mattstratton
mattstratton / --kitchen-errors.txt
Last active August 29, 2015 14:14
Kitchen-azure errors
This is the error I get on bundle exec kitchen converge:
 ~/src/cookbooks/azure-kitchen/ [master*] be kitchen converge
-----> Starting Kitchen (v1.3.1)
-----> Creating <default-centos-64>...
Searching for images for distro centos-6.4
nested asn1 error
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [undefined method `status' for nil:NilClass]
PS C:\chef> chef-client
[2015-02-04T11:57:05-08:00] WARN:
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.
To fix this issue add an entry like this to your configuration file:
```
@mattstratton
mattstratton / gist:1e2b2da86e3ec3c17636
Created January 26, 2015 21:38
Kitchen Output for Windows Thingy
-----> Starting Kitchen (v1.3.2.dev)
-----> Creating <default-windows-81-chef11164>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'windows-8.1'...
Progress: 10%
Progress: 20%
Progress: 90%
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: default-windows-81-chef11164_default_1422308222625_81647
@mattstratton
mattstratton / gist:ad62526c797ba6e0f6f3
Created December 23, 2014 17:53
Show Title Ideas
We need clever ideas for titles for these episodes. Please leave comments with your ideas.
1. Blameless Post-Mortems
2. DevOps Jobs or Whatever
3. DevOps and Microsoft
4. Starting a New DevOps Job
5. How to Bring About Culture Change in an Organization
@mattstratton
mattstratton / Preferences.sublime-settings
Last active August 29, 2015 14:12
Sublime User Settings
{
"detect_indentation": false,
"font_size": 13,
"ignored_packages":
[
"BeautifyRuby",
"Vintage",
"WordPress",
"SideBarEnhancements"
],