SlideShare a Scribd company logo
1 of 41
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Akhtar Hossain
AWS Solution Architect
Sep 7th, 2017
AWS Startup Day
Manual & Automation
Overview
1. Where to begin with automation (10m)
2. Tools and tips for building automation (15m)
3. Monitoring and maintaining tools you’ve built (15m)
If you want to build an engineering company,
hire more than 50% engineers.
Evolution of Automation
Automated systems evolve over time. Start simple.
Manually Build
A Cluster
Automatically
Build A Cluster
Self Service
Creation Of A
Cluster
Phase 1 Phase 2 Phase 3
Start with the most common
Issue tracking tools help tell you where to automate
Look at the most common types of requests coming
into a team and begin automating those:
Deploys, Database Migrations, Access Requests,
Service Provisioning, etc.
If you’re small enough you should have a good sense
of what you spend the most time doing repetitively.
Always Be An Un-blocker
Identify Where Teams Are Waiting On Others
New
Feature
Developed
Dev Run
TestingQA Deploy
CodeOps
New
Feature
Developed
Dev Run
TestingDev Deploy
CodeDev
Automation Is Company Wide
Work Closely With All Of Your Teams
Too commonly automation is only prioritized for engineering teams.
All teams benefit from some of the simplest improvements to process.
Spend time with non-engineering teams and understand their workflows.
Small investments in these processes early on prevent hiring people to
manually do this labor.
It’s generally never too early to automate, but
usually too late once it’s needed.
Section Review
Key Takeaways On Where To Begin
1. Automation evolves over time. Start simple, and build on those ideas.
2. Identify the most common requests through ticketing systems and
frequent asks by other teams.
3. Become an “Unblocker” to help speed up productivity across your
company.
4. Spend time talking across other teams to find out what automation
would make their lives easier.
Self Service
Phase 1
Manual Process For Everything: 35 Minutes
Developer
Needs Deploy
Requests
Deploy From
Ops
Manually
Deploys
15 Minutes 20 Minutes
Phase 2
Automatic Deploys, Manually Triggered: 17 Minutes
Developer
Needs Deploy
Requests
Deploy From
Ops
Automatically
Deploys
15 Minutes 2 Minutes
Phase 3
Self Service Automated Deploys: 2 Minutes
Developer
Needs Deploy
Self Service
Deploys
2 Minutes
Phase 3
Feedback Of Status/Health Is Essential
Developer
Needs Deploy
Self Service
Deploys
2 Minutes
Problems? Failures? Error Rates?
Creating Self Service Tools
Multiple ways to build tools
Interface Pros Cons
Command Line Easy to use Difficult to maintain versioning across
many systems. Library dependencies
(w/o compiled binaries)
API Easy for building complex tooling Requires detailed documentation
Web Interface Easy to interact with. Easy secondary
execution methods in emergency.
Have to also maintain a
website/interface. Generally interfaces
with APIs/Command Line tools in the
backend.
Chat Interface Easy to use and easy to onboard new
engineers. Easy secondary execution
methods in emergency.
Depends on API, CommandLine tools,
and config management on the back
end.
Creating Self Service Tools
Chat is a powerful way to build tooling
Some people create web interfaces, but this becomes difficult to maintain,
and now you have to manage additional services and resource for this
portal.
Becomes one big project that gets managed as it grows and robs resources
from development teams.
Chat is a simple interface to develop for and maintain.
Advantages Of Chat Based
Don’t reinvent the wheel if you don’t have to
Visibility about what is happening in the environment across teams
Audit trail for quicker troubleshooting and added compliance
Self service to help teams work faster without being dependent on
others
Easy to enforce policy and good practice
Advantages Of Using Chat Automation
Visibility On What’s Happening In The Company
[Mackenzie Kosut 2:18PM] @mrbot deploy production
[MrBot 2:18 PM] Deploying git commit 577f84e37 from Staging to
Production for @mackenzie
[MrBot 2:19 PM] Deploy 577f84e37 out to 10% of Production
[MrBot 2:21 PM] Error levels healthy (0.02% down from %0.021)
proceeding with rest of deploy of 577f84e37 to Production
[MrBot 2:22 PM] Deploy 577f84e37 out to 100% of Production [MrBot
2:27 PM] Deploy 577f84e37 health is good (0.019% down from %0.021).
Deploy 577f84e37 successful for @mackenzie
1. Developer runs deploy
2. Code is deployed to 10% of Production
3. Monitoring verifies code is healthy
4. System automatically finished deploys
Advantages Of Using Chat Automation
Ability To Audit & Backtrack Incidents
[Mackenzie Kosut 2:18PM] @mrbot run migration #183
[MrBot 2:18 PM] Running migration #183 for @mackenzie
[MrBot 2:19 PM] [FAIL] MySQL Error Message: Table '%s' was locked with
a READ lock and can't be updated
[AlertSystem 2:19 PM] [FAIL] Production Web (mysite.com) HTTPS failed
healthcheck
[MrBot 2:21 PM] Migration failed
1. Developer runs automated migration using chat command
2. Migration fails
3. Website health check fails
4. Migration aborts
Advantages Of Using Chat Automation
Easy To Enforce Policy & Best Practice
1. Developer attempts unauthorized after hour deploy
2. System prevents deploy and educates user on how to over-ride
[Mackenzie Kosut 4:51 AM] @mrbot deploy production
[MrBot 4:51 AM] Sorry Mackenzie, only authorized users can run
production deploys after hours. Re-run with +escalate to initiate
approval process.
* Good practice is to always have any production change, regardless of size or complexity, reviewed by two people.
Large Number of Open Source Projects
Don’t reinvent the wheel if you don’t have to
Leverage many of the available tools for
building chat interfaces.
Many come with a large number of add-
ons and capabilities out of the box.
Large number of users also means a
bigger community for support and
guidance.
Building Chat Automation Is Easy
Create Automation With Familiar Tools
Deploy
Production
Ansible
Wrapper
deploy.yml
Ansible
Wrapper
You don’t need to be a CoffeeScript* expert, simply use it
as a wrapper to execute languages of choice.
- name: Launch instance with ebs
local_action:
ec2 keypair={{ keypair }}
instance_type={{ instance_type.stdout }}
image={{ base_ami_201704.stdout }}
region={{ region }}
count={{ count }}
tenancy={{ tenancy }}
wait=true
wait_timeout={{ wait_timeout }}
vpc_subnet_id={{ availability_zone.stdout }}
ebs_optimized={{ ebs_optimized.stdout }}
group=ansible_default,ansible_{{primary_role}}
register: ec2
when: ebs_optimized.stdout == 'true'
Simplify The Interface For Familiar Tools
Example of an Ansible playbook that Hubot calls via CoffeeScript
Building a Chat Bot
Build automation around processes you understand
Instead of trying to build a messenger bot
from scratch, understand how your users
would interact with it.
It’s informative to be a mechanical turk and
manually handle responses. Find the most
common requests and begin automating
those.
Obviously this works for launching smaller
services, once at scale, you need a
different approach.
Section Review
Key Takeaways On Self Service Tools
1. Self service tools allow teams to move quicker without being blocked on
others.
2. Teams need confidence in being self service which requires proper
metrics and feedback of how their process is performing.
3. Automated processes should have a manual fall back mode in the event
of an emergency.
4. Spend time talking across other teams to find out what automation
would make their lives easier.
Data Science & Analytics
Self Service Is Useful Everywhere
Data Science & Analytics Is A Great Example
Requests
DataSales
Researches
Request
Data Provides
ReportData
Requests
DataSales
Views
Report,
Tweaks As
Needed
Sales
Self Service Is Useful Everywhere
Data Science & Analytics Is A Great Example
Self Service Is Useful Everywhere
Data Science & Analytics Is A Great Example
Database
Managing
Users&Rights
SQL ClientUser
Database
Managing
Users&Rights
Managing multiple users and grants across multiple databases can be frustrating.
Self Service Is Useful Everywhere
Data Science & Analytics Is A Great Example
AbstractedReportingLayer
User
Database
Database
GroupUserPer
Role/Team
GroupUserPer
Role/Team
Abstracting away into an abstraction layer allows centralized control and auditing.
Air Canada Near-Miss at San Francisco
FAA Automation Paradox
This Applies To The World Of Infrastructure
https://www.faa.gov/c/content/dam/faa/regulations-policies/documents/rmh_ch07.pdf
“..because the pilot lacked critical skills and the flight crew
relied too heavily on an automated system it did not fully
understand.”
1. Build automation tools but understand how they work, what they
do, and when to use them.
2. Don’t build tools dependent on other tools. Dependency chains
like these complicate debugging.
3. Production automation systems should be simple to understand,
simple to run, and simple to troubleshoot.
Keep Your Automation Simple
Follow The Unix Tools Philosophy
Make each program do one thing well. To do a new job, build afresh rather than complicate old programs
by adding new "features".
Expect the output of every program to become the input to another, as yet unknown, program.
Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't
insist on interactive input.
Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate
to throw away the clumsy parts and rebuild them.
Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build
the tools and expect to throw some of them out after you've finished using them.
https://en.wikipedia.org/wiki/Unix_philosophy
Output Status & Failure
Keep Interface Simple, But Logging Detailed
1. Keep the output to the end user simple and readable
2. Always ensure you have detailed logging written somewhere
3. Failures should explain why it failed, and what action to take next.
Don’t Underestimate Macros
Simple Local Tools Can Be Powerful To Your Organization
Open Ticket
(ZenDesk)
Look Up User ID In
Admin Tool
Search Site Usage In
Analytics Tool
Respond With Standard
Response
Open Ticket
(ZenDesk)
Look Up User In
Admin Tool
Search Site Usage In
Analytics Tool
Respond With Standard
Response
30s 30s 30s
5s 5s
U 1
ManuallyMacros
VoiceOps with Alexa
Looking forward at what’s possible
Alexa..
.. Ask production for error rate?
.. Ask production to ban IP 14.12.13.5
.. Ask production to deploy master
.. Ask development to spin down unused instances
.. Ask production to verify backups
.. Ask staging for current testing status
Finding Time To Build Automation
Let’s Be Honest, There Is Never A Right Time
1. Dedicate time weekly to work on automation. 2-4 hours, same day and
time, sit down and spend time just automating.
2. Work with others to bounce ideas off of what to build next and how to
improve on what you have.
3. Try to automate ahead of the problems before the tasks become too
great. Dedicating time helps give you this advantage.
4. Think of the 2-4 hours of time as an investment. You will get multiple
times this free time back once better systems are in place.
Summary
Keep Interface Simple, But Logging Detailed
1. When building automation, build it around a self-service model.
2. Don’t reinvent the wheel, build with what tools & frameworks already
exist.
3. Keep your tools simple, not dependent on others, and easy to
understand.
4. Build easy to understand interfaces but retain detailed logging
5. Automation helps you build controls & policy as you grow
6. Don’t underestimate simple automation tools
“Always be unblocking others.”
Own the problem, not the solution.
AWS Automation Day: Tools and Tips for Building Simple, Effective Automation

