Upgrade to Pro — share decks privately, control downloads, hide ads and more …

USING ANSIBLE FOR DEVOPS

Chris Short
September 12, 2018

USING ANSIBLE FOR DEVOPS

What is DevOps and how Ansible fits into the puzzle.

Chris Short

September 12, 2018
Tweet

More Decks by Chris Short

Other Decks in Technology

Transcript

  1. USING ANSIBLE FOR DEVOPS
    Chris Short
    Principal Product Marketing Manager, Ansible
    [email protected]
    @ChrisShort

    View full-size slide

  2. 5
    DEVOPS DEFINED
    DevOps is a culture and practice that emphasizes
    the collaboration and communication of both
    software developers and IT operations professionals
    while automating the process of software delivery
    and infrastructure changes.
    ADAPTED FROM WIKIPEDIA

    View full-size slide

  3. 6
    DEVOPS BUILDS ON APP-DEV and IT-OPS INNOVATION

    View full-size slide

  4. 7
    DEVOPS CREATES DEMAND FOR AUTOMATION ACROSS THE DEV AND OPS LIFECYCLES
    100%
    Enterprises
    worldwide are investing
    in or evaluating DevOps
    85%
    Enterprise IT decision makers state
    automation is either mission critical
    or very important to their
    future DevOps strategy
    DevOps is almost 10 Years Old!!!
    NEXT GENERATION IT INFRASTRUCTURE & MANAGEMENT SURVEY
    DEC 2017
    N= 1171 Worldwide IT Operations Decision Makers

    View full-size slide

  5. 8
    DEVOPS
    is not a product

    View full-size slide

  6. 9
    DEVOPS
    is an opportunity to
    have a business
    discussion

    View full-size slide

  7. 10
    STANDARDIZATION AUTOMATION CONTINUOUS
    IMPROVEMENT

    View full-size slide

  8. 13
    ACCELERATE APP DELIVERY
    Increase agility and
    efficiency, and provide better
    control of existing and new IT
    environments
    Automate routine IT tasks to save
    time and increase stability
    Reduce IT environment complexity
    through automation
    Promote cultural changes needed to
    implement DevOps
    Transform culture, process
    and methodologies to
    accelerate digital
    transformation
    Speed & agility
    Collaboration & connection
    Catalyze innovation
    Accelerate application
    delivery with containers
    Deliver faster
    Develop faster
    Change faster
    Innovate faster
    BUSINESS INNOVATION
    IT AUTOMATION

    View full-size slide

  9. 14
    VALUE OF AUTOMATION FOR DEVOPS
    GROW
    REVENUE
    ● Rapid innovation of new services and applications
    ● Scale applications and infrastructure on demand
    ● Broaden use of cloud native apps & microservices for agility
    ● Increase developer productivity
    REDUCE
    COST
    ● Portability to optimize cost & performance
    ● Maximize value of existing IT while rapidly evolving architecture
    ● Improve IT Ops productivity
    ● Consistent compliance & security

    View full-size slide

  10. 15
    Credit: 2018 State of DevOps Report, Nicole Forsgren, PhD

    View full-size slide

  11. OPERATIONS
    DEVELOPERS

    View full-size slide

  12. 18
    WHERE DO
    I START?

    View full-size slide

  13. 19
    AUTOMATE
    REPEAT IT

    View full-size slide

  14. 20
    WHAT IS ANSIBLE AUTOMATION?
    Ansible is an open source community project
    sponsored by Red Hat. It’s a simple automation
    language that can perfectly describe IT
    application environments in Ansible Playbooks.
    Ansible Tower is an enterprise framework for
    controlling, securing and managing your
    Ansible automation with a UI and RESTful API.

    View full-size slide

  15. 21
    WHY ANSIBLE?
    SIMPLE POWERFUL AGENTLESS
    App deployment
    Configuration management
    Workflow orchestration
    Network automation
    Orchestrate the app lifecycle
    Human readable automation
    No special coding skills
    needed
    Tasks executed in order
    Usable by every team
    Get productive quickly
    Agentless architecture
    Uses OpenSSH & WinRM
    No agents to exploit or update
    Get started immediately
    More efficient & more secure

    View full-size slide

  16. 22
    THE ANSIBLE WAY
    CROSS PLATFORM
    Agentless support for all major
    OS variants, physical, virtual,
    cloud and network devices.
    HUMAN READABLE
    Perfectly describe and
    document every aspect of your
    application environment.
    PERFECT DESCRIPTION
    OF APPLICATION
    Every change can be made by
    Playbooks, ensuring everyone is
    on the same page.
    VERSION CONTROLLED
    Playbooks are plain-text. Treat
    them like code in your existing
    version control.
    DYNAMIC INVENTORIES
    Capture all the servers 100% of
    the time, regardless of
    infrastructure, location, etc.
    ORCHESTRATION PLAYS
    WELL WITH OTHERS
    Every change can be made by
    Playbooks, ensuring everyone is
    on the same page.

    View full-size slide

  17. 23
    ANSIBLE IS THE UNIVERSAL LANGUAGE
    DEV QA/SECURITY IT OPERATIONS
    BUSINESS
    Ansible is the first automation language that can be read and written across IT.
    Ansible is the only automation engine that can automate the entire
    application lifecycle and continuous delivery pipeline.

    View full-size slide

  18. 24
    1900+
    Ansible modules
    31,000+
    Stars on GitHub
    500,000+
    Downloads a month

    View full-size slide

  19. 25
    PLAYBOOK EXAMPLE
    ---
    - name: install and start apache
    hosts: web
    become: yes
    vars:
    http_port: 80
    tasks:
    - name: httpd package is present
    yum:
    name: httpd
    state: latest
    - name: latest index.html file is present
    copy:
    src: files/index.html
    dest: /var/www/html/
    - name: httpd is started
    service:
    name: httpd
    state: started

    View full-size slide

  20. 26
    WHAT CAN I DO WITH ANSIBLE?
    Automate the deployment and management of your entire IT footprint.
    Orchestration
    Do this...
    Firewalls
    Configuration
    Management
    Application
    Deployment
    Provisioning
    Continuous
    Delivery
    Security and
    Compliance
    On these...
    Load Balancers Applications Containers Clouds
    Servers Infrastructure Storage And more...
    Network Devices

    View full-size slide

  21. 27
    ANSIBLE AUTOMATES TECHNOLOGIES YOU USE
    CLOUD VIRT &
    CONTAINER
    WINDOWS NETWORK DEVOPS MONITORING
    AWS
    Azure
    Digital Ocean
    Google
    OpenStack
    Rackspace
    +more
    Docker
    VMware
    RHV
    OpenStack
    OpenShift
    +more
    ACLs
    Files
    Packages
    IIS
    Regedits
    Shares
    Services
    Configs
    Users
    Domains
    +more
    Arista
    A10
    Cumulus
    Bigswitch
    Cisco
    Cumulus
    Dell
    F5
    Juniper
    Palo Alto
    OpenSwitch
    +more
    Jira
    GitHub
    Vagrant
    Jenkins
    Bamboo
    Atlassian
    Subversion
    Slack
    Hipchat
    +more
    Dynatrace
    Airbrake
    BigPanda
    Datadog
    LogicMonitor
    Nagios
    New Relic
    PagerDuty
    Sensu
    StackDriver
    Zabbix
    +more
    STORAGE
    NetApp
    Red Hat Storage
    Infinidat
    +more
    OPERATING
    SYSTEMS
    RHEL and Linux
    UNIX
    Windows
    +more

    View full-size slide

  22. 28
    WHEN WE WIN — START SMALL, THINK BIG
    3 HIGH-LEVEL BENEFITS FOR SUCCESSFUL IT AUTOMATION
    Infrastructure as YAML
    ● Automate backup & restores
    ● Manage “golden” versions of configurations
    Configuration management
    ● Changes can be incremental or wholesale
    ● Make it part of the process: agile, waterfall, etc.
    Ensure an ongoing steady state
    ● Schedule tasks daily, weekly, or monthly
    ● Perform regular state checking and validation

    View full-size slide

  23. 29
    PLAYBOOK EXAMPLES
    LAMP + HAPROXY + NAGIOS
    github.com/ansible/ansible-examples/tree/master/lamp_haproxy
    WINDOWS
    github.com/ansible/ansible-examples/tree/master/windows
    SECURITY COMPLIANCE
    github.com/ansible/ansible-lockdown
    NETWORK
    github.com/privateip/network-demo
    MORE...
    galaxy.ansible.com
    github.com/ansible/ansible-examples

    View full-size slide

  24. 30
    15,000 ROLES AT YOUR DISPOSAL
    Reusable Roles and Container Apps that allow you to do more, faster
    Built into the Ansible CLI and Tower
    galaxy.ansible.com

    View full-size slide

  25. 32
    BOOK RECOMMENDATIONS

    View full-size slide

  26. 33
    ---
    - name: configure ios interface
    hosts: ios01
    tasks:
    - name: collect device running-config
    ios_command:
    commands: show running-config interface GigabitEthernet0/2
    provider: “{{ cli }}”
    register: config
    - name: administratively enable interface
    ios_config:
    lines: no shutdown
    parents: interface GigabitEthernet0/2
    provider: “{{ cli }}”
    when: ‘”shutdown” in config.stdout[0]‘
    - name: verify operational status
    ios_command:
    commands:
    - show interfaces GigabitEthernet0/2
    - show cdp neighbors GigabitEthernet0/2 detail
    waitfor:
    - result[0] contains ‘line protocol is up’
    - result[1] contains ‘iosxr03’
    - result[1] contains ’10.0.0.42’
    provider: “{{ cli }}”
    PLAYBOOK EXAMPLE: NETWORK AUTOMATION

    View full-size slide

  27. 34
    - hosts: new_servers
    tasks:
    - name: ensure common OS updates are current
    win_updates:
    register: update_result
    - name: ensure domain membership
    win_domain_membership:
    dns_domain_name: contoso.corp
    domain_admin_user: '{{ domain_admin_username }}'
    domain_admin_password: '{{ domain_admin_password }}'
    state: domain
    register: domain_result
    - name: reboot and wait for host if updates or domain change require it
    win_reboot:
    when: update_result.reboot_required or domain_result.reboot_required
    - name: ensure local admin account exists
    win_user:
    name: localadmin
    password: '{{ local_admin_password }}'
    groups: Administrators
    - name: ensure common tools are installed
    win_chocolatey:
    name: '{{ item }}'
    with_items: ['sysinternals', 'googlechrome']
    PLAYBOOK EXAMPLE: WINDOWS

    View full-size slide

  28. Stability and security
    Training and Consulting
    Access to award winning Red Hat
    Customer Portal
    Fully supported RHEL/CentOS 7.2+, Ubuntu
    14.04 & 16.04 LTS, Amazon Web Service (AWS)
    AWX code has not gone through
    Quality Engineering
    No training, certification, or consulting
    services available from Red Hat on AWX
    100% community supported (GitHub, IRC,
    mailing lists, etc.)
    AWX ANSIBLE TOWER
    WHAT ABOUT AWX?!?!
    IT’S A VALID QUESTION

    View full-size slide