Alessandro Franceschi
2011-Oct-26 14:26 UTC
[Puppet Users] Request for comments: new foo module template
To who may be interested,
I''m working on the default template of the next generation of
Example42 modules.
In http://github.com/example42/puppet-foo2 there''s the foo sample
module.
All the "first generation" Example42 modules (
http://github.com/example42/puppet-modules
) which are more or less compatible with Puppet 0.25* are going to
remain and mantained but new development will be done mainly on a
brand new (and still not existing) generation of modules, which are
going to be compatible only with 2.6, will not break on 2.8 ( I loved
variables dynamic scoping, but I''m probably the only one) and are
supposed to take advantage of the frills and features of Puppet 2.x.
Before starting to produce the new module I want to define a solid
template that is going to be used to scaffold the base structure of
all the other modules, for this reason I ask for suggestions, comments
and feedback on http://github.com/example42/puppet-foo2
These are the basic principles behind some design choices:
- Usage of parametrized classes whenever possible. We like APIs don''t
we?
- Module are plug and play with easy to extend MultiOS support
- By default, generally, a module just installs the relevant
application and doesn''t enforce any design choice on how configuration
files are defined
- Possibility to customize, as much as possible, the module behavior
via parameters, without any modification of the core module (see
source, template, options and my_class parameters)
- Integration (disabled by default) with Example42 puppi, monitor and
firewall modules
- Limited inclusion of sub classes and optimization on the number of
the managed resources for performance optimization
- Decommissioning features (asbet/disable/disableboot)
- Modules will probably require puppetlabs-stdlib (or a direct fork)
Work to do:
- Define tests (rspec? cucumber? plain test/ files?)
- Handle in a smarter way the data source file for puppi (next
version) with all the variables managed by the module
To test the module run
https://github.com/example42/puppet-modules/blob/master/00_example42scripts/module_clone.sh
in a directory that contains the foo module. Edit yournewmodule/
manifests/params.pp as needed and use the module with something like:
class { "openssh":
# template => "example42/openssh/sshd_config.erb",
source => [ "puppet:///modules/example42/openssh/sshd_config-
$hostname" , "puppet:///modules/example42/openssh/sshd_config" ],
# options => {
# "X11Forwarding" => "yes",
# "PermitRootLogin" => "yes",
# "ListenAddress" => "0.0.0.0/0",
# },
my_class => "example42::openssh",
puppi => true,
debug => true,
## disable => true,
disableboot => true,
# absent => true,
}
Thanks for the attention and for any feedback
Al
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.