• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Installing Python Application in OpenShift PaaS

By Abhishek Ghosh April 21, 2013 7:02 am Updated on August 30, 2014

Installing Python Application in OpenShift PaaS

Advertisement

Installing Python Application in OpenShift PaaS needs some modification and custom commands as you might not able to run. Here are some tips for Python. Basically Python is a high-level programming language, usages can be quite complex scientific usage and OpenShift is a great platform to test whether a Python App is running rightly or not.

 

Installing Python Application in OpenShift PaaS : Basic Needs

 

For Installing Python App, at minimum you will need :

 

  • Some experience with Python in ‘normal’ situation
  • The OpenShift Command Line Tool
  • A new App instance created in OpenShift
  • OS X Terminal or iTerm2 (I prefer), Terminal in Linux or PuTTY in Windows (Read the Guide for PuTTY)

 

Steps For Installing Python Application in OpenShift PaaS

 

First, you can create an Python instance either from command line or from the web Interface.  Python 2.7 is official, Python 3.3 is community edition. After creating the instance, first SSH to to OpenShift’s that instance , for example :

Advertisement

---

 

Vim
1
ssh 51737db8500446f9b9000020@pn-abhishekghosh.rhcloud.com

 

number, namespace ( on-abhishekghosh) are variables, you will get the url from web interface. Change Directory to temporary folder (copy-paste / type exactly) :

 

Vim
1
cd $OPENSHIFT_TMP_DIR

 

For example, I want to deploy this instance from github :

 

Vim
1
https://github.com/AbhishekGhosh/Neural-Genetic-Algorithm

 

Obviously, I can either clone the git or wget the zip file or add the remote git as source from web interface. wget is less complex. The application is actually not made for extra changes neded for OpenShift. We are taking that you have used web interface to install Python as cartridge.

 

You can run which python command to check whether Python rightly got installed. In the temporary dir (we have changed directory before) :

 

Vim
1
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz

 

Untar it :

 

Vim
1
tar zxf setuptools-0.6c11.tar.gz

 

Remove the compressed file :

 

Vim
1
rm -r setuptools-0.6c11.tar.gz

 

Go to the folder :

 

Vim
1
cd setuptools-0.6c11

 

Installing Python Application in OpenShift PaaS

 

When you will run :

 

Vim
1
/bin/python setup.py install

 

It is the uncanny official method. It will actually point you towards system default Python directory. The version will be different and will ask for root access. You might expect an easy installation. But it will never happen. For this reason there are few ways :

 

Your App root is here :

 

Vim
1
/var/lib/openshift/51737db8500446f9b9000020/app-root/

 

Except the digit (

Vim
1
51737db8500446f9b9000020

) part, others are constant. Instead install the modules from the build action hook :

 

Vim
1
2
3
4
5
6
7
# .openshift/action_hooks/build
  # # example # #
#!/bin/bash
MESSAGES_PATH=$HOME/python-2.6/virtenv/lib/python2.6/site-packages/django-messages-patch-src
git clone git://github.com/jpardobl/django-messages-patched.git $MESSAGES_PATH
ln -s $MESSAGES_PATH/django_messages
$HOME/python-2.6/virtenv/lib/python2.6/site-packages/messages

Tagged With install python openshift , paas with python , steps to put python project on openshift
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Installing Python Application in OpenShift PaaS

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • OpenShift OctoPress Auto install Script

    OpenShift OctoPress Auto install Script is an Advanced Script to Run OctoPress on Free OpenShift PaaS Practically Without Any Knowing Ruby or Git.

  • OpenShift PaaS Less Used Features : Update Yourself

    There are many OpenShift PaaS Changes which demands to understand how you should upgrade your machine to use our huge guides on OpenShift PaaS.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy