-
Manual process is bad
-
Slow
-
Error prone
-
Makes releasing code hard
-
Automated process is good
% shef | |
This is shef, the Chef shell. | |
Chef Version: 0.10.8 | |
http://www.opscode.com/chef | |
http://wiki.opscode.com/display/chef/Home | |
run `help' for help, `exit' or ^D to quit. | |
chef > recipe |
## | |
# binding definition API. | |
# Examples taken from nagios cookbook | |
bind(:nagios_service_name).to("nagios") | |
bind(:hostgroups) do | |
search(:role, "*:*").map {|r| r.name } | |
end |
Some people think that configuration should not be "Turing complete"; others think the configuration language should be as expressive as possible--so much so that it amounts to a programming language itself.
I assert that configuration files which are not Turing complete (or, perhaps a more useful distinction, are not "sufficiently complex languages") are in practice extended to be that complex; and when that happens, the result is often more difficult to understand than if the language were more powerful to start with.
config defaultToCurrentScreen true | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsSpread true | |
# Monitor Aliases | |
alias mon-laptop 0 | |
alias mon-dell 1 | |
# Command e shows window hints |
vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box | |
mkdir smartos && cd smartos | |
vagrant init smartos | |
vagrant up | |
vagrant ssh |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
-
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the
secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection. -
Use production SSL certificates locally. This is annoying
# Set the Location to my Powershell FOlders | |
set-location c:\Code\Powershell | |
# Fix/Set the console size | |
$Shell = $Host.UI.RawUI | |
$size = $Shell.WindowSize | |
$size.width=150 | |
$size.height=50 | |
$Shell.WindowSize = $size |
Reference READMEs:
# Attribute Provenance reporter | |
# ----------------------------- | |
# | |
# Runs as a ChefSpec test and dumps two sections of data: | |
# 1. all attributes (data from `node.debug_value()`) | |
# 2. where each attribute is set. You can specify the attributes | |
# you want included with an ATTRS environment variable. | |
# | |
# Sample run: | |
# |