
Implementing DevOps with Ansible 2
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
- [*] Use Ansible to provision and automate Docker containers and images
- [*] Learn the fundamentals of Continuous Integration and Continuous Delivery and how to leverage Ansible to implement these modern DevOps
- [*] Learn the fundamentals of creating custom Ansible modules
- [*] Learn the fundamentals of Ansible Galaxy
- [*] Follow along step-by-step as we teach you to scale Ansible for your DevOps processes
Book DescriptionThinking about adapting the DevOps culture for your organization using a very simple, yet powerful automation tool, Ansible 2? Then this book is for you! In this book, you will start with the role of Ansible in the DevOps module, which covers fundamental DevOps practices and how Ansible is leveraged by DevOps organizations to implement consistent and simplified configuration management and deployment. You will then move on to the next module, Ansible with DevOps, where you will understand Ansible fundamentals and how Ansible Playbooks can be used for simple configuration management and deployment tasks. After simpler tasks, you will move on to the third module, Ansible Syntax and Playbook Development, where you will learn advanced configuration management implementations, and use Ansible Vault to secure top-secret information in your organization. In this module, you will also learn about popular DevOps tools and the support that Ansible provides for them (MYSQL, NGINX, APACHE and so on). The last module, Scaling Ansible for the enterprise, is where you will integrate Ansible with CI and CD solutions and provision Docker containers using Ansible. By the end of the book you will have learned to use Ansible to leverage your DevOps tasks. What you will learn - [*] Get to the grips with the fundamentals of Ansible 2.2 and how you can benefit from leveraging Ansible for DevOps.
- [*] Adapt the DevOps process and learn how Ansible and other tools can be used to automate it.
- [*] Start automating Continuous Integration and Continuous Delivery tasks using Ansible
- [*] Maximize the advantages of tools such as Docker, Jenkins, JIRA, and many more to implement the DevOps culture.
- [*] Integrate DevOps tools with Ansible
- [*] Extend Ansible using Python and create custom modules that integrate with unique specific technology stacks
- [*] Connect and control the states of various third-party applications such as GIT, SVN, Artifactory, Nexus, Jira, Hipchat, Slack, Nginx, and others
Who this book is forIf you are a DevOps engineer, administrator, or developer and want to implement the DevOps environment in your organization using Ansible, then this book is for you.
More details
Person
Jonathan McAllister has been creating software and automations since he was a child. As an avid computer technologist, he has had 13 years' professional experience in software development, test, and delivery practices. During his career, he has architected and implemented software build, test, and delivery solutions for cutting-edge technology organizations across diverse technology stacks. Jonathan has most recently been focusing on build pipelines, continuous integration, continuous delivery, microservice architecture, standardized processes, agile and Kanban, and the implementation of highly scalable automation solutions. He has worked and consulted for some of the industry's most notable companies, including Microsoft, Merck, Logitech, and Oracle. His focus is entirely on designing scalable software build, delivery, and test pipelines in an effort to streamline releases through standardization and help develop strategies that can elevate revenue through modern continuous practices.
Content
- Cover
- Copyright
- Credits
- About the Author
- Acknowledgments
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 1: DevOps Fundamentals
- DevOps 101
- Culture
- Automation
- Measurement
- Sharing
- The History of DevOps
- Strides toward the future
- DevOps in the Modern Software Organization
- The DevOps assembly line
- Correlations between a DevOps assembly line and manufacturing
- DevOps architectures and practices
- Encapsulated software development
- Microservices
- Continuous Integration and Continuous Delivery
- Modularity
- Horizontal scalability
- Blue-green deployments
- Artifact management and versioning
- Symmetrical environments
- Summary
- Chapter 2: Configuration Management Essentials
- Understanding Configuration Management
- Origins of Configuration Management
- The Aims of Configuration Management
- Scenario 1
- Scenario 2
- Scenario 3
- Scenario 4
- Basic Principles of Configuration Management
- Configuration Management Best Practices
- How Ansible Simplifies DevOps Implementations
- Binary Artifact Management and Ansible
- Summary
- Chapter 3: Installing, Configuring, and Running Ansible
- Installing Ansible
- Red Hat Enterprise Linux via Configuration Management
- Apt for Debian/Apt for Ubuntu
- Porting Ansible to Gentoo
- PKG for FreeBSD
- Pip for macOS
- OpenCSW for Solaris/SunOS
- Via Python pip
- Once Ansible has been installed
- Setting up authentication between the control server and hosts
- The Ansible Architecture
- Open source
- Module-based
- Agentless
- Pluggable
- Local automation execution using Ansible
- Remote automation execution using Ansible
- Container-oriented automation
- The Ansible Command-Line Interface
- Usage: ansible &host-pattern& [options]
- Ansible command-line examples
- Configuring Ansible
- Common base configuration items
- The Ansible Inventory
- Defined inventory groups
- Loose inventory items/hosts/devices
- Executing playbook's and targeting specific inventory files and groups
- Summary
- Chapter 4: Playbooks and Inventory Files
- Ansible Playbook Constructs
- The programming languages that make up a playbook
- YAML
- Jinja2 - a brief introduction
- Constructing an Ansible playbook
- Hosts
- Variables (vars/vars_files)
- Tasks/plays
- Ansible Play's and Task's
- Ansible plays
- Ansible tasks
- Multiline task parameters
- Variables and Variable Files
- Basic variable syntax
- Variable files
- Hosts and Inventory
- Targeting Infrastructure
- Ansible Modules
- Managing packages in Ansible
- Yum
- The apt-get and dpkg
- Managing users in Ansible
- File and directory management in Ansible
- Managing services in Ansible
- Transferring files in Ansible
- Summary
- Chapter 5: Playbooks - Beyond the Fundamentals
- playbook's and Conditional Logic
- Iterators and Loops
- Basic loops using with_items
- Nested loops using with_nested
- Looping over hashes using with_dict
- Iterating over files using with_file
- Iterating over sequential numbers
- The do until iterator
- Iterating over inventory hosts using play_hosts
- Includes
- Play-level includes
- Task-level includes
- Dynamic includes
- Ansible Roles
- Ansible Register Variables
- Simple Ansible registers
- Accessing registers
- Additional conditional logic with registers
- Null or empty comparisons
- Vars and Ansible registers
- Iterating over register contents
- Ansible Handlers
- Summary
- Chapter 6: Jinja in Ansible
- Introducing Jinja
- Jinja2 Programming Constructs
- Expressions, filters, and variables
- Jinja string concatenation and manipulation
- Basic arithmetic operations in Jinja
- Compound math equations and order of operations in Jinja
- Filters available
- Conditional logic (if-then-else)
- Loops and iterators
- Simple counters
- List iterators
- Complex iterators using Jinja
- Applying Jinja in Ansible Playbook's
- Summary
- Chapter 7: Ansible Vault
- The Ansible Vault Architecture
- Basic Vault Usage
- Encrypting an Ansible vault YAML file
- To decrypt
- To rekey an Ansible vault file
- Editing in place
- Decrypting the vault when running a playbook
- Automatically decrypting using password files
- Manually decrypting vault data
- Real-world Ansible Vault Workflow
- Ansible vault with roles
- Summary
- Chapter 8: Ansible Modules and Libraries
- Introducing Ansible Modules
- Integrating Ansible with Other Technologies
- Ansible with JIRA
- Ansible and Git
- Ansible and Jenkins
- Ansible and Docker
- Summary
- Chapter 9 : Integrating Ansible with CI and CD Solutions
- Overview of Continuous Integration
- Continuous integration concepts and practices
- Handling unfinished work
- Branch by abstraction
- Feature toggles
- A/B testing patterns
- Overview of Continuous Delivery
- Continuous Delivery defined
- Handling complex and long running builds and deployments
- CI-&CD feedback loop
- Blue-green deployments
- CI-&CD anti-patterns
- Ansible's Role in CI-&CD
- Ansible best practices in CI-&CD
- Integrating Ansible with Jenkins
- The Jenkins Ansible plugin
- The Jenkins Ansible API modules
- The jenkins_job Ansible Module
- Integrating Ansible with Vagrant
- Leveraging Ansible for Vagrant provisioning
- Summary
- Chapter 10: Ansible and Docker
- Understanding Docker's Architecture
- Understanding Docker containers as environments
- Managing Docker Containers with Ansible
- Creating Docker containers
- Removing Docker containers
- Launching and stopping Docker containers
- Managing network access Docker containers
- Using Ansible to Create Docker Images
- Using Dockerfiles to launch Ansible playbooks
- Managing Docker Images with Ansible
- Pulling, pushing, and tagging images
- Building and archiving Docker images
- Saving and loading archived Docker images
- Gathering Facts About Docker Containers
- Summary
- Chapter 11 : Extending Ansible
- Understanding Ansible Plugins and its Architecture
- When should we create a module?
- Setting Up the Ansible Module Development Environment
- Ansible module testing tool setup
- Developing Hello World Ansible Module
- Testing a developmental Ansible module
- Reading input parameters
- Adding custom facts to a module
- Setting up the Ansible Plugin Development Environment
- Understanding the Different Types of Plugins
- Action plugins
- Callback plugins
- Connection plugins
- Lookup plugins
- Distributing Ansible plugins
- Summary
- Chapter 12 : Ansible Galaxy
- Ansible Galaxy Fundamentals
- The Ansible Galaxy website
- The Ansible Galaxy command-line interface
- Ansible Galaxy command-line options explained
- The install subcommand
- The delete subcommand
- The import subcommand
- The ifo subcommand
- The init command
- The list subcommand
- The login subcommand
- The remove subcommand
- The search subcommand
- The setup subcommand
- The help command
- Summary
- Index
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.