Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Our modules will be patterned after the Puppet Labs suggested layout du jour. SIMP additions are in bold below.

  • module/manifests/
    • init.pppp 
    • params.pp
    • install.pp
    • config.pp
    • service.pp
    • firewall.pp
    • logging.pp
    • audit.pp
    • selinux.pp (this one may just have to be mixed in at times, however, any boolean flipping should probably be done here)

...

  1. They must be disabled by default
  2. They must be name-based where the Boolean true and the Stringsimp amount to the same action.
  3. They must allow for an ENC since we want maximum module uptake where possible
    1. This will look something like the following

      $enable_firewall = defined($::enable_firewall) ? $::enable_firewall : hiera('enable_firewall',false)
      1. Yes, this does mean that these features are disabled by default in the modules. However, they will be enabled by default in simp-core, so we're ensuring maximum safety for downstream users.
      2. Can we make this a function? Is that too much trouble/obfuscation?

Advanced Module Structure

Some modules may manage components that do not easily fit the recommended structure.  

  • If the module has taken on too much responsibility for a single component, refactor it into separate component modules and use the recommended structure.
  • If the module manages a single responsibility yet is inherently complex, apply the recommended structure to appropriate areas.

Below are two recommended patterns for complex adaptations:

Modules that manage both client and server

For services that manage both a client and server, introduce a server/ and client/ directory, and apply the recommended structure to each:

  • module/manifests/
    • init.pp
    • params.pp (for module-wide settings)
    • server.pp
    • server/
      • params.pp
      • install.pp
      • config.pp
      • service.pp
      • firewall.pp
      • logging.pp
      • audit.pp
      • selinux.pp
    • client.pp
    • client/
      • params.pp
      • install.pp
      • config.pp
      • service.pp
      • firewall.pp
      • logging.pp
      • audit.pp
      • selinux.pp

NOTE: Many legacy modules will use an earlier pattern in init.pp where the boolean parameters $is_client and $is_server 

Modules that manage their own internal "services"

Action Items

  •  Discuss these decisions on Monday and ensure that I didn't miss anything of note. Update the page accordingly.
  •  Construct the Puppet module skeleton defined in 
    Jira Legacy
    serverJIRA (simp-project.atlassian.net)
    columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
    serverId45e63be1-2551-37a6-b050-86a38172f71d
    keySIMP-20
     to adhere to this structure.