More Related Content

What's hot

Operating system module
Operating system moduleOperating system module
Operating system modulekiamiel
 
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSI
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSIIntroduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSI
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSIVarun Mahajan
 
Software life cycle comparison
Software life cycle comparisonSoftware life cycle comparison
Software life cycle comparisonSuvek Shakya
 
Ramanujan IT City, Chennai - 100 % recycled water used for cooling tower
Ramanujan IT City, Chennai - 100 % recycled water used for cooling towerRamanujan IT City, Chennai - 100 % recycled water used for cooling tower
Ramanujan IT City, Chennai - 100 % recycled water used for cooling towerDanfoss India
 
HVAC Energy Efficiency in Commercial Buildings
HVAC Energy Efficiency in Commercial BuildingsHVAC Energy Efficiency in Commercial Buildings
HVAC Energy Efficiency in Commercial BuildingsAlan Richardson
 
Implementation
ImplementationImplementation
Implementationhcicourse
 
Smart building Requirements
Smart building RequirementsSmart building Requirements
Smart building RequirementsIndrajeet Kumar
 
Unit 1 defects classes
Unit 1 defects classesUnit 1 defects classes
Unit 1 defects classesRoselin Mary S
 
Contents of Computer Software
Contents of Computer SoftwareContents of Computer Software
Contents of Computer SoftwareAvinash Rouniyar
 
