Containerizing Continuous Delivery in Java

Book description

Using containers to package and deploy applications is causing a seismic shift in the way software is developed, and you may wonder how, or if, Java works with this new paradigm. In fact, combining Java with container technology can bring out the best in both. With this report, you’ll learn valuable techniques, methodologies, and advice for continuously delivering Java applications with containers, from both an architectural and operational perspective.

To help you follow the book’s examples, author Daniel Bryant includes a simple ecommerce application that includes three microservices, a Docker Compose file, and a Jenkins build pipeline. You can clone the GitHub repository locally and learn firsthand how the continuous delivery process with Docker works. Much of the advice and patterns in this guide also apply to several other container technologies.

With this book, you’ll explore:

  • Continuous delivery basics with Java—and how JAR and WAR files differ from containers
  • How Docker impacts a typical Java application CD build pipeline
  • The impact of microservices and cloud-native Twelve-Factor Applications on Java architectural patterns
  • How containers affect functional testing, and non-functional performance and security testing
  • Host-level monitoring, container-level metrics, and application-level health checks

About the author: Daniel Bryant is Chief Scientist at OpenCredo and CTO at SpectoLabs. Acting as a technical leader and aspiring to be the archetypal "generalizing specialist," his current work includes enabling agility within organizations. He does so by focusing on the relevance of architecture within agile development, implementing high-quality testing strategies, and facilitating continuous integration/delivery.

Table of contents

  1. Introduction
    1. Acknowledgments
  2. 1. Continuous Delivery Basics
    1. Continuous Delivery with a Java Build Pipeline
    2. Maximize Feedback: Automate All the Things
    3. The Impact of Containers on Continuous Delivery
  3. 2. Continuous Delivery of Java Applications with Docker
    1. Adding Docker to the Build Pipeline
    2. Introducing the Docker Java Shopping Application
      1. Obtaining the Example Project Code and Pipeline
      2. Docker Java Shopping Application Architecture
      3. Local Development Environment Configuration
      4. Building a Docker Image Locally
      5. Packaging Java Within Docker: Which OS, Which Java?
      6. Packing Java Within Docker: JDK or JRE?
    3. Pushing Images to a Repository and Testing
      1. Create a Jenkins Server via Vagrant
      2. Building a Docker Image for a Java Application
      3. Potential Improvements to the Build Pipeline
    4. Running Docker as a Deployment Fabric
      1. Component Testing with Docker
      2. Using Docker Compose for E2E Testing
      3. Running Docker in Production
    5. It’s a Brave New (Containerized) World
  4. 3. The Impact of Docker on Java Application Architecture
    1. Cloud-Native Twelve-Factor Applications
    2. The Move to Microservices
    3. API-Driven Applications
    4. Containers and Mechanical Sympathy
  5. 4. The Importance of Continuous Testing
    1. Functional Testing with Containers
    2. Nonfunctional Testing: Performance
    3. Nonfunctional Testing: Security Across the System
      1. Host-Level Security
      2. Container-Level Security
      3. Application-Level Security
      4. Additional Reading
  6. 5. Operations in the World of Containers
    1. Host-Level Monitoring
    2. Container-Level Metrics
    3. Application-Level Metrics and Health Checks
  7. 6. Conclusion and Next Steps

Product information

  • Title: Containerizing Continuous Delivery in Java
  • Author(s): Daniel Bryant
  • Release date: March 2017
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491959787