Now that we have a clear understanding of what the application that we are going to build, we can directly start our code. I am going to use bio as the project name of our application. If you haven't create it, you can follow the first series of the article here. From inside bio folder you will find several files and folders. For starter, lets open the file setup.py and inspect its contents :
from setuptools import setup setup(name='YourAppName', version='1.0', description='OpenShift App', author='Your Name', firstname.lastname@example.org', url='http://www.python.org/sigs/distutils-sig/', # install_requires=['Django>=1.3'], )
If you followed this article series until now, I can safely assumed that you have already registered to Openshift and able to use RHC client tool to create a Python application there. If not, you may want to follow the first article here. In Part II of series of this article, I would like to create a solid ground understanding of what the application we built like.
Let's connect your local environment to the Openshift's cloud
After freely registering yourself to the Openshift cloud and before starting to develop your application, the next logical step is to install Openshift RHC Client Tools. This will making your life easier in creating, managing and monitoring your application in Openshift by using just a single command line action. Of course you can do it using Openshift Web Console, but a concise command line operation is actually all that you need.
If you already familiar enough with web application, I bet you know that finding a cheap (yes, cheap must come first) and reliable (then come reliability) hosting service for your PHP application is very easy. It is because PHP, or to be exact LAMP stack (Linux+Apache MySQL+PHP) is the most popular technology stack in developing web application. An annual charge for a LAMP stack is very affordable. But the same is not applied if you try to build your web application with technology stack other than LAMP, such as Ruby, Java or Python. A traditional approach to host a web application other than PHP is to have yourself a VPS account from an internet hosting provider such as DigitalOcean, which often they don't come with a free plan. In my experience, a free plan is important, as it allows you to get test your application on the internet for free. And having a VPS will require you to manage and install all your application related library, framework and application by yourself.
Copyright(c) 2014 - PythonBlogs.com
All rights reserved