Statistics
5
Views
0
Downloads
0
Donations
Support
Share
Uploader

高宏飞

Shared on 2026-03-21

AuthorAbraham Marín-Pérez & Daniel Bryant

Continuous delivery adds enormous value to the business and the entire software delivery lifecycle, but adopting this practice means mastering new skills typically outside of a developer’s comfort zone. In this practical book, Daniel Bryant and Abraham Marín-Pérez provide guidance to help experienced Java developers master skills such as architectural design, automated quality assurance, and application packaging and deployment on a variety of platforms. Not only will you learn how to create a comprehensive build pipeline for continually delivering effective software, but you’ll also explore how Java application architecture and deployment platforms have affected the way we rapidly and safely deliver new software to production environments. Get advice for beginning or completing your migration to continuous delivery Design architecture to enable the continuous delivery of Java applications Build application artifacts including fat JARs, virtual machine images, and operating system container (Docker) images Use continuous integration tooling like Jenkins, PMD, and find-sec-bugs to automate code quality checks Create a comprehensive build pipeline and design software to separate the deploy and release processes Explore why functional and system quality attribute testing is vital from development to delivery Learn how to effectively build and test applications locally and observe your system while it runs in production

Tags
No tags
Publisher: O'Reilly Media, Inc.
Publish Year: 2018
Language: 英文
File Format: PDF
File Size: 7.2 MB
Support Statistics
¥.00 · 0times
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

