What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Jul 03, 2007 by rcarmo
Labels: Featured
HOWTO  
Quick Setup Guide

Introduction

Okay, so you want to know how to go about running Yaki, right?

Here's what you'll need:

Checking Out The Code

For now, there are no nice tar or zip files of Yaki. You'll need to get it from Google Code, which means following these instructions.

The File Tree

You'll find that Yaki lives inside a complete Snakelets installation, which has the following layout (some files and folders are omitted for clarity):

yaki --+-- serv.py (the start script)
       |
       +-- monitor.py (the process monitor, which you can run from cron to restart Snakelets automatically)
       |
       +-- docs (Snakelets original docs)
       |
       +-- logs (HTTP and app server log files)
       |
       +-- snakeserver (Snakelets itself, containing a few other directories)
       |
       +-- userlibs (where some Yaki dependencies are kept, shared across all Snakelets applications)
       |
       +-- webapps.disabled (some - disabled - sample Snakelets applications I included as reference)
       |
       +== webapps ==+== ROOT ==+== __init__.py (the main Yaki configuration file)
                                |
                                +-- plugins (Wiki plugins, basically Python classes that manage markup)
                                |
                                +-- space (the default path for page content, which you can - and should - change)
                                |
                                +-- web --+-- (static files and some dynamic helpers)
                                |         |
                                |         +-- themes (page templates and related stuff)
                                |
                                +== yaki (Yaki itself, which is where all the action is)

Getting It Going

Just type python serv.py and Snakelets will start running. You'll see some diagnostic output (which is also available in the logs folder), and you can go straight to http://127.0.0.1:9080 to have a look at it.

Since it includes a few sample blog entries and all known documentation about itself, you can get a feel for what it can do right away.

Adding Your Own Content

Have a look into __init__.py and locate the configItems hash. The store attribute tells Yaki where to look for content, and you can change it to point to your own file tree.

Note: you'll need to copy the space/meta folder to your own file tree, since it contains some "meta pages" that Yaki requires to work, such as the default EmptyPage

Changing Themes

For now, changing themes means doing three things:

This will change at a latter date (especially if I end up extending Yaki to do virtual hosting)

Keeping It Going

If you want to keep Yaki running for an extended period of time, I recommend using monitor.py, which can be added to your crontab to check if Snakelets is running and restart it automatically.

Recommended Setup

I personally recommend editing serv.py to bind Yaki to run solely on localhost (i.e., changing the bindname to read '127.0.0.1') and setting up lighttpd as a reverse proxy for it. lighttpd will do HTTP/1.1 and keepalives to remote browsers, improving response times significantly.

Multiple Instances

Right now, there is nothing to prevent people from running multiple instances of Yaki on different ports (by editing HTTPD_PORT in serv.py) - since the Yaki+Snakelets combination has a very small memory footprint, it's entirely feasible, and you can use lighttpd to glue it all together on different path names or virtual hosts.

However, there is some demand for using Yaki as a hosting platform (with completely different content and theme paths, but sharing the same Python process), so I'll be looking into making Yaki virtual host-aware.


Comment by Myles.Braithwaite, Jul 17, 2007

Just a quick trick I add the svn:external my space folder meta like so:

$ svn propedit svn:externals space meta http://yaki.googlecode.com/svn/trunk/yaki/webapps/ROOT/space/meta


Sign in to add a comment