SlideShare une entreprise Scribd logo
1  sur  78
Why Ansible?
What is Ansible?
Ansible - Pull configuration tool
Ansible architecture
Playbook
What’s in it for you?
Inventory
Working of Ansible
Ansible Tower
Use case by Hootsuite
Why Ansible?
This is Sam, a system administrator. He is
responsible for his company’s infrastructure
Why Ansible?
[Web Servers]
[Database Servers]
Why Ansible?
He must install Apache on all the 3 web servers and
MySQL on the two database servers
[Web Servers]
[Database Servers]
Why Ansible?
That’s easy! Wouldn’t take much time either
[Web Servers]
[Database Servers]
Why Ansible?
But what if the number of servers increase?
[Web Servers]
[Database Servers]
The same task must be repeated multiple times.
Moreover, humans are prone to make errors
Why Ansible?
[Web Servers]
[Database Servers]
Why Ansible?
This is where Ansible comes to the rescue
[Web Servers]
[Database Servers]
Why Ansible?
With Ansible, a code is written once for the
installation and deployed multiple times
[Web Servers]
[Database Servers]
Why Ansible?
Sam can now work on more productive tasks rather
than the repetitive ones
[Web Servers]
[Database Servers]
What is Ansible?
Sounds great, right?
But what is Ansible?
What is Ansible?
IT automation
What is Ansible?
Instructions are written to
automate the IT
professional’s work
Ansible is a tool that provides:
IT automation Configuration management
What is Ansible?
Instructions are written to
automate the IT
professional’s work
Consistency of all
systems in the
infrastructure is
maintained
Ansible is a tool that provides:
Ansible is a tool that provides:
IT automation
Instructions are written to
automate the IT
professional’s work
Configuration management
Consistency of all
systems in the
infrastructure is
maintained
Automatic deployment
Applications are deployed
automatically on a variety
of environments
What is Ansible?
Ansible - Pull configuration tool
Pull configuration: Nodes check with the server periodically
and fetch the configurations from it
Ansible - Pull configuration tool
Pull configuration: Nodes check with the server periodically
and fetch the configurations from it
Push configuration: Server pushes configuration to
the nodes
Ansible - Pull configuration tool
Push configuration: Server pushes configuration to
the nodes
Unlike Chef and Puppet, Ansible is push
type configuration management tool
Ansible - Pull configuration tool
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
The local machine is where Ansible is installed
Ansible architecture
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
Nodes are the systems to be configured. They are
controlled by the local machine
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
Module is a collection of configuration code files
Playbooks
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
These configuration code files are called playbooks
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
Inventory is a document that groups the nodes under
specific labels
Playbooks
Ansible architecture
Local Machine
Node
Module
Inventory Node
Node
The local machine connects to the nodes through an SSH
client
SSH
Playbooks
Playbook
The core of Ansible
is it’s playbook
Playbook
Playbook
So, what is a
playbook?
Playbook
Playbook
Playbook
Playbooks are the instructions to
configure the nodes
Playbook
Playbook
Playbooks are the instructions to
configure the nodes
They are written in YAML, a language
used to describe data
Playbook
Did you know, YAML
stands for “YAML Ain’t
Markup Language”
Playbook
Playbooks are the instructions to
configure the nodes
They are written in YAML, a language
used to describe data
Playbook
Let’s have a look at the
structure of a playbook
Playbook
Playbooks are the instructions to
configure the nodes
They are written in YAML, a language
used to describe data
Playbook
Let’s have a look at the
structure of a playbook
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Playbook begins with ‘--
-’
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
A playbook is a list of
plays
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Host is the target for the
play
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Each play has a list of
tasks
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Each element in the list
of tasks is given a name
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
The name is followed by
instructions to execute
the task
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Have a look at the first
task
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Module yum is used to
install the apache
service
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Simple, isn’t it?
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
But where do these host
names come from?
---
-name: play 1
hosts: webserver
tasks:
-name: install apache
yum:
name: apache
state: present
-name: start apache
service:
name: apache
state: start
-name: play 2
hosts: databaseserver
tasks:
-name: install MySQL
yum:
name: MySQL
state: present
Playbook
Inventory
This is why we have an
inventory
Inventory
An inventory file
classifies nodes into
groups
[webserver]
web1.machine
web2.machine
web3.machine
[databaseserver]
db1.machine
Inventory
We have two groups
here: ‘webserver’ and
‘databaseserver’
[webserver]
web1.machine
web2.machine
web3.machine
[databaseserver]
db1.machine
Inventory
The hostnames of the
nodes are specified
under the group name
[webserver]
web1.machine
web2.machine
web3.machine
[databaseserver]
db1.machine
Inventory
Working of Ansible
Local Machine
NodeNode Node
Ansible is installed only on the local machine.
This makes Ansible agentless
Working of Ansible
Local Machine
NodeNode Node
The playbook and inventory are written at the
local machine
Working of Ansible
Local Machine
NodeNode Node
The local machine connects to the nodes
through SSH
SS
H
Working of Ansible
Local Machine
NodeNode Node
The local machine gathers the facts of each
node. Facts indicate the state of the nodes
SS
H
Working of Ansible
Local Machine
NodeNode Node
The playbooks are sent to the nodes
SS
H
Working of Ansible
Local Machine
NodeNode Node
The playbooks are now executed. This
configures the nodes to their desired states
SS
H
Working of Ansible
Working of Ansible
So, let’s see if you can
answer a simple
question…
Working of Ansible
What is the major
leverage Ansible has
over Chef and Puppet?
Working of Ansible
Leave your answers on
the comment!
Ansible Tower
Now, let’s have a look at
the icing on the cake-
Ansible Tower!
Ansible Tower
Ansible Tower is a framework for Ansible
Ansible Tower
Ansible Tower is a framework for Ansible
It provides a GUI. Thus, reducing the
dependency on the command prompt
window
Ansible Tower
Ansible Tower is a framework for Ansible
It provides a GUI. Thus, reducing the
dependency on the command prompt
window
Instead of typing long commands, tasks
can now be performed in a single click
Ansible Tower
Use case by Hootsuite
Hootsuite is a social media
management system
Use case by Hootsuite
They assist businesses in
campaigning across
social media platforms
Use case by Hootsuite
But as they gained
popularity, a crisis struck
Use case by Hootsuite
Servers had to be rebuilt continuously
Use case by Hootsuite
Unfortunately, there was no standard
documentation and the entire process
relied on memory
Use case by Hootsuite
This is when the need for Ansible was
realised
Use case by Hootsuite
Now, playbooks are written to deploy
servers providing a standardization
Use case by Hootsuite
Servers are built and rebuilt in a matter of
seconds
Use case by Hootsuite
Use case by Hootsuite
Servers are built and rebuilt in a matter of
seconds
Key Takeaways
Ansible- pull configuration tool
Ansible architecture
What is ansible?Why ansible?
playbook Inventory
Key Takeaways
Ansible towerWorking of ansible Use case by hootsuite
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevOps Tools | Simplilearn

