[Puppet Users] Re: Solaris zone documentation

2009-01-28 Thread Matt McLeod

James Turnbull wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>  
> Matt McLeod wrote:
> > OK.  So the docco is completely wrong:  everything referenced in the
> > template needs to be set as a variable prior to defining the zone.
> > I'd assumed from context that the template was going to have the
> > previously-declared object properties passed to it.
> >
> Sorry - how is the documentation wrong?  You can't define a variable
> in a template without declaring the variable.  If you don't reference
> said variable in a template then where is the value going to come from?
> 
> Can you point me to the documentation that confused you?

As per my original message:

  http://reductivelabs.com/trac/puppet/wiki/TypeReference#zone

The example provided doesn't work because it doesn't define any of the
variables used in the template.  As this was my first exposure to the
template system (we haven't had any need for it thusfar, most of our
configs are site-wide) it wasn't obvious that the template wasn't
going to pick that stuff up from the zone type definition it was
being called from where "realhostname" *is* being defined, just not
as a variable.

-- 
* Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
 --- People can do the work, so machines have time to think ---

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Solaris zone documentation

2009-01-28 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Matt McLeod wrote:
> OK.  So the docco is completely wrong:  everything referenced in the
> template needs to be set as a variable prior to defining the zone.
> I'd assumed from context that the template was going to have the
> previously-declared object properties passed to it.
>
Sorry - how is the documentation wrong?  You can't define a variable
in a template without declaring the variable.  If you don't reference
said variable in a template then where is the value going to come from?

Can you point me to the documentation that confused you?

Thanks

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkmBP28ACgkQ9hTGvAxC30DnPwCcCoQiOTvycok2/0BwBaE7sQJ8
D0UAn3zAPhXUHf5wF4idsykWdyGa8pMJ
=WOTs
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Solaris zone documentation

2009-01-28 Thread Matt McLeod

OK.  So the docco is completely wrong:  everything referenced in the
template needs to be set as a variable prior to defining the zone.
I'd assumed from context that the template was going to have the
previously-declared object properties passed to it.

I can live with that, I was going to abstract the zone type anyway.

Matt

Andrew Shafer wrote:
> Matt,
> 
> There is no realhostname variable in scope when the template is getting
> called.
> 
> Variables in templates either need to be facts or set in the scope of Puppet
> they are being called from.
> 
> Does that make sense?
> 
> Andrew
> 
> 
> On Tue, Jan 27, 2009 at 5:22 PM, Matt McLeod  wrote:
> 
> >
> > I'm following the example provided in the type reference
> > under 'zone', i.e.:
> >
> >zone{myzone:
> >autoboot=>true,
> >create_args=>"-b",
> >ip=>"nge0:10:130.55.201",
> >path=>"/zoneds/%s",
> >realhostname=>"myzone.example.com",
> >sysidcfg=>template(sysidcfg)
> >}
> >
> > with the following template:
> >
> > system_locale=en_AU
> > timezone=Australia/NSW
> > terminal=xterms
> > security_policy=NONE
> > root_password=elided
> > timeserver=localhost
> > name_service=DNS {domain_name=<%= domain %>
> >name_server=10.132.2.150}
> > network_interface=primary {hostname=<%= realhostname %>
> >ip_address=<%= ip %>
> >netmask=<%= netmask %>
> >protocol_ipv6=no
> >default_route=<%= defaultroute %>}
> > nfs4_domain=dynamic
> >
> > The sysidcfg template is ripped straight from
> > 
> > but it doesn't work:
> >
> > err: Could not retrieve catalog: Failed to parse template sysidcfg: Could
> > not find value for 'realhostname' at
> > /staging/puppet/production/manifests/nodes.pp:90 on node
> > elided.example.com
> >
> > This is with Puppet 0.24.7 on both client and server.
> >
> > I've not really needed the templating before so it's possible that
> > there's a really obvious error in the template provided in the
> > type reference and I'm just not seeing it.
> >
> > Matt
> >
> > --
> > * Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
> > --- People can do the work, so machines have time to think ---
> >
> > >
> >
> 
> > 

-- 
* Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
 --- People can do the work, so machines have time to think ---

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Announcing - Facter 1.5.3

2009-01-28 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
We're pleased to announce that Facter release 1.5.3 is now available.
This is largely a maintenance release but there are some new facts and
features.  This will be the last release in the 1.5.x branch and the
next release will be 2.0.0.

New facts

