Deployment Platform/Sneakernet

Summary

This page is intended to describe the process of offline synchronization between Sugar Network servers. The synchronization process means making data changes, happened on servers, common for all of them.

Recipes

A list of scenarios to follow in the field.

Clone Master

On a box with Internet available, plug Synchronization media. Its mount point will be referred as MOUNTPOINT in text below.

If sugar-network package is installed, run the following command:

sugar-network-sync MOUNTPOINT http://api-testing.network.sugarlabs.org/

Otherwise,

  • place fetched data to MOUNTPOINT with to a file with .packet suffix;
  • create empty file in MOUNTPOINT named as .sugar-network-sync.

Run Node server on Sugar box

This mode is useful when there is no dedicated hardware for school server. In that case, particular XO laptop might be a Node server, e.g., one that teacher has.

  • Prepare Database media. Place the following files to the root of removable device that is intended to be a Database media:
    • .sugar-network file;
    • master file with api-testing.network.sugarlabs.org content, will be Master's GUID;
    • node file with arbitrary string content, will be Node's GUID.
  • On a box that is intended to be a Node server; in Sweets Distribution Control Panel section, enable Behave as a Sugar Network server.. checkbox (will require restarting Sugar Shell).
  • Plug prepared Database media.

In current implementation, the initial process on Node side will take some time (30min on XO-1.5 laptop) to merge synchronization data.

Run clients

  • Make sure that Node server and all clients are in the same local network, e.g., wireless Ad-hoc.
  • Client Sugar boxes should enable Auto discover server in local network radio-box in Sweets Distribution Control Panel section.
  • Client should see Node content as a Network content.

Current implementation is fragile in case of detecting local Node server, if Node content is not available on client side, try to restart Sugar.

Synchronize Node on Sugar box

On a Node box,

  • plug Synchronization media to let Node read input and write output Synchronization packets;
  • wait until Sugar Shell will alert with Synchronization complete.. message;
  • unplug Synchronization media.

On a box that has Internet available,

  • plug Synchronization media;
  • run sugar-network-sync script (placed by Node while synchronizing) from its root and wait until it will finish uploading and downloading Synchronization packet files;
  • then, repeat Node box steps.