Difference between revisions of "Platform Team/Server Kit/sugar-server"

From Sugar Labs
Jump to navigation Jump to search
Line 13: Line 13:
 
Provide Sugar users registration on a school server. After being registered, Sugar on users side will setup interaction with a school server, such as:
 
Provide Sugar users registration on a school server. After being registered, Sugar on users side will setup interaction with a school server, such as:
  
* jabber sever in {{Code|/desktop/sugar/collaboration/jabber_server}} GConf setting,
+
* Setup jabber sever location,
* backup url in {{Code|/desktop/sugar/backup_url}} GConf setting,
+
* url to backup or restore Journal,
* Package Management System configuration file in {{Code|~/.sugar/''profile''/pms.conf}} to upgrade packages on client side.
+
* update native packages.
  
Later, these settings will be used by [[Sugar_Server_Kit/sugar-client|sugar-client]] to process its regular routines.
+
==== Interface ====
 +
 
 +
Service is listenning {{Code|--id-port}} port on the {{Code|--host}} host to serve XML-RPC requests. There is only one RPC function:
 +
 
 +
''dict'' '''register'''(''str'' serial, ''str'' nickname, ''str'' uuid, ''str'' pubkey)
 +
 
 +
Where {{Code|pubkey}} is a SSH DSS public key without the {{Code|ssh-dss }} prefix.
 +
 
 +
The resulting dictionary on success, contains:
 +
 
 +
* {{Code|success: OK}};
 +
* Several keys that are 1:1 as configuration options of [[Sugar_Server_Kit/sugar-client|sugar-client]] utility. The particular set of keys are details of implementations and processed only internally;
 +
* [http://wiki.laptop.org/go/School_server OLPC XS] backwards compatibility keys that are not being processed by sugar-client: {{Code|backupurl}}, {{Code|jabberserver}}, {{Code|backuppath}}.
 +
 
 +
The resulting dictionary on fails, contains:
 +
 
 +
* {{Code|success: ERR}};
 +
* {{Code|error}} key with error message.
  
 
=== backup ===
 
=== backup ===

Revision as of 18:56, 20 September 2011

Summary

The core Sugar Server Kit component.

The singular program requires only Python, and obvious dependencies like coreutils, to allow all its services to function properly. It provides basic sugar related services, and uses one CLI tool to manage all its functionality.

Services

The list of services that sugar-server provides.

id

Provide Sugar users registration on a school server. After being registered, Sugar on users side will setup interaction with a school server, such as:

  • Setup jabber sever location,
  • url to backup or restore Journal,
  • update native packages.

Interface

Service is listenning --id-port port on the --host host to serve XML-RPC requests. There is only one RPC function:

dict register(str serial, str nickname, str uuid, str pubkey)

Where pubkey is a SSH DSS public key without the ssh-dss prefix.

The resulting dictionary on success, contains:

  • success: OK;
  • Several keys that are 1:1 as configuration options of sugar-client utility. The particular set of keys are details of implementations and processed only internally;
  • OLPC XS backwards compatibility keys that are not being processed by sugar-client: backupurl, jabberserver, backuppath.

The resulting dictionary on fails, contains:

  • success: ERR;
  • error key with error message.

backup

activation

keyring

collector

Collect usage statistics gathered by sugar-client in monitor mode for later analyzing.

Requires

  • bios-crypto
    bios-crypto client utilities are being used in anti-thief support and should be installed only if sign service is being used.
  • python-mysql
    If the rest of school server applications use MySql, it might be useful to keep sugar-server data in MySql as well. Otherwise plain text file will be used.

Configuration

By default, configuration occurs based on several sources (sorted by applied order):

  • /etc/sugar-server.conf system-wide configuration file,
  • ~/.local/sugar-server/config user-wide configuration file,
  • sugar-server's command-line arguments.

Configuration files contain option names equal to command-line arguments. To get the current configuration, call:

sugar-server config

See sugar-server-templates sources for an example.

Getting involved

  • Report on bugs.
  • Read the HACKING file to know how to contribute with code.

Resources