Platform Team/Server Kit/Mace: Difference between revisions
No edit summary |
m moved Sugar Server Kit/Mace to Platform Team/Server Kit/Mace: Move SSK to HSD |
||
| (8 intermediate revisions by 3 users not shown) | |||
| Line 10: | Line 10: | ||
* mace doesn't function like a daemon; it just converts configuration sources to the final configuration on the final server, e.g., as a post procedure after installing packages; | * mace doesn't function like a daemon; it just converts configuration sources to the final configuration on the final server, e.g., as a post procedure after installing packages; | ||
* mace is designed to ease support of intermediate customizing, i.e., the original configuration, provided by an upstream project, might be supplemented (not patched) in the downstream product before deploying it to the final users. | * mace is designed to ease support of intermediate customizing, i.e., the original configuration, provided by an upstream project, might be supplemented (not patched) in the downstream product before deploying it to the final users. | ||
* within the [[Sugar Server Kit]] initiative, mace is intended to support, mostly, only the [[Sugar_Server_Kit/Architecture#Dumb_school_servers|Dumb school servers]] functional model. | |||
== Configuration sources == | == Configuration sources == | ||
| Line 38: | Line 39: | ||
In addition to configuration files, Mace can process files with a {{Code|.env}} suffix. These files contain variable declarations in Bash syntax. The values of these variables might be entered in configuration files in the form of {{Code|@VARIABLE@}}, in which case they will be expanded to real values while applying the configuration. | In addition to configuration files, Mace can process files with a {{Code|.env}} suffix. These files contain variable declarations in Bash syntax. The values of these variables might be entered in configuration files in the form of {{Code|@VARIABLE@}}, in which case they will be expanded to real values while applying the configuration. | ||
In addition to custom variables, there is a list of special ones: | |||
* variables exported by providers; | |||
* {{Code|''<provider>''_SERVICE}} variables with paths to {{Code|/etc/init.d}} services for all providers that support services; | |||
* {{Code|SRC_ROOT}}, path to the root directory with configuration sources; | |||
* {{Code|DST_ROOT}}, path to the root directory to place final configuration; | |||
* {{Code|INCLUDE}}, if this variable is set in {{Code|.env}} files, it will be treated as a colon separated list of directories to search for additional configuration sources; if {{Code|INCLUDE}} directories are not absolute, they will be referenced from the [[Sugar_Server_Kit/sugar-server-templates|sugar-server-templates]] root; | |||
* {{Code|PWD}}, path to the directory where current source configuration file is located. | |||
=== Keywords === | === Keywords === | ||
| Line 103: | Line 113: | ||
mace config | mace config | ||
== Troubleshooting == | |||
* By default, if mace can't start configuring services with new configuration, it falls back to the old configuration. It might be not very useful in case of investigating new configuration errors. To prevent such behavior use {{Code|-R}} command-line argument and try to start affected service manually (with new configuration): | |||
mace apply -R | |||
/etc/init.d/<SERVICE> start | |||
== Testing routines == | == Testing routines == | ||
| Line 146: | Line 163: | ||
== Getting involved == | == Getting involved == | ||
* [http://bugs.sugarlabs.org/newticket?component=sugar-server-kit Report] | * [http://bugs.sugarlabs.org/newticket?component=sugar-server-kit Report bugs]. | ||
* Read the [http://api.sugarlabs.org/mace/pages/HACKING.html HACKING] file to know how to contribute with code. | * Read the [http://api.sugarlabs.org/mace/pages/HACKING.html HACKING] file to know how to contribute with code. | ||