OpenShift for Developers, 2nd Edition

Book description

Ready to build cloud native applications? Get a rapid, hands-on introduction to daily life as a developer whose code runs on OpenShift, the open source container application platform from Red Hat. Creating and containerizing your apps for deployment on modern distributed systems can be daunting. With this practical guide, developers will learn how to build, deploy, and manage a multitiered application on OpenShift.

Authors Joshua Wood and Brian Tannous, principal developer advocates at Red Hat, 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 your code. Throughout this book, you'll learn how to use OpenShift and the Quarkus Java framework to develop and deploy apps using proven enterprise technologies.

  • Explore core OpenShift technologies, including containers and Kubernetes
  • Learn the development cycles for building and deploying on OpenShift
  • Build and deploy a multitiered application on OpenShift and manage its ongoing lifecycle
  • Use a fast and iterative development cycle, with the Kubernetes platform as the deployment target
  • Create a continuous integration and deployment pipeline to build and deploy application source code on OpenShift
  • Automate scale, build, and deployment processes using OpenShift's developer features and webhooks

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. 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. Continuous Integration and Continuous Development (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. CodeReady Containers Requirements
      2. Installing CodeReady Containers 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
      4. Summary
  6. 5. OpenShift Pipelines
    1. Tekton
      1. Tekton is Pipelines, Pipelines Tekton
    2. OpenShift Pipelines Operator
      1. Installing the Pipelines Operator
      2. Pipelines in the Web Console
      3. Using Pipelines
    3. OpenShift Pipelines resources
      1. The Stuff Steps are Made of
    4. Summary
  7. 6. Developing and Deploying from Source Code
    1. A Cloud Ready Post-It Application
      1. Application Topology
      2. Fork the backend repository
      3. Create a new project for the Post-It app
      4. Deploy the backend component
      5. Inspect the backend resources
      6. Deploy the frontend component
      7. A running Post-It 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. Code Complete
    2. Database Templates
    3. Service Binding Operator
      1. Install the 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
      1. Delete the running quarkus-backend pod
    8. Summary
  9. 8. Production Deployment and Scaling
    1. Application Scaling
      1. Manual Scaling
      2. A service tangent
      3. Automatically 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. Web Console Developer Perspective Monitoring
    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