OpenShift for Developers, 2nd Edition

Book description

Ready to build cloud native applications? Get a hands-on introduction to daily life as a developer crafting code on OpenShift, the open source container application platform from Red Hat. Creating and packaging your apps for deployment on modern distributed systems can be daunting. Too often, adding infrastructure value can complicate development. With this practical guide, you'll learn how to build, deploy, and manage a multitiered application on OpenShift.

Authors Joshua Wood and Brian Tannous demonstrate how OpenShift speeds application development. With the Kubernetes container orchestrator at its core, OpenShift simplifies and automates the way you build, ship, and run code. You'll learn how to use OpenShift and the Quarkus Java framework to develop and deploy apps using proven enterprise technologies and practices that you can apply to code in any language.

  • Learn the development cycles for building and deploying on OpenShift, and the tools that drive them
  • Use OpenShift to build, deploy, and manage the ongoing lifecycle of an n-tier application
  • Create a continuous integration and deployment pipeline to turn your source code changes into production rollouts
  • Automate scaling decisions with metrics and trigger lifecycle events with webhooks

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Who This Book Is For
    2. What You Will Learn
    3. Conventions Used in This Book
    4. Using Code Examples
    5. O’Reilly Online Learning
    6. How to Contact Us
    7. Acknowledgments
  2. 1. A Kubernetes Application Platform
    1. Linux Containers
    2. Kubernetes
    3. What OpenShift Adds
      1. Web Console
      2. Curated Software Catalogs: An OpenShift App Store
      3. CI/CD: Pipelines
      4. Networking and Service Mesh
      5. Integrated Prometheus Metrics, Monitoring, and Alerts
    4. Summary
  3. 2. OpenShift Concepts
    1. Projects Organize Applications and Teams
      1. Projects and Applications
    2. Application Components in OpenShift
      1. Pods
      2. Services
      3. OpenShift Routes
    3. Building Container Images
    4. Deploying Applications
    5. Interacting with OpenShift
      1. oc
      2. OpenShift Web Console
    6. Summary
  4. 3. OpenShift Lab
    1. CodeReady Containers
      1. CRC Requirements
      2. Installing CRC on Windows
      3. CRC Always Wants More
    2. Logging In to OpenShift
      1. Log In to the Web Console
      2. Log In on the Command Line
    3. Summary
  5. 4. Deploying an Application on OpenShift
    1. A Simple Sample Application
      1. Git and GitHub
      2. Building and Deploying the Application on OpenShift
      3. Adding and Deploying a New Feature
    2. Summary
  6. 5. OpenShift Pipelines
    1. Tekton
    2. OpenShift Pipelines Operator
      1. Installing the Pipelines Operator
      2. Pipelines in the Web Console
      3. Using Pipelines
    3. OpenShift Pipelines Resources
      1. Command
      2. Script
    4. Summary
  7. 6. Developing and Deploying from Source Code
    1. Noted: A Cloud-Ready Notes Application
      1. Application Topology
      2. Fork the Backend Repository
      3. Create a New Project for the Noted App
      4. Deploy the Backend Component
      5. Inspect the Backend Resources
      6. Deploy the Frontend Component
      7. A Running Noted Application
    2. Automatic Pipeline Runs Using Tekton Triggers
      1. Pipeline Triggers
      2. The Forward Proxy Workaround
      3. Deploy the ngrok Template
      4. GitHub Webhook Configuration
    3. The Reversed Text Quarkus-Backend Bug Fix
    4. Summary
  8. 7. Evolving the Application: Data Persistence
    1. Database Without Delay
    2. Database Templates
    3. Service Binding Operator
    4. The Postgres Operator Designed for Service Binding
      1. Add the Sample DB Operators OperatorSource
      2. Install the PostgreSQL Database Operator
      3. Verify Operator Installation
      4. Deploy a PostgreSQL Database
    5. Configure the pgsql quarkus-backend Branch
      1. Inspect the quarkus-backend pgsql Branch
    6. Service Binding Operator Usage
      1. Configure a ServiceBinding
      2. Test the ServiceBinding
      3. Inspect the ServiceBinding Injection
    7. Persistence in Action
    8. Summary
  9. 8. Production Deployment and Scaling
    1. Application Scaling
      1. Manual Scaling
      2. The Service Abstraction
      3. Automatic Scaling
    2. Health Checks
      1. Health-Checking Probes
      2. Configure the Health Checks in OpenShift
    3. Production Deployment Strategies
      1. Available Deployment Strategies on OpenShift
      2. Configuring a Deployment Strategy
      3. Deployment Rollbacks
    4. Summary
  10. 9. Monitoring and Managing Applications on OpenShift
    1. Listing and Detailing Resources
      1. Using Labels to Filter Listed Resources
      2. Describing Resources
    2. Events and Logs
    3. Debugging an Application in Its Container
      1. oc rsh
      2. oc exec
      3. oc debug
    4. OpenShift Monitoring
      1. Monitoring in the Web Console Developer Perspective
    5. Deleting Resources, Applications, and Projects
    6. Summary
  11. 10. Templates, Operators, and OpenShift Automation
    1. Templates
      1. Templates in the OpenShift Web Console
      2. Creating Your Own Templates
    2. Operators
      1. Operator Subscriptions and the Operator Lifecycle Manager
      2. Operators from the Developer Perspective
    3. Summary
  12. Index

Product information

  • Title: OpenShift for Developers, 2nd Edition
  • Author(s): Joshua Wood, Brian Tannous
  • Release date: September 2021
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098103361