Changes between Version 10 and Version 11 of how-to/puppet/layout
- Timestamp:
- May 5, 2013, 1:20:05 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
how-to/puppet/layout
v10 v11 13 13 == Layout == 14 14 15 Below is the layout of our [ https://git.mayfirst.org/?p=mfpl/puppet.git;a=summarygit repository].15 Below is the layout of our [source:puppet puppet git repository]. 16 16 17 * helper holds code for running operations on our servers from the command line using the freepuppet command. For a list of options run: 17 [source:puppet/helper helper/]:: 18 holds code for running operations on our servers from the command line using the `freepuppet` command. For a list of options run: 18 19 {{{ 19 20 helper/freepuppet-helper -l 20 21 }}} 21 * manifests: this is where information about each MFPL server is stored, plus some general information specific to our servers 22 * site.pp: this is the file that boostraps all other files 23 * globals.pp: global variables specific to May First/People Link, used throughout 24 * modules.pp: one line to import every puppet module that we use. We only use one module: mayfirst 25 * nodes: this directory contains the files for each server in our network 26 * production: one file for every production server in our network 27 * dev: one file for every test/dev server 28 * modules: modules are abstracted collections of manifests, templates and files. All of our puppet code is in the mayfirst module. 22 [source:puppet/manifests manifests/]:: 23 this is where information about each MFPL server is stored, plus some general information specific to our servers 24 * [source:puppet/manifests/site.pp site.pp]: this is the file that boostraps all other files 25 * [source:puppet/manifests/globals.pp globals.pp]: global variables specific to May First/People Link, used throughout 26 * [source:puppet/manifests/modules.pp modules.pp]: one line to import every puppet module that we use. We only use one module: mayfirst 27 * [source:puppet/manifests/nodes nodes/]: this directory contains the files for each server in our network 28 * [source:puppet/manifests/nodes/production production/]: one file for every production server in our network 29 * [source:puppet/manifests/nodes/dev dev/]: one file for every test/dev server 30 [source:puppet/modules modules/]:: 31 modules are abstracted collections of manifests, templates and files. All of our puppet code is in the mayfirst module. 29 32 30 33 = Puppet Resources = … … 45 48 }}} 46 49 47 This file resource ensures that a file located at /etc/aliases on the target server will be created. The content of the file will be based on the template located in the puppet repository in modules/mayfirst/postfix/aliases.erb(this template contains variables that will be dynamically filled in).50 This file resource ensures that a file located at /etc/aliases on the target server will be created. The content of the file will be based on [source:puppet/modules/mayfirst/postfix/aliases.erb its template] (this template contains variables that will be dynamically filled in). 48 51 49 52 == execs == … … 148 151 }}} 149 152 150 $namesake and $purposeare not used by puppet - they are there for human readability.153 `$namesake` and `$purpose` are not used by puppet - they are there for human readability. 151 154 152 155 = Variable Scoping = 153 156 154 Global variables are defined in manifests/globals.pp and have an mfpl_ prefix. They are accessible anywhere in the code, provided you use the double colon syntax: $::, e.g. $::mfpl_admin_user_ids.157 Global variables are defined in [source:puppet/manifests/globals.pp] and have an `mfpl_` prefix. They are accessible anywhere in the code, provided you use the double colon syntax: `$::`, e.g. `$::mfpl_admin_user_ids`. 155 158 156 159 All other variables should be properly scoped.