Learning OpenShift

Book Description

Leverage the power of cloud computing using OpenShift Online to design, build, and deploy scalable applications

In Detail

Cloud computing and particularly Platform as a Service is rapidly changing the way software engineers approach software development. Without knowing the gritty details of the operating system and application servers, developers are able to use the OpenShift Online platform to tune performance and achieve scalability while also ensuring that their applications are stable and reliable.

This book will guide you through the essential concepts necessary to use the OpenShift platform. Whether you are a years of experience or just starting to learn how to develop software, this book will provide you with all of the information you need from account creation, installation and configuration of client tools to integrating an IDE with the service, deployment, and management of PHP and Java-based applications.

With plenty of sample code and screenshots, this book will ensure your success in speeding up application development while also creating enterprise class scalable applications.

What You Will Learn

  • Master OpenShift Online by using the command line, web console, and IDE integrations
  • Develop applications that will automatically scale based upon the number of concurrent HTTP requests by utilizing HAProxy and multiple OpenShift gears
  • Utilize continuous integration to perform builds and run automated test suites
  • Leverage OpenShift Online to manage development teams with fine grained access permissions
  • Debug applications deployed to the OpenShift Online service by leveraging remote debugging and logfiles
  • Use add-on cartridges to provide database servers, cron job scheduling, deployments, and metrics for your applications
  • Extend the functionality of the OpenShift platform by deploying custom servers using the Do-It-Yourself cartridge

Publisher Resources

Download Example Code

