DevOps Automation Cookbook

Over 120 recipes covering key automation techniques through code management and virtualization offered by modern Infrastructure as a Service

DevOps Automation Cookbook

This ebook is included in a Mapt subscription
Michael Duffy

2 customer reviews
Over 120 recipes covering key automation techniques through code management and virtualization offered by modern Infrastructure as a Service
$0.00
$35.99
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781784392826
Paperback334 pages

Book Description

There has been a recent explosion in tools that allow you to redefine the delivery of infrastructure and applications, using a combination of automation and testing to deliver continuous deployment. DevOps has garnered interest from every quarter, and is rapidly being recognized as a radical shift, as large as the Agile movement for the delivery of software.

This book takes a collection of some of the coolest software available today and shows you how to use it to create impressive changes to the way you deliver applications and software. It tackles the plethora of tools that are now available to enable organizations to take advantage of the automation, monitoring, and configuration management techniques that define a DevOps-driven infrastructure.

Starting off with the fundamental command-line tools that every DevOps enthusiast must know, this book will guide you through the implementation of the Ansible tool to help you facilitate automation and perform diverse tasks. You will explore how to build hosts automatically with the creation of Apt mirrors and interactive pre-seeds, which are of the utmost importance for Ubuntu automation. You will also delve into the concept of virtualization and creating and manipulating guests with ESXi. Following this, you will venture into the application of Docker; learn how to install, run, network, and restore Docker containers; and also learn how to build containers in Jenkins and deploy apps using a combination of Ansible, Docker, and Jenkins. You will also discover how to filter data with Grafana and the usage of InfluxDB along with unconventional log management. Finally, you will get acquainted with cloud infrastructure, employing the Heroku and Amazon AWS platforms.

By tackling real-world issues, this book will guide you through a huge variety of tools, giving new users the ability to get up and running and offering advanced users some interesting recipes that may help with existing issues.

Table of Contents

Chapter 1: Basic Command Line Tools
Introduction
Controlling network interfaces
Monitoring network details with the IP command
Monitoring connections using the ss command
Gathering basic OS statistics
Viewing historical resource usage with SAR
Installing and configuring a Git client
Creating an SSH key for Git
Using ssh-copy-id to copy keys
Creating a new Git repository
Cloning an existing Git repository
Checking changes into a Git repository
Pushing changes to a Git remote
Creating a Git branch
Chapter 2: Ad Hoc Tasks with Ansible
Introduction
Installing an Ansible control node on Ubuntu
Installing an Ansible control node on CentOS
Creating an Ansible inventory
Using the raw module to install python-simplejson
Installing packages with Ansible
Restarting services using Ansible
Executing freeform commands with Ansible
Managing users with Ansible
Managing SSH keys with Ansible
Chapter 3: Automatic Host builds
Introduction
Creating an Apt mirror using aptly
Automated installation using PXE boot and a Preseed file
Automating post-installation tasks
Chapter 4: Virtualization with VMware ESXi
Introduction
Installing ESXi
Installing and using the vSphere Client
Allowing SSH access to ESXi
Creating a new guest
Allocating resources to a guest
Using the ESXi command line to start, stop, and destroy guests
Managing command-line snapshots
Tuning the host for guest performance
Chapter 5: Automation with Ansible
Introduction
Installing Ansible
Creating a scaffold Playbook
Creating a common role
Creating a webserver using Ansible and Nginx
Creating an application server role using Tomcat and Ansible
Installing MySQL using Ansible
Installing and managing HAProxy with Ansible
Using ServerSpec to test your Playbook
Chapter 6: Containerization with Docker
Introduction
Installing Docker
Pulling an image from the public Docker registry
Performing basic Docker operations
Running a container interactively
Creating a Dockerfile
Running a container in detached mode
Saving and restoring a container
Using the host only network
Running a private Docker registry
Managing images with a private registry
Chapter 7: Using Jenkins for Continuous Deployment
Introduction
Installing Jenkins
Installing the Git plugin
Installing a Jenkins slave
Creating your first Jenkins job
Building Docker containers using Jenkins
Deploying a Java application to Tomcat with zero downtime using Ansible
Chapter 8: Metric Collection with InfluxDB
Introduction
Installing InfluxDB
Creating a new InfluxDB database
Logging events with the InfluxDB REST API
Gathering host statistics with Telegraf
Exploring data with the InfluxDB data explorer
Installing Grafana
Creating dashboards with Grafana
Chapter 9: Log Management
Introduction
Centralizing logs with Syslog
Using syslog templates
Managing log rotation with the Logrotate utility
Installing ElasticSearch, Logstash, and Kibana
Importing logs into Elasticsearch with Logstash
Using Kibana queries to explore data
Using Kibana queries to examine data
Chapter 10: Monitoring with Sensu
Introduction
Installing a Sensu server
Installing a Sensu client
Installing check prerequisites
Finding community checks
Adding a DNS check
Adding a disk check
Adding a RAM check
Adding a process check
Adding a CPU check
Creating e-mail alerts
Creating SMS alerts
Using Ansible to install Sensu
Chapter 11: IAAS with Amazon AWS
Introduction
Signing up for AWS
Setting up IAM
Creating your first security group
Creating your first EC2 host
Using Elastic Load Balancers
Managing DNS with route53
Using Ansible to create EC2 hosts
Chapter 12: Application Performance Monitoring with New Relic
Introduction
Signing up for a New Relic account
Installing the New Relic Java agent
Using the performance overview
Locating performance bottlenecks with Transaction Traces
Observing database performance with New Relic
Release performance monitoring with New Relic
Server Monitoring with New Relic