Fundamentals of Practical Building Automation Systems
Fundamentals of Practical Building Automation SystemsFundamentals of Practical Building Automation Systems
Fundamentals of Practical Building Automation SystemsLiving Online
 
Intelligent Building Management Systems
Intelligent Building Management SystemsIntelligent Building Management Systems
Intelligent Building Management SystemsKhaled Ali
 
Emulation and simulation
Emulation and simulationEmulation and simulation
Emulation and simulationNebalAlJamal
 

What's hot (20)

Operating system module
Operating system moduleOperating system module
Operating system module
 
Bms system
Bms  systemBms  system
Bms system
 
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSI
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSIIntroduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSI
Introduction to GNU/Linux, Free Software, Open Source Software, FSF, FSM, OSI
 
Software life cycle comparison
Software life cycle comparisonSoftware life cycle comparison
Software life cycle comparison
 
System engineering
System engineeringSystem engineering
System engineering
 
Ramanujan IT City, Chennai - 100 % recycled water used for cooling tower
Ramanujan IT City, Chennai - 100 % recycled water used for cooling towerRamanujan IT City, Chennai - 100 % recycled water used for cooling tower
Ramanujan IT City, Chennai - 100 % recycled water used for cooling tower
 
HVAC Energy Efficiency in Commercial Buildings
HVAC Energy Efficiency in Commercial BuildingsHVAC Energy Efficiency in Commercial Buildings
HVAC Energy Efficiency in Commercial Buildings
 
