| 
									
										
										
										
											2010-11-01 00:22:15 +01:00
										 |  |  | cdist-language(7) | 
					
						
							|  |  |  | ================= | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | Nico Schottelius <nico-cdist--@--schottelius.org> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NAME | 
					
						
							|  |  |  | ---- | 
					
						
							| 
									
										
										
										
											2010-11-01 00:22:15 +01:00
										 |  |  | cdist-language - Cdist Configuration language | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DESCRIPTION | 
					
						
							|  |  |  | ----------- | 
					
						
							| 
									
										
										
										
											2010-11-01 00:22:15 +01:00
										 |  |  | A cdist configuration consists of the following parts: | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-02-02 14:02:17 +01:00
										 |  |  | - manifests (cdist-manifests(7)) | 
					
						
							| 
									
										
										
										
											2010-11-01 00:22:15 +01:00
										 |  |  | - library (cdist-language-library(7)) | 
					
						
							|  |  |  | - modules (cdist-language-modules(7)) | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-01 00:22:15 +01:00
										 |  |  | In short the configuration is built as follows: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - conf/hosts/init is executed, the resulting output is used for module loading | 
					
						
							|  |  |  | - the appropriate modules are loaded and executed, which | 
					
						
							|  |  |  | - use library functions. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | The three stages are used to seperate configurations: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - hosts contain mappings to created modules | 
					
						
							|  |  |  | - modules create (probably site specific) configurations using library collections | 
					
						
							|  |  |  | - the library is shipped with cdist, but can be extendet locally | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-01 16:19:54 +01:00
										 |  |  |    - DSL: Shell! | 
					
						
							|  |  |  |       - gives if, else and EVEN elsif for free! | 
					
						
							|  |  |  |       - and case | 
					
						
							|  |  |  |       - and and and | 
					
						
							|  |  |  |       - and there's no os (solaris doesn't count) without a usable /bin/sh | 
					
						
							|  |  |  |       - cdist defines what you can use | 
					
						
							|  |  |  |          - you _can_ use os specific stuff | 
					
						
							|  |  |  |          - but it's ugly and you shoot into your own foot | 
					
						
							|  |  |  |       - "manifests" (use the same name here?) will be run/sourced | 
					
						
							|  |  |  |          - inheritance possible via sourcing | 
					
						
							|  |  |  |          - cdist-lib always preloaded | 
					
						
							|  |  |  |       - library == functions? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    - matching on explored items, not only on host name? | 
					
						
							|  |  |  |          - match function in host? [optional] | 
					
						
							|  |  |  |          - explorer ran before! | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - document exported variables! | 
					
						
							|  |  |  |    use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | - library vs. modules? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Requirements: | 
					
						
							|  |  |  |    It MUST be incredible easy/dumb to add new types. | 
					
						
							|  |  |  |       => growable default types | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-01 16:30:16 +01:00
										 |  |  |    - how to write a module | 
					
						
							|  |  |  |       - module function autoloading via *.sh | 
					
						
							|  |  |  |       - module "manifest"? | 
					
						
							|  |  |  |          - create functions in *.sh  | 
					
						
							|  |  |  |          - name functions "modulename_function" | 
					
						
							|  |  |  |             module hellow | 
					
						
							|  |  |  |             function kitty | 
					
						
							|  |  |  |             => hellow_kitty | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       - you are advised (not forced) to put files | 
					
						
							|  |  |  |          to a subdirectory named "files" | 
					
						
							| 
									
										
										
										
											2010-11-01 16:19:54 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | SEE ALSO | 
					
						
							|  |  |  | -------- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPYING | 
					
						
							|  |  |  | ------- | 
					
						
							| 
									
										
										
										
											2011-02-02 22:19:00 +01:00
										 |  |  | Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is | 
					
						
							| 
									
										
										
										
											2010-11-01 00:16:38 +01:00
										 |  |  | granted under the terms of the GNU General Public License version 3 (GPLv3). |