Platform Team/Sugar Network/Implementation: Difference between revisions

No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 24: Line 24:
The configuration occurs based on several sources (sorted by applied order):
The configuration occurs based on several sources (sorted by applied order):


* {{Code|/etc/sugar-network.conf}} system-wide configuration file,
* {{Code|/etc/sugar-network.d}} directory with system-wide configuration files,
* {{Code|~/.config/sugar-network/config}} user-wide configuration file.
* Command-line arguments (configuration names equal to command-line arguments),
* Command-line arguments (configuration names equal to command-line arguments),
* {{Code|/etc/sugar-network/config}} system-wide configuration file,
* {{Code|~/.config/sugar-network/config}} user-wide configuration file.


To get the current configuration, call:
To get the current configuration, call:
Line 76: Line 77:
This is a client side application. The reasons to have such client application (instead of direct using of server API) are the following:
This is a client side application. The reasons to have such client application (instead of direct using of server API) are the following:


* Provide access to local Sugar Network data (providing [[Platform_Team/Sugar_Network/API|API]] from the localhost), it is useful if server is not accessible;
* Provide access to local Sugar Network data (providing [[Platform_Team/Sugar_Network/API|API]] from the localhost), e.g., from remote devices;
* Being not connected to a server, users might create postponed changes in Sugar Network content, they will be applied to a server right after getting connected;
* Having locally provided API as a proxy to a server, it is the only way (for now) to be authenticated on the server;
* Having locally provided API as a proxy to a server, it is the only way (for now) to be authenticated on the server;
* Provide features that can't served from a servers, e.g., launching activities;
* Provide features that can't served from a servers, e.g., launching activities;
Line 85: Line 87:
* Command-line arguments (configuration names equal to command-line arguments),
* Command-line arguments (configuration names equal to command-line arguments),
* {{Code|/etc/sweets.conf}} system-wide configuration file,
* {{Code|/etc/sweets.conf}} system-wide configuration file,
* {{Code|/etc/sweets.d}} directory with system-wide configuration files,
* {{Code|~/.config/sweets/config}} user-wide configuration file,
* {{Code|~/.config/sweets/config}} user-wide configuration file,
* {{Code|~/.sugar/''current-profile''/sweets.conf}} configuration specific to a Sugar profile.
* {{Code|~/.sugar/''current-profile''/sweets.conf}} configuration specific to a Sugar profile, this configuration file is being created by Sugar Integration code in Sugar and better to avoid setting these options directly.


To get the current configuration, call:
To get the current configuration, call:
Line 121: Line 124:
== Usage ==
== Usage ==


Install ''sugar-network'' package from the Factory repository from [[Sweets Distribution]] or checkout sources from [http://git.sugarlabs.org/network Gitorious]:
Depending on use-case, follow one of existing [[Deployment_Platform#Deployment_scenarios|usage scenarios]].
 
== Sources ==
 
Clone sources from Git repository:


  git clone git://git.sugarlabs.org/network/network.git --recurse-submodules
  git clone git://git.sugarlabs.org/network/network.git --recurse-submodules