دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: [6th early release ed.] نویسندگان: Bas Meijer, Lorin Hochstein, René Moser سری: ISBN (شابک) : 9781098109158, 9781098109080 ناشر: O'Reilly Media, Inc. سال نشر: 2022 تعداد صفحات: [590] زبان: English فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) حجم فایل: 5 Mb
در صورت تبدیل فایل کتاب Ansible: Up and Running, 3rd Edition به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب Ansible: Up and Running، نسخه سوم نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
در میان بسیاری از ابزارهای مدیریت پیکربندی موجود، Ansible دارای مزایای متمایز است - ماهیت آن حداقل است، نیازی به نصب چیزی روی گرههای خود ندارید، و منحنی یادگیری آسانی دارد. با این نسخه سوم به روز شده، یاد خواهید گرفت که چگونه با این ابزار به سرعت کارآمد باشید، چه یک توسعه دهنده باشید که کد را برای تولید پیاده سازی می کند و چه مدیر سیستمی که به دنبال راه حل اتوماسیون بهتری است. نویسندگان Bas Meijer، Lorin Hochstein و Rene Moser به شما نشان میدهند چگونه کتابهای بازی بنویسید (اسکریپتهای مدیریت پیکربندی Ansible)، مدیریت سرورهای راه دور، و کشف قدرت واقعی ابزار: ماژولهای اعلامی داخلی. شما متوجه خواهید شد که Ansible دارای عملکرد مورد نیاز شما است - و سادگی مورد نظر شما. شما خواهید آموخت: مدیریت پیکربندی و استقرار Ansible بهترین شیوه های Ansible نحوه استفاده از قالب جدید مجموعه ها نحوه استفاده از Ansible در ویندوز، لینوکس و macOS نحوه استفاده از Ansible در سازمان های بزرگتر نحوه ایجاد یک محیط توسعه محلی نحوه ایجاد قابلیت استفاده مجدد محتوای قابلتوجه برای میانافزار منبع باز نحوه ایجاد تصاویر کانتینر، تصاویر برای نمونههای ابری و نمونههای محاسبات ابری این کتاب بهتر است از ابتدا تا انتها خوانده شود و فصلهای بعدی بر روی فصلهای قبلی ساخته شوند. از آنجایی که به سبک آموزشی نوشته شده است، می توانید آن را در دستگاه خود دنبال کنید. بیشتر نمونه ها بر روی برنامه های کاربردی وب تمرکز دارند. نسخه سوم خواننده را به سطح بعدی در اجرای Ansible برای کارهای حیاتی می برد. استفاده از روشهای مهندسی نرمافزار برای اعتبارسنجی کیفیت کد و چارچوبهای آزمایشی برای تأیید نتایج در یک راهاندازی آزمایشی، حدسها و مفروضات را از بین میبرد. Ansible 2.10 با پایتون 3.8 بهترین اجرا می شود.
Among the many configuration management tools available, Ansible has some distinct advantages--it\'s minimal in nature, you don\'t need to install anything on your nodes, and it has an easy learning curve. With this updated third edition, you\'ll learn how to be productive with this tool quickly, whether you\'re a developer deploying code to production or a system administrator looking for a better automation solution. Authors Bas Meijer, Lorin Hochstein, and Rene Moser show you how to write playbooks (Ansible\'s configuration management scripts), manage remote servers, and explore the tool\'s real power: built-in declarative modules. You\'ll discover that Ansible has the functionality you need--and the simplicity you desire. You\'ll learn: Ansible configuration management and deployment Ansible best practices How to use the new Collections format How to use Ansible on Windows, Linux, and macOS How to use Ansible in larger organizations How to create a local development environment How to create reusable Ansible content for open source middleware How to create container images, images for cloud instances, and cloud computing instances This book is best read start to finish, with later chapters building on earlier ones. Because it\'s written in a tutorial style, you can follow along on your own machine. Most examples focus on web applications. The third edition takes the reader to the next level in running Ansible for mission-critical work. Using software engineering methods to validate code quality and test frameworks to verify results in a test setup eradicates the guesswork and assumptions. Ansible 2.10 runs best with Python 3.8.
Cover Copyright Table of Contents Preface to the Third Edition Conventions Used in This Book Using Code Examples O’Reilly Online Learning How to Contact Us Acknowledgments From Lorin From René From Bas Chapter 1. Introduction A Note About Versions Ansible: What Is It Good For? How Ansible Works What’s So Great About Ansible? Simple Powerful Secure Is Ansible Too Simple? What Do I Need to Know? What Isn’t Covered Moving Forward Chapter 2. Installation and Setup Installing Ansible Loose Dependencies Running Ansible in Containers Ansible Development Setting Up a Server for Testing Using Vagrant to Set Up a Test Server Telling Ansible About Your Servers Simplifying with the ansible.cfg File Kill Your Darlings Convenient Vagrant Configuration Options Port Forwarding and Private IP Addresses Enabling Agent Forwarding The Docker Provisioner The Ansible Local Provisioner When the Provisioner Runs Vagrant Plug-ins Hostmanager VBGuest VirtualBox Customization Vagrantfile Is Ruby Production Setup Conclusion Chapter 3. Playbooks: A Beginning Preliminaries A Very Simple Playbook Specifying an NGINX Config File Creating a Web Page Creating a Group Running the Playbook Playbooks Are YAML Start of Document End of File Comments Indentation and Whitespace Strings Booleans Lists Dictionaries Multiline Strings Pure YAML Instead of String Arguments Anatomy of a Playbook Plays Tasks Modules Viewing Ansible Module Documentation Putting It All Together Did Anything Change? Tracking Host State Getting Fancier: TLS Support Generating a TLS Certificate Variables Quoting in Ansible Strings Generating the NGINX Configuration Template Loop Handlers A Few Things to Keep in Mind About Handlers Testing Validation The Playbook Running the Playbook Conclusion Chapter 4. Inventory: Describing Your Servers Inventory/Hosts Files Preliminaries: Multiple Vagrant Machines Behavioral Inventory Parameters Changing Behavioral Parameter Defaults Groups and Groups and Groups Example: Deploying a Django App Aliases and Ports Groups of Groups Numbered Hosts (Pets Versus Cattle) Hosts and Group Variables: Inside the Inventory Host and Group Variables: In Their Own Files Dynamic Inventory Inventory Plug-ins Amazon EC2 Azure Resource Manager The Interface for a Dynamic Inventory Script Writing a Dynamic Inventory Script Breaking the Inventory into Multiple Files Adding Entries at Runtime with add_host and group_by add_host group_by Conclusion Chapter 5. Variables and Facts Defining Variables in Playbooks Defining Variables in Separate Files Directory Layout Viewing the Values of Variables Variable Interpolation Registering Variables Facts Viewing All Facts Associated with a Server Viewing a Subset of Facts Any Module Can Return Facts or Info Local Facts Using set_fact to Define a New Variable Built-In Variables hostvars inventory_hostname groups Extra Variables on the Command Line Precedence Conclusion Chapter 6. Introducing Mezzanine: Our Test Application Why Is Deploying to Production Complicated? Postgres: The Database Gunicorn: The Application Server NGINX: The Web Server Supervisor: The Process Manager Conclusion Chapter 7. Deploying Mezzanine with Ansible Listing Tasks in a Playbook Organization of Deployed Files Variables and Secret Variables Installing Multiple Packages Adding the Become Clause to a Task Updating the apt Cache Checking Out the Project Using Git Installing Mezzanine and Other Packages into a Virtual Environment Complex Arguments in Tasks: A Brief Digression Configuring the Database Generating the local_settings.py File from a Template Running django-manage Commands Running Custom Python Scripts in the Context of the Application Setting Service Configuration Files Enabling the NGINX Configuration Installing TLS Certificates Installing Twitter Cron Job The Full Playbook Running the Playbook Against a Vagrant Machine Troubleshooting Cannot Check Out Git Repository Cannot Reach 192.168.33.10.nip.io Bad Request (400) Conclusion Chapter 8. Debugging Ansible Playbooks Humane Error Messages Debugging SSH Issues Common SSH Challenges PasswordAuthentication no SSH as a Different User Host Key Verification Failed Private Networks The debug Module Playbook Debugger The assert Module Checking Your Playbook Before Execution Syntax Check List Hosts List Tasks Check Mode Diff (Show File Changes) Tags Limits Conclusion Chapter 9. Roles: Scaling Up Your Playbooks Basic Structure of a Role Example: Deploying Mezzanine with Roles Using Roles in Your Playbooks Pre-Tasks and Post-Tasks A database Role for Deploying the Database A mezzanine Role for Deploying Mezzanine Creating Role Files and Directories with ansible-galaxy Dependent Roles Ansible Galaxy Web Interface Command-Line Interface Role Requirements in Practice Contributing Your Own Role Conclusion Chapter 10. Complex Playbooks Dealing with Badly Behaved Commands Filters The default Filter Filters for Registered Variables Filters That Apply to Filepaths Writing Your Own Filter Lookups file pipe env password template csvfile dig redis Writing Your Own Lookup Plug-in More Complicated Loops With Lookup Plug-in with_lines with_fileglob with_dict Looping Constructs as Lookup Plug-ins Loop Controls Setting the Variable Name Labeling the Output Imports and Includes Dynamic Includes Role Includes Role Flow Control Blocks Error Handling with Blocks Encrypting Sensitive Data with ansible-vault Multiple Vaults with Different Passwords Conclusion Chapter 11. Customizing Hosts, Runs, and Handlers Patterns for Specifying Hosts Limiting Which Hosts Run Running a Task on the Control Machine Manually Gathering Facts Retrieving an IP Address from the Host Running on One Host at a Time Running on a Batch of Hosts at a Time Running Only Once Limiting Which Tasks Run step start-at-task Running Tags Skipping Tags Running Strategies Linear Free Advanced Handlers Handlers in Pre- and Post-Tasks Flush Handlers Meta Commands Handlers Notifying Handlers Handlers Listen The SSL Case for the listen Feature Conclusion Chapter 12. Managing Windows Hosts Connection to Windows PowerShell Windows Modules Our Java Development Machine Adding a Local User Windows Features Installing Software with Chocolatey Configuration of Java Updating Windows Conclusion Chapter 13. Ansible and Containers Kubernetes Docker Application Life Cycle Registries Ansible and Docker Connecting to the Docker Daemon Example Application: Ghost Running a Docker Container on Our Local Machine Building an Image from a Dockerfile Pushing Our Image to the Docker Registry Orchestrating Multiple Containers on Our Local Machine Querying Local Images Deploying the Dockerized Application Provisioning MySQL Deploying the Ghost Database Frontend Frontend: Ghost Frontend: NGINX Cleaning Out Containers Conclusion Chapter 14. Quality Assurance with Molecule Installation and Setup Configuring Molecule Drivers Creating an Ansible Role Scenarios Desired State Configuring Scenarios in Molecule Managing Virtual Machines Managing Containers Molecule Commands Linting YAMLlint ansible-lint ansible-later Verifiers Ansible Goss TestInfra Conclusion Chapter 15. Collections Installing Collections Listing Collections Using Collections in a Playbook Developing a Collection Conclusion Chapter 16. Creating Images Creating Images with Packer Vagrant VirtualBox VM Combining Packer and Vagrant Cloud Images Google Cloud Platform Azure Amazon EC2 The Playbook Docker Image: GCC 11 Conclusion Chapter 17. Cloud Infrastructure Terminology Instance Amazon Machine Image Tags Specifying Credentials Environment Variables Configuration Files Prerequisite: Boto3 Python Library Dynamic Inventory Inventory Caching Other Configuration Options Defining Dynamic Groups with Tags Applying Tags to Existing Resources Nicer Group Names Virtual Private Clouds Configuring ansible.cfg for Use with ec2 Launching New Instances EC2 Key Pairs Creating a New Key Uploading Your Public Key Security Groups Permitted IP Addresses Security Group Ports Getting the Latest AMI Create a New Instance and Add It to a Group Waiting for the Server to Come Up Putting It All Together Specifying a Virtual Private Cloud Dynamic Inventory and VPC Conclusion Chapter 18. Callback Plug-ins Stdout Plug-ins ARA debug default dense json minimal null oneline Notification and Aggregate Plug-ins Python Requirements foreman jabber junit log_plays logentries logstash mail profile_roles profile_tasks say slack splunk timer Conclusion Chapter 19. Custom Modules Example: Checking That You Can Reach a Remote Server Using the Script Module Instead of Writing Your Own can_reach as a Module Should You Develop a Module? Where to Put Your Custom Modules How Ansible Invokes Modules Generate a Standalone Python Script with the Arguments (Python Only) Copy the Module to the Host Create an Arguments File on the Host (Non-Python Only) Invoke the Module Expected Outputs Output Variables That Ansible Expects Implementing Modules in Python Parsing Arguments Accessing Parameters Importing the AnsibleModule Helper Class Argument Options AnsibleModule Initializer Parameters Returning Success or Failure Invoking External Commands Check Mode (Dry Run) Documenting Your Module Debugging Your Module Implementing the Module in Bash Specifying an Alternative Location for Bash Conclusion Chapter 20. Making Ansible Go Even Faster SSH Multiplexing and ControlPersist Manually Enabling SSH Multiplexing SSH Multiplexing Options in Ansible More SSH Tuning Algorithm Recommendations Pipelining Enabling Pipelining Configuring Hosts for Pipelining Mitogen for Ansible Fact Caching JSON File Fact-Caching Backend Redis Fact-Caching Backend Memcached Fact-Caching Backend Parallelism Concurrent Tasks with Async Conclusion Chapter 21. Networking and Security Network Management Supported Vendors Ansible Connection for Network Automation Privileged Mode Network Inventory Network Automation Use Cases Security Comply with Compliance? Secured, but Not Secure Shadow IT Sunshine IT Zero Trust Conclusion Chapter 22. CI/CD and Ansible Continuous Integration Elements in a CI System Jenkins and Ansible Running CI for Ansible Roles Staging Ansible Plug-in Ansible Tower Plug-in Conclusion Chapter 23. Ansible Automation Platform Subscription Models Ansible Automation Platform Trial What Ansible Automation Platform Solves Access Control Projects Inventory Management Run Jobs by Job Templates RESTful API AWX.AWX Installation Create an Organization Create an Inventory Running a Playbook with a Job Template Using Containers to Run Ansible Creating Execution Environments Conclusion Chapter 24. Best Practices Simplicity, Modularity, and Composability Organize Content Decouple Inventories from Projects Decouple Roles and Collections Playbooks Code Style Tag and Test All the Things Desired State Deliver Continuously Security Deployment Performance Indicators Benchmark Evidence Final Words Bibliography Index About the Authors Colophon