Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Creating and deploying Flask web applications using Python and PostgreSQL cartridges


In this recipe, you will develop a simple job portal application using the Python Flask web framework (http://flask.pocoo.org/) and the PostgreSQL database. I have chosen Flask because it is a very easy-to-use and popular web framework. You can run any web framework, such as Django, Bottle, Zope, and Tornado, on OpenShift. The example application will allow users to post job openings and view a list of all the persisted jobs in the system. These two functionalities will be exposed using the two REST endpoints. The source code for this recipe is available on GitHub at https://github.com/OpenShift-Cookbook/chapter8-jobstore-simple.

Getting ready

This recipe is based on the assumption that you have read previous recipes in this chapter. To walk through this recipe, you will need the rhc command-line client installed on your machine. Please refer to the Installing the OpenShift rhc command-line client recipe in...