Contenu connexe

Tendances

Tendances (20)

Ansible
AnsibleAnsible
Ansible
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Accelerating with Ansible
Accelerating with AnsibleAccelerating with Ansible
Accelerating with Ansible
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with Ansible
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Ansible
AnsibleAnsible
Ansible
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansible
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
Ansible get started
Ansible get startedAnsible get started
Ansible get started
 

Similaire à What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevOps Tools | Simplilearn

Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19
dvillaco
 

Similaire à What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevOps Tools | Simplilearn (20)

Ansible
AnsibleAnsible
Ansible
 
Ansible_Basics_ppt.pdf
Ansible_Basics_ppt.pdfAnsible_Basics_ppt.pdf
Ansible_Basics_ppt.pdf
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Automating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
 
Ansible a tool for dev ops
Ansible a tool for dev opsAnsible a tool for dev ops
Ansible a tool for dev ops
 
MongoDB Management & Ansible
MongoDB Management & AnsibleMongoDB Management & Ansible
MongoDB Management & Ansible
 
UNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptxUNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptx
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
Managing windows Nodes like Linux Nodes by Ansible
Managing windows Nodes like Linux Nodes by AnsibleManaging windows Nodes like Linux Nodes by Ansible
Managing windows Nodes like Linux Nodes by Ansible
 
ansible_rhel.pdf
ansible_rhel.pdfansible_rhel.pdf
ansible_rhel.pdf
 