uptime - Returns the uptime of the host
uptime_{period} - uptime in seconds, hours and days
network - Returns the network of an interface based on IP and Netmask.
Miscellaneous Solaris 10 facts

Additional changes

- - Support for interface facts on Darwin
- - Support for virtual fact on Solaris 10
- - Better Ubuntu suppoty
- - Added support for SLES
- - Fixes to multiple interface facts

The release is available to download at ReductiveLabs and the Redmine
tracker:

http://reductivelabs.com/trac/puppet/wiki/DownloadingPuppet
http://projects.reductivelabs.com/projects/facter/files

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkmBNZAACgkQ9hTGvAxC30BmmQCgzW8e4Xwo3Ub5SKVHtohwmaC+
AbcAnRxSPVxv1I571PCqvo80tdogCKa8
=7hmv
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Augeas type proposal; long.

2009-01-28 Thread David Lutterkort

On Sun, 2009-01-25 at 15:21 -0800, Robin Lee Powell wrote:
> On Mon, Jan 19, 2009 at 01:28:53PM -0800, David Lutterkort wrote:
> > 
> > 
> > This is what I am trying to address with better path expressions in
> > Augeas itself. That lets you write
> > 
> > set "/files/etc/aliases/*[name = 'postmaster']/value"
> > f...@bar.com
> > 
> > to do exactly the same thing.
> 
> That'd be excellent.  I'd want a regex option there too, though.

Can you post some examples of how you'd want to use regexes to
augeas-devel ?

> Any idea when this will be out?

In the next release - I posted patches to the list to implement that,
just needs some volunteers to play with it some ;)

> > This sort of brains (slicing and dicing the Augeas tree) really
> > belongs into Augeas - the Puppet type should mostly bridge the gap
> > between Augeas' command-oriented structure and Puppet's
> > state-oriented veiw of the world.
> 
> Fair enough.  I didn't know you were trying to do this kind of stuff
> on your end, and like I said, I was prepared to write the Puppet
> stuff myself, because I can.  I really can't help you with the
> Augeas stuff, and I'm feeling impatient.  :)

But yes, you can .. by trying out the new XPath support and figuring out
where it falls short of what you need ;)

David



--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Solaris zone documentation

2009-01-28 Thread Andrew Shafer
Matt,

There is no realhostname variable in scope when the template is getting
called.

Variables in templates either need to be facts or set in the scope of Puppet
they are being called from.

Does that make sense?

Andrew


On Tue, Jan 27, 2009 at 5:22 PM, Matt McLeod  wrote:

>
> I'm following the example provided in the type reference
> under 'zone', i.e.:
>
>zone{myzone:
>autoboot=>true,
>create_args=>"-b",
>ip=>"nge0:10:130.55.201",
>path=>"/zoneds/%s",
>realhostname=>"myzone.example.com",
>sysidcfg=>template(sysidcfg)
>}
>
> with the following template:
>
> system_locale=en_AU
> timezone=Australia/NSW
> terminal=xterms
> security_policy=NONE
> root_password=elided
> timeserver=localhost
> name_service=DNS {domain_name=<%= domain %>
>name_server=10.132.2.150}
> network_interface=primary {hostname=<%= realhostname %>
>ip_address=<%= ip %>
>netmask=<%= netmask %>
>protocol_ipv6=no
>default_route=<%= defaultroute %>}
> nfs4_domain=dynamic
>
> The sysidcfg template is ripped straight from
> 
> but it doesn't work:
>
> err: Could not retrieve catalog: Failed to parse template sysidcfg: Could
> not find value for 'realhostname' at
> /staging/puppet/production/manifests/nodes.pp:90 on node
> elided.example.com
>
> This is with Puppet 0.24.7 on both client and server.
>
> I've not really needed the templating before so it's possible that
> there's a really obvious error in the template provided in the
> type reference and I'm just not seeing it.
>
> Matt
>
> --
> * Matt McLeod | mail: m...@boggle.org | blog: http://abortrephrase.com/ *
> --- People can do the work, so machines have time to think ---
>
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: augeas on solaris?

2009-01-28 Thread David Lutterkort

On Tue, 2009-01-27 at 16:21 +0100, Dan Bode wrote:
>  Has anyone used Augeas on solaris? I guess that the lenses may not
> work there.
> 
> Has anyone compiled augeas on solaris? I tried, but I got warnings
> aout asprintf not being available and I could not find the
> installation package for it.