Implementation
ImplementationImplementation
Implementation
 
Smart building Requirements
Smart building RequirementsSmart building Requirements
Smart building Requirements
 
LED Lighitng for Sports
LED Lighitng for Sports LED Lighitng for Sports
LED Lighitng for Sports
 
Unit 1 defects classes
Unit 1 defects classesUnit 1 defects classes
Unit 1 defects classes
 
Contents of Computer Software
Contents of Computer SoftwareContents of Computer Software
Contents of Computer Software
 
Fundamentals of Practical Building Automation Systems
Fundamentals of Practical Building Automation SystemsFundamentals of Practical Building Automation Systems
Fundamentals of Practical Building Automation Systems
 
Green rating systems
Green rating systemsGreen rating systems
Green rating systems
 
Smart buildings
Smart buildingsSmart buildings
Smart buildings
 
Intelligent Building Management Systems
Intelligent Building Management SystemsIntelligent Building Management Systems
Intelligent Building Management Systems
 
Emulation and simulation
Emulation and simulationEmulation and simulation
Emulation and simulation
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
Climate and buildings
Climate and buildings   Climate and buildings
Climate and buildings
 
Slides chapters 6-7
Slides chapters 6-7Slides chapters 6-7
Slides chapters 6-7
 

Similar to AWS Automation Day: Tools and Tips for Building Simple, Effective Automation

Why Startups Need Automated Infrastructures
Why Startups Need Automated InfrastructuresWhy Startups Need Automated Infrastructures
Why Startups Need Automated InfrastructuresAdam Jacob
 
Why Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure PresentationWhy Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure Presentationelliando dias
 
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...Amazon Web Services
 
Building An Automated Infrastructure
Building An Automated InfrastructureBuilding An Automated Infrastructure
Building An Automated Infrastructureelliando dias
 
Building Automated Infrastructures
Building Automated InfrastructuresBuilding Automated Infrastructures
Building Automated Infrastructureselliando dias
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsBenjamin Cane
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingAnna Russo
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systemsLen Bass
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio worldCodecamp Romania
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...Anna Russo
 
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...apidays
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Servicebutest
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Servicebutest
 
Application Of A Server Hardening Essay
Application Of A Server Hardening EssayApplication Of A Server Hardening Essay
Application Of A Server Hardening EssayWinstina Kennedy
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous DeliveryNetcetera
 
We-Donut.io presentation of Platform
We-Donut.io presentation of PlatformWe-Donut.io presentation of Platform
We-Donut.io presentation of PlatformDennis Reurings
 

Similar to AWS Automation Day: Tools and Tips for Building Simple, Effective Automation (20)

Why Startups Need Automated Infrastructures
Why Startups Need Automated InfrastructuresWhy Startups Need Automated Infrastructures
Why Startups Need Automated Infrastructures
 
