DevOps Classroom Series- Ansible 05/November/2019

Configuration Management

  • For any application to work we need some softwares.
  • Options for installing necessary softwares and deploying application

Manual

  • Administrator will install the necessary softwares
  • Admin will deploy the application
  • Problems:
    • Slow
    • Error Prone

Shell/Powershell Scripts

  • Create a shell/powershell script to perform deployment
  • Problems:
    • Multiple ways of doing the same activity. Because it impacts Readability and Maintainability.
    • Every script has assumptions
    • Scripts are Procedural (How it has to done)
  • Example:
    • Create a file:
      • Create a file using touch command
      • files path should be at /home/ubuntu/test.txt

Configuration Management

  • In this user will write the desired state
  • Scripts are Declarative (What has to be done)
  • The major theme is to maintain desired state.
  • CM has an important property call as idempotance
  • Example:
    • Create a file
      • I want an empty file at /home/ubuntu/test.txt
  • CM can be done using many tools, some of them are
    • Ansible
    • Chef
    • Salt
    • Puppet
    • CFEngine
    • PowerShell DSC

Architecture of Configuration Management

Preview

PUSH

Preview

PULL

Preview

Ansible Falls under Push based Configuration Management

Preview

  • Ansible is push based CM tool by default.
  • Software requirements of Ansible
    • Ansible Control Server:
      • Python
      • Ansible
    • Nodes:
      • Python

What do the user need to provide to ansible

  • Playbook:
    • Written in YAML
    • YAML is all about data representation
  • Inventory:
    • List of nodes to be used by Ansible Control

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner