Master the ins and outs of advanced operations with Ansible About This Book Learn how to extend Ansible with custom modules, plugins, and inventory sources Utilize advanced Ansible features to orchestrate rolling updates with little to no service disruptions An up-to-date book that brings to light the newly added features in Ansible 2.x Who This Book Is For This book is for Ansible developers and operators who have an understanding of the core elements and applications but are now looking to enhance their skills in applying automation using Ansible. What You Will Learn Gain an in-depth understanding of how Ansible works under the covers Fully automate the Ansible playbook executions with encrypted data Access and manipulate variable data within playbooks Use Blocks to construct failure recovery or cleanup Explore the Playbook debugger and Ansible Console Troubleshoot unexpected behavior effectively Work with cloud infrastructure providers and container systems Develop custom modules, plugins, and dynamic inventory sources In Detail This book provides you with the knowledge you need to understand how Ansible 2.1 works at a fundamental level and leverage its advanced capabilities. You'll learn how to encrypt Ansible content at rest and decrypt data at runtime. You will master the advanced features and capabilities required to tackle the complex automation challenges of today and beyond. You will gain detailed knowledge of Ansible workflows, explore use cases for advanced features, craft well thought out orchestrations, troubleshoot unexpected behaviour, and extend Ansible through customizations. Finally, you will discover the methods used to examine and debug Ansible operations, helping you to understand and resolve issues. By the end of the book, the readers will be able to unlock the true power of the Ansible automation engine and will tackle complex real world actions with ease. Style and approach This clear, practical guide illustrates the advanced functionalities of Ansible, its system architecture, and design aspects that will help you to master Ansible with ease.
Master the ins and outs of advanced operations with AnsibleAbout This Book* Learn how to extend Ansible with custom modules, plugins, and inventory sources* Utilize advanced Ansible features to orchestrate rolling updates with little to no service disruptions* An up-to-date book that brings to light the newly added features in Ansible 2.xWho This Book Is ForThis book is for Ansible developers and operators who have an understanding of the core elements and applications but are now looking to enhance their skills in applying automation using Ansible.What you will learn* Gain an in-depth understanding of how Ansible works under the covers* Fully automate the Ansible playbook executions with encrypted data* Access and manipulate variable data within playbooks* Use Blocks to construct failure recovery or cleanup* Explore the Playbook debugger and Ansible Console* Troubleshoot unexpected behavior effectivelyIn DetailThis book provides you with the knowledge you need to understand how Ansible 2.1 works at a fundamental level and leverage its advanced capabilities. You'll learn how to encrypt Ansible content at rest and decrypt data at runtime. You will master the advanced features and capabilities required to tackle the complex automation challenges of today and beyond.You will gain detailed knowledge of Ansible workflows, explore use cases for advanced features, craft well thought out orchestrations, troubleshoot unexpected behaviour, and extend Ansible through customizations. Finally, you will discover the methods used to examine and debug Ansible operations, helping you to understand and resolve issues.
Create production CoreOS clusters and master the art of deploying Container-based microservices About This Book Confidently deploy distributed applications and effectively manage distributed infrastructure using Containers and CoreOS Build secure, scalable CoreOS clusters to deploy distributed applications using open source technologies and industry best practices Every concept and technology in this book is illustrated with practical examples that can be used in both development and production environments. Who This Book Is For This book is intended for Cloud application developers and Cloud infrastructure administrators. If you are looking to deploy a CoreOS cluster or you already have a CoreOS cluster that you want to manage better in terms of performance, security, and scaling, then this book is perfect for you. To follow the hands-on stuff, you need to have a Google and an AWS Cloud account and be able to run CoreOS VMs on your machine. A basic understanding of public and private clouds, Containers, Docker, Linux, and CoreOS is required. What You Will Learn Install CoreOS on a VM, on the Cloud, and bare metal, and find out how to keep your cluster secure and up to date Configure and troubleshoot key CoreOS services, such as etcd, systemd, and fleet, for distributed application deployment Study container networking using CoreOS Flannel and other solutions, such as Docker libnetwork, Weave, and Calico Explore the container filesystem and container volume management using Docker volume, NFS, GlusterFS, and Flocker Get to know the internals of container technologies such as Docker, Rkt, and Container orchestration using Openstack, Kubernetes and Docker native solutions Troubleshoot CoreOS cluster and Containers using monitoring and logging tools and master production techniques such as staging, security, and automation In Detail CoreOS makes Google and Amazon-style Cloud infrastructure available for anyone building their own private Cloud. This book covers the CoreOS internals and the technologies used in the deployment of container-based distributed applications. It starts with an overview of CoreOS and distributed application development while sharing knowledge on related technologies. Critical CoreOS services and networking and storage considerations for CoreOS are covered next. In latter half of the book, you will learn about Container runtime systems such as Docker and Rkt and Container Orchestration using Kubernetes. You will also find out about the integration of popular orchestration solutions such as OpenStack, the AWS Container service, and the Google Container Engine with CoreOS and Docker. Lastly, we cover troubleshooting as well as production considerations. Style and approach This is an easy-to–follow, comprehensive guide that covers both basic and advanced concepts. All topics are illustrated with practical examples that can be used in both simulation and production environments.
Design automation blueprints using Ansible's playbooks to orchestrate and manage your multi-tier infrastructure About This Book Get to grips with Ansible's features such as orchestration, automatic node discovery, and data encryption Create data-driven, modular and reusable automation code with Ansible roles, facts, variables, and templates A step-by-step approach to automating and managing system and application configurations effectively using Ansible's playbooks Who This Book Is For If you are a systems or automation engineer who intends to automate common infrastructure tasks, deploy applications, and use orchestration to configure systems in a co-ordinated manner, then this book is for you. Some understanding of the Linux/UNIX command line interface is expected. What You Will Learn Write simple tasks and plays Organize code into a reusable, modular structure Separate code from data using variables and Jinja2 templates Run custom commands and scripts using Ansible's command modules Control execution flow based on conditionals Integrate nodes and discover topology information about other nodes in the cluster Encrypt data with ansible-vault Create environments with isolated configurations to match application development workflow Orchestrate infrastructure and deploy applications in a coordinated manner In Detail Ansible combines configuration management, orchestration, and parallel command execution into a single tool. Its batteries-included approach and built-in module library makes it easy to integrate it with cloud platforms, databases, and notification services without requiring additional plugins. Playbooks in Ansible define the policies your systems under management enforce. They facilitate effective configuration management rather than running ad hoc scripts to deploy complex applications. This book will show you how to write a blueprint of your infrastructure encompassing multi-tier applications using Ansible's playbooks. Beginning with the basic concepts such as plays, tasks, handlers, inventory, and the YAML syntax that Ansible uses, you will see how to organize your code into a modular structure. Building on this, you will master techniques to create data-driven playbooks with variables, templates, logical constructs, and encrypted data. This book will also take you through advanced clustering concepts such as discovering topology information, managing multiple environments, and orchestration. By the end of this book, you will be able to design solutions to your automation and orchestration problems using playbooks quickly and efficiently. Style and approach This book follows a step-by-step approach, with the concepts explained in a conversational and easy-to-follow style. Each topic is explained sequentially in the process of creating a course. A comprehensive explanation of the basic and advanced features of Ansible playbooks is also included.
Deep dive into the unified, distributed storage system in order to provide excellent performance About This Book Leverage Ceph's advanced features such as erasure coding, tiering, and Bluestore Solve large-scale problems with Ceph as a tool by understanding its strengths and weaknesses to develop the best solutions A practical guide that covers engaging use cases to help you use advanced features of Ceph effectively Who This Book Is For If you are a developer and an administrator who has deployed a Ceph cluster before and are curious about some of the most advanced features in order to improve performance then this book is for you What You Will Learn Know when and how to use some of Ceph's advanced new features Set up a test cluster with Ansible and some virtual machines using VirtualBox and Vagrant Develop novel solutions to massive problems with librados and shared object classes. Choose intelligent parameters for an erasure coded pool and set it up. Configure the Bluestore settings and see how they interact with different hardware configurations. Keep Ceph running through thick and thin with tuning, monitoring and disaster recovery advice. In Detail Mastering Ceph covers all that you need to know to use Ceph effectively. Starting with design goals and planning steps that should be undertaken to ensure successful deployments, you will be guided through to setting up and deploying the Ceph cluster, with the help of orchestration tools. Key areas of Ceph including Bluestore, Erasure coding and cache tiering will be covered with help of examples. Development of applications which use Librados and Distributed computations with shared object classes are also covered. A section on tuning will take you through the process of optimisizing both Ceph and its supporting infrastructure. Finally, you will learn to troubleshoot issues and handle various scenarios where Ceph is likely not to recover on its own. By the end of the book, you will be able to successfully deploy and operate a resilient high performance Ceph cluster. Style and Approach A practical guide which has each chapter explaining the concept, sharing tips and tricks and a use case to implement the most powerful features of Ceph
Learn everything you need to manage and handle your systems with ease with Ansible 2 using this comprehensive guide About This Book Simplify the automation of applications and systems using the newest version of Ansible Get acquainted with fundamentals of Ansible such as playbooks, modules, and various testing strategies A comprehensive, learning guide that provides you with great skills to automate your organization's infrastructure using Ansible 2 Who This Book Is For The book is for sys admins who want to automate their organization's infrastructure using Ansible 2. No prior knowledge of Ansible is required. What You Will Learn Set up Ansible 2 and an Ansible 2 project in a future-proof way Perform basic operations with Ansible 2 such as creating, copying, moving, changing, and deleting files, and creating and deleting users Deploy complete cloud environments using Ansible 2 on AWS and DigitalOcean Explore complex operations with Ansible 2 (Ansible vault, e-mails, and Nagios) Develop and test Ansible playbooks Write a custom module and test it In Detail Ansible is an open source automation platform that assists organizations with tasks such as configuration management, application deployment, orchestration, and task automation. With Ansible, even complex tasks can be handled easier than before. In this book, you will learn about the fundamentals and practical aspects of Ansible 2 by diving deeply into topics such as installation (Linux, BSD, and Windows Support), playbooks, modules, various testing strategies, provisioning, deployment, and orchestration. In this book, you will get accustomed with the new features of Ansible 2 such as cleaner architecture, task blocks, playbook parsing, new execution strategy plugins, and modules. You will also learn how to integrate Ansible with cloud platforms such as AWS. The book ends with the enterprise versions of Ansible, Ansible Tower and Ansible Galaxy, where you will learn to interact Ansible with different OSes to speed up your work to previously unseen levels By the end of the book, you'll able to leverage the Ansible parameters to create expeditious tasks for your organization by implementing the Ansible 2 techniques and paradigms. Style and approach This book is a step-by-step learning guide on the all new Ansible 2, which is an ideal configuration management tool.
If you want to learn how to use Ansible to automate an infrastructure, either from scratch or to augment your current tooling with Ansible, then this is the book for you. It has plenty of practical examples to help you get to grips with Ansible.
This book is your concise guide to Ansible, the simple way to automate apps and IT infrastructure. In less than 250 pages, this book takes you from knowing nothing about configuration management to understanding how to use Ansible in a professional setting. You will learn how to create an Ansible playbook to automatically set up an environment, ready to install an open source project. You’ll extract common tasks into roles that you can reuse across all your projects, and build your infrastructure on top of existing open source roles and modules that are available for you to use. You will learn to build your own modules to perform actions specific to your business. By the end you will create an entire cluster of virtualized machines, all of which have your applications and all their dependencies installed automatically. Finally, you'll test your Ansible playbooks. Ansible can do as much or as little as you want it to. Ansible: From Beginner to Pro will teach you the key skills you need to be an Ansible professional. You’ll be writing roles and modules and creating entire environments without human intervention in no time at all – add it to your library today. What You Will Learn Learn why Ansible is so popular and how to download and install it Create a playbook that automatically downloads and installs a popular open source project Use open source roles to complete common tasks, and write your own specific to your business Extend Ansible by writing your own modules Test your infrastructure using Test Kitchen and ServerSpec Who This Book Is For Developers that currently create development and production environments by hand. If you find yourself running apt-get install regularly, this book is for you. Ansible adds reproducibility and saves you time all at once. Ansible: From Beginner to Pro is great for any developer wanting to enhance their skillset and learn new tools.
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 second 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 Lorin Hochstein and René 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. Manage Windows machines, and automate network device configuration Manage your fleet from your web browser with Ansible Tower Understand how Ansible differs from other configuration management systems Use the YAML file format to write your own playbooks Work with a complete example to deploy a non-trivial application Deploy applications to Amazon EC2 and other cloud platforms Create Docker images and deploy Docker containers with Ansible 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.
Discover how to efficiently deploy and customize Ansible in the way your platform demands About This Book Get the first book on the market that maximizes the functionalities of Ansible Master the skill of extending Ansible by deep diving into its modules and plugins Work through this step-by-step guide to customizing Ansible according to your requirements Who This Book Is For This book is perfect for developers and administrators who are familiar with Ansible and Python programming, but have no knowledge of how to customize Ansible. What You Will Learn Get a thorough understanding of Ansible modules Find out everything about plugins that fit in the Ansible architecture Get to grips with designing modules and handling errors Work with data structures Distribute Ansible extensions using PyPi and Git submodules Get to know the various distribution methods of modules and plugins In Detail Ansible is an IT automation tool that lets you manage your Infrastructure as a Code. It helps you deploy your applications and manage configurations, thus making life easier. Ansible, in most ways, is self sufficient to address most of your requirements. Ideally, standard modules, libraries, or plugins are used to automate a given IT platform. Customizing Ansible can be done by custom module and plugin development. This book shows you how to automate most of the tasks in your IT environment, thus minimizing the need to manually perform scheduled tasks and extend your Ansible implementation by developing customized modules and plugins. You'll begin by getting an understanding of the fundamental aspects of extending the Ansible framework, such as custom functions and reusable modules. You'll then progress to building custom plugins and extensions using the fundamental building blocks explained earlier. We'll also show you how to automate some tasks using scripts. Finally, we'll demonstrate how these extensions can be seamlessly integrated into existing Ansible installations and explain how to conduct unit testing on these extensions to ensure they work as desired. Style and approach This book is a learning book on the fundamentals of Ansible framework and how it can be leveraged to extend it using the modules and plugins.
Configure and extend Jenkins to architect, build, and automate efficient software delivery pipelines About This Book Configure and horizontally scale a Jenkins installation to support a development organization of any size Implement Continuous Integration, Continuous Delivery, and Continuous Deployment solutions in Jenkins A step-by-step guide to help you get the most out of the powerful automation orchestration platform that is Jenkins Who This Book Is For If you are a novice or intermediate-level Jenkins user who has used Jenkins before but are not familiar with architecting solutions and implementing it in your organization, then this is the book for you. A basic understanding of the core elements of Jenkins is required to make the best use of this book. What You Will Learn Create and manage various types of build jobs, and implement automation tasks to support a software project of any kind Get to grips with the automated testing architecture, and scalable automated testing techniques Facilitate the delivery of software across the SDLC by creating scalable automated deployment solutions Manage scalable automation pipelines in Jenkins using the latest build, test, and deployment strategies Implement a scalable master / slave build automation platform, which can support Windows, Mac OSX, and Linux software solutions Cover troubleshooting and advanced configuration techniques for Jenkins slave nodes Support a robust build and delivery system by implementing basic infrastructure as code solutions in configuration management tools such as Ansible In Detail With the software industry becoming more and more competitive, organizations are now integrating delivery automation and automated quality assurance practices into their business model. Jenkins represents a complete automation orchestration system, and can help converge once segregated groups into a cohesive product development and delivery team. By mastering the Jenkins platform and learning to architect and implement Continuous Integration, Continuous Delivery, and Continuous Deployment solutions, your organization can learn to outmanoeuvre and outpace the competition. This book will equip you with the best practices to implement advanced continuous delivery and deployment systems in Jenkins. The book begins with giving you high-level architectural fundamentals surrounding Jenkins and Continuous Integration. You will cover the different installation scenarios for Jenkins, and see how to install it as a service, as well as the advanced XML configurations. Then, you will proceed to learn more about the architecture and implementation of the Jenkins Master/Save node system, followed by creating and managing Jenkins build jobs effectively. Furthermore, you'll explore Jenkins as an automation orchestration system, followed by implementing advanced automated testing techniques. The final chapters describe in depth the common integrations to Jenkins from third-party tools such as Jira, Artifactory, Amazon EC2, and getting the most out of the Jenkins REST-based API. By the end of this book, you will have all the knowledge necessary to be the definitive resource for managing and implementing advanced Jenkins automation solutions for your organization. Style and approach This book is a step-by-step guide to architecting and implementing automated build solutions, automated testing practices, and automated delivery methodologies. The topics covered are based on industry-proven techniques, and are explained in a simple and easy to understand manner.
Leverage the power of Ansible 2 and related tools and scale DevOps processes About This Book Learn how to use Ansible playbooks along with YAML and JINJA to create efficient DevOps solutions Use Ansible to provision and automate Docker containers and images Learn the fundamentals of Continuous Integration and Continuous Delivery and how to leverage Ansible to implement these modern DevOps Learn the fundamentals of creating custom Ansible modules Learn the fundamentals of Ansible Galaxy Follow along step-by-step as we teach you to scale Ansible for your DevOps processes Who This Book Is For If you are a DevOps engineer, administrator, or developer and want to implement the DevOps environment in your organization using Ansible, then this book is for you. What You Will Learn Get to the grips with the fundamentals of Ansible 2.2 and how you can benefit from leveraging Ansible for DevOps. Adapt the DevOps process and learn how Ansible and other tools can be used to automate it. Start automating Continuous Integration and Continuous Delivery tasks using Ansible Maximize the advantages of tools such as Docker, Jenkins, JIRA, and many more to implement the DevOps culture. Integrate DevOps tools with Ansible Extend Ansible using Python and create custom modules that integrate with unique specific technology stacks Connect and control the states of various third-party applications such as GIT, SVN, Artifactory, Nexus, Jira, Hipchat, Slack, Nginx, and others In Detail Thinking about adapting the DevOps culture for your organization using a very simple, yet powerful automation tool, Ansible 2? Then this book is for you! In this book, you will start with the role of Ansible in the DevOps module, which covers fundamental DevOps practices and how Ansible is leveraged by DevOps organizations to implement consistent and simplified configuration management and deployment. You will then move on to the next module, Ansible with DevOps, where you will understand Ansible fundamentals and how Ansible Playbooks can be used for simple configuration management and deployment tasks. After simpler tasks, you will move on to the third module, Ansible Syntax and Playbook Development, where you will learn advanced configuration management implementations, and use Ansible Vault to secure top-secret information in your organization. In this module, you will also learn about popular DevOps tools and the support that Ansible provides for them (MYSQL, NGINX, APACHE and so on). The last module, Scaling Ansible for the enterprise, is where you will integrate Ansible with CI and CD solutions and provision Docker containers using Ansible. By the end of the book you will have learned to use Ansible to leverage your DevOps tasks. Style and approach A step-by-step guide to automating all DevOps stages with ease using Ansible
Design, build, and automate 10 real-world OpenStack administrative tasks with Ansible About This Book Automate real-world OpenStack cloud operator administrative tasks Construct a collection of automation code to save time on managing your OpenStack cloud Use this step-by-step tutorial to automate such tasks with Ansible Who This Book Is For If you are an OpenStack-based cloud operator and/or infrastructure administrator and are interested in automating administrative functions, then this book is exactly what you are looking for. Having a functioning OpenStack environment is helpful, but most certainly not necessary. What You Will Learn Efficiently execute OpenStack administrative tasks Familiarize yourself with how Ansible works and assess the defined best practices Create Ansible playbooks and roles Automate tasks to customize your OpenStack cloud Review OpenStack automation considerations when automating administrative tasks Examine and automate advanced OpenStack tasks and designated use cases Get a high-level overview of OpenStack and the current production-ready projects Deep dive into OpenStack CLI tools and find out how to use them In Detail Most organizations are seeking methods to improve business agility because they have realized just having a cloud is not enough. Being able to improve application deployments, reduce infrastructure downtime, and eliminate daily manual tasks can only be accomplished through some sort of automation. Packed with real-world OpenStack administrative tasks, this book will walk you through working examples and explain how these tasks can be automated using one of the most popular open source automation tools—Ansible. We will start with a brief overview of OpenStack and Ansible and highlight some best practices. Each chapter will provide an introduction to handling various Cloud Operator administration tasks such as creating multiple users/tenants, setting up Multi-Tenant Isolation, customizing your clouds quotas, taking instance snapshots, evacuating compute hosts for maintenance, and running cloud health checks, and a step-by-step tutorial on how to automate these tasks with Ansible. Style and approach This easy-to-follow reference guide is packed with examples of real-world OpenStack administration tasks; each task is explained in detail and then subsequently turned into automation code.
Learn how to work with the Automate feature of CloudForms, the powerful Red Hat cloud management platform that lets you administer your virtual infrastructure, including hybrid public and private clouds. This practical hands-on introduction shows you how to increase your operational efficiency by automating day-to-day tasks that now require manual input. Throughout the book, author Peter McGowan provides a combination of theoretical information and practical coding examples to help you learn the Automate object model. With this CloudForms feature, you can create auto-scalable cloud applications, eliminate manual decisions and operations when provisioning virtual machines and cloud instances, and manage your complete virtual machine lifecycle. In six parts, this book helps you: Learn the objects and concepts for developing automation scripts with CloudForms Automate Customize the steps and workflows involved in provisioning virtual machines Create and use service catalogs, items, dialogs, objects, bundles, and hierarchies Use CloudForm’s updated workflow to retire and delete virtual machines and services Orchestrate and coordinate with external services as part of a workflow Explore distributed automation processing as well as argument passing and handling