Showing posts from July, 2012

diazotheme.bootstrap 0.2 released

I have been using diazotheme.bootstrap for a number of community sites for quite a while now. It was originally developed around November last year with Bootstrap 1, and have gone through some updates and enhancements to Bootstrap 2 , but it only remains in its github repository, but never actually released properly. Anyway~ ... after long due, diazotheme.bootstrap 0.2 is now released in PyPi:     Btw, should I fork this into collective github?

Virtual hosting on Grok (or Bluebream) - without a reverse proxy

When I was poking at creating the Grok template for OpenShift , I needed to add virtual hosting for the test application. However, OpenShift's DIY cartridge does not allow me to modify the reverse proxy settings as they are automatically generated by the cartridge. Naturally, I had to find another way. Grok virtual hosting with WSGIRewrite WSGIRewrite is a WSGI middleware which provide a facility for mod_rewrite compatible rewrite rules for WSGI applications. Using this middleware, we can rewrite the URL to force virtual hosting on the application server. Lets go straight to the meat, here is the howto. Howto The first step is of course, to add WSGIRewrite into your buildout. Edit and add 'WSGIRewrite' into the install_requires list, and re-run buildout. Afterward, edit your WSGI INI file, (eg: etc/, and find a section called pipeline:main , and add rewrite as the first item in the pipeline. The section should appear like this now:

Grok framework quickstart template for OpenShift using the DIY cartridge

Another OpenShift goodness for Zope developers. A quickstart template for the Grok framework ! Grok is now deployable easily on ! Check it out here: Grok on OpenShift Unlike the Plone template which is pretty straightforward, the Grok template requires some additional steps to initialize the project. This is mainly due to Grok projects are packaged in python eggs by default, so the package name is quite important. A preconfigured package name would surely cause name clashes. To initialize the project, just run with your project name as the parameter. The script will automatically install grokproject, create your project, move the files around so that it works nicely with OpenShift, and add the necessary files into the git repo. Features Create a grok project using your own custom project name Deploy your application using the environment variables of OpenShift Build process, cachi

Plone on OpenShift quickstart using the DIY cartridge

TLDR; Plone is now deployable easily on . Check out the repository here: . Plone on Yesterday I posted about  deploying Plone using a cartridge in your own private OpenShift Origin VM. Afterwards that day, I had some chat in the #openshift IRC channel and was informed that it is OK to run buildout in , and last night, I converted the scripts and config from the cartridge so that it fits in the workflow of the DIY cartridge. Features/Notes: Deploys Plone 4.2 with Dexterity content types easily and quickly on Downloads are cached in ${OPENSHIFT_TMP_DIR}/${OPENDIR_APP_UUID}-cache. However, as this is not shared, it means all new apps will have to redownload the python eggs. While it might be possible to use a shared download cache for this  (OPENSHIFT_TMP_DIR is apparently /tmp), I am not sure whether the SELinux settings in the serve

Plone cartridge for deployment on OpenShift

I was poking around OpenShift on last weekend to see what it offers, and also to see whether I can deploy Plone on it. TLDR; Plone deploys well on my OpenShift VM. I created a cartridge for it here: . I can now easily add new Plone deployments for my development server with less work. About OpenShift OpenShift is a Platform as a Service (PaaS) software from Red Hat. It can be summarized as a FOSS Heroku -like platform for deploying web applications easily. Support for applications comes in 'cartridges', which basically a set of files and scripts to prepare a self-contained environment for your application deployment. OpenShift includes several official cartridges to deploy popular applications and frameworks such as Drupal, RoR, Django, WSGI, etc. There is also a cartridge called 'DIY' which allows you to import any http daemon and serve it through OpenShift - thus providing a basic way in integrating non-official