Why Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure PresentationWhy Your Start Up Needs An Automated Infrastructure Presentation
Why Your Start Up Needs An Automated Infrastructure Presentation
 
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...
Start Up Austin 2017: Manual vs Automation - When to Start Automating your Pr...
 
Building An Automated Infrastructure
Building An Automated InfrastructureBuilding An Automated Infrastructure
Building An Automated Infrastructure
 
Building Automated Infrastructures
Building Automated InfrastructuresBuilding Automated Infrastructures
Building Automated Infrastructures
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environments
 
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STAREAST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Improving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester TrainingImproving Software Quality- 2-day Tester Training
Improving Software Quality- 2-day Tester Training
 
DevOps explained
DevOps explainedDevOps explained
DevOps explained
 
Dev ops and safety critical systems
Dev ops and safety critical systemsDev ops and safety critical systems
Dev ops and safety critical systems
 
Adrian marinica continuous integration in the visual studio world
Adrian marinica   continuous integration in the visual studio worldAdrian marinica   continuous integration in the visual studio world
Adrian marinica continuous integration in the visual studio world
 
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
 
Presentation
PresentationPresentation
Presentation
 
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...
apidays LIVE Helsinki & North - Ideas around automating API Management by Mat...
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
Introduction to the .NET Access Control Service
Introduction to the .NET Access Control ServiceIntroduction to the .NET Access Control Service
Introduction to the .NET Access Control Service
 
Application Of A Server Hardening Essay
Application Of A Server Hardening EssayApplication Of A Server Hardening Essay
Application Of A Server Hardening Essay
 
Path to continuous delivery
Path to continuous deliveryPath to continuous delivery
Path to continuous delivery
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
We-Donut.io presentation of Platform
We-Donut.io presentation of PlatformWe-Donut.io presentation of Platform
We-Donut.io presentation of Platform
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

