You are previewing Getting Started with OpenShift.
O'Reilly logo
Getting Started with OpenShift

Book Description

Intrigued by the possibilities of developing web applications in the cloud? With this concise book, you get a quick hands-on introduction to OpenShift, the open source Platform as a Service (PaaS) offering from Red Hat. You’ll learn the steps necessary to build, deploy, and host a complete real-world application on OpenShift, without having to read long, detailed explanations of the technologies involved.

Though the book uses Python, application examples in other languages are available on GitHub. If you can build web applications, use a command line, and program in Java, Python, Ruby, Node.js, PHP, or Perl, you’re ready to get started.

  • Dive in and create your first example application with OpenShift
  • Modify the example with your own code and hot-deploy the changes
  • Add components such as a database, task scheduling, and monitoring
  • Use external libraries and dependencies in your application
  • Delve into networking, persistent storage, and backup options
  • Explore ways to adapt your team processes to use OpenShift
  • Learn OpenShift terms, technologies, and commands
  • Get a list of resources to learn more about OpenShift and PaaS

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. Why We Wrote This Book
      1. Introducing the Insult Application
    3. How This Book Is Organized
    4. Online Resources
    5. Conventions Used in This Book
    6. Using Code Examples
    7. Safari® Books Online
    8. How to Contact Us
    9. Acknowledgments
      1. Steven
      2. Katie
  2. 1. Introduction
    1. What Is the Difference Between IaaS, PaaS, and SaaS?
    2. The Three Versions of OpenShift
    3. Choosing the Right Solution for You
    4. Things to Understand
      1. Words You Need to Understand
      2. Technology You Need to Understand
        1. SSH
        2. Git
  3. 2. Creating Applications
    1. Preliminary Steps
    2. Setting Up the Command-Line Tools
    3. Creating Your First Application
    4. Autoscaling and Why You Should Use It by Default
    5. Reasons to Move to the Paid Tier
  4. 3. Making Code Modifications
    1. Cloning Code to Your Local Machine
    2. Modifying Application Code
    3. Building and Deploying Your Code
    4. Action Hook Scripts
    5. Hot-Deploying Code
  5. 4. Adding Application Components
    1. Database-Related Cartridges
    2. Nondatabase Cartridges
      1. Cron
      2. Continuous Integration
      3. Metrics and Monitoring
    3. Finding Cartridges and QuickStarts
      1. Adding Third-Party Cartridges
  6. 5. Environment and Application Management
    1. SSH Access
      1. Using SSH to Interact with a Database
      2. Importing SQL in an SSH Session
    2. Environment Variables
      1. Preconfigured Environment Variables
      2. Custom Environment Variables
      3. Overriding Preconfigured Environment Variables
    3. Log Access
    4. Changing Application Server or Database Settings
      1. Application Server Configuration Changes
      2. Database Configuration Changes
    5. Using Marker Files
  7. 6. Library Dependencies
    1. Where to Declare Dependencies
    2. Incorporating Your Own Binary Dependencies
    3. Modifying Your Application to Use the Database
      1. Code to Connect to the Database
      2. Code to Close the Database Connection
      3. Code to Query the Terms for the Insult
      4. What We Have Gained by Adding a Database
  8. 7. Networking
    1. WebSockets
    2. SSH Port Forwarding
    3. Custom URLs
    4. SSL Certificates
    5. Talking to Other Services
    6. Addressable Ports
  9. 8. Disk Usage
    1. Where You Can Write “to Disk”
    2. Determining How Much Disk Space Is Used
    3. Copying Files to or from Your Local Machine
    4. Other Storage Options
  10. 9. Backup
    1. Managing Deployments and Rollbacks
      1. Manual Deployments
      2. Keeping and Utilizing Deployment History
    2. Application Snapshots with RHC
    3. Backing Up Your Database
      1. Writing a Cron Script
      2. Moving Data off the Gear
  11. 10. Team Collaboration
    1. Managing Multiple SSH Keys
    2. Domain Access for Teams
    3. Possible Workflows
  12. 11. Summary
    1. What We Covered
    2. Other Areas to Explore
    3. Final Words
  13. A. Basic Linux for Non-Linux Users
    1. Listing Directory Contents
    2. Changing Permissions
    3. Working with Files and Directories
      1. Creating Files
      2. Moving Files and Directories
      3. Copying Files and Directories
      4. Deleting Files
      5. Creating Directories
      6. Deleting Directories
    4. Where To Learn More
  14. Colophon
  15. Copyright