SlideShare a Scribd company logo
Keep InfraCode simple
with Ansible
Introduction and best practices
jmolero@know-center.at José Manuel Molero
@jmlero Infracoders Meetup
Graz, 11.04.2017
1
>ls –l presentation
oIntroduction
oAnsible
• About
• Inventory
• Playbooks
• Roles
• Advices
oDemo
2
>whoami
oSystems Engineer with 8 years of experience
• Linux environments. Compute clusters. Cloud. Big Data.
Open source software
oFrom Almería (Spain)
o2014 - Wien
• CeMM - Research Center for Molecular Medicine
o2016 - Graz
• Know-Center
• www.know-center.at
@jmlero linkedin.com/in/jmolero github.com/jmlero 3
© Know-Center GmbH • Research Center for Data-Driven Business and Big Data Analytics • 2017
KNOW-CENTER GMBH
Austria's leading research center for
Data-driven Business und Big Data Analytics
* COMET is an Austrian funding program
that supports a sustainable knowledge
transfer from science to industry.
> 80 Researchers
> 600 COMET* & industrial projects
> 30 international EU projects
Founded in 2001
Located at the Technical University of Graz
4
© Know-Center GmbH • Research Center for Data-Driven Business and Big Data Analytics • 2017
Big Data Lab
We help you to gain insights from your data!
CONSULTING DATA ANALYTICS TRAINING
DATA ACQUISITION
Formats, Standards &
Legal issues
PREPARATION
Cleaning, Normalizing, Integration &
Loading
(DISTRIBUTED) ANALYTICS
Utilizing our Hadoop Cluster or other
cloud-based solution
BIG DATA INTRODUCTION
Concepts, Methods, Technologies and
tools around Big Data
DATA VALUE CHECK
Feasibility study about kind, volume and
quality of your data
DATA-DRIVEN BUSINESS
Identifying new business models that can
be added to your value chain
BIG DATA FOR DEVELOPERS
Utilizing the Apache Hadoop ecosystem
for Big Data Analytics
APACHE HADOOP ESSENTIALS
Setup and administration of
Apache Hadoop Clusters
DATA ANALYTICS FUNDAMENTALS
Basics of Data Science and
Machine Learning
5
Disclaimer
o Ansible is a great tool
• But is not perfect
• With pros and cons
o And is not the only tool
• Also learning chef and puppet
o (Unfortunately) Ansible Inc doesn’t pay me
• Focus only on the open source side of the project
6
>vim Ansible/Readme.md
oAnsible is an open source automation tool for (cloud) provisioning,
application deployment, and configuration management
oAcquired by RedHat in 2015
• https://www.redhat.com/en/about/blog/why-red-hat-acquired-ansible
oThe name "Ansible" references a fictional instantaneous
hyperspace communication system (as featured in Orson Scott
Card's Ender's Game)
7
But why Ansible
Simple Powerful Agentless
Radically simple
Easy to read
Easy to start
Designed for multi-tier
developments
Cloud provisioning
Deploy everywhere
from everywhere
Minimal requirements
Agentless architecture
Reliable and secure
8
>diff Ansible Chef Puppet
Ansible Chef Puppet
Initial release 2012
Push
Agentless and Masterless
Playbook
YAML (+Jinja2 templates)
Initial release 2009
Pull
Master/Client
Recipe
Ruby DSL
Initial release 2005
Pull
Master/Client
Manifest
Custom
9
Schema
Infrastructure as a Code
Inventory
Playbooks
SSH
SSH
10
>man inventory
oDescription of the nodes that can be managed by Ansible
11
Hello world (v0.1)
>yum install ansible
>ansible localhost -a “yum install httpd –y; systemctl start httpd”
12
>help modules
oAnsible comes with hundred of modules
• http://docs.ansible.com/ansible/list_of_all_modules.html
oAvoid using commands
• Modules command and shell as last resort
oModules return reports as JSON
• State, changes, info
• Easier to manage and debug
13
Hello world (v0.2)
>yum install ansible
>ansible localhost –m yum -a “state=present name=httpd”
>ansible localhost –m service -a “state=started name=httpd”
14
>ansible-playbook -h
o Playbooks express configurations,
deployment and orchestration
o The Playbook format is YAML
o Each Playbook maps a group of hosts to a
set of roles
• Each role is represented by calls to Ansible tasks
15
Hello world (2) (v0.3)
>vim hello_world.yml
---
- hosts: localhost
tasks:
- name: Install apache2
yum:
name: httpd
state: latest
notify:
- start apache
handlers:
- name: start apache
service:
name: httpd
state: started
>ansible-playbook hello_world.yml
16
Playbooks_roles
o Playbooks composed by tasks and handlers
o How to organize your playbooks?
• Use roles
o Roles are ways of automatically load certain vars_files, tasks, and
handlers based on a known file structure
17
>tree ansible_playbooks
>ansible-galaxy init
18
>git commit –a
o If you can make it simple, make it simple
o If something feels complicated, it probably is (back to number 1)
o Use simple, small and focused roles
o Make it readable (for you after 1 year)
o YAML files. Not much documentation required
o Auto-descriptive playbooks, files, variables and tasks
o Always define state (latest, present, absent)
o Native YAML style (but is not mandatory)
o Editor (syntax highlight) (atom, sublime, vscode)
o Version control
19
>demo.exe (monitoring platform)
Infrastructure as a Code
Inventory
Playbooks
es-server
client01
metricbeats elasticsearch kibana
20
github.com/jmlero
The elastic stack
21
Vielen Dank für Ihre Aufmerksamkeit
Insert: any_question.jpg
jmolero@know-center.at José Manuel Molero
@jmlero Infracoders Meetup
Graz, 11.04.2017
22

