POWERING CONTINUOUS DELIVERY Application Release Automation Integrating Configuration Management into your Application Release eBook Using the right tool for the job Have you ever used a shoe to drive a nail or broom to crush a bug? It may work, but it’s more efficient to grab a hammer or use pesticide. There is little distinction between using the wrong tool and using the right tool the wrong way. In both instances, you may be able to achieve your desired outcome, but you are likely to invest more time than you need and the end product may not be all that great. DevOps practices increase collaboration to give teams shared visibility and control of critical software pipelines. While there are no tools that can magically help you “achieve DevOps,” having the right tools facilitates organizational agility. And while virtualization, monitoring and continuous integration servers are largely understood, there appears to be a lot of confusion in the market surrounding Configuration Management (CM) and Application Release Automation (ARA) tools. This e-book examines guidelines for using these two different yet complimentary types of technologies in the most effective way. What are “DevOps Tools?” The DevOps movement is rooted in the understanding that every business is a software business and that software agility drives a competitive advantage. Over the past decade there’s been an explosion of “DevOps tools.” While you don’t need to have tools in order to practice DevOps, having the right tools can streamline the process. Virtualization and Containerization reduces the effort required to provision infrastructure. Configuration Management (a.k.a “Infrastructure as Code”) increases environment consistency to minimize errors. Continuous Integration increases velocity and quality of software being built. Release and Deployment Automation promotes product into production predictably, quickly and safely. There is little distinction between using the wrong tool and using the right tool the wrong way. Configuration Management, or, “Infrastructure-as-Code” Servers (especially virtualized servers) have become a commodity. In this landscape, treating each server like a “work of art” and lovingly hand-crafting each configuration is a waste of time. Instead, creating infrastructure should be as repeatable and automated as possible. Configuration Management tools like Ansible, Capistrano, Chef, Fabric, Puppet, and SaltStack provide a simple way to configure and manage systems. This is done by effectively turning infrastructure into code, making configurations versionable, testable, and repeatable – just like application code. As teams gain success with configuration management for infrastructure, many are tempted to use these same tools to perform application deployments. However, a lot of problems emerge in organizations that put these tools into practice. CM App Deployment Challenges Sprawling masses of configuration management code Hard-coded values leads to brittle scripts and lack of re-use Per-project code duplication eliminates sharing of best-practices Lack of shared understanding of how everything works together Undocumented dependencies between scripts lead to fear of change and experimentation Wild hacks and fragile workarounds littered with circular or transitive dependencies or version conflicts These issues happen because tools are being used in the wrong way and for the wrong purpose. Configuration Management tools are declarative in nature, built to ensure consistency, but not to automate sequential or branchedlogic processes. CM solutions struggle, however, when applications are introduced that have dependencies amongst applications, networks, databases; or when they have configurations which require temporal logic. de·clar·a·tive pro·ce·dur·al /di`klerətiv/ /prə-ˈsē-jə-rəl/ adjective adjective denoting high-level programming languages that can be used to solve problems without requiring the programmer to specify an exact procedure to be followed the sequence of logic-driven processes through which a piece of software passes from initiation to completion. Application Release Automation Application Release Automation (ARA) solutions are built for process automation, which help ensure process fidelity rather then just focusing on configuration consistency. As such, their main functionalities include workflows that predictably automate and orchestrate deployment release building blocks. ARA solutions may also provide packaging of versioned application artifacts and configurations, environment definition and tracking, notification and triggering capabilities, rollbacks and various integrations to the numerous auxiliary systems used by both developers and IT operations teams. PROCESS-AS-CODE: WORKFLOWS Workflows are designed to accomplish specific tasks. ARA solutions should provide builtin plugins to carry out these actions appropriately regardless of the underlying technology. This allows commands like STOP {AppServer} START {AppServer} to tightly integrate with WebSphere, Tomcat, or JBoss without requiring the workflow designer to know ahead of time what the target will be at run time. Which path should you choose? Promotion paths, audit trails, and composite releases belong in an ARA solution... ...infrastructure consistency belongs in configuration management... and can be an integral part of your Application Release flow. A Tale of Two Tools: Procedural vs. Declarative For a typical 3 tier application (web, app server, database) – how do deployments and capabilities differ between CM and ARA solutions? Let’s find out by looking at four main areas: • Setting up for the deploy • Running the deploy • Confirmation of completion • Governance and Audit 1 Setup for the Deploy Configuration Management Application Release Automation “Declare your way to your desired state” “Model apps and connect the dots” CM solutions are declarative, which means there is no framework for procedural logic during a deploy process. ARA solutions allow modeling of apps and environments to abstract out complexities and simplify the deployment of any app to any environment. CM solutions depend on coding of individual scripts that define and configure each tier of the application. In total, these scripts may be hundreds of lines of code with potential for syntax errors and misuse of specific CM API calls. ARA solutions drive pipelines through custom workflows with branching and error handling ARA solutions often call CM tools within deploy processes to configure infrastructure efficiently. 2 Running the Deploy Configuration Management Application Release Automation “Fire and Forget” “Shared control and visibility” CM solutions typically have a ‘fire and forget’ approach to deployment. During actual execution, there is little visibility into the progress, leaving the operator guessing on what the outcome will be. ARA solutions provide real-time progress for each step of the deploy process. Operators are able to see exactly what step their process is executing and look back on details of previous steps (success, failure, skip, etc). Manual gates and approvals or simple logic flows based on prior return codes allow releases to accurately reflect the business processes required to promote applications to any environment. 3 Confirming Success Configuration Management Application Release Automation “Manual troubleshooting” “Traceability and transparency” Verifying success of CM deploys requires a combination of manually checking target servers and scripting tests and notifications within the CM configuration files. When troubleshooting failed deploys operators assume the burden of relying on scripts or logs to identify problem areas. ARA solutions provide direct visibility into applications installed in any target server environment. When problems arise, ARA solutions provide traceability into the failed process with call-outs to problematic steps and access to associated logs and post-processed summaries. 4 Governance and Audit Configuration Management Application Release Automation “Ensure your configurations are compliant” “See the Who, What, Where and How” CM tools are focused on the infrastructure and as such they can provide assurance that a given policy (such as password requirements) has been enforced on a set of servers. ARA tools allow you to see who authorized or approved a deployment, what was being deployed, where the deployment happened, and how (using which set of credentials/ impersonation). POWERING CONTINUOUS DELIVERY Summary Can you deploy an application with an Infrastructure as Code tool? Yes, but it’s awkward. Can you ensure configuration consistency with an ARA solution? Yes, but it’s awkward. The key is not what you CAN do with each type of technology but what you SHOULD be doing, and knowing how to use the best tool for the job. The blueprint is really simple: codify the basic infrastructure layers using your selected CM solution and adopt an ARA solution to automate processes and orchestrate activities. To learn more about ARA solutions from Electric Cloud visit: http://electric-cloud.com/ara About Electric Cloud Electric Cloud powers Continuous Delivery. We help organizations developing mobile, embedded systems and enterprise web/IT applications deliver better software faster by automating and accelerating build, test, and deployment processes at scale. Industry leaders like Qualcomm, SpaceX, Cisco, GE, Gap, and E*TRADE use Electric Cloud solutions and services to boost DevOps productivity and Agile throughput. For more information, visit electric-cloud.com. electric-cloud.com Corporate Headquarters Electric Cloud, Inc. 35 S. Market Street Suite 100 San Jose, CA 95113 T: 408.419.4300 F: 408.419.4399 [email protected] Electric Cloud Europe 1 Northumberland Avenue Trafalgar Square, London WC2N 5BW United Kingdom T: +44(0)207 872 5500 [email protected] Electric Cloud Japan KK 22F Shibuya Mark City West 1-12-1 Dogenzaka, Shibuya-ku Tokyo 150-0043 Japan T: +81.3.4360.5375 [email protected]
© Copyright 2024