Top Banner
IS IT WORTH MY TIME? AUTOMATION
45

TIAD - Is Automation Worth My Time?

Apr 16, 2017

Download

Technology

Randall Hunt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TIAD - Is Automation Worth My Time?

IS IT WORTH MY TIME?AUTOMATION

Page 2: TIAD - Is Automation Worth My Time?

@JRHUNTJ. RANDALL HUNT

Page 3: TIAD - Is Automation Worth My Time?

@JRHUNTJ. RANDALL HUNT

Page 4: TIAD - Is Automation Worth My Time?

AGENDA

▸Why automate?

▸When to automate?

▸How to automate?

▸Stories from the field

Page 5: TIAD - Is Automation Worth My Time?

WHY THE HELL AM I DOING THIS?

Page 6: TIAD - Is Automation Worth My Time?

EXAMPLE!sorry, I like big fonts!

Page 7: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

Page 8: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

▸ ls -S | head -1

▸ takes about 4 seconds to type

▸ takes about 45 seconds to google

Page 9: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

▸ ls -S | head -1

▸ takes about 4 seconds to type

▸ takes about 45 seconds to google

▸ largest () { ls -S | head -1 }

▸ takes about 15 seconds to type...

▸ and then 2 seconds forever after

Page 10: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

▸ ls -S | head -1

▸ takes about 4 seconds to type

▸ takes about 45 seconds to google

▸ largest () { ls -S | head -1 }

▸ takes about 15 seconds to type...

▸ and then 2 seconds forever after

Page 11: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

Page 12: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

▸ find . -type f -print0 | xargs -0 du -h | sort -hr | head -1

Page 13: TIAD - Is Automation Worth My Time?

WHY?

FIND LARGEST FILE IN A DIRECTORY

▸ find . -type f -print0 | xargs -0 du -h | sort -hr | head -1

Page 14: TIAD - Is Automation Worth My Time?

WHY?

5 HOURS OF FASCINATED CLICKING LATER

Page 15: TIAD - Is Automation Worth My Time?

https://xkcd.com/1319/

Page 16: TIAD - Is Automation Worth My Time?

https://xkcd.com/1319/

Page 17: TIAD - Is Automation Worth My Time?
Page 18: TIAD - Is Automation Worth My Time?

https://xkcd.com/974/

Page 19: TIAD - Is Automation Worth My Time?

AWS SIMPLE SYSTEMS MANAGEMENT

Page 20: TIAD - Is Automation Worth My Time?

WHEN SHOULD I DO THIS?

Page 21: TIAD - Is Automation Worth My Time?

https://xkcd.com/1205/

Page 22: TIAD - Is Automation Worth My Time?

https://xkcd.com/1205/

Page 23: TIAD - Is Automation Worth My Time?

https://xkcd.com/1205/

PERF

ORMA

NCE

QUALITY

Page 24: TIAD - Is Automation Worth My Time?

WHEN?

CHESS GAME WINNERS

▸ ~14 million games recorded in ASCII

▸ Read in files, aggregate winners, report stats

▸ Sounds like a job for:

Page 25: TIAD - Is Automation Worth My Time?

AMAZON EMR

Page 26: TIAD - Is Automation Worth My Time?

AMAZING PERFORMANCE -- ENTIRE DATASET COMPUTED IN JUST 20 MINUTES FOR <$10!!

Page 27: TIAD - Is Automation Worth My Time?

HMM....

Page 28: TIAD - Is Automation Worth My Time?

WHEN?

CHESS GAME WINNERS

▸ ~14 million games == ~10 gigs

▸ Read in files, aggregate winners, report stats == grep / awk

▸ Sounds like a job for: THE COMMAND LINE!

Page 29: TIAD - Is Automation Worth My Time?

find . -type f -name '*.pgn' -print0 | xargs -0 -n4 -P4 mawk '/Result/ { split($0, a, "-"); res = substr(a[1], length(a[1]), 1); if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++ } END { print white+black+draw, white, black, draw }' | mawk '{games += $1; white += $2; black += $3; draw += $4; } END { print games, white, black, draw }'

Thanks to Adam Drake for figuring this out!

http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html

Page 30: TIAD - Is Automation Worth My Time?

30 SECONDS

Page 31: TIAD - Is Automation Worth My Time?

OK, TELL ME HOW!

Page 32: TIAD - Is Automation Worth My Time?

HOW?

I HAVE NO IDEA WHAT I'M DOING, BUT THIS IS WHAT I DO

1. Identify constraints

‣ Money, Business Goals, Time, Performance, Beauty

2. Pursue mitigating factors within constraints

3. Relentlessly pursue constraints until the laws of physics tell you to stop

4. Iterate

Page 33: TIAD - Is Automation Worth My Time?

WHAT ARE THE ACTUAL CONSTRAINTS?

Page 34: TIAD - Is Automation Worth My Time?

CONSTRAINTS

HARDWARE

▸ AWS EBS gp2 volumes have max ~160MiB/s*

▸ AWS EBS io2 volumes have max ~320 MiB/s*

▸ Realistic max network performance of ~800 MiB/s*

▸ CPU performance varies on instance type but up to 8 terraflops per instance

Page 35: TIAD - Is Automation Worth My Time?

CONSTRAINTS

BUSINESS CONSTRAINTS (MONEY)

▸ How much money can we spend on this problem?

▸ How much time can we spend on this problem?

▸ Will a partially automated solution allow us to kick this problem down the road?

▸ Is it cheaper/easier/more accurate to hire humans?

Page 36: TIAD - Is Automation Worth My Time?

CONSTRAINTS

QUALITY CONSTRAINTS (AI VS HUMANS)

▸ How much better are humans at solving this?

Page 37: TIAD - Is Automation Worth My Time?
Page 38: TIAD - Is Automation Worth My Time?

CRAZY STUFF WE'VE AUTOMATED

Page 39: TIAD - Is Automation Worth My Time?
Page 40: TIAD - Is Automation Worth My Time?

BRINGING IT BACK HOME

Page 41: TIAD - Is Automation Worth My Time?

CLOSING THOUGHTS

INFRASTRUCTURE AS CODE == AUTOMATION AS CODE

▸ Chef, Puppet, Ansible or something similar is vital (you already know this)

▸ AWS CloudFormation lets you launch entire FLEETS and NETWORKS in moments. This system is free...

▸ Heterogeneity is the death of automation (cattle not pets)

Page 42: TIAD - Is Automation Worth My Time?

CLOSING THOUGHTS

STOP DOING THE THINGS YOU ALREADY KNOW HOW TO DO

▸ You already know how to run a reverse proxy -- write the code once and be done with it (Amazon API Gateway).

▸ You already know how to maintain your database (AWS RDS) set up protocols and be done with it

▸ You already know how to manage security and permissions, don't set it up yet again

Page 43: TIAD - Is Automation Worth My Time?

CLOSING THOUGHTS

▸ Identify the biggest automation wins

▸ Pursue your automation by pursuing constraints

▸ Add humanity to the process

▸ Don't overthink it, but definitely think about it

Page 44: TIAD - Is Automation Worth My Time?

AWS User Groups

LilleParisRennesNantesBordeauxLyonMontpellierToulouse

facebook.com/groups/AWSFrance/

@aws_actus

Page 45: TIAD - Is Automation Worth My Time?

AWS Enterprise Summit – 27/10/2016, Paris

http://amzn.to/1X2yp0i