On 21 Dic, 01:50, James Turnbull <ja...@lovedthanlost.net> wrote:
> 2009/12/21 Julian Simpson <simpsonjul...@gmail.com>:
> > 2009/12/18 Al @ Lab42 <lab42...@gmail.com>:
> > [snip]
> >> Now, as a user, I think that it is important to know how to start to
> >> write metadata files: format and minimal required parameters.
> >> A final (?) decision is not to be rushed, but an indication of the
> >> format and on some basic parameters  that won't be changed for sure is
> >> definitively welcomed.
> >> If from this thread comes out an "officially Puppet complant" example
> >> of a metadata file I'm an happy guy.
>
> > +1.
>
> > Happy to agree the above.  I'd rather specify less and get some broad
> > agreement on what makes the minimal and official/community compliant
> > metadata, than try and pin down every detail.  I'd assumed that the
> > metadata would be in Ruby code, but equally happy with JSON or YAML.
>
> For those of you who haven't seen the module metadata this is the
> commit (in master and so scheduled for Rowlf not 0.25.2):
>
> http://github.com/reductivelabs/puppet/commit/adc211ad191568e84eb3e1f...
>
> Regards
>
> James Turnbull
>
> --
> Author of:
> * Pro Linux System Administration (http://tinyurl.com/linuxadmin)
> * Pulling Strings with Puppet (http://tinyurl.com/pupbook)
> * Pro Nagios 2.0 (http://tinyurl.com/pronagios)
> * Hardening Linux (http://tinyurl.com/hardeninglinux)

In order to have a real *correct* example of how a json metadata file
should be, according to what is written in
http://github.com/reductivelabs/puppet/blob/adc211ad191568e84eb3e1f618f1cbf78df95ba9/lib/puppet/module.rb
, I ask to the lurking Ruby and Puppet Gurus if something like what
follows could be a correct example of a metadata file.

The name of the file is MODULEPATH/metadata.json

The content (please review/fix):

{"apache": {
  "source": "git://www.example42.com/example42puppetinfrastructure",
  "author": "Alessandro Franceschi",
  "version": "0.1.3",
  "license": "GPL3",
  "puppetversion": "0.24",
  "summary": "Standard Apache module",
  "description": "This module can be used for basic Apache
management",
  "project_page": "http://www.example42.com";,
}}

If we wanted to implement some of the suggestions people have made on
metadata info is something like this suitable (check syntax and
logic)? :

{"apache": {
  "source": "git://www.example42.com/example42puppetinfrastructure",
  "author": "Alessandro Franceschi",
  "version": "0.1.3",
  "license": "GPL3",
  "puppetversion": "0.24",
  "summary": "Standard Apache module",
  "description": "This module can be used for basic Apache
management",
  "project_page": "http://www.example42.com";,
  "dependencies": {
     "native_types": [ "replaceline", "configfile" ] ,
     "parsec_functions": "" ,
     "modules": "" ,
     "facter_plugins": "" ,
  }
  "tested": {
     "centos": [ "4", "5" ] ,
     "solaris": "5.10" ,
  }

}}

And, if we wanted to give more info on classes and defines provided
with the module there should be detail for each class on the required/
optional parameters and eventually the same class dependencies (it's
not rare the case of a module with simple classes with no dependencies
and more complex classes with custom deps).
I suppose there's still much to talk and code around, but it would be
nice to have confirmations on this metadata format and maybe on some
of the proposed details.

Some references for Json:
http://www.json.org/
http://www.json.org/example.html
http://www.ietf.org/rfc/rfc4627.txt

--

You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.


Reply via email to