Ansible Devops North East - slides
Ansible Devops North East - slides Ansible Devops North East - slides
Ansible Devops North East - slides
 
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2
 
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE LabHow to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
 
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 Configuration Management Tool 소개 및 활용
Ansible Configuration Management Tool 소개 및 활용 Ansible Configuration Management Tool 소개 및 활용
Ansible Configuration Management Tool 소개 및 활용
 
Top 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdfTop 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdf
 
Intro to-ansible-sep7-meetup
Intro to-ansible-sep7-meetupIntro to-ansible-sep7-meetup
Intro to-ansible-sep7-meetup
 
Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19
 

Plus de Simplilearn

What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
Simplilearn
 
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
Simplilearn
 
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
Simplilearn
 
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
Simplilearn
 
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
Simplilearn
 
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
Simplilearn
 
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
Simplilearn
 
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
Simplilearn
 
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
Simplilearn
 
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
Simplilearn
 
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
Simplilearn
 
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
Simplilearn
 
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
Simplilearn
 
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
Simplilearn
 
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
Simplilearn
 

Plus de Simplilearn (20)

ChatGPT in Cybersecurity
ChatGPT in CybersecurityChatGPT in Cybersecurity
ChatGPT in Cybersecurity
 
Whatis SQL Injection.pptx
Whatis SQL Injection.pptxWhatis SQL Injection.pptx
Whatis SQL Injection.pptx
 
Top 5 High Paying Cloud Computing Jobs in 2023
 Top 5 High Paying Cloud Computing Jobs in 2023  Top 5 High Paying Cloud Computing Jobs in 2023
Top 5 High Paying Cloud Computing Jobs in 2023
 
Types Of Cloud Jobs In 2024
Types Of Cloud Jobs In 2024Types Of Cloud Jobs In 2024
Types Of Cloud Jobs In 2024
 
Top 12 AI Technologies To Learn 2024 | Top AI Technologies in 2024 | AI Trend...
Top 12 AI Technologies To Learn 2024 | Top AI Technologies in 2024 | AI Trend...Top 12 AI Technologies To Learn 2024 | Top AI Technologies in 2024 | AI Trend...
Top 12 AI Technologies To Learn 2024 | Top AI Technologies in 2024 | AI Trend...
 
What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
What is LSTM ?| Long Short Term Memory Explained with Example | Deep Learning...
 
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
Top 10 Chat GPT Use Cases | ChatGPT Applications | ChatGPT Tutorial For Begin...
 
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
React JS Vs Next JS - What's The Difference | Next JS Tutorial For Beginners ...
 
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
Backpropagation in Neural Networks | Back Propagation Algorithm with Examples...
 
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
How to Become a Business Analyst ?| Roadmap to Become Business Analyst | Simp...
 
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
Career Opportunities In Artificial Intelligence 2023 | AI Job Opportunities |...
 
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
Programming for Beginners | How to Start Coding in 2023? | Introduction to Pr...
 
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
Best IDE for Programming in 2023 | Top 8 Programming IDE You Should Know | Si...
 
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
React 18 Overview | React 18 New Features and Changes | React 18 Tutorial 202...
 
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
What Is Next JS ? | Introduction to Next JS | Basics of Next JS | Next JS Tut...
 
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
How To Become an SEO Expert In 2023 | SEO Expert Tutorial | SEO For Beginners...
 
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
WordPress Tutorial for Beginners 2023 | What Is WordPress and How Does It Wor...
 
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
Blogging For Beginners 2023 | How To Create A Blog | Blogging Tutorial | Simp...
 
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
How To Start A Blog In 2023 | Pros And Cons Of Blogging | Blogging Tutorial |...
 
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
How to Increase Website Traffic ? | 10 Ways To Increase Website Traffic in 20...
 

Dernier

