|
|
| (2 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 86: |
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 122: |
Line 124: |
| == Usage == | | == Usage == |
|
| |
|
| Assume we have two hosts, ''Node'' and ''Client'' (it might be the same real host though). ''Node'' host will be a Sugar Network server. The ''Client'' side will run Sugar Network integrated Sugar session to connect to the ''Node''. [[Sweets_Distribution#Add_repository|Attach]] ''Factory'' [[Sweets Distribution]] repository on both hosts.
| | Depending on use-case, follow one of existing [[Deployment_Platform#Deployment_scenarios|usage scenarios]]. |
| | |
| On the ''Node'' side:
| |
| | |
| * Install {{Code|sugar-network}} package;
| |
| * Populate the {{Code|/etc/sugar-network/config}} configuration file with the following content:
| |
| | |
| [main]
| |
| debug = 3
| |
|
| |
| # path to a directory to place log files
| |
| logdir = /var/log/sugar-network
| |
|
| |
| # path to a directory to place pid files
| |
| rundir = /var/run/sugar-network
| |
|
| |
| # if specified, use this directory for cached files; such files might take
| |
| # considerable number of bytes
| |
| cachedir = /var/cache/sugar-network
| |
|
| |
| [node]
| |
| host = 0.0.0.0
| |
| port = 8000
| |
|
| |
| # path to a directory to place server data
| |
| data-root = /var/lib/sugar-network
| |
|
| |
| # switch off user credentials check; disabling this option will require
| |
| # OpenSSH-5.6 or later
| |
| trust-users = True
| |
| | |
| * Make sure that all directories in config file are created and current user have write permissions there;
| |
| | |
| * Run node server using the {{Code|sugar-network-node start}} command;
| |
| | |
| * Find log files in the {{Code|/var/log/sugar-network-node.log}} file.
| |
| | |
| On the ''Client'' side:
| |
| | |
| * Install {{Code|sweets-desktop}} package;
| |
| | |
| * Point ''Client'' to the newly launched ''Node'' (you all time can use one of [[Platform_Team/Sugar_Network/API#API_servers|public servers]]) in the {{Code|/etc/sweets.conf}} configuration file:
| |
| | |
| [main]
| |
| debug = 3
| |
|
| |
| [client]
| |
| api-url = http://''NODE-HOST-HERE'':8000
| |
| | |
| * Choose ''Sweets Distribution'' desktop session, or, run Sugar in a window using the {{Code|sweets-sugar-emulator}} command;
| |
| | |
| * [[Platform_Team/Sweets_Distribution/Factory/Features#Sugar_Network_integration|Enable]] Sugar Network integration in the Sugar Shell;
| |
| | |
| * Open [[Platform_Team/Sugar_Network/Web_UI|Web UI]] by pressing ''F8'' key;
| |
| | |
| * Find [[Sugar_Network/Contributor_Hub|Contributor Hub]] in the Web UI and launch it;
| |
| | |
| * Find log file in the standard {{Code|~/.sugar/default/logs}} directory.
| |
| | |
| Note that newly installed ''Node'' will be empty, the process of populating it with public data will be implemented in upcoming release.
| |
|
| |
|
| == Sources == | | == Sources == |