Platform Team/Server Kit/Mace: Difference between revisions
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
[<arbitrary-path>]/<service-name>.d/[<service-confile>]/<configuration-file>.conf | [<arbitrary-path>]/<service-name>.d/[<service-confile>]/<configuration-file>.conf | ||
The {{Code|service-confile}} is optional and makes sense only if the configured service has several of them, e.g., Bind, or, if a singular configuration file was split at the Mace level into several parts to make it easy to configure, e.g., per IPTables table {{Code|service-confile}}s. The {{Code|configuration-file}} is a configuration file in a particular service configuration's syntax. All {{Code|configuration-file}} files will be merged by mace to the singular {{Code|service-confile}} file and placed in the appropriate distribution-specific directory. | The {{Code|service-confile}} is optional and makes sense only if the configured service has several of them, e.g., Bind, or, if a singular configuration file was split at the Mace level into several parts to make it easy to configure, e.g., per IPTables table {{Code|service-confile}}s. The {{Code|configuration-file}} is a configuration file in a particular service configuration's syntax. All {{Code|configuration-file}} files will be merged by mace to the singular {{Code|service-confile}} file and placed in the appropriate distribution-specific directory. The purpose in having {{Code|arbitrary-path}} is that there might be several directories with the same {{Code|service-name}}s to make the configuration more flexible, i.e., it allows having several high-level configuration components in a project that configure the same service. | ||
The | The following example shows how IPTables and Squid proxy might be configured: | ||
<dir> +010.net | |||
<service> | +iptables.d | |||
<confile> | +nat | |||
<config> | +010.conf | |||
<dir> +020.proxy | |||
<service> +iptables.d | |||
<confile> | +nat | |||
<config> | +020.squid.conf | |||
<service> +squid.d | |||
<confile> +access | |||
<config> +010.acl.conf | |||
See [http://git.sugarlabs.org/server/base/trees/master/etc sugar-server-base sources] for a more complex examples. | |||
See [http://git.sugarlabs.org/server/base/trees/master/etc sugar-server-base sources] for a more complex | |||
=== Configuration variables === | === Configuration variables === | ||
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. | ||
== Configuration application == | == Configuration application == | ||
| Line 67: | Line 54: | ||
If the sources path is not the default, {{Code|/etc/sugar-server}}, use the {{Code|--input}} argument to specify the right one. | If the sources path is not the default, {{Code|/etc/sugar-server}}, use the {{Code|--input}} argument to specify the right one. | ||
== Templates == | |||
The project [[The_Server/sugar-server-base|sugar-server-base]] is intended to provide most of basic configurations that might be useful for schools servers. After installing it from packages, the final configuration might be composed by symlinking templates from {{Code|/usr/share/sugar-server-base}} directory to the directory where Mace will find it, by default in {{Code|/etc/sugar-server}}. | |||
== Testing routines == | == Testing routines == | ||