SlideShare una empresa de Scribd logo
1 de 56
Descargar para leer sin conexión
AIN’T NOBODY GOT TIME FOR THAT!
MATT FROST
@SHRTWHITEBLDGUY
HTTPS://JOIND.IN/16027
WHO AM I?
INTRODUCTION
WHAT IS AUTOMATION?
DEFINITION
WHY AUTOMATE?
DEFINING PURPOSE
• TASKS BECOME CLEARLY DEFINED IN ONE LOCATION
• OFFERS AN OPPORTUNITY TO REFINE PROCESSES
• ELIMINATES PROCESS VARIATION
• ELIMINATES DISRUPTIONS
WHY AUTOMATE?
WHAT WE’LL COVER
• CHALLENGES
• WHAT/WHERE/WHEN/WHY/HOW?
• OVERVIEW OF AUTOMATION TOOLS/TECHNIQUES
WHAT WE’LL COVER
AUTOMATION CHALLENGES
CHALLENGES
• REQUIRES A STRONG UNDERSTANDING OF THE PROCESS
• REQUIRES A LOT OF TRUST IN THE PROCESS
• REQUIRES A PLAN IF SOMETHING GOES SIDEWAYS
AUTOMATION CHALLENGES
HOW DO WE AUTOMATE?
OBJECTIVE
• TOOLS
• SCRIPTING
• EXPERIENCE
HOW DO WE AUTOMATE?
WHERE CAN WE AUTOMATE?
OBJECTIVE
• LOCALLY
• DEV ENVIRONMENTS
• PRODUCTION
WHERE CAN WE AUTOMATE
LOCALLY
WHERE CAN WE AUTOMATE?
WHEN YOU THINK ABOUT ALL THE
THINGS YOU HAVE TO DO TO START
WORKING, IT’S ANNOYING RIGHT?
THERE ARE SOME
EASY OPTIONS…BUT
ALFRED!
SWEET RIGHT?
WORKFLOWS!
LOCAL SCRIPTING
TOOLS
DEPLOYMENT/CI
• PHING
• JENKINS
• ANSIBLE
• TRAVIS CI
• CUSTOM SHELL SCRIPTS
MONITORING
• NEW RELIC
• PINGDOM
• CUSTOM SHELL SCRIPTS
• TESTING TOOLS
TESTING TOOLS
• PHPUNIT
• PHPSPEC
• BEHAT
• CODECEPTION
• RUNSCOPE
PROVISIONING
• ANSIBLE
• CHEF
• PUPPET
• SHELL SCRIPTS
THERE ARE OPTIONS
YOU DON’T NEED ALL THESE TOOLS
BUT…
CREATING A
SOLUTION
SERVER DEPLOYMENT
CREATING A SOLUTION
DIGITAL OCEAN API
CREATING A SOLUTION
I DON’T WANT TO CLICK THAT
MANY TIMES…
CREATING A SOLUTION
ANSIBLE
CREATING A SOLUTION
SERVER SETUP CAN BE HARD
CREATING A SOLUTION
HERE’S WHAT I NEEDED
CREATING A SOLUTION
• PHP (AND DEPS)
• MYSQL (AND DEPS)
• APACHE (I KNOW…)
• WORDPRESS CONFIGS
ANSIBLE STRUCTURE
CREATING A SOLUTION
ROLES
• Files
• Handlers
• Meta
• Tasks
• Templates
• Vars
PLAYBOOK
---
- name: Install Apache2
apt: pkg=apache2 state=installed update_cache=true
register: apache2
- name: Install Apache2 MPM Prefork
apt: pkg=apache2-pmp-prefork state=installed
when: apache2|success
register: prefork
- name: Install Apache2 MPM Prefork
apt: pkg=apache2-pmp-prefork state=installed
when: apache2|success
register: prefork
---
- hosts: bd
roles:
- setup
- iptables-setup
- apache2-setup
- mysql-setup
- php-setup
- users-setup
PLAYBOOK EXAMPLE
PHING
CREATING A SOLUTION
CONSIDERATIONS
CREATING A SOLUTION
<?xml version="1.0" encoding="UTF-8"?>
<project name="BDSO" default="build" basedir="./">
<property file="bdso.properties" />
<target name="composer">
<echo msg="Composer automatic updates aren't enabled at this point" />
<echo msg="Running self-update on composer" />
<exec command="sudo composer self-update" passthru="true" />
<echo msg="Installing new dependencies (if necessary)" />
<exec command="composer install --no-dev --no-scripts" passthru="true" />
</target>
<target name="build">
<phingcall target="composer" />
</target>
COMPOSER INSTALL WITH PHING
INSTALLING PHING
CREATING A SOLUTION
“phing/phing”: “2.*”
RUNNING PHING
CREATING A SOLUTION
vendor/bin/phing -f path/to/build.xml
BASH SCRIPTING
CREATING A SOLUTION
SCRIPTING COMMANDS
CREATING A SOLUTION
MY FAVORITE UNIX COMMAND
find ./ -type f -name ‘*.php’ -print0 | xargs -0 grep -n ‘SearchTerm’
finder -s ‘SearchTerm’
MONITORING WITH SHELL
SCRIPTS
CREATING A SOLUTION
THE BASICS
CREATING A SOLUTION
• MAKE SURE SERVICES ARE RUNNING
• CHECK SERVER LOAD
• NOTIFICATIONS
SIMPLICITY OVER ALL ELSE
CONCLUSION
SECURITY
CONCLUSION
AUTOMATION IS ATTAINABLE
CONCLUSION
QUESTIONS?
CONCLUSION
FEEDBACK
CONCLUSION
https://joind.in/16027
Twitter: @shrtwhitebldguy
IRC: mfrost503

