shipping code sucks! ways to make it better€¦ · shipping code sucks! ways to make it better...
TRANSCRIPT
Shipping Code Sucks!Ways to Make it Better
Myles A. K. Steinhauser@masteinhauser
@masteinhauser 2
About Me● Really, hardly anyone ever cares but if you insist...● Worked at Applied Data Consultants
– Helped build a stable and reliable RealTime Routing and Tracking SaaS– Dev and Ops, eventually shifted to Ops to help entire Company
● Now at Stratus Technologies in Maynard, MA (Boston)– I am helping build an automated Disaster Recovery system for
FaultTolerant and HighlyAvailable Vms– Automated Deployment of Dev/Prod environment to
workstations, build pipeline and final QA team
● Linux knowledge and do not know Windows well. Sorry!
Onward!
@masteinhauser 3
Tools
● Chef– Puppet too!
● Vagrant– VirtualBox– VMware Fusion or Workstation
● Packer● Jenkins● Omnibus
@masteinhauser 4
Let's talk about Chef, baby
● Configuration Management– Installed Packaged– Their Configurations– 'Usable Documentation'
● Write once, deploy (and debug) everywhere● System 'version' stored in Git, etc.● Automated Testing before deployment● Helps create Deterministic environments
@masteinhauser 5
Vagrant
● Consumes Vagrantfile– Defines
● VM Name● Network Interfaces● Box to use
● Written in Ruby– Distributed as Omnibus package
@masteinhauser 6
Hypervisor
● VirtualBox– Open source, managed by Oracle
● VMware Fusion / Workstation– Closed
● Both used by Vagrant to run VMs
@masteinhauser 7
Packer
● Consumes JSON template file● Installs OS
– RHEL Family (CentOS, Fedora)● Kickstart
– Ubuntu/Debian● Preseed
● Builds VMs– Can build for AWS, VirtualBox, Vmware, Xen
@masteinhauser 8
Jenkins
● Continuous Integration– Per commit build execution– Run all Unit Tests– Artifact Builds and Storage
● Continuous Deployment– Integration Tests– System Tests (hardware failures, etc)– Performance Tests
@masteinhauser 9
Why all these Tools?
@masteinhauser 10
This Buys us...
Stability
=
Scalability + Determinism
(Keep this concept in mind)
@masteinhauser 11
This Buys Us...
● Developer Productivity● Less time setting up
– Developer Workstations– Lab Environment– “Works on My Machine!”– Debugging in the field
@masteinhauser 12
Chef
● Recipes● Cookbooks
– Application Style
● Berkshelf● Environments● Chef Solo vs Chef Server
@masteinhauser 13
Vagrant
● Downloads Boxes● Imports● Boots● Configures anything as needed● Keep in Git, “snapshot” environments
@masteinhauser 14
Packer
● Builders– Create a Machine on a Single Platform
● Provisioners– Install and configure software within a running machine
before exporting into 'golden image'
● PostProcessors– Take the artifact of the above and create a new artifact
@masteinhauser 15
Pets vs Cows
● Originally coined by Randy Bias– If you are “into Cloud” you should follow him
● Pets– brandon– Lindsay
● Cattle– web01– db006
@masteinhauser 16
Pets vs Cows
Something goes wrong with your:● Pet
– SSH in– Fix the problem manually
● Cows– Shoot it.
@masteinhauser 17
What this buys us...
● Stability– Scalability
● Bring up new machines at any time● Immutable Infrastructure
– This is great on cloud platforms!
– Determinism● All machines and templates have been pretested● Failure modes are known beforehand
– If not, add a test!
@masteinhauser 18
Shipping to Customers
● With all of the previous– We have been treating our build pipeline and
developers as...
CUSTOMERS
@masteinhauser 19
Shipping to Customers
● We are now able to...– Downloadable VM Appliance
● VirtualBox● Vagrant● Xen● KVM
– EC2 image
@masteinhauser 20
Shipping to Customers
● But we still cannot...– Incrementally upgrade
● Maybe!
@masteinhauser 21
Omnibus
● “Easily create fullstack installers for your project across a variety of platforms.”
● Static Installation for Dynamic Dependencies– /opt/appname/deps
@masteinhauser 22
Questions / Discussion
Shoot 'em at me!
@masteinhauser 23
Images● http://en.wikipedia.org/wiki/MV_Blue_Marlin
●