Table of Contents

  1. Learning OpenShift
    1. Table of Contents
    2. Learning OpenShift
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Creating Your First OpenShift Application
      1. Creating your OpenShift Online account
      2. Installing and configuring the Red Hat Cloud command-line tools
        1. Installing the RHC command-line tools for Microsoft Windows
        2. Installing the RHC command-line tools for OS X
        3. Installing the RHC command-line tools for Linux
        4. Configuring the RHC command-line tools
      3. Creating your first OpenShift Online application
        1. What just happened?
          1. Placement of your gear
          2. Creating your application account
          3. Configuring your application
          4. Cloning the remote Git repository
        2. Adding the source code to your application
      4. Using the web console
      5. Summary
    9. 2. Creating and Managing Applications
      1. Learning the essential RHC commands
        1. Displaying information about an application
        2. Deleting applications
      2. Understanding cartridges
        1. Web cartridges
        2. Add-on cartridges
      3. Using cartridges
        1. Adding cartridges
      4. Using databases with your application
        1. Adding the phpMyAdmin add-on cartridge
        2. Developing the application
          1. Understanding the code
      5. The cron cartridge
        1. Adding the cron cartridge
        2. Adding a cron job
      6. Summary
    10. 3. Application Maintenance
      1. Stopping and starting applications
      2. Viewing application logfiles
        1. Creating your own logfiles
        2. Viewing a single logfile
      3. Backing up and restoring applications
        1. Creating a snapshot
        2. Restoring a snapshot
      4. Secure shell and your application
        1. Understanding and viewing the /etc/passwd file
        2. Understanding and viewing cgroup information
        3. Setting the timeout parameter and viewing logfiles
      5. Understanding environment variables
        1. Setting your own environment variables
      6. Summary
    11. 4. Using an Integrated Development Environment
      1. To use an IDE or not to use an IDE is the question
      2. Installing and configuring Eclipse
        1. Downloading and installing Eclipse
        2. Downloading and installing the OpenShift plugin
      3. Importing an existing OpenShift application
      4. Creating and managing a new OpenShift application
        1. Deploying changes
        2. Viewing your application's logfiles
        3. Embedding add-on cartridges
        4. Viewing your application's environment variables
        5. Viewing the details of an application
      5. Deleting an application
      6. Integrating OpenShift with other IDEs
      7. Summary
    12. 5. Creating and Deploying Java EE Applications
      1. The evolution of Java EE
      2. Introducing the sample application
      3. Creating a JBoss EAP application
        1. Adding database support to the application
        2. Importing the MLB stadiums into the database
        3. Adding database support to our Java application
      4. Creating the database access class
        1. Creating the beans.xml file
      5. Creating the domain model
      6. Creating the REST services
        1. Verifying the REST web services
      7. Creating the user interface
        1. Creating the map using Leaflet and OpenStreetMap
          1. Verifying that the map was deployed and is responsive
        2. Getting the stadiums from our REST services
        3. Adding the stadiums to the map
        4. Automatically updating the map
        5. Testing the application
      8. Taking the easy way out
      9. Summary
    13. 6. Creating and Deploying Spring Framework Java Applications
      1. An overview of the Spring Framework
      2. Creating a Spring application
        1. Taking the easy way out
        2. Creating a Tomcat gear on OpenShift
        3. Adding the MongoDB NoSQL database to our application
        4. Adding Spring support to the application
        5. Adding a configuration to the application
        6. Adding the domain model to the application
        7. Adding the REST endpoint to the application
      3. Deploying the application
      4. Adding the web frontend
        1. Having fun with the web UI
      5. Summary
    14. 7. Adding a Continuous Integration Environment to Applications
      1. What is continuous integration?
      2. Adding support for a Jenkins server
        1. Verifying that the Jenkins server is up and running
      3. Embedding Jenkins into an existing application
      4. Using the Jenkins web console
      5. Building code with Jenkins
        1. Troubleshooting the build
      6. Manually triggering a build
      7. Summary
    15. 8. Using OpenShift for Team Development
      1. Setting up multiple domains
        1. Adding a new domain with the command line
        2. Adding a new domain with the web console
      2. Adding members to a domain
        1. Managing members with the command line
          1. Modifying a member's role in a domain
          2. Deleting a member from a domain
        2. Managing members with the web console
          1. Modifying a member's role and deleting a member
      3. Promoting code between environments
        1. Promoting the code
      4. Adding access using SSH keys
      5. Summary
    16. 9. Using the OpenShift Web Console
      1. Creating applications
        1. Using instant applications
        2. Modifying the source code
      2. Managing applications
        1. Adding cartridges
        2. Restarting an application
        3. Adding a custom domain name and SSL certificate
        4. Creating a URL for application cloning
        5. Deleting an application
      3. Summary
    17. 10. Debugging Applications
      1. Using port forwarding
        1. Connecting to MongoDB
      2. Using Eclipse for Java debugging
      3. Using IntelliJ for Java debugging
      4. Using logfiles for debugging
      5. Summary
    18. 11. Using the Marker and Action Hook System
      1. An overview of the marker system
        1. The hot_deploy marker
        2. JBoss-specific markers
      2. Creating and using markers
        1. Using the hot_deploy marker
        2. Using the force_clean_build marker
      3. An overview of the action hook system
      4. Creating and using action hooks
        1. Creating the deploy action hook
        2. Testing the deploy action hook
      5. Summary
    19. 12. Scaling Applications
      1. Why scaling matters
      2. Vertical and horizontal scaling
      3. Using automatic scaling
        1. Creating a scaled application with the command line
        2. Creating a scaled application with the web console
      4. Using manual scaling
      5. Setting scaling limits
      6. Viewing the load-balancer information
      7. Customizing the scaling algorithm
      8. Summary
    20. 13. Using the Do-It-Yourself Cartridge
      1. Understanding the DIY cartridge
      2. Creating an application with the DIY cartridge
      3. Stopping the default web server
      4. Creating a Tomcat 8 server
      5. Summary
    21. A. The RHC Command-line Reference
      1. Top-level commands
        1. Getting started
        2. Working with applications
        3. Management commands
    22. B. Getting Involved with the Open Source Project
      1. Contributing to the project
    23. Index

Product Information

  • Title: Learning OpenShift
  • Author(s):
  • Release date: October 2014
  • Publisher(s): Packt Publishing
  • ISBN: 9781783980963