Atom Publishing Protocol: Setting Up Yanel on Ubuntu
One of my primary reasons for presenting on REST at MinneBar 07 was because I really want to shift over to an Atom Publishing Protocol method for publishing this site (and others as well). I think I'll probably end up implementing my own setup for this, but have been looking to try out a true APP setup (not one grafted onto something like Wordpress).
In that search, I ran across the pairing of a Firefox plugin APP client called Yulup (I mentioned this in a session on Saturday) and a server setup called Yanel. Yanel is a Java solution, which makes me reluctant to use it as my permanent solution. However, as something to work with to get a handle on using APP, it looked like a good fit. It actually has a LOT more than APP going for it.
So, I set it up in an Ubuntu VMWare instance.
Here's the list of default resources you can manipulate in a stock install:
- directory
(Directory) - resource-creator
(Allows to create new resources) - wiki
(Wiki (tested with JSPWiki content)) - atom
(Atom Feed Generator) - pdf
(Pdf Resource) - add-realm
(Add Realm Resource) - testing-control
(Webinterface for controling the testframework) - translation
(Delivers an XML fragment containing links to the translations (aka language versions) of a resource.) - contact-form
(Contact Form for sending email) - atom-entry
(Atom Entry) - yanel-user
(User management interface) - update-webapp
(Check for updates of Yanel webapp) - testing-times
(Generates a graphical overview of the execution times of the various tests) - nutch
(Getting Search results from a Nutch crawl (version 0.8.x)) - show-realms
(show all configured Realms) - xml
(XML whereas an XSLT can be specified and applied) - davcollection
(WebDAV Collection) - odt
(Open Document Text) - navigation
(Navigation XML for building menu etc.) - file
(Generic node resource) - zip
(Zip Collection and generate a zip) - calendar
(Calendar resource based on ICS format)
Setting it up was surprisingly simple, once I worked out what exactly needed to be installed. While it's relatively simple, it *isn't* quick. The install takes a LONG time, so make sure the machine you're using can be left running for a while.
I started with my relatively stock install of Ubuntu. I always use the DVD disc to do an Ubuntu install. It's got the workstation, server, alternate, etc. versions all on one disc. I did a "command-line only" install.
I change the /etc/apt/sources.list file to uncomment all of the lines with "universe" and "multiverse" in them as well as commenting out the CD line (otherwise it prompts for the disc during updates).
I usually do all of this setup as root, which can be made semi-permanent, even on Ubuntu instead of having to do "sudo" in front of every command. Just do a "sudo su".
I run "aptitude update" and "aptitude upgrade all" to patch everything before moving forward. I use "aptitude" instead of "apt-get" because it does a better job of handling dependencies and has better error messages to help you figure out what packages you need.
Anyway, I then installed the following packages:
ssh
sun-java6-plugin
sun-java6-bin
sun-java6-jdk
sun-java6-jre
subversion
After those packages were installed, I checked out the Yanel source code from their SVN repository into a "yanel" directory inside my home directory.
svn co http://svn.wyona.com/repos/public/yanel/trunk yanel
When prompted for the password for "root", just hit enter and then use these credentials to check out:
Username: anonymous
Password: anonymous
The checkout can take a while. When it's done, we need to set up the JAVA_HOME variable. Incidentally, it's this kind of crap that bugs me about Java in general. It's most of the infrastructure stuff for Java that gets in the way before you even see the language. Between pathing issues, JAR/WAR deployment, etc. you can spend days just getting the environment to cooperate.
This time around, there is a fairly quick solution, even if I wonder why exactly the Java package doesn't set one. You can get the path to the Java install that the package did by running:
sudo update-alternatives --config java
On my install, it came back with this path:
/usr/lib/jvm/java-6-sun/jre/
Just an aside. If you install this on an existing install that has more than one JRE, you'll get a list to "choose" from instead of just the one entry. Just hit "Enter" and use the default one. That's what your system is configured to use if you were to just run the "java" command.
Anyway, you want to trim it down to the above line (removing the /bin/java part that the output has in it). What you're after is the "base" directory. Once you've got that path, you set the environment variable, obviously adjusting for your path:
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre/
Once that's done, you can actually run the Yanel wizard. Go into the "yanel" directory wherever you checked it out and run:
./configure.sh
If I recall correctly, I just answered everything with defaults. After that's done, run
./build.sh
which will go through a bunch more downloading and ask you a few questions. Again, just go with the defaults.
When that's finally done, you can start Yanel:
./yanel.sh start
Now, because this is a VMWare virtual machine, I'm not actually going to be on "localhost", so I ran "ifconfig" to get the IP address and went to this URL in my browser:
http://192.168.0.184:8080/yanel/
Obviously, in your case, the IP address will likely change. However, that was "all" it took. It was fairly tedious and slow, but not terribly difficult and now I've got a setup to mess around with.
Let me know if you do anything interesting with it.
