Book description
Over 100 hands-on recipes that will help you create, deploy, manage, and scale OpenShift applications
In Detail
It is important to hit the ground running with the creation and deployment of your OpenShift applications. This book will start by showing you how to create OpenShift applications, use different databases with your applications, and deal with your applications based on your background as a developer. All bases have been covered with very extensive sections on the Java, Python, and Node platforms. Your enlightening quest into OpenShift will conclude with a discussion on how to continuously integrate and deploy your apps using Jenkins, and how OpenShift can help you build horizontally scalable applications.
This comprehensive cookbook will show the trainee OpenShift developer a huge number of recipes, solutions, tips, and tricks to improve their experience and enhance their expertise.
What You Will Learn
- Teach you how to create and deploy your own Java EE and Spring applications using OpenShift
- Help you discover how to host your Node.js applications
- Guide you through developing and deploying Python web applications
- Learn the trade of building horizontally scalable applications with OpenShift
- Show you how to store your periodic database backup to Amazon S3
- Leverage the rhc command-line tool to become efficient with OpenShift
- Learn how to effectively use Jenkins with OpenShift applications
Table of contents
-
OpenShift Cookbook
- Table of Contents
- OpenShift Cookbook
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
-
1. Getting Started with OpenShift
- A brief introduction into OpenShift
- Creating an OpenShift Online account
- Creating OpenShift domains using the web console
- Creating a WordPress application using the web console
- Uploading SSH keys using the web console
- Working with the SSH key passphrases
- Cloning the application to the local machine
- Deploying your first change
- Checking the application's gear quota and limits
- Installing the OpenShift rhc command-line client
- Setting up an OpenShift account using rhc
- Enabling the autocomplete feature in an rhc command-line client
- Viewing the account details using rhc
- Specifying a different OpenShift server hostname
- Updating rhc
-
2. Managing Domains
- Introduction
- Creating a domain using rhc
- Renaming a domain using rhc
- Viewing domain details using rhc
- Adding viewer members to a domain using rhc
- Adding an editor member to a domain using rhc
- Adding an admin member to a domain using rhc
- Viewing all the members in a domain using rhc
- Removing members from a domain using rhc
- Restricting gear sizes for a domain using rhc
- Leaving a domain using rhc
- Deleting a domain using rhc
-
3. Creating and Managing Applications
- Introduction
- Creating an OpenShift application using the rhc command-line client
- Specifying your own template Git repository URL
- Starting/stopping/restarting an application
- Adding and managing add-on cartridges
- Adding a cron cartridge to an application
- Using downloadable cartridges with OpenShift applications
- Viewing application details
- Cloning the application Git repository using rhc
- SSH into the application gear using rhc
- Running a command in the application's SSH session using rhc
- Setting application-specific environment variables
- Taking and restoring application backups
- Tracking and rolling back application deployments
- Configuring the default Git branch for deployment
- Doing manual deployments
- Configuring and doing binary deployments
- Using your own custom domain name
- Cleaning up the application
- Deleting the application
-
4. Using MySQL with OpenShift Applications
- Introduction
- Adding a MySQL cartridge to your application
- Adding a phpMyAdmin cartridge to your application
- Accessing a MySQL database from your local machine
- Connecting to a MySQL cartridge from your local machine using MySQL Workbench
- Updating the MySQL max connections setting
- Updating the MySQL configuration settings
- Performing scheduled MySQL database backups
- Using an Amazon RDS MySQL DB instance with OpenShift
-
5. Using PostgreSQL with OpenShift Applications
- Introduction
- Adding the PostgreSQL cartridge to your application
- Accessing the PostgreSQL cartridge from your local machine
- Connecting to the PostgreSQL cartridge using pgAdmin from your local machine
- Updating the PostgreSQL max_connections setting
- Using the .psqlrc configuration file to configure the OpenShift application psql shell
- Performing scheduled PostgreSQL database backups
- Using EnterpriseDB PostgreSQL Cloud Database with OpenShift
- Installing PostgreSQL extensions
-
6. Using MongoDB and Third-party Database Cartridges with OpenShift Applications
- Introduction
- Adding a MongoDB cartridge to your application
- Adding a RockMongo cartridge to your application
- Accessing a MongoDB cartridge from your local machine
- Connecting to a MongoDB cartridge using Robomongo from your local machine
- Enabling the MongoDB cartridge REST interface
- Performing scheduled MongoDB database backups
- Using MongoLab MongoDB-as-a-Service with OpenShift
- Adding a MariaDB cartridge to your application
- Adding a Redis cartridge to your application
-
7. OpenShift for Java Developers
- Introduction
- Creating and deploying Java EE 6 applications using the JBoss EAP and PostgreSQL 9.2 cartridges
- Configuring application security by defining the database login module in standalone.xml
- Installing modules with JBoss cartridges
- Managing JBoss cartridges using the management web interface and CLI
- Creating and deploying Spring applications using the Tomcat 7 cartridge
- Taking thread dumps of Java cartridges
- Choosing between Java 6 and Java 7
- Enabling hot deployment for Java applications
- Skipping the Maven build
- Forcing a clean Maven build
- Overriding the default Maven build command
- Installing the JAR file not present in the Maven central repository
- Developing OpenShift Java applications using Eclipse
- Using Eclipse System Explorer to SSH into the application gear
- Debugging Java applications in the Cloud
-
8. OpenShift for Python Developers
- Introduction
- Creating your first Python application
- Managing Python application dependencies
- Creating and deploying Flask web applications using Python and PostgreSQL cartridges
- Enabling hot deployment for Python applications
- Forcing a clean Python virtual environment
- Accessing an application's Python virtual environment
- Using Gevent with Python applications
- Installing a custom Python package
- Using the .htaccess file to configure Apache
-
9. OpenShift for Node.js Developers
- Introduction
- Creating your first Node.js application
- Configuring Node supervisor options
- Managing Node.js application dependencies
- Using the use_npm marker
- Enabling hot deployment for Node.js applications
- Creating and deploying Express web applications using Node.js and MongoDB cartridges
- Working with Web Sockets
- Using CoffeeScript with OpenShift Node.js applications
- 10. Continuous Integration for OpenShift Applications
-
11. Logging and Scaling Your OpenShift Applications
- Introduction
- Viewing application logs
- Working with JBoss application logs
- Enabling JBoss access logs
- Working with Tomcat application logs
- Working with Python application logs
- Creating scalable applications
- Configuring a different health check URL for HAProxy
- Configuring HAProxy to use a different balance algorithm
- Creating scalable apps from nonscalable apps
- Enabling manual scaling with marker files
- A. Running OpenShift on a Virtual Machine
- Index
Product information
- Title: OpenShift Cookbook
- Author(s):
- Release date: October 2014
- Publisher(s): Packt Publishing
- ISBN: 9781783981205
You might also like
book
Kubernetes - A Complete DevOps Cookbook
Leverage Kubernetes and container architecture to successfully run production-ready workloads Key Features Implement Kubernetes to orchestrate …
book
OpenShift in Action
OpenShift in Action is a full reference to Red Hat OpenShift that breaks down this robust …
book
Kubernetes Cookbook
Kubernetes is becoming the de-facto standard for container orchestration and distributed applications management across a microservices …
book
Learn OpenShift
Gain hands-on experience of installing OpenShift Origin 3.9 in a production configuration and managing applications using …