AWS Automation Day: Tools and Tips for Building Simple, Effective Automation

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Akhtar Hossain AWS Solution Architect Sep 7th, 2017 AWS Startup Day Manual & Automation
  • 2. Overview 1. Where to begin with automation (10m) 2. Tools and tips for building automation (15m) 3. Monitoring and maintaining tools you’ve built (15m)
  • 3. If you want to build an engineering company, hire more than 50% engineers.
  • 4.
  • 5. Evolution of Automation Automated systems evolve over time. Start simple. Manually Build A Cluster Automatically Build A Cluster Self Service Creation Of A Cluster Phase 1 Phase 2 Phase 3
  • 6. Start with the most common Issue tracking tools help tell you where to automate Look at the most common types of requests coming into a team and begin automating those: Deploys, Database Migrations, Access Requests, Service Provisioning, etc. If you’re small enough you should have a good sense of what you spend the most time doing repetitively.
  • 7. Always Be An Un-blocker Identify Where Teams Are Waiting On Others New Feature Developed Dev Run TestingQA Deploy CodeOps New Feature Developed Dev Run TestingDev Deploy CodeDev
  • 8. Automation Is Company Wide Work Closely With All Of Your Teams Too commonly automation is only prioritized for engineering teams. All teams benefit from some of the simplest improvements to process. Spend time with non-engineering teams and understand their workflows. Small investments in these processes early on prevent hiring people to manually do this labor. It’s generally never too early to automate, but usually too late once it’s needed.
  • 9. Section Review Key Takeaways On Where To Begin 1. Automation evolves over time. Start simple, and build on those ideas. 2. Identify the most common requests through ticketing systems and frequent asks by other teams. 3. Become an “Unblocker” to help speed up productivity across your company. 4. Spend time talking across other teams to find out what automation would make their lives easier.
  • 11. Phase 1 Manual Process For Everything: 35 Minutes Developer Needs Deploy Requests Deploy From Ops Manually Deploys 15 Minutes 20 Minutes
  • 12. Phase 2 Automatic Deploys, Manually Triggered: 17 Minutes Developer Needs Deploy Requests Deploy From Ops Automatically Deploys 15 Minutes 2 Minutes
  • 13. Phase 3 Self Service Automated Deploys: 2 Minutes Developer Needs Deploy Self Service Deploys 2 Minutes
  • 14. Phase 3 Feedback Of Status/Health Is Essential Developer Needs Deploy Self Service Deploys 2 Minutes Problems? Failures? Error Rates?
  • 15. Creating Self Service Tools Multiple ways to build tools Interface Pros Cons Command Line Easy to use Difficult to maintain versioning across many systems. Library dependencies (w/o compiled binaries) API Easy for building complex tooling Requires detailed documentation Web Interface Easy to interact with. Easy secondary execution methods in emergency. Have to also maintain a website/interface. Generally interfaces with APIs/Command Line tools in the backend. Chat Interface Easy to use and easy to onboard new engineers. Easy secondary execution methods in emergency. Depends on API, CommandLine tools, and config management on the back end.
  • 16. Creating Self Service Tools Chat is a powerful way to build tooling Some people create web interfaces, but this becomes difficult to maintain, and now you have to manage additional services and resource for this portal. Becomes one big project that gets managed as it grows and robs resources from development teams. Chat is a simple interface to develop for and maintain.
  • 17. Advantages Of Chat Based Don’t reinvent the wheel if you don’t have to Visibility about what is happening in the environment across teams Audit trail for quicker troubleshooting and added compliance Self service to help teams work faster without being dependent on others Easy to enforce policy and good practice
  • 18. Advantages Of Using Chat Automation Visibility On What’s Happening In The Company [Mackenzie Kosut 2:18PM] @mrbot deploy production [MrBot 2:18 PM] Deploying git commit 577f84e37 from Staging to Production for @mackenzie [MrBot 2:19 PM] Deploy 577f84e37 out to 10% of Production [MrBot 2:21 PM] Error levels healthy (0.02% down from %0.021) proceeding with rest of deploy of 577f84e37 to Production [MrBot 2:22 PM] Deploy 577f84e37 out to 100% of Production [MrBot 2:27 PM] Deploy 577f84e37 health is good (0.019% down from %0.021). Deploy 577f84e37 successful for @mackenzie 1. Developer runs deploy 2. Code is deployed to 10% of Production 3. Monitoring verifies code is healthy 4. System automatically finished deploys
  • 19. Advantages Of Using Chat Automation Ability To Audit & Backtrack Incidents [Mackenzie Kosut 2:18PM] @mrbot run migration #183 [MrBot 2:18 PM] Running migration #183 for @mackenzie [MrBot 2:19 PM] [FAIL] MySQL Error Message: Table '%s' was locked with a READ lock and can't be updated [AlertSystem 2:19 PM] [FAIL] Production Web (mysite.com) HTTPS failed healthcheck [MrBot 2:21 PM] Migration failed 1. Developer runs automated migration using chat command 2. Migration fails 3. Website health check fails 4. Migration aborts
  • 20. Advantages Of Using Chat Automation Easy To Enforce Policy & Best Practice 1. Developer attempts unauthorized after hour deploy 2. System prevents deploy and educates user on how to over-ride [Mackenzie Kosut 4:51 AM] @mrbot deploy production [MrBot 4:51 AM] Sorry Mackenzie, only authorized users can run production deploys after hours. Re-run with +escalate to initiate approval process. * Good practice is to always have any production change, regardless of size or complexity, reviewed by two people.
  • 21. Large Number of Open Source Projects Don’t reinvent the wheel if you don’t have to Leverage many of the available tools for building chat interfaces. Many come with a large number of add- ons and capabilities out of the box. Large number of users also means a bigger community for support and guidance.
  • 22. Building Chat Automation Is Easy Create Automation With Familiar Tools Deploy Production Ansible Wrapper deploy.yml Ansible Wrapper You don’t need to be a CoffeeScript* expert, simply use it as a wrapper to execute languages of choice.
  • 23. - name: Launch instance with ebs local_action: ec2 keypair={{ keypair }} instance_type={{ instance_type.stdout }} image={{ base_ami_201704.stdout }} region={{ region }} count={{ count }} tenancy={{ tenancy }} wait=true wait_timeout={{ wait_timeout }} vpc_subnet_id={{ availability_zone.stdout }} ebs_optimized={{ ebs_optimized.stdout }} group=ansible_default,ansible_{{primary_role}} register: ec2 when: ebs_optimized.stdout == 'true' Simplify The Interface For Familiar Tools Example of an Ansible playbook that Hubot calls via CoffeeScript
  • 24. Building a Chat Bot Build automation around processes you understand Instead of trying to build a messenger bot from scratch, understand how your users would interact with it. It’s informative to be a mechanical turk and manually handle responses. Find the most common requests and begin automating those. Obviously this works for launching smaller services, once at scale, you need a different approach.
  • 25. Section Review Key Takeaways On Self Service Tools 1. Self service tools allow teams to move quicker without being blocked on others. 2. Teams need confidence in being self service which requires proper metrics and feedback of how their process is performing. 3. Automated processes should have a manual fall back mode in the event of an emergency. 4. Spend time talking across other teams to find out what automation would make their lives easier.
  • 26. Data Science & Analytics
  • 27. Self Service Is Useful Everywhere Data Science & Analytics Is A Great Example Requests DataSales Researches Request Data Provides ReportData Requests DataSales Views Report, Tweaks As Needed Sales
  • 28. Self Service Is Useful Everywhere Data Science & Analytics Is A Great Example
  • 29. Self Service Is Useful Everywhere Data Science & Analytics Is A Great Example Database Managing Users&Rights SQL ClientUser Database Managing Users&Rights Managing multiple users and grants across multiple databases can be frustrating.
  • 30. Self Service Is Useful Everywhere Data Science & Analytics Is A Great Example AbstractedReportingLayer User Database Database GroupUserPer Role/Team GroupUserPer Role/Team Abstracting away into an abstraction layer allows centralized control and auditing.
  • 31. Air Canada Near-Miss at San Francisco
  • 32. FAA Automation Paradox This Applies To The World Of Infrastructure https://www.faa.gov/c/content/dam/faa/regulations-policies/documents/rmh_ch07.pdf “..because the pilot lacked critical skills and the flight crew relied too heavily on an automated system it did not fully understand.” 1. Build automation tools but understand how they work, what they do, and when to use them. 2. Don’t build tools dependent on other tools. Dependency chains like these complicate debugging. 3. Production automation systems should be simple to understand, simple to run, and simple to troubleshoot.
  • 33. Keep Your Automation Simple Follow The Unix Tools Philosophy Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features". Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input. Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them. Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them. https://en.wikipedia.org/wiki/Unix_philosophy
  • 34. Output Status & Failure Keep Interface Simple, But Logging Detailed 1. Keep the output to the end user simple and readable 2. Always ensure you have detailed logging written somewhere 3. Failures should explain why it failed, and what action to take next.
  • 35. Don’t Underestimate Macros Simple Local Tools Can Be Powerful To Your Organization Open Ticket (ZenDesk) Look Up User ID In Admin Tool Search Site Usage In Analytics Tool Respond With Standard Response Open Ticket (ZenDesk) Look Up User In Admin Tool Search Site Usage In Analytics Tool Respond With Standard Response 30s 30s 30s 5s 5s U 1 ManuallyMacros
  • 36.
  • 37. VoiceOps with Alexa Looking forward at what’s possible Alexa.. .. Ask production for error rate? .. Ask production to ban IP 14.12.13.5 .. Ask production to deploy master .. Ask development to spin down unused instances .. Ask production to verify backups .. Ask staging for current testing status
  • 38. Finding Time To Build Automation Let’s Be Honest, There Is Never A Right Time 1. Dedicate time weekly to work on automation. 2-4 hours, same day and time, sit down and spend time just automating. 2. Work with others to bounce ideas off of what to build next and how to improve on what you have. 3. Try to automate ahead of the problems before the tasks become too great. Dedicating time helps give you this advantage. 4. Think of the 2-4 hours of time as an investment. You will get multiple times this free time back once better systems are in place.
  • 39. Summary Keep Interface Simple, But Logging Detailed 1. When building automation, build it around a self-service model. 2. Don’t reinvent the wheel, build with what tools & frameworks already exist. 3. Keep your tools simple, not dependent on others, and easy to understand. 4. Build easy to understand interfaces but retain detailed logging 5. Automation helps you build controls & policy as you grow 6. Don’t underestimate simple automation tools “Always be unblocking others.”
  • 40. Own the problem, not the solution.