Infrastructure-as-Code Automation Using Terraform, Packer, Vault, Nomad and Consul : Hands-on Deployment, Configuration, and Best Practices
معرفی کتاب «Infrastructure-as-Code Automation Using Terraform, Packer, Vault, Nomad and Consul : Hands-on Deployment, Configuration, and Best Practices» نوشتهٔ Cay S. Horstmann، Rance D. Necaise و Navin Sabharwal,Sarvesh Pandey,Piyush Pandey (auth.)، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Table of Contents 4 About the Authors 9 About the Technical Reviewer 11 Acknowledgments 12 Chapter 1: Getting Started with HashiCorp Automation Solutions 14 Introduction to Infrastructure as Code 14 Introduction to HashiCorp Automation 17 Packer 18 Terraform 19 Vault 20 Nomad 20 Consul 21 Vagrant 21 Boundary 22 Waypoint 22 Summary 23 Chapter 2: Getting Started with HashiCorp Terraform 24 Introduction to HashiCorp Terraform 24 Terraform CLI (Open Source) 26 Terraform Cloud 27 Terraform Enterprise 27 Comparing the Options 27 Setting up an AWS Account 29 Getting Started with Terraform Cloud 35 Terraform Workflow 46 Getting Started with Terraform CLI 47 What’s New in Terraform 0.14 58 Terraform 0.14 vs. Terraform 0.13 58 Summary 58 Chapter 3: Understanding Terraform Programming Constructs 59 Configuration Language 60 Arguments, Blocks, and Expressions 60 Code Organization 61 Configuration Ordering 62 Resources 62 Provider 63 Input Variables 64 Environment Variables 66 Output Values 67 Local Values 69 Modules 70 Creating a Custom Module 72 Version 77 count and for_each 78 depends_on Module 79 Providers 79 Provider Version Constraints in Modules 80 Automatic Installation of Third-Party Providers 81 Provider Plug-ins in a Local Filesystem 82 Data Sources 83 Backend Configuration 85 Backend Types 86 Backend Initialization 87 Provisioners 87 Creation-Time Provisioners 88 Destroy-Time Provisioners 89 Multiple Provisioners 90 Types of Provisioners 91 Generic Provisioners 91 File Provisioners 91 Local-Exec Provisioners 92 Remote-Exec Provisioners 93 Vendor Provisioners 93 Chef Provisioners 94 Summary 95 Chapter 4: Automating Public Cloud Services Using Terraform 96 Automating the GCP Public Cloud Using Terraform 96 Creating a VPC and Subnet with Terraform 105 Creating a Virtual Machine with Terraform 108 Creating a GCS Bucket with Terraform 112 Automating the Azure Public Cloud Using Terraform 119 Summary 140 Chapter 5: Getting Started with Vault 141 Introduction to HashiCorp Vault 141 Understanding Vault’s Logical Architecture 143 Understanding Vault’s Security Model 145 Installing Vault CLI and Integration with AWS 147 Summary 160 Chapter 6: Getting Started with HashiCorp Packer 161 Introduction to HashiCorp Packer 161 Builders 162 Communicators 163 Provisioners 163 Post-Processors 164 Variables 165 Using Declared Variables in Templates 166 Using Environment Variables in Templates 166 Installing Packer 166 Hands-on Exercise to Automate AWS AMI 168 Summary 176 Chapter 7: Getting Started with HashiCorp Consul 177 Introduction to HashiCorp Consul 177 Service Discovery 178 Configuration Management 179 Service Mesh and Network Segmentation 179 Architecture 180 Agent 181 Catalog 182 Anti-Entropy 183 Consensus Protocol 183 Gossip Protocol 183 LAN Gossip Pool 184 WAN Gossip Pool 184 Installing Consul 184 Service Discovery Using Consul 188 Intention Deletion 195 Service Registration 203 DNS and Health Checks Using Consul 208 Summary 209 Chapter 8: Getting Started with Nomad 210 Container Orchestration 210 Introduction to Nomad 213 Nomad Architecture 216 Autoscaling Overview 219 Dynamic Application Sizing 220 Horizontal Cluster Autoscaling 220 Horizontal Application Autoscaling 220 Installing Nomad 220 Policy-Driven Governance in Nomad 230 Namespaces 230 Resource Quotas 231 Sentinel Policies 231 Nomad ACLs 232 Tokens 232 Policies 232 Rules 232 Capabilities 233 Container Application Deployment Using Nomad 233 Summary 245 Index 246 Discover the methodologies and best practices for getting started with HashiCorp tools, including Terraform, Vault, and Packer. The book begins with an introduction to the infrastructure-as-code concept while establishing the need for automation and management technologies. You’ll go over hands-on deployment, configuration, and best practices for Terraform, Packer, Vault, Nomad, and Consul. You’ll then delve deeper into developing automation code using Terraform for automating AWS/Azure/GCP public cloud tasks; advanced topics include leveraging Vault for secrets management and Packer for image management. Along the way you will also look at Nomad and Consul for managing application orchestration along with network interconnectivity. In each chapter you will cover automated infrastructure and application deployment on the VM/container base ecosystem. The book provides sample code and best-practice guidance for developers and architects to look at infrastructure-as-code adoption from a holistic viewpoint. All the code presented in the book is available in the form of scripts, which allow you to try out the examples and extend them in interesting ways. What You Will Learn Get an overview of the architecture of Terraform, Vault, Packer, Nomad, and Consul Follow hands-on steps for enabling Terraform, Vault, Packer, Nomad, and Consul Automate various services on the public cloud, including AWS, Azure, and GCP Who This Book Is For Developers, architects, and administrators who want to learn about infrastructure-as-code automation. Discover the methodologies and best practices for getting started with HashiCorp tools, including Terraform, Vault, and Packer. The book begins with an introduction to the infrastructure-as-code concept while establishing the need for automation and management technologies. You0́9ll go over hands-on deployment, configuration, and best practices for Terraform, Packer, Vault, Nomad, and Consul. You0́9ll then delve deeper into developing automation code using Terraform for automating AWS/Azure/GCP public cloud tasks; advanced topics include leveraging Vault for secrets management and Packer for image management. Along the way you will also look at Nomad and Consul for managing application orchestration along with network interconnectivity. In each chapter you will cover automated infrastructure and application deployment on the VM/container base ecosystem. The book provides sample code and best-practice guidance for developers and architects to look at infrastructure-as-code adoption from a holistic viewpoint. All the code presented in the book is available in the form of scripts, which allow you to try out the examples and extend them in interesting ways. You will: Get an overview of the architecture of Terraform, Vault, Packer, Nomad, and Consul Follow hands-on steps for enabling Terraform, Vault, Packer, Nomad, and Consul Automate various services on the public cloud, including AWS, Azure, and GCP.
دانلود کتاب Infrastructure-as-Code Automation Using Terraform, Packer, Vault, Nomad and Consul : Hands-on Deployment, Configuration, and Best Practices