DevOps for Web Development

Book description

Achieve the Continuous Integration and Continuous Delivery of your web applications with ease

About This Book

  • Overcome the challenges of implementing DevOps for web applications, familiarize yourself with diverse third-party modules, and learn how to integrate them with bespoke code to efficiently complete tasks

  • Understand how to deploy web applications for a variety of Cloud platforms such as Amazon EC2, AWS Elastic Beanstalk, Microsoft Azure, Azure Web Apps, and Docker Container

  • Understand how to monitor applications deployed in Amazon EC2, AWS Elastic Beanstalk, Microsoft Azure, Azure Web Apps using Nagios, New Relic, Microsoft Azure, and AWS default monitoring features

  • Who This Book Is For

    If you are a system admin or application and web application developer with a basic knowledge of programming and want to get hands-on with tools such as Jenkins 2 and Chef, and Cloud platforms such as AWS and Microsoft Azure, Docker, New Relic, Nagios, and their modules to host, deploy, monitor, and manage their web applications, then this book is for you.

    What You Will Learn

  • Grasp Continuous Integration for a JEE application—create and configure a build job for a Java application with Maven and with Jenkins 2.0

  • Create built-in delivery pipelines of Jenkins 2 and build a pipeline configuration for end-to-end automation to manage the lifecycle of Continuous Integration

  • Get to know all about configuration management using Chef to create a runtime environment

  • Perform instance provisioning in AWS and Microsoft Azure and manage virtual machines on different cloud platforms—install Knife plugins for Amazon EC2 and Microsoft Azure

  • Deploy an application in Amazon EC2, AWS Elastic Beanstalk, Microsoft Azure Web Apps, and a Docker container

  • Monitor infrastructure, application servers, web servers, and applications with the use of open source monitoring solutions and New Relic

  • Orchestrate multiple build jobs to achieve application deployment automation—create parameterized build jobs for end-to-end automation

  • In Detail

    The DevOps culture is growing at a massive rate, as many organizations are adopting it. However, implementing it for web applications is one of the biggest challenges experienced by many developers and admins, which this book will help you overcome using various tools, such as Chef, Docker, and Jenkins.

    On the basis of the functionality of these tools, the book is divided into three parts. The first part shows you how to use Jenkins 2.0 for Continuous Integration of a sample JEE application. The second part explains the Chef configuration management tool, and provides an overview of Docker containers, resource provisioning in cloud environments using Chef, and Configuration Management in a cloud environment. The third part explores Continuous Delivery and Continuous Deployment in AWS, Microsoft Azure, and Docker, all using Jenkins 2.0.

    This book combines the skills of both web application deployment and system configuration as each chapter contains one or more practical hands-on projects. You will be exposed to real-world project scenarios that are progressively presented from easy to complex solutions. We will teach you concepts such as hosting web applications, configuring a runtime environment, monitoring and hosting on various cloud platforms, and managing them. This book will show you how to essentially host and manage web applications along with Continuous Integration, Cloud Computing, Configuration Management, Continuous Monitoring, Continuous Delivery, and Deployment.

    Style and approach

    This is a learning guide for those who have a basic knowledge of application deployment, configuration management tools, and Cloud computing, and are eager to leverage it to implement DevOps for web applications using end-to-end automation and orchestration.

    Table of contents

    1. DevOps for Web Development
      1. DevOps for Web Development
      2. Credits
      3. About the Author
      4. Acknowledgments
      5. About the Reviewer
      6. www.PacktPub.com
        1. Why subscribe?
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Downloading the color images of this book
          3. Errata
          4. Piracy
          5. Questions
      8. 1. Getting Started – DevOps Concepts, Tools, and Technologies
        1. Understanding the DevOps movement
          1. DevOps with the changing times
            1. The waterfall model
            2. The agile model
            3. Collaboration
            4. Cloud computing - the disruptive innovation
            5. Why DevOps?
          2. The benefits of DevOps
        2. The DevOps lifecycle - it's all about "continuous"
          1. Build automation
          2. Continuous integration
            1. Best practices
          3. Cloud computing
          4. Configuration management
          5. Continuous delivery/continuous deployment
            1. Best practices for continuous delivery
          6. Continuous monitoring
          7. Continuous feedback
        3. Tools and technologies
          1. Code repositories – Git
            1. Advantages
            2. Characteristics
            3. Differences between SVN and Git
          2. Build tools – Maven
            1. Example pom.xml file
          3. Continuous integration tools – Jenkins
            1. Key features and benefits
          4. Configuration management tools – Chef
            1. Features
          5. Cloud service providers
          6. Container technology
            1. Docker
          7. Monitoring tools
            1. Zenoss
            2. Nagios
          8. Deployment orchestration/continuous delivery - Jenkins
            1. End-to-end orchestration: Jenkins plugins
          9. The DevOps dashboard
        4. An overview of a sample Java EE application
          1. The list of tasks
        5. Self-test questions
        6. Summary
      9. 2. Continuous Integration with Jenkins 2
        1. Introduction
        2. Installing Jenkins
          1. Setting up Jenkins
        3. The Jenkins dashboard
        4. Configuring Java and Maven in Jenkins
          1. Configuring Java
          2. Configuring Maven
        5. Creating and configuring a build job for a Java application with Maven
        6. Configuring and authenticating source code on GitHub
        7. Configuring build job
        8. Configuring JUnit
        9. The Dashboard View plugin - overview and usage
        10. Managing nodes
          1. Creating and configuring slave node in Jenkins 2
          2. Configuring the build job for master and slave node
        11. Sending e-mail notifications based on build status
        12. Integrating Jenkins and Sonar
        13. Self-test questions
        14. Summary
      10. 3. Building the Code and Configuring the Build Pipeline
        1. Creating built-in delivery pipelines
          1. Creating scripts
            1. Example 1 – creating a Groovy script to build a job
            2. Example 2 – creating a build step to publish test reports
            3. Example 3 – archiving build job artifacts
            4. Example 4 – running a build step on a node
            5. Example 5 – marking the definite steps of a build job
        2. Creating a pipeline for compiling and executing test units
        3. Using the Build Pipeline plugin
        4. Integrating the deployment operation
        5. Self-test questions
        6. Summary
      11. 4. Installing and Configuring Chef
        1. Getting started with Chef
        2. Overview of hosted Chef
        3. Installing and configuring a Chef workstation
        4. Converging a Chef node using a Chef workstation
        5. Installing software packages using cookbooks
        6. Creating a role
        7. Self-test questions
        8. Summary
      12. 5. Installing and Configuring Docker
        1. Overview of Docker containers
        2. Understanding the difference between virtual machines and containers
        3. Installing and configuring Docker on CentOS
        4. Creating your first Docker container
        5. Understanding the client-server architecture of Docker
        6. Managing containers
        7. Creating a Docker image from Dockerfile
        8. Self-test questions
        9. Summary
      13. 6. Cloud Provisioning and Configuration Management with Chef
        1. Chef and cloud provisioning
        2. Installing knife plugins for Amazon Web Services and Microsoft Azure
        3. Creating and configuring a virtual machine in Amazon EC2
        4. Creating and configuring a virtual machine in Microsoft Azure
        5. Docker containers
        6. Self-test questions
        7. Summary
      14. 7. Deploying Application in AWS, Azure, and Docker
        1. Prerequisites – deploying our application on Remote Server
          1. Setting up Tomcat server
        2. Deploying application in Docker container
        3. Deploying Application in AWS
        4. Deploying application in Microsoft Azure
        5. Self-test questions
        6. Summary
      15. 8. Monitoring Infrastructure and Applications
        1. Getting started – monitoring
        2. Overview of Monitoring tools and Techniques
          1. Nagios
            1. Quick start with Nagios
        3. Monitoring AWS Elastic Beanstalk
        4. Monitoring Microsoft Azure Web App Service
        5. Self-test questions
        6. Summary
      16. 9. Orchestrating Application Deployment
        1. Creating build jobs for end-to-end automation
        2. Configuring SSH authentication using a key
        3. Configuring the build pipeline for build job orchestration
        4. Executing the pipeline for application deployment automation
        5. Hygieia – a DevOps dashboard
        6. Self-test questions
        7. Summary

    Product information

    • Title: DevOps for Web Development
    • Author(s): Mitesh Soni
    • Release date: October 2016
    • Publisher(s): Packt Publishing
    • ISBN: 9781786465702