[Puppet Users] Puppet parser function woes

2015-07-07 Thread Peter Berghold
I've written a parser function to scrape a website looking for the newest
version of a package I want loaded on my laptop.  I'm getting really wonky
results.

Here's the function in all its glory completely un-edited:
require 'net/https'
require rexml/document
require 'sanitize'


module Puppet::Parser::Functions
  newfunction(:latest_makehuman_unstable, :type = :rvalue, :doc = -EOS
This function interrogates the MakeHuman nightly builds site to detect
the newest version of MakeHuman for download.

Returns the deb package name
EOS
 ) do |args|


stripped=Sanitize.clean(fetch_download_list())
lines = stripped.split(/\n/);
deblist=lines.grep(/x-debian/)
wanted = deblist.last.split(/.deb/).first + .deb
  end

end

def fetch_download_list
  begin
http = Net::HTTP.new(download.tuxfamily.org,80)
http.use_ssl = false
http.start do |http|
  req = Net::HTTP::Get.new(makehuman/nightly/,
   {User-Agent =
juretta.com RubyLicious 0.2})
  response = http.request(req)
  response.body

end
end

It is supposed to return the name of the latest .deb file listed on the
website.  This (I thought) should be a no-brainer.  Instead I get this:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
undefined local variable or method `resp' for
Scope(Class[Apps::Modelling::Makehuman]):Puppet::Parser::Scope at
/etc/puppet/environments/production/modules/apps/manifests/modelling/makehuman.pp:41
on node saltycowdawg.tfl.berghold.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The variable it is complaining about does not exist!  What the heck?

Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAArvnv1nHpn6RoY5F%3DcNM_%3DzU2ft1Gir_3QL-McYcBOaTGzpmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] where is PC1 for Debian Jessie?

2015-07-07 Thread Melissa Stone
On Mon, Jul 6, 2015 at 9:42 AM, Martin Alfke tux...@gmail.com wrote:

 Hi Felix,

 seems as if Jessie is missing the apt-sources.
 Remove the sources line from /etc/apt/sources.list.d/filename
 and rerun apt-get update

 best,
 Martin

 On 06 Jul 2015, at 01:37, Felix Frank felix.fr...@alumni.tu-berlin.de
 wrote:

  Hi,
 
  has anyone tried the PC1 on jessie yet? I just did the following:
 
  wget http://apt.puppetlabs.com/puppetlabs-release-pc1-jessie.deb
  dpkg -i puppetlabs-release-pc1-jessie.deb
  apt-get update
 
  but I get
 
  ...
  W: Failed to fetch http://apt.puppetlabs.com/dists/jessie/Release
  Unable to find expected entry 'PC1/source/Sources' in Release file
  (Wrong sources.list entry or malformed file)


The release package for jessie has been updated, and this should no longer
be an issue

 
  No puppetlabs packages come available to apt.
 
  Thanks,
  Felix
 
  On 06/09/2015 10:30 PM, Kylo Ginsberg wrote:
  Hey all,
 
  We're planning to release the next puppet-agent drop on June 22nd and
  that should include Jessie packages/repos.
 
  Meanwhile, you can grab jessie packages from our nightly builds, e.g.
 
 
 http://nightlies.puppetlabs.com/puppet-agent/3a6740a0753b6fb20d27e45071eedc29dd8b436c/repos/deb/jessie/PC1/puppet-agent_1.1.0.170.g3a6740a-1jessie_amd64.deb
 
  Builds only promote to nightly if they pass CI, but these are
  nightlies, so standard caveats apply.
 
  Thanks,
  Kylo
 
  --
  You received this message because you are subscribed to the Google
 Groups Puppet Users group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to puppet-users+unsubscr...@googlegroups.com.
  To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/5599BFB7.5090808%40Alumni.TU-Berlin.de
 .
  For more options, visit https://groups.google.com/d/optout.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/7EE67E94-8478-407F-9CC3-26D8F134536E%40gmail.com
 .
 For more options, visit https://groups.google.com/d/optout.




-- 
Melissa Stone
Release Engineer, Puppet Labs
--

*PuppetConf 2015 http://2015.puppetconf.com/ is coming to Portland,
Oregon! Join us October 5-9.*
*Register now to take advantage of the Early Adopter discount
https://www.eventbrite.com/e/puppetconf-2015-october-5-9-tickets-13115894995?discount=EarlyAdopter
*
*—**save $349!*

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAHEe_kqMYu1FwKLGC-A8W-YMNJMrmTYNbSyV3ofC2XxU%3D19fTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet firewall module and more esoteric rules

2015-07-07 Thread Hunter Haugen
Filed as a bug: https://tickets.puppetlabs.com/browse/MODULES-2197

On Fri, Jul 3, 2015 at 1:14 AM Tom Boland t...@t0mb.net wrote:

 Hi all,

 I've been looking at using the puppet firewall module to define the
 rules on a load balancer/proxy I'm working on.  Unfortunately, I don't
 think it's going to work, unless there's a workaround for the issue I've
 just found.

 I'm looking at implementing the SYNPROXY guidelines in this RedHat article:


 http://rhelblog.redhat.com/2014/04/11/mitigate-tcp-syn-flood-attacks-with-red-hat-enterprise-linux-7-beta/

 I've attempted to implement a rule in iptables, and then use puppet
 resource to reverse engineer it in to puppet, and this is the result:

 $ iptables -t raw -I PREROUTING -i eth0 -p tcp -m tcp --syn --dport 80
 -j CT --notrack
 $ puppet resource firewall
 firewall { '9001 7b01864cb3bb80b99a31bd1e24ec43e9':
ensure = 'present',
chain  = '80',
checksum_fill  = 'false',
clamp_mss_to_pmtu  = 'false',
dport  = ['CT'],
iniface= '--tcp-flags',
isfragment = 'false',
jump   = '--notrack',
kernel_timezone= 'false',
physdev_is_bridged = 'false',
proto  = 'FIN,SYN,RST,ACK SYN',
random = 'false',
rdest  = 'false',
reap   = 'false',
rsource= 'false',
rttl   = 'false',
socket = 'false',
table  = 'raw',
time_contiguous= 'false',
 }

 As you may see, the parameters are a bit jumbled.  The chain has the
 value for the port, and the dport has the value for the jump, the
 protocol has various TCP packet types rather than just 'tcp' etc etc.

 Would anyone be able to suggest a way around this?

 For the moment I'll look in to stopping the module purging existing
 rules and manage my SYNPROXY stuff outside of puppet.

 Many thanks.  Tom.

 --
 You received this message because you are subscribed to the Google Groups
 Puppet Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to puppet-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/puppet-users/5596445F.406%40t0mb.net.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJaQvGDMhUQCNTAtZbcpvLkyj--HxeZMGjWBC%2BeXuuAPmiXp-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How can I install ruby193 gems on CentOS 6 with softwarecollections (SCL)?

2015-07-07 Thread Stefan Lasiewski
Hello,

I have a CentOS 6 system running Puppet 3.8, and I use SCL (Software 
Collections https://www.softwarecollections.org) to install some packages 
like http24 and ruby193.

I am having trouble using Puppet's gem provider to install gems with 
ruby193.

I have a manifest like this:


  package { ['ruby193', 'ruby193-ruby-devel', 'ruby193-rubygem-bundler']:   
 
ensure  = present, 
 
require = Class['::company_yum::softwarecollections'], 
   
  } 
 
  # Install Compass for webapp 

  package { ['sass', 'compass']:   
  
ensure   = 'installed',   
  
provider = 'gem', 
  
require  = Package['ruby193-ruby-devel'], 
  
  }

 
But it seems that Puppet does not know about the location of the 
ruby193-ruby-devel headers, and I would need to use the SCL version of 
ruby193 gem, not /usr/bin/gem.


Notice: /Stage[main]/Class_webhost::Silverstripe/Package[ruby193-ruby-devel
]/ensure: created

Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri compass' 
returned 1: ERROR:  Error installing compass:

ERROR: Failed to build gem native extension.


/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10 
for inspection.

Results logged to 
/usr/lib/ruby/gems/1.8/gems/ffi-1.9.10/ext/ffi_c/gem_make.out

Building native extensions.  This could take a while...

Error: /Stage[main]/Class_webhost::Silverstripe/Package[compass]/ensure: 
change from absent to present failed: Execution of '/usr/bin/gem install --
no-rdoc --no-ri compass' returned 1: ERROR:  Error installing compass:

ERROR: Failed to build gem native extension.


/usr/bin/ruby extconf.rb

mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h



Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10 
for inspection.

Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.10/ext/ffi_c/gem_make.
out

Building native extensions.  This could take a while...

...

Notice: Finished catalog run in 50.02 seconds


The ruby193-ruby-devel headers live under /opt/rh/ruby193/ :

[root@webhost ~]# find /opt/rh/ruby193/root/ -name ruby.h
/opt/rh/ruby193/root/usr/include/ruby/ruby.h
/opt/rh/ruby193/root/usr/include/ruby.h
[root@webhost ~]# 



How can I use the Puppet gem provider to work with ruby193 installed by SCL?

Thanks,

-= Stefan

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8c61846a-bc57-4824-8b79-d2c5135158c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] elegant way to hash a line in a file, if present

2015-07-07 Thread Cam Mac
Hi Tom,

Thanks for the reply. I hadn't used the 'file' method as I didn't want to 
create the file if it wasn't there already, only modify it. Sorry I should 
have said that in my original post. It was this requirement that made it 
less than straightforward.

Cheers,

Cam

On Tuesday, 30 June 2015 14:41:54 UTC+1, Tom Limoncelli wrote:

 You'll want to create the file using file{} and then add require = 
 File['/path/to/file'] so that the file is created before Puppet tries 
 to modify it. 

 You can do that with less typing by using the - operator. For example: 

   file { '/usr/share/X11/xorg.conf.d/glamor.conf': 
 ensure = file, 
 mode  = '0644',   # adjust as needed 
 owner  = 'root', # adjust as needed 
 group  = 'root',# adjust as needed 
   }- 
   file_line { 'hash_glamor': 
 path  = '/usr/share/X11/xorg.conf.d/glamor.conf', 
 line  = '#  Load  glamoregl', 
 match = 'Load  glamoregl', 
   } 

 Tom 


 On Mon, Jun 29, 2015 at 10:37 AM, Cam Mac iuc...@gmail.com javascript: 
 wrote: 
  Hi, 
  
  I wanted to create a recipe for hashing a line in a file (I'd rather 
 hash it 
  than delete it), if the file is present and that particular line is 
 present. 
  I came up with a less than elegant solution and wondered whether 
  someone knows of a better way. 
  
  The file in question: /usr/share/X11/xorg.conf.d/glamor.conf 
  The line in question (which needs to be commented):  Load  glamoregl 
  
exec { 'hash_glamor': 
  path= '/bin:/usr/sbin:/usr/bin', 
  command = 'sed -i \'s/\(^\s*Load\s*\glamoregl\$\)/\#\1/\' 
  /usr/share/X11/xorg.conf.d/glamor.conf', 
  onlyif = 'grep -E ^\s*Load\s*\glamoregl\$ 
  /usr/share/X11/xorg.conf.d/glamor.conf', 
} 
  
  I tried using the 'file_line' module: 
  
file_line { 'hash_glamor': 
  path  = '/usr/share/X11/xorg.conf.d/glamor.conf', 
  line  = '#  Load  glamoregl', 
  match = 'Load  glamoregl', 
} 
  
  but this returns an error if the file doesn't exist, and I couldn't find 
 a 
  way of adding a conditional that will check whether the file exists in 
 the 
  'file_line' module before it executes. 
  
  Augeas could be a possibility, but I couldn't see a way of doing it in a 
  simple way. 
  
  Any suggestions welcome. 
  
  Thanks, 
  
  Cam 
  
  -- 
  You received this message because you are subscribed to the Google 
 Groups 
  Puppet Users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to puppet-users...@googlegroups.com javascript:. 
  To view this discussion on the web visit 
  
 https://groups.google.com/d/msgid/puppet-users/f0b10c43-3868-46f7-9257-fd1e795dc360%40googlegroups.com.
  

  For more options, visit https://groups.google.com/d/optout. 



 -- 
 Email: t...@whatexit.org javascript:Work: 
 tlimonce...@stackoverflow.com 
 Skype: YesThatTom 
 Blog:  http://EverythingSysadmin.com 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/57ff8e31-591b-4e20-af80-4b50c2709764%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] how to use file resource with source file name unknown

2015-07-07 Thread Andreas Dvorak
Hello,

I have a module to copy files /etc/hostname.* in Solaris. But the interface 
name can be any.

e.g.
networking/file/vm6742/hostname.e1000g0
networking/file/vm6742/hostname.e1000g1

I do not want to user file with recurse because the files in /etc have 
different permissions.

Is it possible to get a file list of the source to use that in the file 
resource or is there an other solution?


Best regards
Andreas

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1b0199b1-7e9b-47ff-a08a-10ef8ae6c5bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] How to make service start depend on a file existing

2015-07-07 Thread Mark Kirkwood
I would like to prevent a service starting until a certain file exists. 
The wrinkle is that the file is not (directly) created by puppet.


I'm thinking that I want to somehow 'declare' the file to puppet without 
*it* trying to create it, and the use something like:


File[the-file] - Service[the-service]

to make sure the service get started after the file is created. However 
I'm stumped at the first bit (the file 'declare' idea). Any thoughts?


Regards

Mark

--
You received this message because you are subscribed to the Google Groups Puppet 
Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/559C7B17.1000401%40catalyst.net.nz.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Augeas: Skipping because no files were changed

2015-07-07 Thread Ian Mortimer
On Tue, 2015-07-07 at 07:33 -0700, Chris Lee wrote:

 I am trying to add two new options to grub.conf using augeas.
 The code is as follows:
 
 augeas { 'grub.conf/8250_LAR':
 tag = chris1,
 incl= '/boot/grub/grub.conf',
 lens= 'Grub.lns',
 changes = [
 'set /title[1]/kernel/8250.nr_uarts 8',
 'set /title[1]/kernel/8250_core.nr_uarts 8',
 ],
 }

This needs:

   context = '/files/etc/grub.conf',


-- 
Ian

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1436324375.3994.75.camel%40its-ep-84lxwx1.its.uq.edu.au.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Augeas: Skipping because no files were changed

2015-07-07 Thread Ian Mortimer
On Tue, 2015-07-07 at 07:33 -0700, Chris Lee wrote:

 I am trying to add two new options to grub.conf using augeas.
 The code is as follows:
 
 augeas { 'grub.conf/8250_LAR':
 tag = chris1,
 incl= '/boot/grub/grub.conf',
 lens= 'Grub.lns',
 changes = [
 'set /title[1]/kernel/8250.nr_uarts 8',
 'set /title[1]/kernel/8250_core.nr_uarts 8',
 ],
 }

Actually in this case it needs:

   context = '/files/boot/grub/grub.conf',

or:

   context = '/files/etc/grub.conf',
   incl = '/etc/grub.conf',


-- 
Ian

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1436325812.3994.77.camel%40its-ep-84lxwx1.its.uq.edu.au.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: how to use file resource with source file name unknown

2015-07-07 Thread jcbollinger


On Tuesday, July 7, 2015 at 5:22:45 AM UTC-5, Andreas Dvorak wrote:

 Hello,

 I have a module to copy files /etc/hostname.* in Solaris. But the 
 interface name can be any.

 e.g.
 networking/file/vm6742/hostname.e1000g0
 networking/file/vm6742/hostname.e1000g1

 I do not want to user file with recurse because the files in /etc have 
 different permissions.

 Is it possible to get a file list of the source to use that in the file 
 resource or is there an other solution?


You can use Puppet's generate() function to get a listing of the files on 
the master, and manipulate the result into on File resource for each of the 
source files.  Probably the built-in split() function will be useful for 
that, and perhaps also regsubst().  Alternatively, you could package some 
or all of that into a custom function.

You might also find it to your advantage to wrap up the per-file details in 
a defined type, which you can instantiate with an array title derived from 
your file list:

mymodule::hostname_file { $filenames: }

Or I guess the newfangled way to go about it would involve the each() 
function (Puppet 4 or future parser only).


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/903b0c66-f36b-4a8e-8c45-879d16971add%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: yum disable/enable repo with wildcards

2015-07-07 Thread jcbollinger


On Monday, July 6, 2015 at 12:14:30 PM UTC-5, Vince Skahan wrote:

 On Monday, July 6, 2015 at 7:44:17 AM UTC-7, jcbollinger wrote:


[...] 
 


 If you are concerned that unmanaged repos may be be added to your systems, 
 and you are running at least Puppet 3.5, then you should be able to use the 
 Resources metaresource to purge unmanaged repos.


 I'm struggling with translating that last statement into English I can 
 understand.have an example I could try ?



Yes:

resources { 'purge unmanaged Yum repos':
  name = 'yumrepo',
  purge = true
}

Warning: apply that *only* to systems on which all repo definitions you 
want to retain are managed by Yumrepo resources.  Any others (that Puppet 
finds) will be completely removed.

See the docs for the Resources (meta-) resource type 
https://docs.puppetlabs.com/references/3.stable/type.html#resources for a 
bit more information.


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/0b0337c7-17db-4b54-8661-838845b7a992%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Config test when restarting a service

2015-07-07 Thread jcbollinger


On Monday, July 6, 2015 at 8:43:33 AM UTC-5, Jonathan Gazeley wrote:

 On 06/07/15 14:26, Peter Meier wrote: 
  -BEGIN PGP SIGNED MESSAGE- 
  Hash: SHA1 
  
  Notify on its own is no good, since if the exec fails, the service 
  gets restarted anyway. 
  
  Require on its own is no good, since the exec runs every time. 
  
  Is there some way to combine the two? 
  The problem is that a notify includes a before relationship, which 
  means that the service resource is always being managed *before* the 
  config test happens. What you want is the following: 

 Hi Pete, 

 Thanks for your detailed response. At my site, the DHCP config is partly 
 written out by a Forge module, partly generated by a script from a 
 database and partly deployed from a git repo where it is edited by 
 humans. So it seems a bit messy to get all of these resources to notify 
 the config test and the service. 



You can always have the config-test resource 'subscribe' to the various 
data source resources instead of having the data sources 'notify' the 
exec.  The effects are identical.  Likewise, you may either have the 
config-test resource 'notify' the service or have the service 'subscribe' 
to the config-test resource.  It seems pretty clean to me to put all these 
relationships on the config test, as that way you can freely modify or even 
remove the config test without changing anything else.  The ultimate data 
sources can notify the service directly if you wish; that will not prevent 
the config test being interposed between and serving to gate the restart.  
If you want the test to be performed only when one of the config sources is 
modified (by Puppet) then set it to be 'refreshonly'.

You cannot hook the test so tightly to the service that it is automatically 
run before the service is refreshed, without regard to the reason for the 
refresh.  You could, however, wrap Exec and Service together into a defined 
type, to serve as a stand-in for the bare Service resource, so that any 
event received by the defined type instance triggers the test before the 
service is restarted:

define mymodule::checked_dhcpd(
$test_command = '/bin/true',
# service properties ...
  ) {
  exec { 'dhcpd-config-test':
command = $test_command,
refreshonly = true
  }
  ~
  service { 'dhcpd':
# ...
  }

}

That does not protect you from resources notifying the Service directly, 
but it will do what you want as long as they notify only the defined-type 
instance (which alternatively may itself subscribe to any resource of 
interest).


John

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b8522a1d-3a46-4a99-9b72-f96a04bb3f1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] PuppetDB Sizing

2015-07-07 Thread Byron Miller
I use the write/read configuration built into PuppetDB and point the 
interfaces to VIPs behind a netscaler..  Netscaler load balances to the 
puppetDB instances and they're all setup so that writes happen to the 
primary DB node and reads can happen on the VIP for the slave nodes.  The 
slave nodes just use log shipping in postgres 9.4.

I'm not running 8000 nodes, but we do have about 2k and i get away with 
running puppetdb in vmware on fairly small sized VMs.  We use the crap out 
of read access for internal tooling and 30 minute checkins don't seem to 
cause much load for writes.

-byron

On Thursday, July 2, 2015 at 8:15:00 AM UTC-5, miguel wrote:

 On Thu, Jul 2, 2015 at 6:39 AM, Erik Dalén erik.gus...@gmail.com 
 javascript: wrote: 
  
  We have separated the PuppetDB service hosts and the postgres databases 
 to 
  different hosts. For postgres we have a write master with a hot standby 
 and 
  four read-only slaves (one for each PuppetDB host). This was scaled up 
 when 
  we actually had some performance issues with earlier PuppetDB versions 
 and 
  can likely be scaled down to just two service hosts and read-only slaves 
  without issues now. 
  

 Could you share how did you configure the write-master and the read-only 
 slaves? 

 Did you use the write/read separation of PuppetDB configuration? 


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/15f0cd84-bc4c-48cc-9c06-ab51fb7a3294%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Augeas: Skipping because no files were changed

2015-07-07 Thread Chris Lee
I am trying to add two new options to grub.conf using augeas.
The code is as follows:

augeas { 'grub.conf/8250_LAR':
tag = chris1,
incl= '/boot/grub/grub.conf',
lens= 'Grub.lns',
changes = [
'set /title[1]/kernel/8250.nr_uarts 8',
'set /title[1]/kernel/8250_core.nr_uarts 8',
],
}


However nothing is added to /etc/grub.conf at all, and the puppet run 
completes as follows with debug.

Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Augeas version 1.0.0 is 
installed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Will attempt to save and 
only run if files changed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): sending command 'set' 
with params [/title[*]/kernel/8250.nr_uarts, 8]
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): sending command 'set' 
with params [/title[*]/kernel/8250_core.nr_uarts, 8]
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Skipping because no 
files were changed
Debug: Augeas[grub.conf/8250_LAR](provider=augeas): Closed the augeas 
connection

Manually, Augeas appears to work fine:

augtool set /files/boot/grub/grub.conf/title[1]/kernel/8250_core.nr_uarts 8
augtool save
Saved 1 file(s)

I'd appreciate any ideas?


Thanks
Chris

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9f4a854d-e3b3-4be1-b7f2-5d495dba21d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.