19
Toolmaking Julien Goodwin — @LapTop006 [email protected]

Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

ToolmakingJulien Goodwin — @[email protected]

Page 2: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Image: https://www.flickr.com/photos/baggis/3558629328/ CC-BY-NC

Page 3: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Image: https://www.flickr.com/photos/steve-wilson/102518219/ CC-BY-NC

Page 4: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Image: https://www.flickr.com/photos/mtneer_man/1253372145/ CC-BY-NC

Page 5: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Image: https://www.flickr.com/photos/mwichary/4376236771/ CC-BY

Page 6: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Toolmaking in Operations

Page 7: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

What for? (1)

Answer ad-hoc questions

● “Do we have any of these recalled components”● “What does this BGP route look like on all our core routers”● Sometimes a rough answer quickly is more valuable than correct but slow

Replace manual processes with consistent automated (even if in part) ones.

● Deployment ● Test

Page 8: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

What for? (2)

Simple examples for future work

● Real, but simple uses of libraries

Building a toolkit for later uses

● Things you can plumb together are great

Page 9: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

What in?

Shell Pipelines

Shell Scripts

Editor macros

Perl / Python / Ruby / Powershell / etc. scripts

C++ / Java / Go / Rust tools

Page 10: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

How complex? (1)

Shell Pipelines — A few lines, one-offs

Shell Scripts — A few dozen lines at most

Editor macros — A few lines

Page 11: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

How complex? (2)

Perl / Python / Ruby / Powershell / etc. scripts

C++ / Java / Go / Rust tools

— No inherent limits, practice sensible modularity & testing.

Page 12: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Validation & Testing

Testing large operations tools can be hard.

Splitting elements into testable modules, with their own fake implementations for larger system tests can work well.

Try to keep a standard, shared library for constants.

Page 13: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

User Experience

Once a tool is ever to be run by someone other than the initial author.

(Or the initial author in six months … weeks … days … hours)

● Some trivial documentation○ “Tool does X”○ “Does not do Y or Z”○ “Will need an update if Project Fremont happens”

● Input validation○ Doesn’t need to be perfect, catching gross errors and bailing with a usage message is fine

Page 14: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Distribution

No personal tools for team problems

Have a way to distribute so all team members can run

... and update

Page 15: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Scaling Toolmaking

Page 16: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Scaling from zero...

Some companies “don’t allow” ops engineers to “write software”.

There’s often an end run (script exception) that’s used in practice.

Management cover a “read-only” rule may help to start.

Page 17: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Scaling to one.

In many ops teams hiring a single toolmaking-focused engineer can be the biggest marginal value hire possible.

That toolmaker still needs to be a member of the team.

Page 18: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Scaling to zero...

A separate team of toolmakers is often bad.

If scaling to a separate team is needed have that team work on supporting infrastructure.

Page 19: Toolmaking - linux.conf.au€¦ · Testing large operations tools can be hard. Splitting elements into testable ... In many ops teams hiring a single toolmaking-focused engineer can

Questions?Julien Goodwin — @[email protected]

QT / KDE dev, or work with BGP? Please come talk to me.