O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modern Linux Administration

Book Description

If you want to excel in your work as a Linux administrator, or perhaps land a job as one, you need this book. The amount of knowledge and expertise required of Linux administrators has grown tremendously over the past 10 years. Today you need an amazing variety of skills, several of them very new. This book provides developers, enterprise architects, and site reliability engineers with a sound introduction to bleeding-edge Linux-based tools and technologies for both development and production environments.

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. Why I Wrote This Book
    3. A Word on the New Technologies that are critical for Linux Administrators Today
    4. Navigating This Book
    5. Conventions Used in This Book
    6. Using Code Examples
    7. Safari® Books Online
    8. How to Contact Us
    9. Acknowledgments
  2. 1. Modern Linux System Administration
    1. Motivation for the new System Administration Strategies and Tools
    2. Problems with Traditional Systems Administration
      1. Monitoring
      2. The Image Sprawl problem
      3. Agile Development Methodologies and the System Administrator
      4. Cloud environments
      5. Impact of Big Data
      6. Manual Operations without automation
    3. Automated Infrastructure Management
    4. Automating Redundant Configuration Work
    5. Configuration Management
      1. Infrastructure as Code
    6. Modern Scripting Languages and Databases
      1. Essential Programming Skills for the System Administrator
      2. The Rise of NoSQL Databases
      3. Caching
      4. Content Delivery Networks
    7. IT Orchestration
      1. Provisioning with Vagrant
      2. Vagrant and Configuration Management Tools
      3. Provisioning - Automatic Server Deployment
    8. Server (hardware) Virtualization
    9. Containerization – the New Virtualization
      1. Docker and Containerization
      2. Docker Container Orchestration and Distributed Schedulers
    10. Cluster Management and Cluster Operating Systems
    11. Version Control Systems
    12. Continuous Integration and Continuous Deployment
      1. Benefits Offered by CI
      2. Steps involved in CI
      3. Continuous Integration and Continuous Deployment
      4. Continuous Application deployment
      5. Tools for Implementing Continuous Integration
    13. Log Management, Monitoring and Metrics
      1. Effective Metrics
      2. Proactive Monitoring
      3. Service Metrics
      4. Synthetic Monitoring
    14. Cloud Computing
      1. Open Stack – the Open Source Cloud Platform
    15. Software Defined Networking
    16. Microservices, Service Registration and Service Discovery
      1. Benefits of Microservices
      2. Service Discovery
      3. Service Registration
  3. 2. Networking Essentials for a System Administrator
    1. What the internet is
      1. Packets
      2. Packet Switches
      3. Applications and APIs
      4. Network Protocols
      5. Network Messages and Message Formatting
    2. Networking Essentials – Theory and Practice
      1. Breaking up the real work into layers – the OSI Model
      2. Protocol Layering
      3. The Internet Protocol Stack
    3. The Network Layer and TCP/IP Networking
      1. The Forwarding Function
      2. Routing Essentials and Routing Management
    4. The Hypertext Transfer Protocol (HTTP)
      1. Using the HTTP/2 Protocol for Enhanced Performance
    5. Network Load Balancing
      1. Benefits of Using a Network Load Balancer
      2. Load Balancing with DNS
      3. Enterprise Load Balancers
      4. Software Based Load Balancing
      5. Hardware Load Balancing
      6. Using a Hosted Load Balancer Service
    6. Modern Networking Technologies
      1. Quality of Service (QoS)
      2. Quality of Experience (QoE)
      3. Routing and Network Congestion Control
      4. Software-Defined Networking
      5. Limitations of current networks
      6. The three “Planes’ in Networking
      7. Defining Functions for the Network Control Plane
      8. Network Functions Virtualization
      9. The OpenFlow Protocol
  4. 3. Scalability, Web Applications, Web Services, and Microservices
    1. Scaling and Common Datacenter Infrastructures
      1. The Front End Technologies
      2. The Back End Technologies
      3. Scalability of Applications
      4. Content Delivery Networks
      5. How large websites scale
    2. Scaling Web Applications
      1. Managing state at the front end
      2. Other Types of State
      3. Scaling the Web Services
      4. Making Effective use of Third-party services
    3. Working with Web Servers
      1. Working with the Apache Web Server
      2. The NGINX Web Server
      3. Caching Proxies and Reverse Proxying
    4. Handling Data Storage with Databases
      1. Relational databases
      2. Other Types of Databases
      3. MongoDB as a Backend Database
    5. Caching
      1. HTTP-Based Caching (Browser caching)
      2. Caching Objects
    6. Asynchronous Processing, Messaging Applications and MOM
      1. Messages and Message Queues
      2. Components of a Messaging Architecture
      3. Message Brokers and Message Oriented Middleware (MOM)
      4. Messaging Protocols
      5. Popular Message Brokers
    7. The Model-View-Controller Architecture and Single Paged Applications
      1. The Problem
      2. MVC to the Rescue
      3. Ruby on Rails
      4. Full stack JavaScript Development with MEAN
      5. Single Page Applications – the new Paradigm for Web Applications
    8. Web Services
    9. Web Service Basics
      1. Simple Object Access Protocol (SOAP)
      2. Two Types of Web Services
    10. Service-Based Architectures and Microservices
      1. Similarities between traditional SOAs and the Microservice approach
      2. Differences between SOA and Microservices
      3. Service Types
  5. 4. Server Virtualization and Linux Containers
    1. Linux Server Virtualization
      1. The Architecture of Virtual Machines
      2. The Virtual Machine Monitor (Hypervisor)
      3. How VMs share Resources
      4. Benefits offered by Virtual Machines
      5. Drawbacks of Virtualization
      6. Virtualization Types
      7. Type of Hypervisors
      8. Xen Virtualization
      9. Kernel-Based Virtual Machines (KVM)
      10. Considerations in Selecting the Physical Servers for virtualization
      11. Migrating Virtual Machines
    2. Application Deployment and Management with Linux Containers
    3. Chroot and Containers
    4. Applications and their Isolation
      1. Virtualization and Containerization
      2. Benefits offered by Linux Containers
      3. Two Types of Uses for Linux Containers
    5. The Building Blocks of Linux Containers
      1. Namespaces and Process Isolation
      2. Control Groups (cgroups)
      3. SELinux and Container Security
      4. Linux Containers versus Virtualization (KVM)
      5. Linux Containers and KVM Virtualization – the Differences
      6. Limitations of LXC
      7. Container benefits
      8. Linux Container Adoption Issues
      9. Managing Linux Containers
  6. 5. Working with Docker Containers
    1. Docker Basics
      1. When Docker Isn’t Right for You
      2. What Docker Consists of
      3. The Docker Project
      4. Docker Images and Docker Containers
      5. What Linux Administrators should know in order to support Docker
    2. Setting up the Docker Container Run-Time Environment
      1. Getting Information about the Containers
    3. Running Container Images
      1. Managing Containers
      2. Running Interactive Containers
      3. Making your base Image Heftier
      4. Committing a Container
      5. Running Commands within a Container
      6. Linking Containers
      7. Running Services inside a Container
      8. Running Privileged Containers
    4. Building Docker Images
      1. Building Images with a Dockerfile
      2. Image Layers
    5. Docker Image Repositories
      1. Using a Private Docker Registry
    6. New Operating Systems Optimized for Docker
      1. Using CoreOS
      2. Working with Atomic Host
    7. The Docker Stack in Production
      1. Provisioning Resources with Docker Machine
      2. Docker Orchestration
      3. Docker Orchestration and Clustering Tools
      4. Distributed Schedulers for Docker Containers
    8. Docker Containers, Service Discovery and Service Registration
      1. Connecting Containers through Ambassadors
      2. How Service Discovery Works
      3. Zero-Configuration Networking
      4. Service Discovery
      5. Service Registration
  7. 6. Automating Server Deployment and Managing Development Environments
    1. Linux Package Management
      1. Using the rpm and dpkg commands
      2. Package Management with YUM and APT
    2. Fully Automatic Installation (FAI)
      1. How FAI Works
      2. How it Works
      3. Setting up the Network Server
      4. Setting up the PXE Server for a Network Installation
      5. Using Kickstart
    3. Automatically Spinning up Virtual Environments with Vagrant
      1. Some Background
      2. Vagrant and its Alternatives
      3. Getting Started with Vagrant
      4. Spinning up a New VM
      5. The Vagrantfile
      6. Vagrant Box
      7. Provisioning Vagrant Boxes
      8. Automated Provisioning
      9. Creating Vagrant Base Boxes
      10. Using Packer and Atlas for creating base boxes
    4. Parallel Job-Execution and Server Orchestration Systems
      1. Working with Remote Command Execution Tools
      2. Server Provisioning with Razor
      3. Server Provisioning with Cobbler
  8. 7. Infrastructure as Code, Configuration Management and Orchestration Tools
    1. Infrastructure as Code
      1. Benefits of Treating Infrastructure as Code
      2. Cloud Environments and Infrastructure as Code
      3. Tools for Treating Infrastructure as Code
      4. Test-Driven Infrastructures
    2. Configuration Management Automation
      1. Need for Configuration Management Tools
      2. Declarative Versus Imperative Programming
    3. Configuration Management with Chef
      1. Chef’s Architecture and Key Components
      2. Writing Chef Recipes
      3. Using Test Kitchen to Manage Test Environments
      4. Using Chef Client to Manage Nodes
    4. Using Puppet for Configuration
      1. Installing Puppet
      2. Puppet Manifests
      3. Creating Puppet Modules
      4. Using a Puppet Server
    5. Server Provisioning and Orchestration with Salt
      1. Architecture of Salt – the Basics
      2. Examples of Salt usage
      3. Grains and Pillars
      4. Basic Salt Commands
      5. Execution Modules
      6. Salt States and Configuration Management
    6. Using Ansible for CM, Orchestration, and Provisioning
      1. How Ansible is Different from the other CM Tools
      2. The Guts of Ansible
      3. How Playbooks Work
      4. Modules
      5. Inventories Describe your Infrastructure
  9. 8. Version Control and Source Code Management
    1. Version Control - An Introduction
      1. Types of Version Control Systems
      2. Revision Control and Infrastructure Management
      3. Why Use Source Control?
    2. Our First Foray into the World of Git
    3. Introduction to Git
      1. What Sets Git Apart from other CVS Systems?
    4. Creating Local Repositories with Git
      1. Creating a Repository
      2. Checking the Repository Status
      3. Checking the Logs and the Status of a Repository
    5. Staging and Committing Files
      1. Committing Multiple Files
      2. Cloning Repositories
      3. Remote Git
    6. The Git Branching Model
      1. Creating Branches
      2. Merging Branches
      3. Resolving Conflicts
    7. Setting up Git on a Server – Hosting Git Repositories
      1. Multiple Protocols
      2. Setting up a Git Server
      3. Enterprise Deployment of Git
      4. Tools for Managing Git Repositories
    8. Using GitHub
      1. Setting up your Account
      2. The GitHub Workflow
  10. 9. Continuous Integration, Continuous Delivery, and Continuous Deployment
    1. Builds and Deployment
    2. How Build Tools Help – Maven, Ant and Gradle
      1. The Maven Build Tool
      2. Using Ant to Perform Builds
      3. Using Gradle as a Build Tool
    3. An Overview of the Software Development Process
      1. The Software Development Life Cycle
      2. Following the Waterfall Model of Development
      3. The Agile Software Development Process
      4. The Scrum Framework
      5. The Agile Software Development Process and Continuous Integration
    4. Continuous Integration (CI)
      1. The CI Process
      2. Problems Detected by CI
      3. Building Software at Every Change
      4. Benefits of a CI System
      5. Best Practices for CI
      6. Requirements for a CI System
      7. Features of a CI System
      8. A Typical CI Scenario
    5. Continuous Delivery
      1. CD and CI
      2. The Build (or Deployment ) Pipeline
      3. Continuous Delivery and DevOps
    6. Continuous Integration with Jenkins
      1. Architecture of Jenkins
      2. Components of the Jenkins Framework
      3. Jenkins and other Continuous Integration Tools
      4. The Need for a Binary Repository Tool
    7. A Typical Continuous Integration Strategy using Jenkins
      1. Branching strategies
      2. Creating the Continuous Integration Pipelines
      3. Continuous Delivery with Jenkins
      4. Continuous Deployment with Jenkins
    8. Continuous Integration with TeamCity/GO
  11. 10. Centralized Log Management and Analysis, and Handling Streaming Data
    1. Introduction to Logging and Its Issues
      1. What is a Log?
      2. Varieties of Log Data
      3. Issues in Performing Log Analysis
      4. Centralizing Logs with Syslog
      5. Using Rsyslog for Logging
      6. SYSLOG-NG
      7. Rotating Logs with Logrotate
    2. Log Aggregation
      1. Possible Strategies
      2. Log Aggregation Workflow
      3. Log Aggregation Alternatives
    3. Effective Log Management and Log Analysis with ElasticSearch, Logstash, and Kibana
      1. Searching Engines and Indexing - Elasticsearch
      2. Basic Concepts of ElasticSearch
      3. Understanding the ElasticSearch APIs
      4. Elasticsearch Marvel and Shield
    4. Logstash
      1. Logstash Plugins
      2. Logstash under the Hood
      3. The Logstash Workflow
      4. Configuring Logstash – Some Examples
    5. Kibana
    6. A Simple Example Showing How ELK Works
      1. The Input Data
      2. Configuring the Logstash Input
      3. Using ElasticSearch in a Production Setting
    7. Log Analysis with Splunk
      1. Scaling and High Availability
      2. Working with Data
      3. Using the Splunk Processing Language
      4. Advanced Analytics with Log Files
      5. Splunk versus ELK
      6. Saas solutions for Logging –Sumologic and Loggly
    8. Handling Streaming Data
    9. Apache Kafka
      1. Benefits offered by Kafka
      2. Kafka Architecture
      3. How Kafka Works
  12. 11. System Monitoring, Event Processing, and Tracking Application Performance
    1. Monitoring – an Overview
      1. How Monitoring is generally done
      2. Need for New Monitoring Tools
      3. Do-it-yourself Versus using External Monitoring Services
      4. Monitoring and the Mean Time to Recovery
      5. How Metrics and Logs can help Proactive Behavior
      6. Different Types of Metrics
      7. Metric Tracking across Multiple Services
      8. Devops and Monitoring
    2. Time Series Databases
      1. Using Cacti
      2. Using Librato
      3. Graphite
      4. Components of Graphite
      5. Statistics and Transformations
    3. Event Processing Tools
      1. Riemann
      2. Big Panda
    4. System Monitoring
      1. Nagios
      2. Ganglia
      3. Using Munin
      4. Using Collectd
      5. Using Sensu
    5. Web and User Monitoring
      1. Synthetic Monitoring
      2. Real User Monitoring
      3. Using Synthetic Monitoring and RUM Together
      4. Pingdom
    6. Application Performance Monitoring (APM) Suites
      1. New Relic APM
      2. AppDynamics
      3. Comparison of New Relic and AppDynamics
    7. On-Call Management Tools