asprintf is a GNU libc extension, but gnulib should add a replacement on
Solaris - I have to admit I haven't tried building Augeas on Solaris,
but I do build on FreeBSD regularly. 

Just noticed that the Augeas build system doesn't set up the asprintf
replacement ... I'll fix that. But as Peter said, probably best to
continue this conversation on augeas-de...@redhat.com.

David



--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] module creation script

2009-01-28 Thread chakkerz

Hello there

I've written a script that generates a skeleton module, i was going to
drop it onto the recipe page, alas i can't edit that...

#!/bin/bash

moduleDir=`puppetd --configprint modulepath | cut -d ':' -f 1`

module="$1"
moduleInit="$moduleDir/$module/manifests/init.pp"

mkdir -p $moduleDir/$1/depends
mkdir -p $moduleDir/$1/files
mkdir -p $moduleDir/$1/templates
mkdir -p $moduleDir/$1/manifests

touch $moduleInit

echo "class $module" >> $moduleInit
echo "{" >> $moduleInit
echo -e "\tif (skip_$module != \"true\")" >> $moduleInit
echo -e "\t{" >> $moduleInit
echo -e "\t}" >> $moduleInit
echo "" >> $moduleInit
echo "}" >> $moduleInit


when used it does:
[r...@puppetbeta ~]# ~/bin/create_module test
[r...@puppetbeta ~]# cd `puppetd --configprint modulepath | cut -d ':'
-f 1`
[r...@puppetbeta modules]# find ./test/
./test/
./test/depends
./test/files
./test/templates
./test/manifests
./test/manifests/init.pp
[r...@puppetbeta modules]# cat ./test/manifests/init.pp
class test
{
if (skip_test != "true")
{
}

}

... obviously there is a general preference for the { to be up one
line, but that's a minor change :)

I don't know if it's worthwhile to have there...

anyways, thought i'd post just in case.

chakkerz
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Solaris zone documentation

2009-01-28 Thread Rob Chanter

Hi Matt!

On Wed, Jan 28, 2009 at 11:22 AM, Matt McLeod  wrote:
> network_interface=primary {hostname=<%= realhostname %>
>
> err: Could not retrieve catalog: Failed to parse template sysidcfg: Could not 
> find value for 'realhostname' at 
> /staging/puppet/production/manifests/nodes.pp:90 on node elided.example.com
>

I'd guess that it's looking for a 'realhostname' fact. Facter 1.5.2 on
opensolaris here doesn't output a fact with that name. Does it work if
you substitute 'hostname' or 'fqdn'?

cheers
rob

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: pkgsrc provider for Package?

2009-01-28 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Rob Chanter wrote:
>
>
> Can puppet easily enough refer a package resource to an alternative
provider?
>
package { blah:
ensure => latest,
provider => ports
}

The provider attribute allows you to specify which provider to use for
certain functions.

Regards

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iEYEARECAAYFAkmA9tgACgkQ9hTGvAxC30CayACg0g1xE51uaTVLsfe1HT61Ufv+
WtEAn2A1y9NeBB9fpDZHIpXMtmCNr/MF
=JiFJ
-END PGP SIGNATURE-


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: File 'replace => false' doesn't match my expectations...

2009-01-28 Thread Andrew Shafer
Jeff,

What version of Puppet are you using?

I could not reproduce this behavior with either content or source.

When replace was false the file was not changed.

When I changed the file on disk, the logs say that the checksum changed and
that is replaced in the file bucket.

If you can consistently reproduce the behavior, open an issue with the
steps.

Thanks,
Andrew



On Wed, Jan 28, 2009 at 8:37 AM, Jeff  wrote:

>
> Sorry if I missed this in the documentation...
>
> Does this work according to its design?
>
> When I configure this file with a template and CHANGE the file on the
> client server, puppet detects a change and overwrites the file:
> file { "jboss-config":
>path=> "/etc/sysconfig/jboss",
>ensure  => present,
>replace => false,
>owner   => root,
>group   => root,
>mode=> "0644",
>content => template("/var/puppet/modules/atg/files/jboss-
> config.erb"),
>require => Package["jboss-${release}"]
> }
>
> BUT when I configure this file with a source:
> file { "jboss-config":
>path=> "/etc/sysconfig/jboss",
>ensure  => present,
>replace => false,
>owner   => root,
>group   => root,
>mode=> "0644",
>source  => "puppet://$servername/atg/jboss-config",
>require => Package["jboss-${release}"]
> }
>
> puppet does NOT overwrite a changed file on the client server.
>
> I expected no overwrites in either situation.
>
> Jeff
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Quote, dollar and pipe

2009-01-28 Thread Rob Chanter

On Wed, Jan 28, 2009 at 7:26 AM, Luke Kanies  wrote:
> Heh, sorry; I was trying to dredge up an appropriate response en
> Français and failed,

Would that be "de rien, et bienvenue"?

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: pkgsrc provider for Package?

2009-01-28 Thread Rob Chanter

On Wed, Jan 28, 2009 at 6:11 PM, James Turnbull  wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> So I just looked quickly at the doco for pkgsrc and the existing
> freebsd, openbsd and ports support in Puppet and it looks to me like
> it'll work fine.  It's currently confined to only work on OpenBSd and
> FreeBSD but it'd be an easy fix to update that and if there are minor
> bugs fix those.

Pkgsrc also works on Red Hat. We use it here for a few things. The
other thing that occurs to me is that with pkgsrc on non-NetBSD
systems, you end up with a mixed package system where core OS packages
are provided by RPM (or SVR4 pkgadd/pkgrm or whatever) and the
extended packages are managed using the pkgsrc toolset. There might
also be namespace clashes between the two package systems, since they
use different package databases.

Can puppet easily enough refer a package resource to an alternative provider?

cheers
rob

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Automating removal of an application

2009-01-28 Thread Andrew Shafer
I'm not entirely certain of your scenario, but unless you are going to
purposely have two versions of the same application running in production
for extended periods, this seems like the wrong way to do this.

Do you have some way to roll through Dev, Test, Staging, Production?

Can you just have one class for myApplication that gets versioned that goes
through the process to production?

We have some plans to handle more generic state transitions using Puppet, so
you could do something like apply this manifest, then this one, then this
other one, which would make your problem trivial.






On Mon, Jan 26, 2009 at 9:18 AM, nicolas  wrote:

>
> Hello,
>
>   I'm currently prototyping the use of Puppet to manage a bunch of
> home-made applications on a lot of servers.
>   As our applications evolves frequently and multiples versions can
> be used at the same time, we use classes that include version in their
> name, like "myApplication_1-2-0"
>
>  A typical application class like "myApplication_1-2-0" contains for
> example a package to install, some configuration files as templates, a
> crontab, a service definition and a mount point
>
>  When I want to deploy version 1-3-0 of my application on a node, to
> replace version 1-2-0, the standard way to do with puppet, as I
> understand it, would be :
>  - node initially contains "include myApplication_1-2-0"
>  - I edit node to contains "include myApplication_1-2-0::remove"
> where myApplication_1-2-0::remove is a class that removes everything
> myApplication_1-2-0 installed
>  - I apply the config to node
>  - I edit the node to contains "include myApplication_1-3-0"
>  - I apply the config to node
>
> But on node, there is the localconfig.yaml file (usually in /var/lib/
> puppet/) that contains everything needed to know what should be
> removed when myApplication_1-2-0 is installed.
> I was thinking of automating this step like this :
>  - retrieve config from master
>  - retrieve local config (in localconfig.yaml)
>  - if an application has not the same version on the master and
> locally then
>   a)  change everything to absent for version which is locally
> installed
>   b) apply this, so local version is removed
>   c) then apply config from master, so new version is installed
>
> Do you think it's a good approach ?
> If not, do you know an alternate ways to manage applications that have
> several versions ?
>
> thanks for your answers
> nicolas
>
> >
>

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Automating removal of an application

2009-01-28 Thread nicolas


Ok, I agree that my request is targeted to a special case that can be
dangerous if applied to general case.
My main concern was that our admins may find tedious to do the two-
steps process for each release of an application. Maybe I should tell
them it's more secure !

Anyway, thanks for sharing your ideas

nicolas




--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Automating removal of an application

2009-01-28 Thread Evan Hisey

On Wed, Jan 28, 2009 at 3:00 AM, nicolas  wrote:
>
>
> Thanks for your answer Evan.
>
> For these applications, we need to have a very good control. So we'll
> never update them via local update utility nor use an ensure => latest
> We always use ensure => x.y.z
> We also need to be able to do rollback, so it's simpler to remove
> everything from say, version 1-3-2, and then apply version 1-3-1
>
> I understand that our needs are specific, but there is something that
> surprise me with Puppet : if you don't explicitly remove something
> that was deployed previously with Puppet, then it stays
> For example, say you have a mount point A that you manage with Puppet
> For some reason, you need to change this mount point, now call it B.
> We could expect that if your manifest first contains A, then contains
> B, your intent is to remove A and creates B
> Puppet will just create B and leave A. It forces you to do it in two
> steps, first remove B, then apply and second add A then apply
>
> Any reasons why Puppet forces to explicitely remove everything that it
> previously installed (and that is known, thanks to localconfig.yaml
> file on nodes) ?
>

I find that this method is lot more admin friendly. If you have to
explicitly remove things you can not accidentally remove large chunks
of the system. Let say you have apache and php installed on a server.
You want to remove php but have forgotten that you replaced the apache
non-phped config with a phped config using the php module. Under
current operational mode nothing to bad happens except maybe a
complaint about the missing php. Under an automatic associated roll
back all of a sudden apache quits working because it removed the
config file, leaving you having to figure out that happened. A lot of
things in puppet error on the side of least surprise and least
dangerous.

  I occasionally have need to do one time pushes to my machines for
license files. Once all the machines have updated to the newest
license, I disable the license update as it only happens once a year
and only has to be done to existing installs as all new installs will
get the latest license. The current mode of operation makes this work.

Of course Luke may tell me I am totally wrong.

Evan

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] File 'replace => false' doesn't match my expectations...

2009-01-28 Thread Jeff

Sorry if I missed this in the documentation...

Does this work according to its design?

When I configure this file with a template and CHANGE the file on the
client server, puppet detects a change and overwrites the file:
file { "jboss-config":
path=> "/etc/sysconfig/jboss",
ensure  => present,
replace => false,
owner   => root,
group   => root,
mode=> "0644",
content => template("/var/puppet/modules/atg/files/jboss-
config.erb"),
require => Package["jboss-${release}"]
}

BUT when I configure this file with a source:
file { "jboss-config":
path=> "/etc/sysconfig/jboss",
ensure  => present,
replace => false,
owner   => root,
group   => root,
mode=> "0644",
source  => "puppet://$servername/atg/jboss-config",
require => Package["jboss-${release}"]
}

puppet does NOT overwrite a changed file on the client server.

I expected no overwrites in either situation.

Jeff
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: exported resources work sometimes

2009-01-28 Thread Brice Figureau

On Fri, 2009-01-16 at 09:41 -0500, Jason Kohles wrote:
> "MySQL server has gone away" means you lost your connection to mysql,  
> most likely because there is a configured idle timeout or the server  
> was restarted.

Or, more probably the mysql server has crashed, for any reasons
(including crashed/corrupted tables). Note that mysql usually run inside
a wrapper that relaunches it automatically if it crashes, so that's easy
to not notify mysql is down.

I suggest you look into your syslog file to see if there is anything
suspect, like errors or backtrace.

Hope that helps,
-- 
Brice Figureau
My Blog: http://www.masterzen.fr/


--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] autorequire, password, circular dependencies.

2009-01-28 Thread Dan Bode
dependency question:

I want to require that Package{ruby-shadow} is installed if its not there on
Redhat. This package is in Yum-repo which has some dependency requires for
files owned by root, so I have created the circular reference

user{root:password} -> Package[ruby-shadow] -> Class["yum"] (has files that
are owned by root) -> User[root]

Are there ways to fix situations where the autorequires don't allow me to do
something? Or do I have to work around them?

(for example, if I want to customize the root user, files owned by root
don't have to wait for this)

thanks,

Dan Bode

--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Automating removal of an application

2009-01-28 Thread nicolas


Thanks for your answer Evan.

For these applications, we need to have a very good control. So we'll
never update them via local update utility nor use an ensure => latest
We always use ensure => x.y.z
We also need to be able to do rollback, so it's simpler to remove
everything from say, version 1-3-2, and then apply version 1-3-1

I understand that our needs are specific, but there is something that
surprise me with Puppet : if you don't explicitly remove something
that was deployed previously with Puppet, then it stays
For example, say you have a mount point A that you manage with Puppet
For some reason, you need to change this mount point, now call it B.
We could expect that if your manifest first contains A, then contains
B, your intent is to remove A and creates B
Puppet will just create B and leave A. It forces you to do it in two
steps, first remove B, then apply and second add A then apply

Any reasons why Puppet forces to explicitely remove everything that it
previously installed (and that is known, thanks to localconfig.yaml
file on nodes) ?

nicolas
--~--~-~--~~~---~--~~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---