]> gitweb.fluxo.info Git - puppet-stdlib.git/log
puppet-stdlib.git
14 years agoUpdate README with getvar() and validate_hash()
Jeff McCune [Wed, 22 Jun 2011 00:06:46 +0000 (17:06 -0700)]
Update README with getvar() and validate_hash()

The README now provides quick examples of how to take advantage of the
getvar() and validate_hash() functions included in this release of the
stdlib.

14 years agoMerge branch 'ticket/master/8010_validate_hash_function'
Jeff McCune [Wed, 22 Jun 2011 00:03:25 +0000 (17:03 -0700)]
Merge branch 'ticket/master/8010_validate_hash_function'

* ticket/master/8010_validate_hash_function:
  (#8010) Add validate_hash spec tests
  (#8010) Add validate_hash function

14 years ago(#8010) Add validate_hash spec tests
Jeff McCune [Wed, 22 Jun 2011 00:02:22 +0000 (17:02 -0700)]
(#8010) Add validate_hash spec tests

These tests run through a number of example cases and exercise the
behavior of the validate_hash function.

To run, simple execute rspec validate_hash_spec.rb

14 years ago(#8010) Add validate_hash function
Jeff McCune [Wed, 22 Jun 2011 00:01:33 +0000 (17:01 -0700)]
(#8010) Add validate_hash function

This function validates all passed variables are hashes.  This is
similar to the validate_bool function and is copied from it.

14 years agoMerge branch 'ticket/master/8010_getvar_function'
Jeff McCune [Wed, 22 Jun 2011 00:01:14 +0000 (17:01 -0700)]
Merge branch 'ticket/master/8010_getvar_function'

* ticket/master/8010_getvar_function:
  (#8010) Add getvar() rvalue function

14 years ago(#8010) Add getvar() rvalue function
Jeff McCune [Tue, 21 Jun 2011 21:10:33 +0000 (14:10 -0700)]
(#8010) Add getvar() rvalue function

This isn't directly related to #8010, but rather indirectly fills the
need to allow the end user to configure where data values are looked up.

This allows the namespace to be passed as a class parameter.  A module
may then quickly and easily look up data from the user-defined
namespace.

14 years agoRemove metadata.json from repository
Jeff McCune [Mon, 20 Jun 2011 23:05:18 +0000 (16:05 -0700)]
Remove metadata.json from repository

This file is generated from the puppet-module build command and should
not be included in the repository.  If it is, the repository is not
directly usable on a Puppet master because the metadata.json is invalid.

14 years agoUpdate CHANGELOG for version 0.1.6
Jeff McCune [Wed, 15 Jun 2011 18:53:15 +0000 (11:53 -0700)]
Update CHANGELOG for version 0.1.6

14 years agoMerge pull request #4 from jeffmccune/ticket/master/3_anchor_resource_type
Jeff McCune [Wed, 15 Jun 2011 18:51:33 +0000 (11:51 -0700)]
Merge pull request #4 from jeffmccune/ticket/master/3_anchor_resource_type

Ticket/master/3 anchor resource type

Nan +1'ed on the tech list.

Merging into master.

14 years ago(#3) Add simple unit test for anchor type
Jeff McCune [Wed, 15 Jun 2011 16:43:22 +0000 (09:43 -0700)]
(#3) Add simple unit test for anchor type

Unlike the whit type the anchor type derives from, we are not hacking
the stringify method.  We expect the resource to be named simply
Anchor[foo::bar] where the name is "foo::bar".

14 years ago(#3) Add an anchor type to provide containment
Jeff McCune [Wed, 15 Jun 2011 16:40:04 +0000 (09:40 -0700)]
(#3) Add an anchor type to provide containment

With Puppet 2.6.x we do not have a way to specify containment
relationships.  In the use case of class ntp { } declaring
ntp::{package,config,service} classes, the ntp class itself should allow
the user to specify before and require relationships to the main ntp
class.

The anchor resource type allows module authors to close the loop on
classes composing the main top level module.  For example:

    class ntp {
      class { 'ntp::package': }
      -> class { 'ntp::config': }
      -> class { 'ntp::service': }
      # These two resources "anchor" the composed classes
      # such that the end user may use "require" and "before"
      # relationships with Class['ntp']
      anchor { 'ntp::begin': } -> class { 'ntp::package': }
      class { 'ntp::service': } -> anchor { 'ntp::end': }
    }

Using this pattern, the module user may then simply declare relationships to
the ntp class as they expect:

    class { 'ntp': } -> class { 'mcollective': }
    # OR
    class { 'mcollective': } -> class { 'ntp': }

14 years agoAdd additional tests to validate_bool() spec
Jeff McCune [Fri, 3 Jun 2011 18:56:02 +0000 (11:56 -0700)]
Add additional tests to validate_bool() spec

14 years agoUpdate CHANGELOG for 0.1.5
Jeff McCune [Fri, 3 Jun 2011 18:43:38 +0000 (11:43 -0700)]
Update CHANGELOG for 0.1.5

14 years agoAdd Apache 2.0 License
Jeff McCune [Fri, 3 Jun 2011 18:44:23 +0000 (11:44 -0700)]
Add Apache 2.0 License

14 years agoMerge branch 'feature/master/validation_functions'
Jeff McCune [Fri, 3 Jun 2011 18:42:39 +0000 (11:42 -0700)]
Merge branch 'feature/master/validation_functions'

* feature/master/validation_functions:
  Add spec test for validate_bool function
  Add validate_bool() function to stdlib

14 years agoAdd spec test for validate_bool function
Jeff McCune [Fri, 3 Jun 2011 18:41:20 +0000 (11:41 -0700)]
Add spec test for validate_bool function

This is an interesting spec test for module developers.
It illustrates how to cause Puppet to test the function
from the Puppet DSL rather than the Ruby DSL, fully
exercising the system from the perspective of the end
user.

(Note how Puppet[:code] is set, then the scope reset, then
the compile method called.)

Paired-with: Dan Bode <dan@puppetlabs.com>

14 years agoAdd validate_bool() function to stdlib
Jeff McCune [Fri, 3 Jun 2011 18:39:45 +0000 (11:39 -0700)]
Add validate_bool() function to stdlib

This function aborts catalog compilation if any of the passed
values are not true or false.  Note, this catches the string
values of true and false correct and will abort catalog
compilation if they are not boolean values.

Paired-with: Dan Bode <dan@puppetlabs.com>

14 years agoUpdate CHANGELOG with stage re-ordering
Jeff McCune [Thu, 26 May 2011 17:25:45 +0000 (10:25 -0700)]
Update CHANGELOG with stage re-ordering

14 years agoMerge branch 'bug/master/prefer_stages_after_main'
Jeff McCune [Thu, 26 May 2011 17:25:35 +0000 (10:25 -0700)]
Merge branch 'bug/master/prefer_stages_after_main'

* bug/master/prefer_stages_after_main:
  Move stages to after main

14 years agoMove stages to after main
Jeff McCune [Thu, 26 May 2011 17:21:42 +0000 (10:21 -0700)]
Move stages to after main

Working with the stages in stdlib, I quickly ran into an issue where
most of the stages were before the main stage.  This made it difficult
to declare any resources in a traditional "include" style class while
hiding the end user from the stages being associated with other module
classes.

For example, in class mcollective, a package would be declared in main.
However, if mcollective declared class mcollective::service in stage
infra_deploy and this was before main, there would be a dependency loop
between the package and the service.

There appears to be a convention around "chain your stages after main"
to avoid the need to create relatively empty shell classes.

14 years agoUpdate CHANGELOG for 0.1.3 release
Jeff McCune [Wed, 25 May 2011 20:29:27 +0000 (13:29 -0700)]
Update CHANGELOG for 0.1.3 release

14 years agoMerge branch 'feature/master/7657_validate_re'
Jeff McCune [Wed, 25 May 2011 19:39:58 +0000 (12:39 -0700)]
Merge branch 'feature/master/7657_validate_re'

* feature/master/7657_validate_re:
  (#7657) Add basic validate_re function

14 years ago(#7657) Add basic validate_re function
Jeff McCune [Wed, 25 May 2011 19:38:15 +0000 (12:38 -0700)]
(#7657) Add basic validate_re function

While developing Puppet Modules with class parameters, data from the
user should be validated as per the Style Guide.  Puppet should fail
early and hard in the situation of invalid data being passed into the
module.

This function provides a more concise method to the alternative of using
if statements in the Puppet manifests.

14 years agoAdd DS_Store to gitignore
Jeff McCune [Wed, 25 May 2011 16:36:08 +0000 (09:36 -0700)]
Add DS_Store to gitignore

14 years agoUpdate changelog for version 0.1.2
Jeff McCune [Tue, 24 May 2011 18:48:50 +0000 (11:48 -0700)]
Update changelog for version 0.1.2

Also add release process information.

14 years agoAdd changelog to track releases
Jeff McCune [Tue, 24 May 2011 18:27:41 +0000 (11:27 -0700)]
Add changelog to track releases

Following the development process, as new releases of this module are
cut the Changelog will be updated.

14 years agoAdd standard set of run stages.
Jeff McCune [Tue, 24 May 2011 18:25:51 +0000 (11:25 -0700)]
Add standard set of run stages.

Many modules I'm working on need a standard but
relatively granular location in the catalog.  For example,
any module that configures the packaging system should
run "early"

Add the following stages which have inter-dependencies
in the top to bottom order listed:

 * setup
 * deploy
 * runtime
 * setup_infra
 * deploy_infra
 * main
 * setup_app
 * deploy_app

14 years agoUpdate README with target versions
Jeff McCune [Tue, 24 May 2011 18:23:16 +0000 (11:23 -0700)]
Update README with target versions

Also add the list of things this module will
likely contain.

14 years agoInitial commit
Jeff McCune [Tue, 24 May 2011 18:06:30 +0000 (11:06 -0700)]
Initial commit