Dernier (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 

What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevOps Tools | Simplilearn

  • 1.
  • 2. Why Ansible? What is Ansible? Ansible - Pull configuration tool Ansible architecture Playbook What’s in it for you? Inventory Working of Ansible Ansible Tower Use case by Hootsuite
  • 4. This is Sam, a system administrator. He is responsible for his company’s infrastructure Why Ansible? [Web Servers] [Database Servers]
  • 5. Why Ansible? He must install Apache on all the 3 web servers and MySQL on the two database servers [Web Servers] [Database Servers]
  • 6. Why Ansible? That’s easy! Wouldn’t take much time either [Web Servers] [Database Servers]
  • 7. Why Ansible? But what if the number of servers increase? [Web Servers] [Database Servers]
  • 8. The same task must be repeated multiple times. Moreover, humans are prone to make errors Why Ansible? [Web Servers] [Database Servers]
  • 9. Why Ansible? This is where Ansible comes to the rescue [Web Servers] [Database Servers]
  • 10. Why Ansible? With Ansible, a code is written once for the installation and deployed multiple times [Web Servers] [Database Servers]
  • 11. Why Ansible? Sam can now work on more productive tasks rather than the repetitive ones [Web Servers] [Database Servers]
  • 13. Sounds great, right? But what is Ansible? What is Ansible?
  • 14. IT automation What is Ansible? Instructions are written to automate the IT professional’s work Ansible is a tool that provides:
  • 15. IT automation Configuration management What is Ansible? Instructions are written to automate the IT professional’s work Consistency of all systems in the infrastructure is maintained Ansible is a tool that provides:
  • 16. Ansible is a tool that provides: IT automation Instructions are written to automate the IT professional’s work Configuration management Consistency of all systems in the infrastructure is maintained Automatic deployment Applications are deployed automatically on a variety of environments What is Ansible?
  • 17. Ansible - Pull configuration tool
  • 18. Pull configuration: Nodes check with the server periodically and fetch the configurations from it Ansible - Pull configuration tool
  • 19. Pull configuration: Nodes check with the server periodically and fetch the configurations from it Push configuration: Server pushes configuration to the nodes Ansible - Pull configuration tool
  • 20. Push configuration: Server pushes configuration to the nodes Unlike Chef and Puppet, Ansible is push type configuration management tool Ansible - Pull configuration tool
  • 22. Local Machine Node Module Inventory Node Node The local machine is where Ansible is installed Ansible architecture
  • 23. Ansible architecture Local Machine Node Module Inventory Node Node Nodes are the systems to be configured. They are controlled by the local machine
  • 24. Ansible architecture Local Machine Node Module Inventory Node Node Module is a collection of configuration code files
  • 25. Playbooks Ansible architecture Local Machine Node Module Inventory Node Node These configuration code files are called playbooks
  • 26. Ansible architecture Local Machine Node Module Inventory Node Node Inventory is a document that groups the nodes under specific labels Playbooks
  • 27. Ansible architecture Local Machine Node Module Inventory Node Node The local machine connects to the nodes through an SSH client SSH Playbooks
  • 29. The core of Ansible is it’s playbook Playbook Playbook
  • 30. So, what is a playbook? Playbook Playbook
  • 31. Playbook Playbooks are the instructions to configure the nodes Playbook
  • 32. Playbook Playbooks are the instructions to configure the nodes They are written in YAML, a language used to describe data Playbook
  • 33. Did you know, YAML stands for “YAML Ain’t Markup Language” Playbook Playbooks are the instructions to configure the nodes They are written in YAML, a language used to describe data Playbook
  • 34. Let’s have a look at the structure of a playbook Playbook Playbooks are the instructions to configure the nodes They are written in YAML, a language used to describe data Playbook
  • 35. Let’s have a look at the structure of a playbook --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 36. Playbook begins with ‘-- -’ --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 37. A playbook is a list of plays --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 38. Host is the target for the play --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 39. Each play has a list of tasks --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 40. Each element in the list of tasks is given a name --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 41. The name is followed by instructions to execute the task --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 42. Have a look at the first task --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 43. Module yum is used to install the apache service --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 44. Simple, isn’t it? --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 45. But where do these host names come from? --- -name: play 1 hosts: webserver tasks: -name: install apache yum: name: apache state: present -name: start apache service: name: apache state: start -name: play 2 hosts: databaseserver tasks: -name: install MySQL yum: name: MySQL state: present Playbook
  • 47. This is why we have an inventory Inventory
  • 48. An inventory file classifies nodes into groups [webserver] web1.machine web2.machine web3.machine [databaseserver] db1.machine Inventory
  • 49. We have two groups here: ‘webserver’ and ‘databaseserver’ [webserver] web1.machine web2.machine web3.machine [databaseserver] db1.machine Inventory
  • 50. The hostnames of the nodes are specified under the group name [webserver] web1.machine web2.machine web3.machine [databaseserver] db1.machine Inventory
  • 52. Local Machine NodeNode Node Ansible is installed only on the local machine. This makes Ansible agentless Working of Ansible
  • 53. Local Machine NodeNode Node The playbook and inventory are written at the local machine Working of Ansible
  • 54. Local Machine NodeNode Node The local machine connects to the nodes through SSH SS H Working of Ansible
  • 55. Local Machine NodeNode Node The local machine gathers the facts of each node. Facts indicate the state of the nodes SS H Working of Ansible
  • 56. Local Machine NodeNode Node The playbooks are sent to the nodes SS H Working of Ansible
  • 57. Local Machine NodeNode Node The playbooks are now executed. This configures the nodes to their desired states SS H Working of Ansible
  • 58. Working of Ansible So, let’s see if you can answer a simple question…
  • 59. Working of Ansible What is the major leverage Ansible has over Chef and Puppet?
  • 60. Working of Ansible Leave your answers on the comment!
  • 62. Now, let’s have a look at the icing on the cake- Ansible Tower! Ansible Tower
  • 63. Ansible Tower is a framework for Ansible Ansible Tower
  • 64. Ansible Tower is a framework for Ansible It provides a GUI. Thus, reducing the dependency on the command prompt window Ansible Tower
  • 65. Ansible Tower is a framework for Ansible It provides a GUI. Thus, reducing the dependency on the command prompt window Instead of typing long commands, tasks can now be performed in a single click Ansible Tower
  • 66. Use case by Hootsuite
  • 67. Hootsuite is a social media management system Use case by Hootsuite
  • 68. They assist businesses in campaigning across social media platforms Use case by Hootsuite
  • 69. But as they gained popularity, a crisis struck Use case by Hootsuite
  • 70. Servers had to be rebuilt continuously Use case by Hootsuite
  • 71. Unfortunately, there was no standard documentation and the entire process relied on memory Use case by Hootsuite
  • 72. This is when the need for Ansible was realised Use case by Hootsuite
  • 73. Now, playbooks are written to deploy servers providing a standardization Use case by Hootsuite
  • 74. Servers are built and rebuilt in a matter of seconds Use case by Hootsuite
  • 75. Use case by Hootsuite Servers are built and rebuilt in a matter of seconds
  • 76. Key Takeaways Ansible- pull configuration tool Ansible architecture What is ansible?Why ansible? playbook Inventory
  • 77. Key Takeaways Ansible towerWorking of ansible Use case by hootsuite

Notes de l'éditeur

  1. Style - 01
  2. Style - 01
  3. Style - 01
  4. Style - 01
  5. Style - 01
  6. Style - 01
  7. Style - 01
  8. Style - 01
  9. Style - 01
  10. Style - 01
  11. Style - 01
  12. Style - 01
  13. Style - 01
  14. Style - 01
  15. Style - 01
  16. Style - 01
  17. Style - 01
  18. Style - 01
  19. Style - 01
  20. Style - 01
  21. Style - 01
  22. Style - 01
  23. Style - 01
  24. Style - 01
  25. Style - 01
  26. Style - 01
  27. Style - 01
  28. Style - 01
  29. Style - 01
  30. Style - 01
  31. Style - 01
  32. Style - 01
  33. Style - 01
  34. Style - 01
  35. Style - 01
  36. Style - 01
  37. Style - 01
  38. Style - 01
  39. Style - 01
  40. Style - 01
  41. Style - 01
  42. Style - 01
  43. Style - 01
  44. Style - 01
  45. Style - 01
  46. Style - 01
  47. Style - 01
  48. Style - 01
  49. Style - 01
  50. Style - 01
  51. Style - 01
  52. Style - 01
  53. Style - 01
  54. Style - 01
  55. Style - 01
  56. Style - 01
  57. Style - 01
  58. Style - 01
  59. Style - 01
  60. Style - 01
  61. Style - 01
  62. Style - 01
  63. Style - 01
  64. Style - 01
  65. Style - 01
  66. Style - 01
  67. Style - 01