Más contenido relacionado

Destacado

Destacado (11)

PHP Cloud Deployment Toolkits
PHP Cloud Deployment ToolkitsPHP Cloud Deployment Toolkits
PHP Cloud Deployment Toolkits
 
Desplegando código con Phing, PHPunit, Coder y Jenkins
Desplegando código con Phing, PHPunit, Coder y JenkinsDesplegando código con Phing, PHPunit, Coder y Jenkins
Desplegando código con Phing, PHPunit, Coder y Jenkins
 
Phing
PhingPhing
Phing
 
Building and Deploying PHP Apps Using phing
Building and Deploying PHP Apps Using phingBuilding and Deploying PHP Apps Using phing
Building and Deploying PHP Apps Using phing
 
Automated Deployments
Automated DeploymentsAutomated Deployments
Automated Deployments
 
Continuous Integration @ MeetMagento Germany 2015
Continuous Integration @ MeetMagento Germany 2015Continuous Integration @ MeetMagento Germany 2015
Continuous Integration @ MeetMagento Germany 2015
 
Deploying PHP applications with Phing
Deploying PHP applications with PhingDeploying PHP applications with Phing
Deploying PHP applications with Phing
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 

Similar a Ain't Nobody Got Time For That: Intro to Automation

Lessons learned from building Demand Side Platform
Lessons learned from building Demand Side PlatformLessons learned from building Demand Side Platform
Lessons learned from building Demand Side Platform
bbogacki
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
Joseph Scott
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
Nexcess.net LLC
 
Getting Started with OpenStack Development
Getting Started with OpenStack Development Getting Started with OpenStack Development
Getting Started with OpenStack Development
Rackspace
 

Similar a Ain't Nobody Got Time For That: Intro to Automation (20)

Northeast PHP - High Performance PHP
Northeast PHP - High Performance PHPNortheast PHP - High Performance PHP
Northeast PHP - High Performance PHP
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
 
BIG DATA ANALYSIS
BIG DATA ANALYSISBIG DATA ANALYSIS
BIG DATA ANALYSIS
 
Lessons learned from building Demand Side Platform
Lessons learned from building Demand Side PlatformLessons learned from building Demand Side Platform
Lessons learned from building Demand Side Platform
 
Your code are my tests
Your code are my testsYour code are my tests
Your code are my tests
 
Site Performance - From Pinto to Ferrari
Site Performance - From Pinto to FerrariSite Performance - From Pinto to Ferrari
Site Performance - From Pinto to Ferrari
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
 
Deployments in one click!
Deployments in one click!Deployments in one click!
Deployments in one click!
 
Quality code in wordpress
Quality code in wordpressQuality code in wordpress
Quality code in wordpress
 
Improving qa on php projects
Improving qa on php projectsImproving qa on php projects
Improving qa on php projects
 
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
ExpressionEngine - Simple Steps to Performance and Security (EECI 2014)
 
Oracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdfOracle_Patching_Untold_Story_Final_Part2.pdf
Oracle_Patching_Untold_Story_Final_Part2.pdf
 
Google App Engine: For PHP Developers
Google App Engine: For PHP DevelopersGoogle App Engine: For PHP Developers
Google App Engine: For PHP Developers
 
NYC HUG - Application Architectures with Apache Hadoop
NYC HUG - Application Architectures with Apache HadoopNYC HUG - Application Architectures with Apache Hadoop
NYC HUG - Application Architectures with Apache Hadoop
 
Pentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 EditionPentest Apocalypse - SANSFIRE 2016 Edition
Pentest Apocalypse - SANSFIRE 2016 Edition
 
Getting Started with OpenStack Development
Getting Started with OpenStack Development Getting Started with OpenStack Development
Getting Started with OpenStack Development
 
we45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Pythonwe45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Python
 
Securing the Heart of Automated Infrastructure
Securing the Heart of Automated InfrastructureSecuring the Heart of Automated Infrastructure
Securing the Heart of Automated Infrastructure
 

Más de mfrost503 (7)

Getting started-php unit
Getting started-php unitGetting started-php unit
Getting started-php unit
 
Intro to OAuth
Intro to OAuthIntro to OAuth
Intro to OAuth
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
Mocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnitMocking Dependencies in PHPUnit
Mocking Dependencies in PHPUnit
 
Agent of Change
Agent of ChangeAgent of Change
Agent of Change
 
Agent of Change
Agent of ChangeAgent of Change
Agent of Change
 
BDD Language in PHPUnit Tests
BDD Language in PHPUnit TestsBDD Language in PHPUnit Tests
BDD Language in PHPUnit Tests
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Ain't Nobody Got Time For That: Intro to Automation