Running a Blog on Google Appengine

Last week, I talked about setting up a dynamic personal web page on Google AppEngine. I mentioned that it would be possible to grow and expand your page beyond the simplistic informational page I have shown you. More specifically, I mentioned running blogs and forums out of it. I already described how to set up a AppEngine based forum so there is no need to reiterate that here. Today I wanted to talk about running your own blog on top of the service.

No, I don’t expect you to write your own blog software, just like you didn’t have to write the forum software. Believe it or not, but blogging engines are being ported to or designed this platform. One of such engines is Bloog written and maintained by Bill Katz. As far as I can tell, it is one of the first Blog software that runs on AppEngine but there will be more to come – I’m sure of it.

Bloog may not be the most sophisticated blogging platform, or the most configurable one – it’s not WordPress. But it is fully functional and it has everything you may need for day to day blogging. It supports reader comments, tagging, has a dynamic contact form, dynamic archives by year, it automatically generates an Atom feed and the template is pre-configured to allow you including vertical add banners in the sidebar. No bells and whistles mind you, but solid functionality.

Bloog is on GitHub and you probably are best off pulling the source code from there. If you are a bit old fashioned like me, and you haven’t caught the git bug yet, the GitHub has a wonderful feature that will allow you to download all of the source code from the repository with a single mouse click as either a zip file or a tarball. Unfortunately if you do that, you will get an incomplete version of the code.

I haven’t really used git, so maybe someone with more experience can verify if what I’m saying is correct. From what I’ve seen, if you are using git, you can set up something akin to symlinks that point to other projects on GitHub. When you check the code out, git will notice the dependency, and follow the link to download the latest and greatest code for it from it’s own repository and put it in the correct directory in your project. This is very neat, but unfortunately it breaks down when you use the “download code as a tarball” feature. The “foreign” code is not fetched, so you end up with empty directories where it was supposed to be.

Bloog depends on Firepython which should be in the utils/external/firepython/ directory. But it’s not and you will probably spend few minutes scratching your head to figure it out. Fortunately I stumbled upon this discussion to help me out.

Essentially, what you have to do, is to grab Firepython a tarball, and extract it into utils/external/firepython/ in your Bloog directory. After you do that, you are ready to go. Here is how my Bloog turned out:

There administration UI is vestigial, so to change things such as the blog title, author and the sidebar links you need to manually edit config.py in the root directory of your project. It’s actually very straightforward – just a long associative list. There is nothing to it, and even someone with no knowledge of Python should be able to do it.

The sidebar banner (I changed it to that liquid drip thing just to show you it’s possible) is defined in a static HTML file located in \views\default\bloog\ads.html. Just delete whatever was there and insert your own personalized vertical banner or add block.

Once you do that, you can just deploy it to Google AppEngine and enjoy your own little blog. That’s really all there is to it. They could make it easier to install, but really the Firepython thing is my fault. If I used git, it would probably never happen.

There you go – yet another awesome thing you can do with Google Apps. You can blog on it, run discussion forums, create personal pages – possibilities are endless. When it first came out, a lot of people discarded it as a mere toy but it’s not. It is a glimpse of what cloud computing can do for you these days! It is a glimpse of how a lot of hosting might be done in the future.

Of course, standard disclaimers apply – you are hosting your shit on Google’s cloud for free which means you don’t really own it. And since it’s google, it will probably harvest your blog for data which it will use maliciously in it’s quest o achieve sentience. So you have to factor that into the equation when you are deciding whether or not you want to use this service.

Arguably, in this day and age there are dozens of free blogging platforms out there. Most of them will let you use your own domain name too. So running a blog on AppEngine is probably not the most efficient way to go about blogging. Bu it is kindoff awesome – and you can hack python code and you are not afraid to get your hands dirty you do get much more control over how your blog looks and what it does than with one of these free services.

I wouldn’t probably recommend running your “mission critical” blog on this platform. But for AppEngine enthusiasts like me, Bloog is yet another fun app to mess around with.

This entry was posted in programming and tagged , . Bookmark the permalink.



