Changes between Version 1 and Version 2 of Configuration


Ignore:
Timestamp:
26.11.2012 10:04:58 (6 years ago)
Author:
tim
Comment:

Added TOC and note on the Emacs YAML mode

Legend:

Unmodified
Added
Removed
Modified
  • Configuration

    v1 v2  
     1[[TOC(Configuration,notitle,depth=2)]] 
    12= Fawkes Configuration = 
    2  
    33The Fawkes configuration is stored in text files using the [http://www.yaml.org YAML] syntax. It is represented as a structured tree where the actual configuration values are stored in the leafs and have explicit basic types. Values are accessed with path-like specifiers within the software, e.g. {{{/fawkes/example-value}}}. 
    44 
     
    3434  Contains a sequence of strings which refer to files or directories to include. All files are loaded in the order they are specified one after another, overwriting previously defined data. A directory is denoted by a closing slash (/). It is searched for files with the suffix ''.yaml'' and added in alphabetical order. 
    3535 
    36 == Tags == 
     36=== Tags === 
    3737Two tags are supported that can be specified (as in the example above). 
    3838 
     
    7171}}} 
    7272 
     73== Emacs YAML mode == 
     74To make editing of the configuration easier and more comfortable we recommend to install the Emacs YAML major mode. It supports syntax highlighting of the configuration file and a few commands to support editing. The following procedure describes how to install the mode in your home directory. 
     75{{{ 
     76git clone https://github.com/yoshiki/yaml-mode 
     77mkdir -p ~/.emacs.d/lisp 
     78cp yaml-mode/yaml-mode.el ~/.emacs.d/lisp 
     79}}} 
     80Then edit the file {{{~/.emacs}}} and add the following (the first line is to add the just created directory as a path to look for Emacs LISP files): 
     81{{{ 
     82(add-to-list 'load-path "~/.emacs.d/lisp/") 
     83(require 'yaml-mode) 
     84(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode)) 
     85(add-hook 'yaml-mode-hook 
     86          '(lambda () (define-key yaml-mode-map "\C-m" 'newline-and-indent))) 
     87}}} 
     88After restarting Emacs the mode will be active. 
     89 
    7390== Old Database Configuration == 
    7491For the first couple of years the configuration used to be stored in a SQLite database. This was done to make access fast, to provide an overlay of the host-specific configuration over the default configuration, and to support full on-line modifyability and persistence from within the software. The new YAML configuration system revises some of these decisions based on the experience made with the system. In particular, the new focus is easy configuration by directly editing files. The anticipated benefit from using GUI or command line tools and overlayed configurations did not turn out to have the expected benefits. We still provided a simplified host-specific overlay configuration that can be modified from within the software at run-time, but we do not provide access to the default value anymore once overwritten.