Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AutomaCon 2015 - But Does It Actually Work? Run...

AutomaCon 2015 - But Does It Actually Work? Running Your Infrastructure Code For Real

Unless you want to live in a fantasy world - given the nature of infrastructure code (extremely side effect driven and brittle due to external dependencies) - running this stuff for real is a necessary evil to prove to yourself that it all "still works as advertised".

Fletcher Nichol

September 15, 2015
Tweet

More Decks by Fletcher Nichol

Other Decks in Technology

Transcript

  1. –Adam Jacob, Web Operations “Enable the reconstruction of the business

    from nothing but a source code repository, an application data backup, and bare metal resources.” Infrastructure as Code
  2. Does Code Decay? • Published January, 2001 • Large codebase

    for telephone switches • 100,000,000 LOC (C/C++) • 15-year old codebase • Each release ~20,000,000 LOC
  3. Decayed Code Unit of code is decayed if it is

    harder to change than it should be, measured in terms of effort, interval, and quality
  4. Decayed Code: Measurement 1. Cost of the change, which is

    effectively on the personnel cost for the developers who implemented it 2. Interval to complete the change, the calendar/clock time required 3. Quality of the changed software
  5. Code Decay • Decay is temporal, may be useful to

    add a “more difficult to change than it used to be” to the definition • Code can be ”correct” and still be decayed • Software that is decaying is simultaneously increasing in value
  6. Decay: Three Classes of Changes 1. Adaptive changes - add

    new functionality to a system 2. Corrective changes - fix faults in the software 3. Perfective changes (“maintenance for the sake of maintenance” or “reengineering”) - are intended to improve the developers’ ability to maintain the software without altering functionality or fixing faults
  7. Symptoms of Code Decay (Selected) 1. Excessively complex (bloated) code

    2. A history of frequent change (a.k.a. code churn) 3. Widely dispersed changes 4. Numerous interfaces (i.e. entry points)
  8. But It Gets Worse • In general, low fault tolerance

    (everyone read Release It!) • Dependency management complexities • Aggressively changing runtimes
  9. Shannon Entropy • From Information theory • Introduced by Claude

    E. Shannon in "A Mathematical Theory of Communication” (1948) • Expected value of the information contained in each message received • Entropy of a message is its amount of uncertainty • Increases when the message is closer to random • Decreases when it is less random
  10. Why Do We Test? We test software systems because there

    is uncertainty in its actual behavior.
  11. Why Do We Test? 1. The more we test, the

    more we know about the system under test 2. The more we know about the system under test, the more likely faults can be found
  12. –Jez Humble and David Farley, Continuous Delivery “If it hurts,

    do it more frequently, and bring the pain forward.”
  13. References Jacob, Adam. “Infrastructure as Code.” Web Operations: Keeping the

    Data on Time. Ed. John Allspaw and Jesse Robbins. Beijing: O’Reilly, 2010. 65-80. Print. Boehm, B.w., and P.n. Papaccio. “Understanding and Controlling Software Costs.” IEEE Transactions on Software Engineering IIEEE Trans. Software Eng. 14.10 (1988): 1462-477. Web. 9 Sept. 2015. Eick, S.g., T.l. Graves, A.f. Karr, J.s. Marron, and A. Mockus. “Does Code Decay? Assessing the Evidence from Change Management Data.” IEEE Transactions on Software Engineering IIEEE Trans. Software Eng. 27.1 (2001): 1-12. Web. 9 Sept. 2015. Yang, Linmin. “Entropy and Software Systems: Towards an Information-theoretic Foundation of Software Testing.” Diss. Washington State U, 2011. Web. 9 Sept. 2015. <https://research.wsulibs.wsu.edu/xmlui/ bitstream/handle/2376/2901/Yang_wsu_0251E_10145.pdf?sequence=1>. “Entropy (information theory).” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc. 7 Sept. 2015. 9 Sept. 2015 <https://en.wikipedia.org/wiki/Entropy_(information_theory)>. Humble, Jez, and David Farley. Continuous Delivery. Upper Saddle River, NJ: Addison-Wesley, 2011. Print.
  14. Image Credits Downtown Portland, OR: https://flic.kr/p/cXAqeb Construction Silhouette: https://flic.kr/p/k1fGAe Bay

    Bridge East Span Under Construction: https://flic.kr/p/wGCczf Lincoln's Inn Library: https://flic.kr/p/dp6D4X Random • Geometry: https://flic.kr/p/6KzZF7 Ballot boxes from the 2008 London elections: https://flic.kr/p/4KBnFw Stock Photography - Canadian Coins: https://flic.kr/p/q6Ufjj Practice. Practice. Practice.: https://flic.kr/p/qSBYah Deserted Beach: https://flic.kr/p/85KM6Q