GETTING MORE CHEFS IN THE KITCHENDeveloping Infrastructure as a Team
WHO AM I?Andrew Gross
Developer at Yipit.com@awgross
Github
WHO IS YIPIT?New York City
24 Employees
Codes15 "Core" Developers
1 Operations Only Developer (me)
Everyone
WHAT DO WE DO?
DAILY DEAL AGGREGATION
E-COMMERCE DEAL AGGREGATION
INVESTOR REPORTS
THE TECHNICAL CHALLENGES
Data Aggregation and DiscoveryFully Customized Emails at Scale
Image ProcessingPersonalization
AIGeolocation
PROBLEM SOLVING TOOLSPython
CRuby
Javascript
DjangoFlask
TornadoChefAWS
SendGrid
CHEF STACKLOCAL
Berkshelf Vagrant Chef-Solo MinitestRspec
CHEF STACKPRODUCTION
Chef-Client Hosted Chef AWSChef 10.18.2 Chef 11
DEVELOPMENT STYLECookbook Development
Master Chef Repo Git Repo Per Cookbook Application Cookbooks Library Cookbooks
"Gangam Style"
WHAT DO WE WANT INCHEF?
DEVELOPERSDEVELOPERSDEVELOPERS
WHY DO WE WANT MORE DEVS IN CHEF?
FOR DEVELOPERS
Go beyond localhost
Insight into: Resiliency
Distributed ComputingAutomationMonitoring
State Transitions
Be a true full stack developer
FOR OPERATIONS
Development rigor TestingCI / CDCode Review Versioning Dependency Management
Sneakily reduce my own workload
WHAT'S STOPPINGDEVELOPERS?
NEW PATTERNS
SOLUTIONS
LOWER THE LEARNING CURVE
SIMPLE INSTALL WIKI
TRIM THE VOCABULARY
Focus on basic parts of cookbooks
RecipesTemplatesAttributes
Hide the rest
FRIENDLY SHELL WRAPPERS
USE A FAMILIARCOMMAND WRAPPER
( Make, rake, fab )
USE FAMILIAR SYNTAX
Javanode .my_cookbook.my_attribute
Rubynode[:my_cookbook][:my_attribute]
Pythonnode['my_cookbook']['my_attribute']
PROVIDE HIGH LEVEL API'S
BE OPINIONATEDMake decisions for them
...because they don't know
(they can change it once they do)
SANE DEFAULTS
YIPIT_BASELINEEvery Machinesshc̀hefclient̀ aaS.bash_profile
YIPIT_WEBNginx Version baked in
Devs don't care what version
They just want a working webserver
STYLE GUIDELINES
Force via Commit Hooks
LEAN RECIPES
Chef DSL
Attributes
Library Calls
PUT LOGIC IN LIBRARIES
Easier to Test
Faster to Test
Easier to Reuse
DIRTY SECRET OF PROGRAMMING INCOMING
DEVELOPERS WILL CHEATGive them something good to cheat from
Good
Not So Good
COMMUNITY COOKBOOKS
Use them for 'low-level' tasks
Developers should be interacting with org. specific cookbooks
ROLES
SIMPLENo (few) Attributes
Short Runlists
Reduce Complexity
Fewer Places to Check for Errors
ENVIRONMENTS
Lock Cookbook Versions
Some static attributes
Versioned via Git (w/ Knife Spork)
DATABAGS
Endpoint Mappings
Package / Library Versions
Volatile Infrastructure Data
TESTING
Require Tests for Logic
RSpecsimplecovMinitest Handler
Logic is anything not Chef DSL
CODE REVIEW
USE ITGerrit
PhabricatorGithub
COMFORT ALLOWS INVESTIGATION
ADVANCTED TOPICSHandlersSearchDynamicConfigurationLWRPs
RESULTS
'Self-Managed' Services
Easier Service Deployment
The Prestige
(AMInator as a Chef Handler)