Introducing the WebLive API

After working on it for the last two weeks, I’m proud to finally announce the WebLive API.
As a reminder, WebLive is the name used for the daemon, Drupal plugin and scripts used to run http://www.edubuntu.org/weblive
Since last week, all the code is now available here: https://launchpad.net/weblive

The API is exported over JSON and example code is available in the branch called ltsp-cluster-agent-vmmanager in the client directory. When interfacing with python, it’s recommended to use the “weblive.py” module as it’ll be updated should the JSON API change or be extended in the near future.

Exported functions are:

  • create_user(serverid, username, fullname, password, session)
  • list_everything()
  • list_locales(serverid)
  • list_packages(serverid)
  • list_servers()

The following functions are exported over authenticated XML-RPC (for management):

  • delete_user(serverid, username)
  • set_disabled(serverid,status)
  • list_users(serverid,all=False)

The main weblive instance is available at https://weblive.stgraber.org/weblive/json and is the one used by Edubuntu.

The drupal-weblive branch contains the Drupal module which is now just a client to the JSON API.

The first use of that API after the Drupal module is Natty’s software-center which since last week ships with code to connect to WebLive.
If you use up to date Natty, you’ll need to install “qtnx” from universe and then start: software-center –with-weblive

All the packages available in WebLive will then have a “Test drive” button you can click to test that app remotely from a WebLive server.

WebLive integration in software-center

The software-center integration is experimental and will hopefully be improved by the time Natty is released. As Ubuntu doesn’t ship qtnx by default, WebLive won’t be visible in the default Ubuntu install, though it’ll be for Edubuntu.

Note: It can take up to a minute to connect to a server. There’s currently no user feedback during the connection process unless you watch the terminal from which you started the software center.

The current code requires your username and hostname to be ascii lowercase alpha characters only. I posted instructions as a comment to get the development branch that doesn’t have this restriction.

About Stéphane Graber

Project leader of Linux Containers, Linux hacker, Ubuntu core developer, conference organizer and speaker.
This entry was posted in Edubuntu, LTSP, Planet Revolution-Linux, Planet Ubuntu, WebLive and tagged . Bookmark the permalink.

12 Responses to Introducing the WebLive API

  1. If you want to test the latest changes for weblive in the software-center, you can try the following:
    – Install “bzr” (sudo apt-get install bzr)
    – bzr get lp:~weblive-dev/software-center/software-center-use-module
    – cd software-center-use-module
    – ./software-center –with-weblive

    This will install bzr, get my development branch of the software-center and start software-center using the new code I just commited.

    It fixes quite a few issues that are present in the software-center currently in Natty. These should get merged quite soon.

  2. Ellipsis says:

    Any plans for this to be enabled in future versions of Ubuntu (not just Edubuntu)?

  3. Well, all that Ubuntu would need to do to get it to work is install the “qtnx” package by default. That’s probably something that can and will be discussed at our next Developer Summit in Budapest.

    Until then we chose to do a smaller scale deployment by just having it by default in Edubuntu and available for all other Ubuntu users who manually install qtnx.
    From that we can gather data on server usage, stability and have something rock stable when we push it to Ubuntu itself.

  4. julien says:

    Hey this is amazing!! I’ve just test it and woow!!

    I am one of the main developper of APODIO http://www.apodio.org distribution for multimedia / art / audio / video and I was wondering how could we use weblive on our server to test apodio online!!! I loooooove it!!

    thx

    julien

    1. Hi!

      I’ll be releasing a guide on how to setup your own WebLive server quite soon (hopefully next week) which should help you do that.

      The basic components you’ll need to achieve this are:
      – ltsp-cluster-agent (source at https://code.launchpad.net/~ltsp-cluster-team/ltsp-cluster/ltsp-cluster-agent)
      – ltsp-cluster-agent-weblive (source at https://code.launchpad.net/~weblive-dev/weblive/ltsp-cluster-agent-weblive)
      – Drupal plugin (source at https://code.launchpad.net/~weblive-dev/weblive/drupal-weblive)
      – A working FreeNX server

      Apparently your distribution is based on Ubuntu, so you should be able to just use the PPAs for the above packages:
      https://launchpad.net/~weblive-dev/+archive/appserv for the application server
      https://launchpad.net/~weblive-dev/+archive/stable for the backend server

      Hope it helps!

  5. Tristan Hils says:

    “I’ll be releasing a guide on how to setup your own WebLive server quite soon (hopefully next week) which should help you do that.”

    Not to nag, but is there any chance you could get that out there??

    Thanks so much!

  6. Vasilica Petcu says:

    Hello,

    Just reading your blog …

    Is there any small how to install weblive on my personal site ? Could you provide some more hints ???

    Thank you,
    Vasilica Petcu

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.