The puppet model

88 views
Skip to first unread message

Thomas Hallgren

unread,
Nov 23, 2010, 8:57:59 AM11/23/10
to Puppet Users
Hi,

I'm trying to find a formal description of the "Graph based model"
that puppet uses but so far I have not been able to find it. Can
someone please tell me where to look?

Thanks,
Thomas Hallgren

Dan Bode

unread,
Nov 23, 2010, 12:34:31 PM11/23/10
to puppet...@googlegroups.com
Hi Thomas,

I don't know the docs as well as I should: I found a detailed description of the process of compiling catalogs. http://projects.puppetlabs.com/projects/1/wiki/Puppet_Internals

The model in puppet is implemented as a directed acyclic graph (DAG). The vertices of the graph are resoures, the edges are the relationships (order dependencies) between resources.

Resource types describe the desired state of a resource in terms of properties.
   ex: File has properties content, mode, owner, group

Types specify the description of a resource, which is abstracted from providers that specify the implementation (how we query the current state, how we synchronize)
  ex: package { 'foo': ensure => installed} is a relevant description regardless of the implementation of how we query the current state and how we synchronize if it does not match the description. (could be apt, rpm, yum)

Properties are attributes of resources that can be synchronized.

The synchronization process is as follows:
  - query the real state of the property on the system
  - compare to the desired state
  - if they are not the same, then synchronize them
  - if we have to sync resources, then create an event.

hope this helps!
-Dan


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


Thomas Hallgren

unread,
Nov 23, 2010, 2:05:21 PM11/23/10
to Puppet Users
Thanks Dan. This was very helpful.

Regards,
Thomas Hallgren

Gabriel Filion

unread,
Nov 24, 2010, 1:46:54 PM11/24/10
to puppet...@googlegroups.com
Hello,

On 11/23/2010 12:34 PM, Dan Bode wrote:
> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Internals
>
> The model in puppet is implemented as a directed acyclic graph (DAG). The
> vertices of the graph are resoures, the edges are the relationships (order
> dependencies) between resources.
>
> Resource types describe the desired state of a resource in terms of
> properties.
> ex: File has properties content, mode, owner, group
>
> Types specify the description of a resource, which is abstracted from
> providers that specify the implementation (how we query the current state,
> how we synchronize)
> ex: package { 'foo': ensure => installed} is a relevant description
> regardless of the implementation of how we query the current state and how
> we synchronize if it does not match the description. (could be apt, rpm,
> yum)
>
> Properties are attributes of resources that can be synchronized.
>
> The synchronization process is as follows:
> - query the real state of the property on the system
> - compare to the desired state
> - if they are not the same, then synchronize them
> - if we have to sync resources, then create an event.

This description is actually concise and quite understandable. I would
suggest adding it to Puppet's documentation wiki, not too far away from
the "extended knowledge" section [1].

[1]: http://docs.puppetlabs.com/#extended-knowledge

--
Gabriel Filion

Nigel Kersten

unread,
Nov 24, 2010, 2:21:30 PM11/24/10
to puppet...@googlegroups.com


Just wanted to point out that we accept patches for the documentation :)

I love Dan's description here, it is indeed concise and
understandable. Let's get it in the docs for sure.

Kenn Hussey

unread,
Dec 9, 2010, 11:30:50 AM12/9/10
to Puppet Users
Helpful indeed.

While reading the description, one thing puzzled me. Is it true that
"the required resource will be instantiated after the requiring
resource" when building the dependency graph model? I would have
expected it to be the other way around...

Thanks,

Kenn
Reply all
Reply to author
Forward
0 new messages