Giter VIP home page Giter VIP logo

hubpy-demo's Introduction

<<<<<<< HEAD hubpy-demo

Demo for the use of python flask targeted for RedHat's OpenShift PaaS platform.

If you do not have the rhc client tools installed, use ruby gem installer

sudo gem install rhc

Setup your user in OpenShift using rhc CLI

rhc setup -l [email protected]

Create the python app

rhc app create todo python-2.7

Copy resultant Git URL:

ssh://[email protected]/~/git/todo.git/

Add the openshift repo to existing repo

git remote add openshift -f ssh://[email protected]/~/git/todo.git/

Merge the openshift repo into the existing repo

git merge openshift/master -s recursive -X ours

Modify the setup.py and application python files to use flask and other components

Add the MongoDB cartridge to the app

rhc cartridge add mongodb-2.2 -a todo

Commit and push your changes to the existing repo

git commit -m "Getting openshift up and running" git push

Push those changes to the openshift repo, which will kickoff a build to openshift

git push openshift master

Navigate to the site page and confirm it runs

http://todoapp-tresbailey.rhcloud.com/static/index.html

Check out your instance via ssh

ssh [email protected]

Watch logs from the application

rhc tail -a todo

Add redis custom cartridge

rhc cartridge add http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart --app todo

Confirm redis values in OpenShift server

export | grep redis

Confirm redis setup using OpenShift status command

rhc cartridge status redis -a todo

Add phantomjs cartridge for headless testing

rhc cartridge add https://raw.github.com/tresbailey/phantomjs-cartridge/master/metadata/manifest.yml -a todo

End of this demo.

Update to the Redis branch

Delete items from the todo list

curl -X DELETE http://todoapp-tresbailey.rhcloud.com/todos

Get the password from the cartridge for redis

rhc cartridge-status redis -a todoapp

Turn on Port-Forwarding for redis cartridge to be hit from localhost

rhc port-forward todoapp

Check the members of the deleted set inside of the openshift redis

redis-cli -p 35546 -a ZTNiMGM0NDI5OGZjMWMxNDlhZmJmNGM4OTk2ZmI5

SMEMBERS deleted

End of second demo

The OpenShift python cartridge documentation can be found at:

https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-python/README.md

84f4642dba2f9e4329457f8543cb97d36545b448

hubpy-demo's People

Contributors

tresbailey avatar

Watchers

James Cloos avatar  avatar

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.