What You Will Learn

  • Manage, use, and work with code in the Git version management system
  • Manage the life cycle of hosts, from creation to on-going management, using Puppet Razor
  • Create hosts automatically using a simple combination of TFTP, DHCP, and pre-seeds
  • Implement virtual hosts using the ubiquitous VMware ESXi hypervisor
  • Control configuration using the powerful and popular Ansible configuration management system
  • Develop powerful, consistent, and portable containers using Docker
  • Track trends, discover data, and monitor key systems using InfluxDB, syslog, and Sensu
  • Deal efficiently with powerful cloud infrastructures using the Amazon AWS Infrastructure as a Service and the Heroku Platform as a Service

Authors

Table of Contents

Chapter 1: Basic Command Line Tools
Introduction
Controlling network interfaces
Monitoring network details with the IP command
Monitoring connections using the ss command
Gathering basic OS statistics
Viewing historical resource usage with SAR
Installing and configuring a Git client
Creating an SSH key for Git
Using ssh-copy-id to copy keys
Creating a new Git repository
Cloning an existing Git repository
Checking changes into a Git repository
Pushing changes to a Git remote
Creating a Git branch
Chapter 2: Ad Hoc Tasks with Ansible
Introduction
Installing an Ansible control node on Ubuntu
Installing an Ansible control node on CentOS
Creating an Ansible inventory
Using the raw module to install python-simplejson
Installing packages with Ansible
Restarting services using Ansible
Executing freeform commands with Ansible
Managing users with Ansible
Managing SSH keys with Ansible
Chapter 3: Automatic Host builds
Introduction
Creating an Apt mirror using aptly
Automated installation using PXE boot and a Preseed file
Automating post-installation tasks
Chapter 4: Virtualization with VMware ESXi
Introduction
Installing ESXi
Installing and using the vSphere Client
Allowing SSH access to ESXi
Creating a new guest
Allocating resources to a guest
Using the ESXi command line to start, stop, and destroy guests
Managing command-line snapshots
Tuning the host for guest performance
Chapter 5: Automation with Ansible
Introduction
Installing Ansible
Creating a scaffold Playbook
Creating a common role
Creating a webserver using Ansible and Nginx
Creating an application server role using Tomcat and Ansible
Installing MySQL using Ansible
Installing and managing HAProxy with Ansible
Using ServerSpec to test your Playbook
Chapter 6: Containerization with Docker
Introduction
Installing Docker
Pulling an image from the public Docker registry
Performing basic Docker operations
Running a container interactively
Creating a Dockerfile
Running a container in detached mode
Saving and restoring a container
Using the host only network
Running a private Docker registry
Managing images with a private registry
Chapter 7: Using Jenkins for Continuous Deployment
Introduction
Installing Jenkins
Installing the Git plugin
Installing a Jenkins slave
Creating your first Jenkins job
Building Docker containers using Jenkins
Deploying a Java application to Tomcat with zero downtime using Ansible
Chapter 8: Metric Collection with InfluxDB
Introduction
Installing InfluxDB
Creating a new InfluxDB database
Logging events with the InfluxDB REST API
Gathering host statistics with Telegraf
Exploring data with the InfluxDB data explorer
Installing Grafana
Creating dashboards with Grafana
Chapter 9: Log Management
Introduction
Centralizing logs with Syslog
Using syslog templates
Managing log rotation with the Logrotate utility
Installing ElasticSearch, Logstash, and Kibana
Importing logs into Elasticsearch with Logstash
Using Kibana queries to explore data
Using Kibana queries to examine data
Chapter 10: Monitoring with Sensu
Introduction
Installing a Sensu server
Installing a Sensu client
Installing check prerequisites
Finding community checks
Adding a DNS check
Adding a disk check
Adding a RAM check
Adding a process check
Adding a CPU check
Creating e-mail alerts
Creating SMS alerts
Using Ansible to install Sensu
Chapter 11: IAAS with Amazon AWS
Introduction
Signing up for AWS
Setting up IAM
Creating your first security group
Creating your first EC2 host
Using Elastic Load Balancers
Managing DNS with route53
Using Ansible to create EC2 hosts
Chapter 12: Application Performance Monitoring with New Relic
Introduction
Signing up for a New Relic account
Installing the New Relic Java agent
Using the performance overview
Locating performance bottlenecks with Transaction Traces
Observing database performance with New Relic
Release performance monitoring with New Relic
Server Monitoring with New Relic

Book Details

ISBN 139781784392826
Paperback334 pages
Read More
From 2 reviews

Read More Reviews