SlideShare a Scribd company logo
1 of 14
Download to read offline
WAG the Blog*
Using WordPress, Ansible, and Git to Build Your Website
WordCamp Atlanta 2016 || Evan Volgas || Developer Track
* Ha! A pun.
Who the heck is this guy?
Evan….
• Recently started as a data engineer at MailChimp
• Has used WordPress off and on for about 6-7 years
• Has used Ansible for about a two years now
• Probably drinks more coffee than you*
• Definitely has written more bad code than you**
More Snark
@EvanVolgas
Less Snark
https://evan.is/
* No seriously, he has a problem
** See above
Important Disclaimers
I believe….
• Google Exists
• You can use it
• Reading code in slides is boring
• Working with servers is fun
• Elvis is still alive*
* You’re not fooling anybody Matt… or should I say Elvis?
Who cares about servers? (bias / opinion alert)
Think about the question:
How does the internet work?*
https://ma.ttias.be/the-best-tech-question-to-ask-in-a-job-interview/
My opinion: As professionals who earn a living on the internet, we owe it to ourselves
and the people we work with to understand the technologies we are using on a deep
level.
That includes understanding more about servers than most people would ever stop
and think about in the first place.
* Laws, sausages, and software… all things you don’t want to see get made
Ansible
• Ansible is OSS that was written to make configuring
and managing servers less of a pain in the neck
• The name Ansible comes from a sci-fi novel by
Ursula K. Le Guin. The term was popularized by
Orson Scott-Card in Ender’s Game.
• In many sci-fi books, an Ansible is a device that can
remotely control large fleets of ships all across the
galaxy
• In our world, Ansible can connect to an arbitrarily
large number of servers over SSH and run
commands on them, commands that you yourself
could run if you were SSH’d into all of the machines
yourself
We read sci-fi all day. It’s a hard NOC life for those of us in software
How Ansible Works in a Nutshell
Ansible…
• Runs playbooks or “plays” against groups of servers
• Each play may be compromised of one or more “roles.” Roles are groups of
things you want to do on your servers and are usually where all the work in
Ansible really happens
• Appropriate role scoping is subjective but an example of a role might be
“Install and configure Nginx” for example or “Install and configure IP Tables.”
Don’t worry about defining an appropriate scope for a role just yet. Instead,
read Other People’s Code and start forming opinions on what works and what
doesn’t
• Every role may have variables, tasks, templates, and/or defaults associated
with it. Here again, OPC will be very helpful.
• The hosts in your Ansible inventory can also have variables assigned to them.
This is some serious secret sauce right here and you should definitely pay
attention to this
Using footnotes in slides is a terrible idea isn’t it?
Ansible: Examples / Discussion
• TLR*: https://github.com/evanv/tlr
• Trellis: https://github.com/roots/trellis
• WordPress Ansible: https://github.com/lamosty/
wordpress-ansible
• AnsiPress: https://github.com/codeablehq/AnsiPress
• Ansible-WordPress: https://github.com/Oefenweb/
ansible-wordpress
* Whoever owns this repo is probably very smart, funny, attractive, & great at at giving presentations
Ansible: Examples Review
Roles may include variables, which
have different levels of precedence
For example, host variables “win”
against role defaults
See http://docs.ansible.com/
ansible/playbooks_variables.html
for info about the rules
You can (and often do) break your
inventory into different host groups
that you can target with different
playbooks
Can you believe they let this guy speak at WordCamp?
Git
• Git is an open source Version Control System (VCS)
• Git is distributed — developers have full copies of the
code and its history on their local environments and
then push changes to a central shared location
• Workflows (eg https://www.atlassian.com/git/tutorials/
comparing-workflows/centralized-workflow and http://
blog.endpoint.com/2014/05/git-workflows-that-
work.html) and opinions about them abound.
• Ignore the flame wars. Just do what works for you and
your team.
He probably doesn’t know anything about Linux either
WordPress and Git
• If you read one article, read this: http://
stevegrunwell.github.io/wordpress-git/
• If you read two articles, read https://
deliciousbrains.com/storing-wordpress-in-git/
• If you read three articles, read https://
markjaquith.wordpress.com/2011/06/24/wordpress-
local-dev-tips/
* Whatever you do, don’t read four articles. Four is nature’s limit. Watch Monty Python. That shalt read three articles. Five is right out.
What’s Git Got to Do with This?
• You *definitely* want to keep your Ansible
playbooks and roles under version control
• You can use Ansible to install Git on your servers.
• You can also (and will, probably, once you suffer
the pain of learning to use them) use Ansible in
connection with CI tools like Travis / Circle /
BuildBot / etc.
Jedi mind trick? Nope. Continuous integration. Not sure what that is? See slide 4.
Why are we here
again?
• You should absolutely take a look at Trellis: https://github.com/roots/
trellis and VVV (https://github.com/Varying-Vagrant-Vagrants/VVV)
• You should also take a look at provision.sh in VVV (https://
github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/provision/
provision.sh) and compare that to Trellis. Quite a bit different, no?
But awfully similar too.
* Learning how the internet works is a lot like learning emacs except people who know how the internet works still get invited to parties sometimes
• The internet is not magic. But it is
complicated. And the more you work
with servers, the more you will be
exposed to its complexity and the
more you will start* to understand it
The moment we’ve all been waiting for….
Let’s provision a server!
Where’s Wapuu?
Concluding remarks
• Earlier I mentioned role scoping in Ansible and also claimed that
you definitely want your Ansible scripts in Git
• Let’s decimate look at OPC https://www.digitalocean.com/
community/tutorials/how-to-automate-installing-wordpress-on-
ubuntu-14-04-using-ansible
• Your server config will change.
You’ll make mistakes. Make
your config a living document.
Use Git.
• https://github.com/MisfitIdeas/
wag-the-blog
Hell is OPC… unless OPC is Rich Hickey’s

More Related Content

What's hot

All about word press
All about word pressAll about word press
All about word press
Dan Beil
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
Cal Henderson
 

What's hot (20)

Hello npm
Hello npmHello npm
Hello npm
 
WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014WordPress Setup and Security - WordCamp, Charleston 2014
WordPress Setup and Security - WordCamp, Charleston 2014
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
Using multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify developmentUsing multi-tenant WordPress to simplify development
Using multi-tenant WordPress to simplify development
 
2010 11 pubcon_hendison_wordpress
2010 11 pubcon_hendison_wordpress2010 11 pubcon_hendison_wordpress
2010 11 pubcon_hendison_wordpress
 
Big Websites
Big WebsitesBig Websites
Big Websites
 
All about word press
All about word pressAll about word press
All about word press
 
Squeeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla WebsiteSqueeze Maximum Performance From Your Joomla Website
Squeeze Maximum Performance From Your Joomla Website
 
Speed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate PerformanceSpeed up Your Joomla Site for Ultimate Performance
Speed up Your Joomla Site for Ultimate Performance
 
SSDs are Awesome
SSDs are AwesomeSSDs are Awesome
SSDs are Awesome
 
Saving Time with WP-CLI
Saving Time with WP-CLISaving Time with WP-CLI
Saving Time with WP-CLI
 
Introducing Wordpress Multitenancy
Introducing Wordpress MultitenancyIntroducing Wordpress Multitenancy
Introducing Wordpress Multitenancy
 
How to make your Webpack builds 10x faster
How to make your Webpack builds 10x fasterHow to make your Webpack builds 10x faster
How to make your Webpack builds 10x faster
 
Modernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with ElasticsearchModernizing WordPress Search with Elasticsearch
Modernizing WordPress Search with Elasticsearch
 
Complete WordPress Setup (Description about Themes & Plugins Added)
Complete WordPress Setup (Description about Themes & Plugins Added)Complete WordPress Setup (Description about Themes & Plugins Added)
Complete WordPress Setup (Description about Themes & Plugins Added)
 
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
Introducing WordPress Multitenancy (Wordcamp Vegas/Orlando 2015/WPCampus)
 
Multi tenant CMSes using php
Multi tenant CMSes using phpMulti tenant CMSes using php
Multi tenant CMSes using php
 
Best Practices for WordPress
Best Practices for WordPressBest Practices for WordPress
Best Practices for WordPress
 
Scalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & ApproachesScalable Web Architectures - Common Patterns & Approaches
Scalable Web Architectures - Common Patterns & Approaches
 
Ako na vlastne WP temy
Ako na vlastne WP temyAko na vlastne WP temy
Ako na vlastne WP temy
 

Viewers also liked

Using the Editor the Proper Way - WordCamp Toronto 2015
Using the Editor the Proper Way - WordCamp Toronto 2015Using the Editor the Proper Way - WordCamp Toronto 2015
Using the Editor the Proper Way - WordCamp Toronto 2015
sethta
 

Viewers also liked (20)

[Container world 2017] The Questions You're Afraid to Ask about Containers
[Container world 2017] The Questions You're Afraid to Ask about Containers[Container world 2017] The Questions You're Afraid to Ask about Containers
[Container world 2017] The Questions You're Afraid to Ask about Containers
 
Do you really- need a 2kg pocket knife-
Do you  really- need  a 2kg pocket knife-Do you  really- need  a 2kg pocket knife-
Do you really- need a 2kg pocket knife-
 
CSS na steroidima (SASS)
CSS na steroidima (SASS)CSS na steroidima (SASS)
CSS na steroidima (SASS)
 
My Contributor Story
My Contributor StoryMy Contributor Story
My Contributor Story
 
VersionPress - WordPress + Git
VersionPress - WordPress + GitVersionPress - WordPress + Git
VersionPress - WordPress + Git
 
WordPress & Front-end performance
WordPress & Front-end performanceWordPress & Front-end performance
WordPress & Front-end performance
 
2013-08-10 WordCamp Russia - Aleksandr Stankevic
2013-08-10 WordCamp Russia - Aleksandr Stankevic2013-08-10 WordCamp Russia - Aleksandr Stankevic
2013-08-10 WordCamp Russia - Aleksandr Stankevic
 
Not One and Done - Repurposing Your Content
Not One and Done - Repurposing Your ContentNot One and Done - Repurposing Your Content
Not One and Done - Repurposing Your Content
 
Develop and Deploy Outside the Repo
Develop and Deploy Outside the RepoDevelop and Deploy Outside the Repo
Develop and Deploy Outside the Repo
 
WooCommerce: An E-Commerce Solution for Wordpress
WooCommerce: An E-Commerce Solution for WordpressWooCommerce: An E-Commerce Solution for Wordpress
WooCommerce: An E-Commerce Solution for Wordpress
 
WordPress mit React – Mehr als eine Zweckehe?!
WordPress mit React – Mehr als eine Zweckehe?!WordPress mit React – Mehr als eine Zweckehe?!
WordPress mit React – Mehr als eine Zweckehe?!
 
Project Management or how to herd cats
Project Management or how to herd catsProject Management or how to herd cats
Project Management or how to herd cats
 
WordPress 101 from WordCamp Cincinatti 2016
WordPress 101 from WordCamp Cincinatti 2016WordPress 101 from WordCamp Cincinatti 2016
WordPress 101 from WordCamp Cincinatti 2016
 
2016 #WCFAY Anatomy of a Website
2016 #WCFAY Anatomy of a Website2016 #WCFAY Anatomy of a Website
2016 #WCFAY Anatomy of a Website
 
Using the Editor the Proper Way - WordCamp Toronto 2015
Using the Editor the Proper Way - WordCamp Toronto 2015Using the Editor the Proper Way - WordCamp Toronto 2015
Using the Editor the Proper Way - WordCamp Toronto 2015
 
Flexing Your WordPress Themes
Flexing Your WordPress ThemesFlexing Your WordPress Themes
Flexing Your WordPress Themes
 
Word press gets responsive 4x3
Word press gets responsive 4x3Word press gets responsive 4x3
Word press gets responsive 4x3
 
Content Creation Regimen - WordCamp Hamilton 2016
Content Creation Regimen - WordCamp Hamilton 2016Content Creation Regimen - WordCamp Hamilton 2016
Content Creation Regimen - WordCamp Hamilton 2016
 
Diabeł tkwi w szczegółach...
Diabeł tkwi w szczegółach...Diabeł tkwi w szczegółach...
Diabeł tkwi w szczegółach...
 
Learning java script and wordpress rest api by tom hermans wordcamp netherl...
Learning java script and wordpress rest api by tom hermans   wordcamp netherl...Learning java script and wordpress rest api by tom hermans   wordcamp netherl...
Learning java script and wordpress rest api by tom hermans wordcamp netherl...
 

Similar to WAG the Blog

Responsive, adaptive and responsible - keynote at NebraskaJS
Responsive, adaptive and responsible - keynote at NebraskaJSResponsive, adaptive and responsible - keynote at NebraskaJS
Responsive, adaptive and responsible - keynote at NebraskaJS
Christian Heilmann
 
Packaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything ElsePackaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything Else
mckern
 

Similar to WAG the Blog (20)

Community and Github: 7/27/2011
Community and Github: 7/27/2011Community and Github: 7/27/2011
Community and Github: 7/27/2011
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability Engineering
 
rsyslog meets docker
rsyslog meets dockerrsyslog meets docker
rsyslog meets docker
 
Responsive, adaptive and responsible - keynote at NebraskaJS
Responsive, adaptive and responsible - keynote at NebraskaJSResponsive, adaptive and responsible - keynote at NebraskaJS
Responsive, adaptive and responsible - keynote at NebraskaJS
 
Dev Environments: The Next Generation
Dev Environments: The Next GenerationDev Environments: The Next Generation
Dev Environments: The Next Generation
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...
 
Packaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything ElsePackaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything Else
 
Avoid adding a new library to the project
Avoid adding a new library to the projectAvoid adding a new library to the project
Avoid adding a new library to the project
 
Ansible top 10 - 2018
Ansible top 10 -  2018Ansible top 10 -  2018
Ansible top 10 - 2018
 
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya KosmodemianskyPostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
PostgreSQL worst practices, version FOSDEM PGDay 2017 by Ilya Kosmodemiansky
 
Social dev camp_2011
Social dev camp_2011Social dev camp_2011
Social dev camp_2011
 
Tiad - Docker: Automation for the rest of us
Tiad - Docker: Automation for the rest of usTiad - Docker: Automation for the rest of us
Tiad - Docker: Automation for the rest of us
 
Docker: automation for the rest of us
Docker: automation for the rest of usDocker: automation for the rest of us
Docker: automation for the rest of us
 
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" EcosystemsPyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
PyData Frankfurt - (Efficient) Data Exchange with "Foreign" Ecosystems
 
Panther: test your Symfony apps with real web browsers
Panther: test your Symfony apps with real web browsersPanther: test your Symfony apps with real web browsers
Panther: test your Symfony apps with real web browsers
 
Ansible Berlin Meetup Intro talk by @danvaida
Ansible Berlin Meetup Intro talk by @danvaidaAnsible Berlin Meetup Intro talk by @danvaida
Ansible Berlin Meetup Intro talk by @danvaida
 
Intro to Drush
Intro to DrushIntro to Drush
Intro to Drush
 
How To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not SuckHow To Make A Framework Plugin That Does Not Suck
How To Make A Framework Plugin That Does Not Suck
 
Untangling - fall2017 - week 7
Untangling - fall2017 - week 7Untangling - fall2017 - week 7
Untangling - fall2017 - week 7
 
SaltStack For DevOps, Free Sample
SaltStack For DevOps, Free SampleSaltStack For DevOps, Free Sample
SaltStack For DevOps, Free Sample
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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?
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

WAG the Blog

  • 1. WAG the Blog* Using WordPress, Ansible, and Git to Build Your Website WordCamp Atlanta 2016 || Evan Volgas || Developer Track * Ha! A pun.
  • 2. Who the heck is this guy? Evan…. • Recently started as a data engineer at MailChimp • Has used WordPress off and on for about 6-7 years • Has used Ansible for about a two years now • Probably drinks more coffee than you* • Definitely has written more bad code than you** More Snark @EvanVolgas Less Snark https://evan.is/ * No seriously, he has a problem ** See above
  • 3. Important Disclaimers I believe…. • Google Exists • You can use it • Reading code in slides is boring • Working with servers is fun • Elvis is still alive* * You’re not fooling anybody Matt… or should I say Elvis?
  • 4. Who cares about servers? (bias / opinion alert) Think about the question: How does the internet work?* https://ma.ttias.be/the-best-tech-question-to-ask-in-a-job-interview/ My opinion: As professionals who earn a living on the internet, we owe it to ourselves and the people we work with to understand the technologies we are using on a deep level. That includes understanding more about servers than most people would ever stop and think about in the first place. * Laws, sausages, and software… all things you don’t want to see get made
  • 5. Ansible • Ansible is OSS that was written to make configuring and managing servers less of a pain in the neck • The name Ansible comes from a sci-fi novel by Ursula K. Le Guin. The term was popularized by Orson Scott-Card in Ender’s Game. • In many sci-fi books, an Ansible is a device that can remotely control large fleets of ships all across the galaxy • In our world, Ansible can connect to an arbitrarily large number of servers over SSH and run commands on them, commands that you yourself could run if you were SSH’d into all of the machines yourself We read sci-fi all day. It’s a hard NOC life for those of us in software
  • 6. How Ansible Works in a Nutshell Ansible… • Runs playbooks or “plays” against groups of servers • Each play may be compromised of one or more “roles.” Roles are groups of things you want to do on your servers and are usually where all the work in Ansible really happens • Appropriate role scoping is subjective but an example of a role might be “Install and configure Nginx” for example or “Install and configure IP Tables.” Don’t worry about defining an appropriate scope for a role just yet. Instead, read Other People’s Code and start forming opinions on what works and what doesn’t • Every role may have variables, tasks, templates, and/or defaults associated with it. Here again, OPC will be very helpful. • The hosts in your Ansible inventory can also have variables assigned to them. This is some serious secret sauce right here and you should definitely pay attention to this Using footnotes in slides is a terrible idea isn’t it?
  • 7. Ansible: Examples / Discussion • TLR*: https://github.com/evanv/tlr • Trellis: https://github.com/roots/trellis • WordPress Ansible: https://github.com/lamosty/ wordpress-ansible • AnsiPress: https://github.com/codeablehq/AnsiPress • Ansible-WordPress: https://github.com/Oefenweb/ ansible-wordpress * Whoever owns this repo is probably very smart, funny, attractive, & great at at giving presentations
  • 8. Ansible: Examples Review Roles may include variables, which have different levels of precedence For example, host variables “win” against role defaults See http://docs.ansible.com/ ansible/playbooks_variables.html for info about the rules You can (and often do) break your inventory into different host groups that you can target with different playbooks Can you believe they let this guy speak at WordCamp?
  • 9. Git • Git is an open source Version Control System (VCS) • Git is distributed — developers have full copies of the code and its history on their local environments and then push changes to a central shared location • Workflows (eg https://www.atlassian.com/git/tutorials/ comparing-workflows/centralized-workflow and http:// blog.endpoint.com/2014/05/git-workflows-that- work.html) and opinions about them abound. • Ignore the flame wars. Just do what works for you and your team. He probably doesn’t know anything about Linux either
  • 10. WordPress and Git • If you read one article, read this: http:// stevegrunwell.github.io/wordpress-git/ • If you read two articles, read https:// deliciousbrains.com/storing-wordpress-in-git/ • If you read three articles, read https:// markjaquith.wordpress.com/2011/06/24/wordpress- local-dev-tips/ * Whatever you do, don’t read four articles. Four is nature’s limit. Watch Monty Python. That shalt read three articles. Five is right out.
  • 11. What’s Git Got to Do with This? • You *definitely* want to keep your Ansible playbooks and roles under version control • You can use Ansible to install Git on your servers. • You can also (and will, probably, once you suffer the pain of learning to use them) use Ansible in connection with CI tools like Travis / Circle / BuildBot / etc. Jedi mind trick? Nope. Continuous integration. Not sure what that is? See slide 4.
  • 12. Why are we here again? • You should absolutely take a look at Trellis: https://github.com/roots/ trellis and VVV (https://github.com/Varying-Vagrant-Vagrants/VVV) • You should also take a look at provision.sh in VVV (https:// github.com/Varying-Vagrant-Vagrants/VVV/blob/develop/provision/ provision.sh) and compare that to Trellis. Quite a bit different, no? But awfully similar too. * Learning how the internet works is a lot like learning emacs except people who know how the internet works still get invited to parties sometimes • The internet is not magic. But it is complicated. And the more you work with servers, the more you will be exposed to its complexity and the more you will start* to understand it
  • 13. The moment we’ve all been waiting for…. Let’s provision a server! Where’s Wapuu?
  • 14. Concluding remarks • Earlier I mentioned role scoping in Ansible and also claimed that you definitely want your Ansible scripts in Git • Let’s decimate look at OPC https://www.digitalocean.com/ community/tutorials/how-to-automate-installing-wordpress-on- ubuntu-14-04-using-ansible • Your server config will change. You’ll make mistakes. Make your config a living document. Use Git. • https://github.com/MisfitIdeas/ wag-the-blog Hell is OPC… unless OPC is Rich Hickey’s