Planet Planet

I started using Planet in about 2008 2006, it would seem? I rapidly came too “Planet Venus” and this article was written during that time,  and was copied from the snipsnap wiki, itself copied from my sun blog. This article focuses on installation and administration. It includes links to my scripts.

Links

Here’s the documentation

  1. Venus Documentation

To which I add,

  1. http://wiki.davelevy.info/planet-venus-themes/

Enhancing Planet with plugins

I posted an article at my/sun oracle blog which detailed the architecture of Planet Venus.

planetdfd-550w

 

The script planet.py runs two other python programs called spider and splice.

Spider gets the feeds defined in config.ini and creates a local cache version, splice, reads the cache and generates the new formats from templates. The diagram does not illustrate the template source files for the output formats and I shall probably need to dig further into the code in order to understand what needs to be done.

What I’ve done.

I originally installed Planet on a Cobalt Qube and moved to a Virtual Box version of Ubuntu 8. I copied the files to a web server. In 2010 I booted up an Amazon EC2 server and decided to install Venus, a derived product on that machine. I developed a personal ‘mingle’ which is hosted on my 1and1 hsting server. (I had to install xslt from a tarball to do this.)

Installing Planet

Pre-requisites

You need Python, V2.2 or better.

There are several ways to install the package, but git is now recommended.

On Ubuntu

$ apt-get install git

For Ubuntu you need and may thus need to install python-librdf, libxml2 & xsltproc. The need can be assessed by using run_tests.py. The packages can be installed using apt-get . librdf is optional see FOAF below.

$ apt-get install [python-librdf|libxml2|xsltproc]

and then, I use

$ VENUS_HOME=<absolute home directory reference>
$ git --git-dir=${VENUS_HOME}/.git pull

as the code to pull the updates. Any comments on this appreciated, I have not yet finished testing this code. I run it twice/month. DFL 15 Feb 2011.

On 1and1

I needed to install planet venus on 1and1, so I used git clone to download the code.

$ git clone https://github.com/rubys/venus.git

I downloaded my tools, and amended functions to define a new BASEDIR. I do not have root access on this machine. runtests.py stated that libxml2 and xslt are both missing so I installed them from source.

I used git clone to download them from

  • http://git.gnome.org/browse/libxml2/
  • http://git.gnome.org/browse/libxslt/

and then mucked around with the automake tools to compile them. It’s good that we have access to the automake and gcc toolset. I ran aclocal, autoheader, autoconf and ./autogen.sh to create a ./configure. I ran ./configure with a –prefix parameter set to a directory in my file space.  I found

  • http://en.wikipedia.org/wiki/Autoconf, very useful, the Automake flow chart, in particular was pretty useful.

The errors that occurred as I guessed what was needed didn’t take too long to understand, it seems that all three auto* tools are needed to create a configure script, and then I need to set the local parameters.

On Centos,

I have had problems installing Venus on Centos 5.3, and have written up my adventures on my Centos 5.3 page.

Creating a personal internet spore aka mingle

The original ambition was to create a personal spore, and I, in 2008/2009, created a mingle/planet on my home desktop and an Ubuntu desktop image on my works laptop. The mingle look and feel is good so I shall persevere. It is now available online at http://davelevy.info/mingle. Mingle is installed using patch 🙁

ooOOOoo

Managing Venus

I have finally written some shell scripts to help me manage multiple planets on a single UNIX image. These have been tested and deployed on Ubuntu 9 images, and more recent versons.

My management scripts are available here…

Now V1.2, untar and gunzip the archive into the directory in which planet.py is located. Edit the functions file so that BASEDIR is the directory in which planet.py is located. (Probably needs a bit more testing).

run_planet.sh runs planet once. It takes a either a URL, which must point to a config file, or a directory name, which must contain a valid config file called config.ini. It tests if the argument starts with \http:// and assumes that if it does, that it is a valid URL, which means that the program will fail if the token is not a valid URL and/or if the URL is not a valid config file. If the directory is called mingle, then it assumes the config file is called mingle.ini. It also has a -\-help option, and -\-version option. Its currently V2.1, licensed as CC BY-SA. It is ksh script. It calls ./functions to establish several functions. It also cycles log files. There must be a directory called ./Logs, this must contain a file called ${directory_name}.i, which contains the next unused number for the log name. The logs have the name format ./Logs/${directoryname}.log.n, where n is a number. The program performs some validation on the $1 to ensure that its environment is sound.

