Changes

Jump to navigation Jump to search
Line 17: Line 17:  
* '''Synchronization packets'''<br>Regular files that contain synchronization data placed to Synchronization media. Packet files are [[wikipedia:Tar_(file_format)|tarballs]] with {{Code|.packet}} file name suffix.
 
* '''Synchronization packets'''<br>Regular files that contain synchronization data placed to Synchronization media. Packet files are [[wikipedia:Tar_(file_format)|tarballs]] with {{Code|.packet}} file name suffix.
   −
== Workflows ==
+
== Recipes ==
    
A list of scenarios to follow in the field.
 
A list of scenarios to follow in the field.
Line 23: Line 23:  
=== Clone Master ===
 
=== Clone Master ===
   −
=== Synchronize Node ===
+
On a box with Internet available, plug Synchronization media. Its mount point will be referred as {{Code|MOUNTPOINT}} in text below.
 +
 
 +
If {{Code|sugar-network}} package is installed, run the following command:
 +
 
 +
sugar-network-sync MOUNTPOINT http://api-testing.network.sugarlabs.org/
 +
 
 +
Otherwise,
 +
 
 +
* using any regular Web downloader, e.g., {{Code|wget}} or {{Code|curl}}, fetch clone data using http://api-testing.network.sugarlabs.org/?cmd=pull url (the first try might return empty file, in that case, retry in a minute);
 +
 
 +
* place fetched data to {{Code|MOUNTPOINT}} with to a file with {{Code|.packet}} suffix;
 +
 
 +
* create empty file in {{Code|MOUNTPOINT}} named as {{Code|.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. There are no special requirements except having {{Code|.sugar-network}} file in the root directory. For the first time, it might be the same device as for Synchronization media.
 +
 
 +
* 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 Database media.
 +
 
 +
* Plug Synchronization media with [[#Clone Master|initial data]].
 +
 
 +
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 {{Code|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.

Navigation menu