More Related Content

Similar to Introduction to Ansible. Meetup Infracoders

ansible_rhel.pdf
ansible_rhel.pdfansible_rhel.pdf
ansible_rhel.pdf
ssuser6d347b
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
Osama Mustafa
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
Puppet
 
Ansible intro
Ansible introAnsible intro
Ansible intro
Hsi-Kai Wang
 
Network Automation: Ansible 101
Network Automation: Ansible 101Network Automation: Ansible 101
Network Automation: Ansible 101
APNIC
 
Apache pig as a researcher’s stepping stone
Apache pig as a researcher’s stepping stoneApache pig as a researcher’s stepping stone
Apache pig as a researcher’s stepping stone
benosteen
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Keith Resar
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
InfinityPP
 
Ansible.pdf
Ansible.pdfAnsible.pdf
Ansible.pdf
shaikshazil1
 
Defending Your Network
Defending Your NetworkDefending Your Network
Defending Your Network
Adam Getchell
 
Ansible
AnsibleAnsible
Ansible
Rahul Bajaj
 
PyData Boston 2013
PyData Boston 2013PyData Boston 2013
PyData Boston 2013
Travis Oliphant
 
Ansible nice-pdf-copy-for-pres
Ansible nice-pdf-copy-for-presAnsible nice-pdf-copy-for-pres
Ansible nice-pdf-copy-for-pres
Manmohan Singh
 
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets AnsibleCloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
Benjamin Zores
 
Ansible intro
Ansible introAnsible intro
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
Yaniv cohen
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)
Chu-Siang Lai
 
OpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid InfrastructureOpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
devopsdaysaustin
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
mohamedmoharam
 

Similar to Introduction to Ansible. Meetup Infracoders (20)

ansible_rhel.pdf
ansible_rhel.pdfansible_rhel.pdf
ansible_rhel.pdf
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Network Automation: Ansible 101
Network Automation: Ansible 101Network Automation: Ansible 101
Network Automation: Ansible 101
 
Apache pig as a researcher’s stepping stone
Apache pig as a researcher’s stepping stoneApache pig as a researcher’s stepping stone
Apache pig as a researcher’s stepping stone
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
 
Ansible.pdf
Ansible.pdfAnsible.pdf
Ansible.pdf
 
Defending Your Network
Defending Your NetworkDefending Your Network
Defending Your Network
 
Ansible
AnsibleAnsible
Ansible
 
PyData Boston 2013
PyData Boston 2013PyData Boston 2013
PyData Boston 2013
 
Ansible nice-pdf-copy-for-pres
Ansible nice-pdf-copy-for-presAnsible nice-pdf-copy-for-pres
Ansible nice-pdf-copy-for-pres
 
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets AnsibleCloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)
 
OpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid InfrastructureOpenStack Preso: DevOps on Hybrid Infrastructure
OpenStack Preso: DevOps on Hybrid Infrastructure
 
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
2016 - Open Mic - IGNITE - Open Infrastructure = ANY Infrastructure
 
Ansible automation tool with modules
Ansible automation tool with modulesAnsible automation tool with modules
Ansible automation tool with modules
 

Recently uploaded

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
Vadym Kazulkin
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 

Recently uploaded (20)

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024High performance Serverless Java on AWS- GoTo Amsterdam 2024
High performance Serverless Java on AWS- GoTo Amsterdam 2024
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 

