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

DevOpsDays Cuba 2017: DevOps Archeology

DevOpsDays Cuba
October 25, 2017
340

DevOpsDays Cuba 2017: DevOps Archeology

Author: Lee Fox
Summary: Back in at the 2001 OOPSLA Conference, the term Software Archeology was first coined. It gave a set of tools and processes for understanding a poorly documented and poorly maintained software architecture. It didn’t just work for the undocumented codebases, but ones that are incredibly large and complex, even if good documentation exists. The idea was to follow the true archeology with investigative work to understand the mindsets of the people who did the original implementations. Nowadays, the problem of understanding software still exists, but has also grown by a quite with the larger scales of production environments that are often times distributed or found in the cloud. So, this session will help the DevOps engineer walking into a new shop with tools and techniques to understand, not only the code, but the entire production system as well. This will help provide faster ramp time, higher quality software implementations, and more stable production environments.

DevOpsDays Cuba

October 25, 2017
Tweet

More Decks by DevOpsDays Cuba

Transcript

  1. • Cloud Architect at Infor • Agile, DevOps, ChatOps evangelist

    • Involved with Agile Austin, Cloud Austin • Alexa Developer • Amateur Chef 2
  2. 5

  3. 6

  4. 7

  5. 8

  6. 9

  7. • First appeared at 2001 OOPSLA conference as a workshop

    • Gain perspective and understanding into application behavior • Understand what predecessors were thinking 10
  8. • First appeared at Austin DevOps, October 2017 • Applying

    Concept to Infrastructure • Infrastructure as code • Learn what predecessors were thinking • Understand how systems work together 11
  9. • This is about the artifacts—the technology • Culture and

    processes forthcoming in DevOps Anthropology 12
  10. • Scripting languages • Ongoing documentation • Signature Analysis and

    software visualization • Reverse Engineering tools • Operating System level traces • Coupling Analysis • Source Control • Search Engines • IDE file browsing • Unit testing • API documentation generation tools • Debuggers • Dependency Analysis 13
  11. 15

  12. 16

  13. • Isolate the artifact • Apply stimuli to the artifact

    • Measure the response of the artifact • Repeat as necessary 18
  14. 19

  15. • Visualizations Provide easy ways to understand code • A

    picture is worth 1000 words • Visualizations are focused along a single dimension or two 20
  16. package org.apache.tomcat.websocket; import javax.websocket.Decoder; public class DecoderEntry { private final

    Class<?> clazz; private final Class<? extends Decoder> decoderClazz; public DecoderEntry(Class<?> clazz, Class<? extends Decoder> decoderClazz) { this.clazz = clazz; this.decoderClazz = decoderClazz; } public Class<?> getClazz() { return clazz; } public Class<? extends Decoder> getDecoderClazz() { return decoderClazz; } }
  17. package org.apache.tomcat.websocket; import java.nio.ByteBuffer; import javax.websocket.SendHandler; class MessagePart { private

    final boolean fin; private final int rsv; private final byte opCode; private final ByteBuffer payload; private final SendHandler intermediateHandler; private volatile SendHandler endHandler; private final long blockingWriteTimeoutExpiry; public MessagePart( boolean fin, int rsv, byte opCode, ByteBuffer payload, SendHandler intermediateHandler, SendHandler endHandler, long blockingWriteTimeoutExpiry) { this.fin = fin; this.rsv = rsv; this.opCode = opCode; this.payload = payload; this.intermediateHandler = intermediateHandler; this.endHandler = endHandler; this.blockingWriteTimeoutExpiry = blockingWriteTimeoutExpiry; } public boolean isFin() { return fin; } public int getRsv() { return rsv; } public byte getOpCode() { return opCode; } public ByteBuffer getPayload() { return payload; } public SendHandler getIntermediateHandler() { return intermediateHandler; } public SendHandler getEndr() { return endHandler; } public void setEndHandler(SendHandler endHandler) { this.endHandler = endHandler; } public long getBlockingWriteTimeoutExpiry() { return blockingWriteTimeoutExpiry; } }
  18. • My version is at http://github.com/ vanderfox/signaturesurvey • Attempting to

    make it language agnostic • Pass in list of characters to scan for 28
  19. 30

  20. • Keep track of your changes and experiments • Analyze

    history of code to date • Branch to isolate changes 31
  21. 32

  22. 33

  23. 34 • See what your upstream/ Downstream dependencies are •

    Specifically, see what you will break with changes
  24. 35

  25. • Intercept requests between machines • Inspect Headers • Look

    at packets • record conversations between machines 36
  26. 37

  27. 38

  28. • Poke the box • Unit Testing for code •

    End to End testing Tools for Infrastructure • Drive full stacks or UIs 41
  29. • Much better for automation than shell scripts • Idempotent

    • Discovery is a repetitive activity 44