Saturday, August 25, 2012

StatusNet powered by OpenShift

I have done a couple of proof of concept projects using StatusNet as a Twitter-like service in support of conference type applications. 2 weeks ago I had decided to work on deploying StatusNet to OpenShift as a quick and easy public facing server.

Then @JasonBrooks published his work with StatusNet at github, and it seemed like a good time to combine efforts.  Through the power of Social Coding - we now have a quickstart for running StatusNet @Openshift.

Some things I learned in doing this that are worthing noting - 
  • ACTION_HOOKS - Whatever you can imagine in a BASH script is possible for scripting setups.  Different hooks apply for different phases of the Application Life Cycle.  Most of StatusNet was written in the deploy, but 
      • pre_build  
      • build
      • deploy
      • post_deploy
    • https://openshift.redhat.com/community/blogs/a-paas-that-runs-anything-http-getting-started-with-diy-applications-on-openshift 
  • ENV variables and SSH are your friends here when validating your install scripts
    • http://www.stylesen.org/shell_openshift_express_and_environment_variables
  • All content in the OPENSHIFT_REPO_DIR is replaced with each new commit
    • If you need to persist anything (i.e. the StatusNet config.php file), copy it to the OPENSHIFT_DATA_DIR
  • Creating and removing new Applications and adding cartridges is relatively quick, but rapidly adding and removing applications repeatedly seems to cause strange issues with DNS and Mysql servers.
    • This is not unexpected as DNS requests and MYSQL DB slices are asynchronous calls throughout the system, and it will take time for changes to be finalized.
So now its possible to host your own Twitter / Yammer like service on Red Hat's OpenShift PaaS.  All in under 5 minutes.  

Simply follow the instructions here :  https://github.com/jasonbrooks/statusnet-openshift-quickstart


Post a Comment