(This page has no text content)
1. Forewords 2. Preface a. Why Did We Write This Book? b. Why You Should Read This Book c. What This Book Is Not d. Conventions Used in This Book e. Using Code Examples f. O’Reilly Safari g. How to Contact Us h. Acknowledgments 3. 1. Continuous Delivery: Why and What a. Setting the Scene b. Enabling Developers: The Why i. Rapid Feedback Reduces Context Switching ii. Automatic, Repeatable, and Reliable Releases iii. Codifying the Definition of “Done” c. Exploring a Typical Build Pipeline: The What
i. Core Build Pipeline Stages ii. Impact of Container Technology iii. Changes with Contemporary Architectures d. Summary 4. 2. Evolution of Java Development a. Requirements of Modern Java Applications i. Need for Business Speed and Stability ii. Rise of the API Economy iii. Opportunities and Costs of the Cloud iv. Modularity Redux: Embracing Small Services v. Impact on Continuous Delivery b. Evolution of Java Deployment Platforms i. WARs and EARs: The Era of Application Server Dominance ii. Executable Fat JARs: Emergence of Twelve-Factor Apps iii. Container Images: Increasing Portability (and Complexity) iv. Function as a Service: The Emergence of “Serverless” v. Impact of Platforms on Continuous Delivery
c. DevOps, SRE, and Release Engineering i. Development and Operations ii. Site Reliability Engineering iii. Release Engineering iv. Shared Responsibility, Metrics, and Observability d. Summary 5. 3. Designing Architecture for Continuous Delivery a. Fundamentals of Good Architecture i. Loose Coupling ii. High Cohesion iii. Coupling, Cohesion, and Continuous Delivery b. Architecture for Business Agility i. Bad Architecture Limits Business Velocity ii. Complexity and Cost of Change c. Best Practices for API-Driven Applications
i. Build APIs “Outside-In” ii. Good APIs Assist Continuous Testing and Delivery d. Deployment Platforms and Architecture i. Designing Cloud-Native “Twelve-Factor” Applications ii. Cultivating Mechanical Sympathy iii. Design and Continually Test for Failure e. The Move Toward Small Services i. Challenges for Delivering Monolithic Applications ii. Microservices: SOA Meets Domain-Driven Design iii. Functions, Lambdas, and Nanoservices f. Architecture: “The Stuff That’s Hard to Change” g. Summary 6. 4. Deployment Platforms, Infrastructure, and Continuous Delivery of Java Apps a. Functionality Provided by a Platform b. Essential Development Processes c. Traditional Infrastructure Platforms
i. Traditional Platform Components ii. Challenges with Traditional Infrastructure Platforms iii. Benefits of Being Traditional iv. CI/CD on Traditional Infrastructure Platforms d. Cloud (IaaS) Platform i. Looking Inside the Cloud ii. Cloud Challenges iii. Benefits of the Cloud iv. Continuously Delivering into the Cloud e. Platform as a Service i. Peeking Inside a PaaS ii. PaaS Challenges iii. Benefits of PaaS iv. CI/CD and PaaS f. Containers (Docker) i. Container Platform Components ii. Container Challenges
iii. Container Benefits iv. Continuously Delivering Containers g. Kubernetes i. Core Concepts of Kubernetes ii. Kubernetes Challenges iii. Benefits of Kubernetes iv. Continuous Delivery on Kubernetes h. Functionas-a-Service/Serverless Functions i. FaaS Concepts ii. Challenges of FaaS iii. FaaS Benefits iv. CI/CD and FaaS i. Working with Infrastructure as Code j. Summary 7. 5. Building Java Applications a. Breaking Down the Build Process b. Automating the Build
i. Build Dependencies ii. External Dependencies iii. Multimodule Projects iv. Multiple Repositories (or a Monorepo)? v. Plugins vi. Releasing and Publishing Artifacts c. Java Build Tooling Overview i. Ant ii. Maven iii. Gradle iv. Bazel, Pants, and Buck v. Other JVM Build Tools: SBT and Leiningen vi. Make d. Choosing a Build Tool e. Summary 8. 6. Additional Build Tooling and Skills a. Linux, Bash, and Basic CLI Commands
i. Users, Permissions, and Groups ii. Working with the Filesystem iii. Viewing and Editing Text iv. Joining Everything Together: Redirects, Pipes, and Filters v. Searching and Manipulating Text: grep, awk, and sed vi. Diagnostic Tooling: top, ps, netstat, and iostat b. HTTP Calls and JSON Manipulation i. curl ii. HTTPie iii. jq c. Basic Scripting i. xargs ii. Pipes and Filters iii. Loops iv. Conditionals d. Summary 9. 7. Packaging Applications for Deployment
a. Building a JAR: Step-by-Step b. Building a Fat Executable “Uber” JAR i. Maven Shade Plugin ii. Building Spring Boot Uber JARs c. Skinny JARs—Deciding Not to Build Fat JARs d. Building WAR Files e. Packaging for the Cloud i. Cooking Configuration: Baking or Frying Machines ii. Building RPMs and DEBs OS Packages iii. Additional OS Package Build Tools (with Windows Support) iv. Creating Machine Images for Multiple Clouds with Packer v. Additional Tools for Creating Machine Images f. Building Containers i. Creating Container Images with Docker ii. Fabricating Docker Images with fabric8
g. Packaging FaaS Java Applications h. Summary 10. 8. Working Locally (Like It Was Production) a. Challenges with Local Development b. Mocking, Stubbing, and Service Virtualization i. Pattern #1: Profiles, Mocks, and Stubs ii. Mocking with Mockito iii. Pattern #2: Service Virtualization and API Simulation iv. Virtualizing Services with Hoverfly c. VMs: Vagrant and Packer i. Installing Vagrant ii. Creating a Vagrantfile iii. Pattern #3: Production-in-a-Box d. Containers: Kubernetes, minikube, and Telepresence i. Introducing the “Docker Java Shop” Sample App ii. Building Java Applications and Container Images
iii. Deploying into Kubernetes iv. Simple Smoke Test v. Building the Remaining Applications vi. Deploying the Entire Java Application in Kubernetes vii. Viewing the Deployed Application viii. Telepresence: Working Remotely, Locally ix. Pattern #4: Environment Leasing e. FaaS: AWS Lamba and SAM Local i. Installing SAM Local ii. AWS Lambda Scaffolding iii. Testing AWS Lambda Event Handling iv. Smoke Testing with SAM Local f. FaaS: Azure Functions and VS Code i. Installing Azure Function Core Tools ii. Building and Testing Locally iii. Testing Remotely, Locally Using VS Code g. Summary 11. 9. Continuous Integration: The First Steps in Creating a Build Pipeline
a. Why Continuous Integration? b. Implementing CI c. Centralized Versus Distributed Version-Control Systems d. Git Primer i. Core Git CLI Commands ii. Hub: An Essential Tool for Git and GitHub e. Working Effectively with DVCS i. Trunk-based Development ii. Feature Branching iii. Gitflow iv. No One-Size Fits All: How to Choose a Branching Strategy f. Code Reviews i. What to Look For ii. Automation: PMD, Checkstyle, and FindBugs iii. Reviewing Pull Requests g. Automating Builds
i. Jenkins h. Getting Your Team Onboard i. Merge Code Regularly ii. “Stop the Line!”: Managing Broken Builds iii. Don’t @Ignore Tests iv. Keep the Build Fast i. CI of the Platform (Infrastructure as Code) j. Summary 12. 10. Deploying and Releasing from the Pipeline a. Introducing the Extended Java Shop Application b. Separating Deployment and Release c. Deploying Applications i. Creating a Container Image ii. Deployment Mechanisms iii. It All Starts (and Ends) with Health Checks iv. Deployment Strategies
v. Working with Unmanaged Clusters vi. Changing Databases d. Releasing Functionality i. Feature Flags ii. Semantic Versioning (semver) iii. Backward Compatibility and Versions in APIs iv. Multiple-Phase Upgrades e. Managing Configuration and Secrets i. “Baked-In” Configuration ii. Externalized Configuration iii. Handling Secrets f. Summary 13. 11. Functional Testing: Correctness and Acceptance a. Why Test Software? b. What to Test? Introducing Agile Testing Quadrants c. Continuous Testing
i. Building the Right Feedback Loop d. Turtles All the Way Down e. Synthetic Transactions f. End-to-End Testing g. Acceptance Testing i. Behavior-Driven Development ii. Stubbing or Virtualizing Third-Party Services iii. Bringing It All Together h. Consumer-Driven Contracts i. RESTful API Contracts ii. Message Contracts i. Component Testing i. Embedded Data Stores ii. In-Memory Message Queues iii. Test Doubles iv. Creating Internal Resources/Interfaces v. In-Process Versus Out-Of-Process
j. Integration Testing i. Verifying External Interactions ii. Testing Fault Tolerance k. Unit Testing i. Sociable Unit Testing ii. Solitary Unit Testing l. Dealing with Flaky Tests i. Data ii. Resource That Is Not Available Yet iii. Nondeterministic Events iv. If Nothing Else Works m. Testing Outside-In Versus Testing Inside-Out i. Outside-In ii. Inside-Out n. Putting It All Together Within the Pipeline
o. How Much Testing Is Enough? p. Summary 14. 12. System-Quality Attributes Testing: Validating Nonfunctional Requirements a. Why Test Nonfunctional Requirements? b. Code Quality c. Architectural Quality i. ArchUnit: Unit-Testing Architecture ii. Generate Design-Quality Metrics with JDepend d. Performance and Load Testing i. Basic Performance Testing with Apache Benchmark ii. Load Testing with Gatling e. Security, Vulnerabilities, and Threats i. Code-Level Security Verification ii. Dependency Verification iii. Deployment Platform-Specific Security Issues iv. Next Steps: Threat Modeling
f. Chaos Testing i. Causing Chaos in Production (Bring in the Monkeys) ii. Causing Chaos in Preproduction g. How Much NFR Testing Is Enough? h. Summary 15. 13. Observability: Monitoring, Logging, and Tracing a. Observability and Continuous Delivery i. Why Observe? ii. What to Observe: Application, Network, and Machine iii. How to Observe: Monitoring, Logging, and Tracing iv. Alerting b. Designing Systems for Observability c. Metrics i. Type of Metrics ii. Dropwizard Metrics iii. Spring Boot Actuator
iv. Micrometer v. Best Practices with Metrics d. Logging i. Forms of Logging ii. SLF4J iii. Log4j 2 iv. Logging Best Practices e. Request Tracing i. Traces, Spans, and Baggage ii. Java Tracing: OpenZipkin, Spring Sleuth, and OpenCensus iii. Recommended Practices for Tracing f. Exception Tracking i. Airbrake g. System-Monitoring Tooling i. collectd