Introduction to Ansible. Meetup Infracoders

  • 1. Keep InfraCode simple with Ansible Introduction and best practices jmolero@know-center.at José Manuel Molero @jmlero Infracoders Meetup Graz, 11.04.2017 1
  • 2. >ls –l presentation oIntroduction oAnsible • About • Inventory • Playbooks • Roles • Advices oDemo 2
  • 3. >whoami oSystems Engineer with 8 years of experience • Linux environments. Compute clusters. Cloud. Big Data. Open source software oFrom Almería (Spain) o2014 - Wien • CeMM - Research Center for Molecular Medicine o2016 - Graz • Know-Center • www.know-center.at @jmlero linkedin.com/in/jmolero github.com/jmlero 3
  • 4. © Know-Center GmbH • Research Center for Data-Driven Business and Big Data Analytics • 2017 KNOW-CENTER GMBH Austria's leading research center for Data-driven Business und Big Data Analytics * COMET is an Austrian funding program that supports a sustainable knowledge transfer from science to industry. > 80 Researchers > 600 COMET* & industrial projects > 30 international EU projects Founded in 2001 Located at the Technical University of Graz 4
  • 5. © Know-Center GmbH • Research Center for Data-Driven Business and Big Data Analytics • 2017 Big Data Lab We help you to gain insights from your data! CONSULTING DATA ANALYTICS TRAINING DATA ACQUISITION Formats, Standards & Legal issues PREPARATION Cleaning, Normalizing, Integration & Loading (DISTRIBUTED) ANALYTICS Utilizing our Hadoop Cluster or other cloud-based solution BIG DATA INTRODUCTION Concepts, Methods, Technologies and tools around Big Data DATA VALUE CHECK Feasibility study about kind, volume and quality of your data DATA-DRIVEN BUSINESS Identifying new business models that can be added to your value chain BIG DATA FOR DEVELOPERS Utilizing the Apache Hadoop ecosystem for Big Data Analytics APACHE HADOOP ESSENTIALS Setup and administration of Apache Hadoop Clusters DATA ANALYTICS FUNDAMENTALS Basics of Data Science and Machine Learning 5
  • 6. Disclaimer o Ansible is a great tool • But is not perfect • With pros and cons o And is not the only tool • Also learning chef and puppet o (Unfortunately) Ansible Inc doesn’t pay me • Focus only on the open source side of the project 6
  • 7. >vim Ansible/Readme.md oAnsible is an open source automation tool for (cloud) provisioning, application deployment, and configuration management oAcquired by RedHat in 2015 • https://www.redhat.com/en/about/blog/why-red-hat-acquired-ansible oThe name "Ansible" references a fictional instantaneous hyperspace communication system (as featured in Orson Scott Card's Ender's Game) 7
  • 8. But why Ansible Simple Powerful Agentless Radically simple Easy to read Easy to start Designed for multi-tier developments Cloud provisioning Deploy everywhere from everywhere Minimal requirements Agentless architecture Reliable and secure 8
  • 9. >diff Ansible Chef Puppet Ansible Chef Puppet Initial release 2012 Push Agentless and Masterless Playbook YAML (+Jinja2 templates) Initial release 2009 Pull Master/Client Recipe Ruby DSL Initial release 2005 Pull Master/Client Manifest Custom 9
  • 10. Schema Infrastructure as a Code Inventory Playbooks SSH SSH 10
  • 11. >man inventory oDescription of the nodes that can be managed by Ansible 11
  • 12. Hello world (v0.1) >yum install ansible >ansible localhost -a “yum install httpd –y; systemctl start httpd” 12
  • 13. >help modules oAnsible comes with hundred of modules • http://docs.ansible.com/ansible/list_of_all_modules.html oAvoid using commands • Modules command and shell as last resort oModules return reports as JSON • State, changes, info • Easier to manage and debug 13
  • 14. Hello world (v0.2) >yum install ansible >ansible localhost –m yum -a “state=present name=httpd” >ansible localhost –m service -a “state=started name=httpd” 14
  • 15. >ansible-playbook -h o Playbooks express configurations, deployment and orchestration o The Playbook format is YAML o Each Playbook maps a group of hosts to a set of roles • Each role is represented by calls to Ansible tasks 15
  • 16. Hello world (2) (v0.3) >vim hello_world.yml --- - hosts: localhost tasks: - name: Install apache2 yum: name: httpd state: latest notify: - start apache handlers: - name: start apache service: name: httpd state: started >ansible-playbook hello_world.yml 16
  • 17. Playbooks_roles o Playbooks composed by tasks and handlers o How to organize your playbooks? • Use roles o Roles are ways of automatically load certain vars_files, tasks, and handlers based on a known file structure 17
  • 19. >git commit –a o If you can make it simple, make it simple o If something feels complicated, it probably is (back to number 1) o Use simple, small and focused roles o Make it readable (for you after 1 year) o YAML files. Not much documentation required o Auto-descriptive playbooks, files, variables and tasks o Always define state (latest, present, absent) o Native YAML style (but is not mandatory) o Editor (syntax highlight) (atom, sublime, vscode) o Version control 19
  • 20. >demo.exe (monitoring platform) Infrastructure as a Code Inventory Playbooks es-server client01 metricbeats elasticsearch kibana 20 github.com/jmlero
  • 22. Vielen Dank für Ihre Aufmerksamkeit Insert: any_question.jpg jmolero@know-center.at José Manuel Molero @jmlero Infracoders Meetup Graz, 11.04.2017 22

Editor's Notes

  1. GRAFISCH mit Know-Center Icons!