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.
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.