11 Responses to Running a Blog on Google Appengine

  1. Mart SINGAPORE Mozilla Firefox Windows Terminalist says:

    Your posts on Google App Engine inspired me to check it out. But I have to learn python now! :|

    Do you use a nice IDE for your python hacks? Or are you using Notepad++ to do every single thing that is just basically text (aka. my current way :P)?

    Reply  |  Quote
  2. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    @Mart: Well, I’ve been using Vim for most of the Python stuff lately. So yeah – text editor type thing.

    If you do want a lightweight IDE Komodo Edit is pretty decent – it does have good Python support and an OK Vim key bindings (it’s missing a lot of advanced Vim features though).

    Reply  |  Quote
  3. Pingback: Terminally Incoherent » Blog Archive » What is your favorite code editor? UNITED STATES WordPress

  4. David Nelson UNITED STATES Google Chrome Windows says:

    I recently forked an existing google app engine / python / django blog and added new features and fixed bugs. It’s pretty nice and has lots of social media plugins ready to go. There is still much to do and I have high aspirations for it. Take a look:

    App Engine Blog

    Reply  |  Quote
  5. Jeff Zhang CHINA Mozilla Firefox Windows says:

    Hi, I encounter a problem when use the bloog. Do you have any ideas ?
    Here’s the error message:
    Traceback (most recent call last):
    File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\__init__.py"  , line 507, in __call__
    handler.get(*groups)
    File "D:\GAE\bloog\handlers\bloog\blog.py", line 371, in get
    filter('article_type =', 'blog entry').order('-published'))
    File "D:\GAE\bloog\view.py", line 246, in render_query
    self.render(handler, render_params)
    File "D:\GAE\bloog\view.py", line 224, in render
    output = self.render_or_get_cache(handler, template_info, params)
    File "D:\GAE\bloog\view.py", line 211, in render_or_get_cache
    output = self.full_render(handler, template_info, template_params)
    File "D:\GAE\bloog\view.py", line 172, in full_render
    tags = Tag.list()
    File "D:\GAE\bloog\models\__init__.py", line 181, in list
    list_repr = '[' + ','.join([obj._to_repr() for obj in objs]) + ']'
    File "D:\GAE\bloog\models\__init__.py", line 152, in _to_repr
    self._to_entity))
    File "D:\GAE\bloog\models\__init__.py", line 58, in to_dict
    init_dict_func(values)
    File "C:\Program Files\Google\google_appengine\google\appengine\ext\db\__init__.py", line 765, in _to_entity
    entity.set_unindexed_properties(self._unindexed_properties)
    AttributeError: 'dict' object has no attribute 'set_unindexed_properties'

    Reply  |  Quote
  6. Scott P UNITED STATES Mozilla Firefox Windows says:

    For those just getting started with the app engine in Windows, the tutorial Google has up has a few flaws. I’ve documented a couple of them and posted some workarounds here.

    Reply  |  Quote
  7. Utku Utkan TURKEY Google Chrome Linux says:

    For those who are looking for a blogging engine running on Google App Engine, you can check out Hoydaa Blog. It is still in beta, but I think it is worth considering. BTW, here is my blog using it http://utku-utkan.appspot.com.

    Reply  |  Quote
  8. Ara Minosian RUSSIAN FEDERATION Google Chrome Windows says:

    I would like to know how to integrate blog with my web site.

    Reply  |  Quote
  9. GAE developer wanted CANADA Google Chrome Windows says:

    I am looking for a programmer to develop a dating site running on Google Apps Engine. Interested, please contact me at chinesesociopolitics at …………. gmail com

    Reply  |  Quote
  10. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    @ GAE developer wanted:

    Uh, oh! Let me guess:

    * You have a great idea for a website, but no programming skills so you are looking for a sucker who will do *ALL OF THE WORK* while you sit back and “supervise”

    * You can’t offer a salary so you expect the programmer to work for free until some unspecified time in the future when the site becomes profitable

    * The site is totally going to be an overnight hit that will blow match, harmony, okcupid and a million other dating sites out of the water.

    Honestly, here is what I think:

    – dating site market is over saturated so your chances of success are slim
    – no competent programmer will ever work for you for free on this project
    – if you find an idiot who will, good luck – I guarantee his code will be shit

    Now suggestions:

    – learn how to program and do it yourself

    Or at least start it. If you make it an interesting project, people will want to join in. If you sit on your ass and say “fetch me a programmer type person, I shall give him my brilliant idea to develop” people will just laugh at you. Do you know how often we get this kind of offers?

    At least twice a week. No seriously. Every single time I meet someone and tell them what I do they either:

    – ask me to fix their laptop for free
    – make me a business proposition kinda like yours

    So, do it yourself. If you can’t do it yourself, you have to spend money up front. Start a company, hire programmers, offer them salaries and benefits and you have a chance. “I have a great idea for a website” is a joke.

    Also, last time I checked this was a blog and not classified ads or rent-a-coder website. What made you think that it is ok to post a “developer wanted” ad here?

    Do you know what we call unsolicited ads like this? We call them spam. You sir are a filthy, unwashed, spammer.

    So, please kindly go fuck yourself, die in a fire and go to hell. In that precise order.

    Reply  |  Quote
  11. aei_vd BULGARIA Google Chrome Windows says:

    hi, I’m doing evryting like you say (I extract the second archiv in the firepython folder, I try with dicet extraction, with extraction on sub folder but still…), but I become the folowing message:
    Traceback (most recent call last):
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 3245, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 3186, in _Dispatch
    base_env_dict=env_dict)
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 531, in Dispatch
    base_env_dict=base_env_dict)
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 2410, in Dispatch
    self._module_dict)
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 2320, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
    File “C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver.py”  , line 2216, in ExecuteOrImportScript
    exec module_code in script_module.__dict__
    File “D:\google\DocSavage-bloog-346e5fb\main.py”, line 36, in
    from firepython.middleware import FirePythonWSGI
    ImportError: No module named firepython.middleware

    can some one help me please

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>