Giter Site home page Giter Site logo

openshift-community-cartridge-python-2.7's Introduction

OpenShift Community Python 2.7 Cartridge

This git repository is a community supported cartridge to help you get started with using Python 2.7.3 on Red Hat's OpenShift PaaS.

Steps to create a Python 2.7 app on OpenShift

Create an account at http://openshift.redhat.com/

Create a namespace, if you haven't already do so

rhc domain create -n <yournamespace>

Create a python-2.7 application (you can name it anything via -a)

rhc app create pecanpie python-2.7

Template Sample Application Caveats

The default template application is optimized for app creation times/speed and so will run a simple WSGI HTTP server on app creation. For more details, see: http://docs.python.org/2/library/wsgiref.html#module-wsgiref.simple_server

And on a first git push (without any code/setup modifications), the app template's setup.py will install greenlet and gevent and run the app with a fast WSGI server based on libevent-http (from gevent). For more details, see: http://www.gevent.org/

ssh/virtualenv Caveats

When you ssh into your app/gear, you will need to source in a script to setup the library paths and activate the virtualenv python 2.7 is installed under.

ssh  $guid@$app-$ns.rhcloud.com
rhcsh> source python-2.7/activate_virtenv

.
.
... And last but not least, enjoy your flight ... http://xkcd.com/353/

openshift-community-cartridge-python-2.7's People

Contributors

ramr avatar

Watchers

 avatar  avatar  avatar

openshift-community-cartridge-python-2.7's Issues

source $OPENSHIFT_HOMEDIR/python-2.7/virtenv/bin/activate not working

Hello, when I try to run:

 source $OPENSHIFT_HOMEDIR/python-2.7/virtenv/bin/activate

and then :

 (virtenv)[....rhcloud.com id]\> python
 python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

but with source python-2.7/activate_virtenv it works fine.

 [,,,.rhcloud.com id]\> source python-2.7/activate_virtenv
  (virtenv)...rhcloud.com id]\> python
  Python 2.7.3 (default, Jan 24 2013, 18:25:57) 

I have created this project yesterday.

Unable to serve static files

I've been trying to get a Django 1.5 installation working on OpenShift and have issues with the python 2.7 community cartridge as it doesn't seem to want to host the static files in wsgi/static which works in the python 2.6 cartridge.

The example django project is DjangoShift

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.