run_allplanets, invokes a function listplanets, which browses ./Logs/*.i to get the names of the planets and then runs them. /bin/sh

makelogctrzero, does what it says, it zeroises the contents of its .i file. It takes the directory name parameter. It has no help messages or other parameters. It has a none zero exit code if it can’t find the file. /bin/sh

tidy_planetlogs.sh is a ksh, and deletes log files over a certain age. Currently two days I think. This is an environment variable declared by the program. It is one of the reasons that I might implement a config file. There are no arguments to this program.

getremoteconfig.sh, is used when a web config file is specified. It is called by run_planet.sh. It takes a URL which __must__ be a valid planet config file, or the flags –list, –tidy, –version. –list lists the workfiles, –tidy deletes them. It does not  have a help parameter. I needed to write this because planet.py will not take a URL as an argument. It gets lost somewhere in ConfigParser which is distributed with Python and designed to solve the very problem I so often have when building shell suites. (It’d be good to fix this at the python level.)

stringisurl tests if the first argument starts with http://. This is implemented as a function in functions file and is where run_planet.sh invokes
the code lines. This is thus just a demo program.

makenewplanet creates a directory, and a log control file. It is /bin/sh, and calls makelogctrzero. It can use a current directory as a model and therefore copy the template and configuration files. It will delete the directory and log control file. It doesn’t create an output directory. It has a help and version flag.

removeplanet calls makenewplanet with a -d flag.

run_allplanets & tidy_planetlogs.sh can be placed in a cron job.

ooOOOoo

Extending Configuration management

Originally a blog article, I have been improving my shell scripts I use to manage Planet.  My first goal was to enable the use of a config file on the web. This will help when implementing a planet on a cloud platform, but I got quite excited when I discovered Python’s ConfigParser. I have been holding off creating a config file for these programs because writing an interpreter is a pain. I wonder how easy to use it would be. I didn’t use it today because I didn’t have my Python book with me and I don’t know Python well enough to have worked it through. Anyway I now have a program to run the planet, manage the logs, support several planets on one system and can acquire a config file over http. I shall finish the public documentation and upload the scripts tomorrow.  16 Dec 2009

Related Posts

  • Planet, mingle & wordpress While developing the new web site, I had a look at how my mingle was organised. The […]
  • Ubuntu 13.10 I am installing this on the Mac under Virtual Box. This snip is about Ubuntu. The […]
  • System V init scripts I really like Ubuntu's system V initialisation scripts and features. This is now based […]
  • Snipsnap and the ‘html’ macro One of the add on features contributed  by the community to the snipsnap project was an […]
  • RCS Revision Control System, one of the grand daddies of them all. I still use it because […]

7 thoughts on “Planet Planet

  1. When I first tried to install Venus on my Cobalt Qube, I wrote the following on this page, I amended the text when I migrated to wordpress and I removed it from the main article today.

    I have installed Venus on my Qube and it fails the install tests. I tried it on an Ubuntu 8 Virtual Box, and it failed the install tests. The first missing component is Redland RDF, which seems to be used in creating the OPML files. The install instructions are at http://librdf.org/bindings/INSTALL.html. I doubt they’ll install on the Qube.

    I removed this from the page today, and inserted the apt-get package names for bzr and the redland packages. I also cross referenced the page to the Centos 5.3 page which should also discuss the failure to install the Redland packages, I can’t find the yum command or package. 17 Dec 2009

  2. I moved this text to comments, it’s very old, and of limited relevance to me today.

    I noted that the Qube’s build was old and unstable and I used a very old version of Planet. I had acquired this by email from a friend who had Planet working on a Qube. Neither of us got the BSD database to work. Also the feed parser struggled with plazes and I have a problem acquiring the twitter feed on the qube.

    I also noted that I adopted “Planet Venus” in the mistaken hope it’d run better on the Qube; Venus doesn’t need the Berkley DB, however, there remained other problems all of them related to the age of the Linux build and the closed nature of the defunct package manager, BlueLinq. It didn’t help, and so there is at least one silver lining in losing the Qube.

    I have some comments about the use of bzr, which Sam Ruby used to distribute Venus for a while, when I returned to it at the end of 2010, he had moved to git. Some bzr comments may/will be retired. 16 Feb 2010

  3. I removed the following lines from main article.

    Redland RDF is a package in the Ubuntu repositories, and can be installed using Synaptic as well as the command line. The RDF package is used to create the FOAF implementation of the OPML files. If you don’t want that, you don’t need it.

  4. I have deleted the comments about the state of the mingle implementation in 2009, the use of friend feed, plazes and Second Brain. I have also deleted comments about my planet G3 which was a format converter for the Gibberlings 3 feeds as the substantive contnt was held in the article on Planet (Venus) Themes (CSS).

  5. It seems I started with Planet in 2006, as I documented my first running planet in my sun/oracle blog in an article entitled, my personal planet. I don’t think the content remains relevant and so I have not brought it forward to either the blog or the wiki,

Leave a Reply

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