Slide 1

Slide 1 text

Lee Fox @FoxInATX 1

Slide 2

Slide 2 text

• Cloud Architect at Infor • Agile, DevOps, ChatOps evangelist • Involved with Agile Austin, Cloud Austin • Alexa Developer • Amateur Chef 2

Slide 3

Slide 3 text

• Java development background • AWS background 3

Slide 4

Slide 4 text

• DevOps Archeology • Dig Techniques 4

Slide 5

Slide 5 text

5

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

7

Slide 8

Slide 8 text

8

Slide 9

Slide 9 text

9

Slide 10

Slide 10 text

• First appeared at 2001 OOPSLA conference as a workshop • Gain perspective and understanding into application behavior • Understand what predecessors were thinking 10

Slide 11

Slide 11 text

• 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

Slide 12

Slide 12 text

• This is about the artifacts—the technology • Culture and processes forthcoming in DevOps Anthropology 12

Slide 13

Slide 13 text

• 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

Slide 14

Slide 14 text

• Monitoring tools • Log Aggregation • Automation tools • Testing Tools

Slide 15

Slide 15 text

15

Slide 16

Slide 16 text

16

Slide 17

Slide 17 text

• Start by observing the box • Describe it • Conduct experiments 17

Slide 18

Slide 18 text

• Isolate the artifact • Apply stimuli to the artifact • Measure the response of the artifact • Repeat as necessary 18

Slide 19

Slide 19 text

19

Slide 20

Slide 20 text

• Visualizations Provide easy ways to understand code • A picture is worth 1000 words • Visualizations are focused along a single dimension or two 20

Slide 21

Slide 21 text

• https://wettel.github.io/ codecity-download.html • Java, C++, C# • Limited to non- commercial use 21

Slide 22

Slide 22 text

• http://gource.io/ • Evolution of codebase • Works with multiple source code repositories 22

Slide 23

Slide 23 text

• Concept introduced by Ward Cunningham • Quick, Visual way to scan for patterns in code 23

Slide 24

Slide 24 text

package org.apache.tomcat.websocket; import javax.websocket.Decoder; public class DecoderEntry { private final Class clazz; private final Class decoderClazz; public DecoderEntry(Class clazz, Class decoderClazz) { this.clazz = clazz; this.decoderClazz = decoderClazz; } public Class getClazz() { return clazz; } public Class getDecoderClazz() { return decoderClazz; } }

Slide 25

Slide 25 text

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; } }

Slide 26

Slide 26 text

DecoderEntry.class: ;;{;;(){;;}{;}(){;}} MessagePart.class: ;;;{;;;;;;;(){;;;;;;;}(){;}(){;}(){;}(){;}(){;}(){;}(){;}(){;}} MessageHandlerResult.class: ;;{;;(){;;}(){;}(){;}} WsIOException.class: ;;;{;;(){;}(){;}} WsPongMessage.class: ;;;{;(){;;;}(){;}}

Slide 27

Slide 27 text

NestedIf.class: ;;{(){{{{{{}}}}}}} LotsOfImports.class: ;;;;;;;;;;;;;;;{;;;;;;;(){;;;;;;;}(){;}} Constants.class: ;;{;;;;;;;;;;;;;;;;;;;;;;;;} ReallyBigMethod.class: ;;;{;;(){;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;}(){;}}

Slide 28

Slide 28 text

• My version is at http://github.com/ vanderfox/signaturesurvey • Attempting to make it language agnostic • Pass in list of characters to scan for 28

Slide 29

Slide 29 text

29 • Found at: http://logstalgia.io/ • Visualize traffic to a web server

Slide 30

Slide 30 text

30

Slide 31

Slide 31 text

• Keep track of your changes and experiments • Analyze history of code to date • Branch to isolate changes 31

Slide 32

Slide 32 text

32

Slide 33

Slide 33 text

33

Slide 34

Slide 34 text

34 • See what your upstream/ Downstream dependencies are • Specifically, see what you will break with changes

Slide 35

Slide 35 text

35

Slide 36

Slide 36 text

• Intercept requests between machines • Inspect Headers • Look at packets • record conversations between machines 36

Slide 37

Slide 37 text

37

Slide 38

Slide 38 text

38

Slide 39

Slide 39 text

• Cloudwatch • StackDriver Monitoring • Datadog • LogicMonitor 39

Slide 40

Slide 40 text

• Splunk • ELK • Graylog 40

Slide 41

Slide 41 text

• Poke the box • Unit Testing for code • End to End testing Tools for Infrastructure • Drive full stacks or UIs 41

Slide 42

Slide 42 text

• Validate the knowledge learned • Duplicate the artifact 42

Slide 43

Slide 43 text

• Ansible • Salt • Chef • Puppet • Capistrano 43

Slide 44

Slide 44 text

• Much better for automation than shell scripts • Idempotent • Discovery is a repetitive activity 44

Slide 45

Slide 45 text

• https://en.wikipedia.org/wiki/Software_archaeology • http://c2.com/doc/SignatureSurvey/ • https://wettel.github.io/codecity-download.html • https://en.wikipedia.org/wiki/Infrastructure_as_Code 45

Slide 46

Slide 46 text

• Lee Fox • Email: [email protected] • Twitter: @FoxInATX 46 http://bit.ly/DevOpsArcheology