Cloud Native Infrastructure with Azure

Book description

The cloud is becoming the de facto home for companies ranging from enterprises to startups. Moving to the cloud means moving your applications from monolith to microservices. But once you do, running and maintaining these services brings its own level of complexity. The answer? Modularity, deployability, observability, and self-healing capacity through cloud native development.

With this practical book, Nishant Singh and Michael Kehoe show you how to build a true cloud native infrastructure using Microsoft Azure or another cloud computing solution by following guidelines from the Cloud Native Computing Foundation (CNCF). DevOps and site reliability engineers will learn how adapting applications to cloud native early in the design phase helps you fully utilize the elasticity and distributed nature of the cloud.

This book helps you explore:

  • Why go cloud native?
  • How to use infrastructure as code
  • What it takes to containerize an application
  • Why and how Kubernetes is the "grand orchestrator"
  • How to create a Kubernetes cluster on Azure
  • How observability complements monitoring
  • How to use service discovery and a service mesh to find new territories
  • How networking and policy management serve as gatekeepers
  • How distributed databases and storage work

Table of contents

  1. Preface
    1. Who Should Read This Book
    2. Goals of This Book
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Introduction: Why Cloud Native?
    1. The Journey to the Cloud
    2. Challenges in the Cloud
    3. Cloud Native Computing Foundation
    4. Adopting a Cloud Native Infrastructure with Azure
    5. Summary
  3. 2. Infrastructure as Code: Setting Up the Gateway
    1. Infrastructure as Code and Its Importance in the Cloud Native World
    2. Getting Started with Azure and Setting Up the Environment
      1. Azure Fundamentals and Preparing Your Azure Environment
      2. Creating an Azure Account
      3. Installing the Azure CLI
    3. Prominent IaC Tools
      1. Terraform
      2. Packer
      3. Ansible
    4. Azure DevOps and Infrastructure as Code
    5. Summary
  4. 3. Containerizing Your Application: More Than Boxes
    1. Why Containers?
      1. Isolation
      2. Security
      3. Packaging and Deployment
    2. Basic Container Primitives
      1. Cgroups
      2. Namespaces
      3. Copy on Write
      4. Capabilities
      5. Seccomp-BPF
    3. Components of Running a Container
      1. Container Orchestrators
      2. Container Software
      3. Container Runtimes
      4. Containers
      5. Operating System
    4. Open Container Initiative (OCI) Specification
      1. OCI Image Specification
      2. OCI Runtime Specification
    5. Docker
      1. Building Your First Docker Image
      2. Best Practices While Using Docker
    6. Other Container Platforms
      1. Kata Containers
      2. LXC and LXD
    7. Container Registries
      1. Securely Storing Images with Harbor
      2. Securely Storing Images with Azure Container Registry
    8. Storing Docker Images in a Registry
    9. Running Docker on Azure
      1. Azure Container Instances
      2. Deploying an Azure Container Instance
      3. Running a Docker Container Engine
    10. Summary
  5. 4. Kubernetes: The Grand Orchestrator
    1. Kubernetes Components
      1. Control Plane
      2. Worker Nodes
    2. Kubernetes API Server Objects
      1. Pods
      2. ReplicaSets
      3. Deployments
      4. Services
      5. Namespaces
      6. Labels and Selectors
      7. Annotations
      8. Ingress Controller
      9. StatefulSets
      10. DaemonSets
      11. Jobs
    3. Observe, Operate, and Manage Kubernetes Clusters with kubectl
      1. General Cluster Information and Commands
      2. Managing Pods
      3. Kubernetes in Production
    4. Summary
  6. 5. Creating a Kubernetes Cluster in Azure
    1. Creating a Kubernetes Cluster from Scratch
      1. Creating the Resource Group
      2. Creating the Machine Images for the Worker and Controller Machines
      3. Creating a Storage Account Backend
      4. Creating an Azure Virtual Network
      5. Creating Public IPs for the Load Balancer
      6. Creating Worker and Controller Instances
      7. Using Ansible to Deploy and Configure the Kubernetes Controller Nodes
      8. Using Ansible to Deploy and Configure the Kubernetes Worker Nodes
      9. Setting Up Pod Networking and Routing
      10. Generating the kubeconfig File for Remote Access and Cluster Validation
    2. Azure Kubernetes Service
    3. Deploying Applications and Services Using Helm: A Package Manager for Kubernetes
      1. Helm Basics
      2. Installing and Managing Helm
      3. Managing Helm Releases
      4. Creating Charts for Your Applications
    4. Summary
  7. 6. Observability: Following the Breadcrumbs
    1. Introduction to Observability
      1. Observability: More Than Three Pillars
      2. Observability: A Superset of Monitoring
      3. Observability-Driven Development
    2. Monitoring Metrics with Prometheus in a Cloud Native World
      1. Prometheus Components and Architecture
      2. Installing and Configuring Prometheus
      3. node_exporter
      4. Instrumentation of Applications
      5. Finding Hosts
      6. Prometheus on Kubernetes
    3. Logging in the Cloud Native World
      1. Logging with Fluentd
      2. Fluentd on Kubernetes
    4. Distributed Tracing in the Cloud Native World
      1. Tracing: Key Concepts
      2. General Tracing System Architecture and Trace Assembly
      3. Tracing Standards, Tools, and Code Instrumentation
    5. Azure Monitor
    6. Summary
  8. 7. Service Discovery and Service Mesh: Finding New Territories and Crossing Borders
    1. Service Discovery
      1. Introduction to CoreDNS
      2. Installing and Configuring CoreDNS
      3. Kubernetes Service Discovery with CoreDNS
      4. Azure DNS
    2. The Service Mesh
      1. Introduction to Istio
      2. Installing Istio on Azure Kubernetes Service
      3. Automatically Injecting the Sidecar Proxy (Envoy Proxy)
      4. Managing Istio Service Meshes Using Kiali
    3. Summary
  9. 8. Networking and Policy Management: Behold the Gatekeepers
    1. The Container Network Interface (CNI)
      1. Why Would You Use a CNI?
      2. How Does CNI Work with Azure?
      3. Various CNI Projects
    2. Calico
      1. Why Would You Use Calico?
      2. Basic Architecture
      3. Deploying Calico
      4. A Calico Deep Dive
      5. Implementing Calico Security Policy
    3. Cilium
      1. Deploying Cilium
      2. Integrating Cilium with Your Cloud
    4. Flannel
      1. Deploying Flannel
      2. A Flannel Deep Dive
    5. Azure Policy
      1. Azure Policy Quickstart
      2. Creating Your Own Azure Policy
      3. Azure Policy for Kubernetes
    6. Open Policy Agent
      1. Deploying OPA on Kubernetes
      2. Deploying Policy with OPA
    7. Summary
  10. 9. Distributed Databases and Storage: The Central Bank
    1. The Need for Distributed Databases in Cloud Native Architecture
      1. Azure Storage and Database Options
    2. Introduction to Vitess: Distributed and Sharded MySQL
      1. Why Run Vitess?
      2. The Vitess Architecture
      3. Deploying Vitess on Kubernetes
    3. Introduction to Rook: Storage Orchestrator for Kubernetes
      1. The Rook Architecture
      2. Deploying Rook on Kubernetes
    4. Introduction to TiKV
      1. Why Use TiKV?
      2. The TiKV Architecture
      3. Deploying TiKV on Kubernetes
    5. More on etcd
      1. Hardware Platform
      2. Autoscaling and Auto-remediation
      3. Availability and Security
    6. Summary
  11. 10. Getting the Message
    1. The Need for Messaging
    2. A Sample Messaging Use Case: Log Ingestion and Analytics
      1. Generation 1: Without Queues
      2. Generation 2: With Cloud Queues and Object Storage
      3. Generation 3: With Memory-Based Pub/Sub Queuing
    3. The Basics of Messaging Platforms
      1. Messaging Versus Streaming
    4. Messaging Fundamentals
      1. Producers and Consumers
      2. Brokers and Clustering
      3. Durability and Persistence
      4. Message Delivery
      5. Security
    5. Common Messaging Patterns
      1. Simple Queue
      2. Publish and Subscribe
      3. Durable Queue
    6. An Overview of Popular Cloud Native Messaging Platforms
      1. RabbitMQ
      2. Apache Kafka
      3. CNCF CloudEvents
    7. Cloud Messaging Deep Dive with NATS
      1. NATS Protocol Architecture
      2. NATS Persistence with JetStream
      3. NATS Security
      4. Deploying NATS on Kubernetes
    8. Azure Messaging Services
      1. Azure Service Bus
      2. Azure Event Hubs
      3. Azure Event Grid
    9. Summary
  12. 11. Serverless
    1. Introduction to Serverless Computing
      1. What Is Serverless?
      2. What Is a Serverless Function?
      3. The Serverless Landscape
      4. Benefits of Serverless
      5. Potential Downsides of Serverless
    2. Azure Function Apps
      1. Function App Architecture
      2. Creating a Function App
    3. Knative
      1. Knative Architecture
      2. Installing and Running Knative Serving on Kubernetes
      3. Installing and Running Knative Eventing on Kubernetes
    4. KEDA
      1. KEDA Architecture
      2. Installing KEDA on Kubernetes
    5. OpenFaaS
      1. OpenFaaS Architecture
      2. Installing OpenFaaS
      3. Writing Your First OpenFaaS Function
    6. Summary
  13. 12. Conclusion
    1. What’s Next?
  14. Index
  15. About the Authors

Product information

  • Title: Cloud Native Infrastructure with Azure
  • Author(s): Nishant Singh, Michael Kehoe
  • Release date: February 2022
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781492090960