RE: [Puppet Users] Outofmemory error for puppetserver process

2016-05-23 Thread Johan De Wit
Hi Jim, 



You should find some answers here : 
https://docs.puppet.com/puppetserver/2.3/tuning_guide.html



per jruby instance, we assign 512mb tot the VM, so 256mb is a little too less.



hth



Johan





-Original message-
From: Jim 
Sent: Tuesday 24th May 2016 4:54
To: Puppet Users 
Subject: [Puppet Users] Outofmemory error for puppetserver process

Hey Guys,

I am wondering what is the problem with the following puppetserver process and 
how to have it resolved.

Interesting thing is puppetserver is still running ! and is able to communicate 
it with agents so I am not sure what is the problem !

I still have 2GB of free memory on my VM

root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# ps 
-aef|grep -i puppet|grep -v grep
root       742     1  0 09:39 ?        00:00:02 /opt/puppetlabs/puppet/bin/ruby 
/opt/puppetlabs/puppet/bin/puppet agent --no-daemonize
root      1369     1  0 09:39 ?        00:00:08 /opt/puppetlabs/puppet/bin/ruby 
/opt/puppetlabs/puppet/bin/mcollectived 
--config=/etc/puppetlabs/mcollective/server.cfg 
--pidfile=/var/run/puppetlabs/mcollective.pid --daemonize
puppet    8044     1  0 09:53 ?        00:01:09 /usr/bin/java 
-XX:OnOutOfMemoryError=kill -9 %p -Djava.security.egd=/dev/urandom -Xms256M 
-Xmx256M -XX:MaxPermSize=256m -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar clojure.main 
-m puppetlabs.trapperkeeper.main --config /etc/puppetlabs/puppetserver/conf.d 
-b /etc/puppetlabs/puppetserver/bootstrap.cfg
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
free -g
             total       used       free     shared    buffers     cached
Mem:             3          1          2          0          0          0
-/+ buffers/cache:          1          2
Swap:            3          0          3
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 


As you can see I have set puppetserver memory to as low as 256MB. I tried to 
change it to 512MB as well but still it reports "OutOfMemory" so kept it on 
256MB anyway.

Here is the output which confirms that puppetserver is running.

root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
service puppetserver status
â— puppetserver.service - LSB: puppetserver
   Loaded: loaded (/etc/init.d/puppetserver)
   Active: active (running) since Tue 2016-05-24 12:53:06 AEST; 16s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10986 ExecStart=/etc/init.d/puppetserver start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/puppetserver.service
           â””─10992 /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p 
-Djava.security.egd=/dev/urandom -Xms256M -Xmx256M -XX:MaxPermSize=256m -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-se...

May 24 12:52:22 jim-Ubuntu1504 systemd[1]: Starting LSB: puppetserver...
May 24 12:53:06 jim-Ubuntu1504 systemd[1]: Started LSB: puppetserver.
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 

Any advice would be much appreciated.

Cheers
Jim

-- 
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/60c8e923-10ca-4d01-a09c-7e87a5036fdb%40googlegroups.com.
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/zarafa.5743e8e3.4d32.16d28aed05678ec2%40zarafa.open-future.be.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Custom Facts for windows with powershell

2016-05-23 Thread Jim
Hi Harish,

I tried to do a simulation at my end and it might be because of syntax 
error. Please provide some feedback.

Regards,
Jim


On Tuesday, 24 May 2016 04:08:29 UTC+10, Harish Kothuri wrote:
>
> Hi, 
>
> I'm trying to create a custom fact to get the installed software using 
> powershell command in windows as follows...
>
>
> *PS Command:-* 
> Get-ItemProperty 
> HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | 
> where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | 
> Select-Object DisplayName, DisplayVersion | ForEach-Object {Write-Host 
> $_.DisplayName"="$_.DisplayVersion}
>
> *Output:-*
> 7-Zip 15.14 = 15.14
> ActiveState ActiveTcl 8.4.20.0 = 8.4.20.0
> Microsoft .NET Framework 4 Client Profile = 4.0.30319
> Microsoft .NET Framework 4 Extended = 4.0.30319
> Notepad++ = 6.9.1
> Microsoft .NET Framework 4 Extended = 4.0.30319
> Puppet = 3.8.7
> Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030 = 11.0.61030.0
> Microsoft .NET Framework 4 Client Profile = 4.0.30319
> MSXML 4.0 SP2 Parser and SDK = 4.20.9818.0
> Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 = 9.0.30729
> VC9.0 SP0 Debug CRT DLLs = 1.0.0
> Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030 = 11.0.61030
> Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030 = 11.0.61030
> Microsoft Visual C++ 2010  x86 Redistributable - 10.0.40219 = 10.0.40219
> ActivePerl 5.16.3 Build 1603 = 5.16.1603
>
>
> i have created a powershellscript like  getinstalledlist.ps1 with above 
> command and placed in facters.d folder. 
>
> When i run puppet agent -t , i get the following error.
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Failed to parse inline template: `@7_zip_15_14 . 
>
>
> Can someone help me to get this going?
>
> Thanks & Regards,
> Harish Kothuri
>

-- 
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/f6071422-0599-4de7-9407-9c567abf543c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Outofmemory error for puppetserver process

2016-05-23 Thread Jim
Hey Guys,

I am wondering what is the problem with the following puppetserver process 
and how to have it resolved.

Interesting thing is puppetserver is still running ! and is able to 
communicate it with agents so I am not sure what is the problem !

I still have 2GB of free memory on my VM

root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
ps -aef|grep -i puppet|grep -v grep
root   742 1  0 09:39 ?00:00:02 
/opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/puppet agent 
--no-daemonize
root  1369 1  0 09:39 ?00:00:08 
/opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/mcollectived 
--config=/etc/puppetlabs/mcollective/server.cfg 
--pidfile=/var/run/puppetlabs/mcollective.pid --daemonize
puppet8044 1  0 09:53 ?00:01:09 /usr/bin/java 
-XX:OnOutOfMemoryError=kill -9 %p -Djava.security.egd=/dev/urandom -Xms256M 
-Xmx256M -XX:MaxPermSize=256m -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar 
clojure.main -m puppetlabs.trapperkeeper.main --config 
/etc/puppetlabs/puppetserver/conf.d -b 
/etc/puppetlabs/puppetserver/bootstrap.cfg
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
free -g
 total   used   free sharedbuffers cached
Mem: 3  1  2  0  0  0
-/+ buffers/cache:  1  2
Swap:3  0  3
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 


As you can see I have set puppetserver memory to as low as 256MB. I tried 
to change it to 512MB as well but still it reports "OutOfMemory" so kept it 
on 256MB anyway.

Here is the output which confirms that puppetserver is running.

root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
service puppetserver status
â—  puppetserver.service - LSB: puppetserver
   Loaded: loaded (/etc/init.d/puppetserver)
   Active: active (running) since Tue 2016-05-24 12:53:06 AEST; 16s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 10986 ExecStart=/etc/init.d/puppetserver start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/puppetserver.service
   └─10992 /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p 
-Djava.security.egd=/dev/urandom -Xms256M -Xmx256M -XX:MaxPermSize=256m -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-se...

May 24 12:52:22 jim-Ubuntu1504 systemd[1]: Starting LSB: puppetserver...
May 24 12:53:06 jim-Ubuntu1504 systemd[1]: Started LSB: puppetserver.
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 

Any advice would be much appreciated.

Cheers
Jim

-- 
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/60c8e923-10ca-4d01-a09c-7e87a5036fdb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] What is the meaning of all these different version commands

2016-05-23 Thread Jim
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments# puppet --version
4.4.1
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments# puppetserver 
--version
puppetserver version: 2.3.1
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments# puppet agent 
--version
4.4.1

Also If I want to upgrade my Ubuntu from 15.10 to 16.04 would the puppet 
server and agent would also get upgraded?

Please advise.


Thanks
Jim

-- 
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/a2fa46b5-ae79-4095-8662-efd1fea2c7b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Custom Facts for windows with powershell

2016-05-23 Thread Jim
Hi Harish,

I am new to powershell and would like t help you although I am new to 
puppet itself.

In your powershell command why are you looking for registry key 'Uninstall' 
should it be Installed?

Please advise.

Thanks
Jim


On Tuesday, 24 May 2016 04:08:29 UTC+10, Harish Kothuri wrote:
>
> Hi, 
>
> I'm trying to create a custom fact to get the installed software using 
> powershell command in windows as follows...
>
>
> *PS Command:-* 
> Get-ItemProperty 
> HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | 
> where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | 
> Select-Object DisplayName, DisplayVersion | ForEach-Object {Write-Host 
> $_.DisplayName"="$_.DisplayVersion}
>
> *Output:-*
> 7-Zip 15.14 = 15.14
> ActiveState ActiveTcl 8.4.20.0 = 8.4.20.0
> Microsoft .NET Framework 4 Client Profile = 4.0.30319
> Microsoft .NET Framework 4 Extended = 4.0.30319
> Notepad++ = 6.9.1
> Microsoft .NET Framework 4 Extended = 4.0.30319
> Puppet = 3.8.7
> Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030 = 11.0.61030.0
> Microsoft .NET Framework 4 Client Profile = 4.0.30319
> MSXML 4.0 SP2 Parser and SDK = 4.20.9818.0
> Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 = 9.0.30729
> VC9.0 SP0 Debug CRT DLLs = 1.0.0
> Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030 = 11.0.61030
> Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030 = 11.0.61030
> Microsoft Visual C++ 2010  x86 Redistributable - 10.0.40219 = 10.0.40219
> ActivePerl 5.16.3 Build 1603 = 5.16.1603
>
>
> i have created a powershellscript like  getinstalledlist.ps1 with above 
> command and placed in facters.d folder. 
>
> When i run puppet agent -t , i get the following error.
>
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Failed to parse inline template: `@7_zip_15_14 . 
>
>
> Can someone help me to get this going?
>
> Thanks & Regards,
> Harish Kothuri
>

-- 
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/fef683cb-d265-4611-9bd2-9bdbb512e192%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Rob Nelson
I wrote some articles on using Git with puppet and r10k. It's a little out
of date in the referenced versions of puppet and r10k, so check to make
sure you're using the modern file locations, but otherwise remains
accurate.
https://rnelson0.com/2014/05/19/puppet-and-git-201-r10k-setup-installation/

There's a link to a Git 100 series I wrote if you need assistance with Git
itself.

On Monday, May 23, 2016, Alex Samad  wrote:

> Hi
>
> Is it really that painful to retro fit git. or is the way you think
> about the DB that different ?
>
> Could you point a good starting point to read up on this ?
>
> Thanks
> Alex
>
> On 24 May 2016 at 07:16, Christopher Wood  > wrote:
> > On Mon, May 23, 2016 at 03:51:58PM +1000, Alex Samad wrote:
> >> How hard is it to retro fit SVN / GIT onto a puppet install.
> >>
> >> I am building from scratch, working through the doco.
> >>
> >> Was thinking once I have a friendly setup then I would look at putting
> >> that into SVN/GIT.
> >
> > Do yourself a huge favour, use git as the tool you use to construct the
> setup. Use it from the start of the process, not just as what you put
> things into when you're done.
> >
> >> Thoughts are
> >> install puppet
> >> install puppetDB
> >> install heira ??
> >>
> >> setup environments, currently thinking
> >> Prod - all prod env
> >> SIM - testing for prod
> >> INF - inf
> >> NON Prod - anything thats not above
> >> dev - testing
> >> alex - personal
> >>
> >> Then I was going to create a whole bundle of profiles break up into
> >>
> >> OS app
> >> things like
> >> smtp
> >> ssh
> >> http
> >> etc
> >>
> >> have the default company setup
> >>
> >> Company Apps
> >> things that cover company apps
> >>
> >>
> >> Then build some roles - based solely from profiles.
> >>
> >> Then some how dynamically assign nodes to a roles / environment.
> >>
> >>
> >> Sounds okay ??
> >>
> >> A
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 23 May 2016 at 10:47, Rilindo Foster  > wrote:
> >> > You can use any VCS with Puppet. I know of one shop that uses
> Mercurial.
> >> >
> >> > Most of the tooling and integration are closely coupled with git and
> most of the workflows assumes that you will be using git. So it would be a
> good idea to get up to speed with it.
> >> >
> >> > Of note that you can use git with svn (which may be helpful if you
> are getting started:
> >> >
> >> >
> https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
> >> >
> >> > - Rilindo
> >> >
> >> > -Original Message-
> >> > From: puppet-users@googlegroups.com  [mailto:
> puppet-users@googlegroups.com ] On Behalf Of Alex Samad
> >> > Sent: Sunday, May 22, 2016 7:44 PM
> >> > To: puppet-users@googlegroups.com 
> >> > Subject: Re: [Puppet Users] Puppet and SVN
> >> >
> >> > Ta
> >> >
> >> > I was at the last puppet (sydney ) users group. heard r10k mentioned
> a lot.
> >> >
> >> > Also I got the impression that git was more closely integrated with
> puppet.
> >> >
> >> > Should I be l looking at git ?
> >> >
> >> > A
> >> >
> >> >
> >> > On 23 May 2016 at 10:40, Henrik Lindberg  > wrote:
> >> >> On 22/05/16 12:41, Alex Samad wrote:
> >> >>>
> >> >>> Hi
> >> >>>
> >> >>> just starting out with puppet.
> >> >>> I found
> >> >>> this
> >> >>>
> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
> >> >>> old page
> >> >>>
> >> >>> talks about checking /etc/puppet into svn.
> >> >>>
> >> >>> But on my centos install I have /etc/puppetlabs/puppet
> >> >>>
> >> >>> do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
> >> >>> later what about my codedir ?
> >> >>>
> >> >>
> >> >> You probably want to use the project r10k to manage your
> >> >> manifests/configurations that are stored in a source code control
> >> >> repository.
> >> >>
> >> >> Here is the page that explains a bit about r10k and SVN:
> >> >>
> https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environment
> >> >> s/svn-environments.mkd
> >> >>
> >> >> There is also lots of material available on r10k itsef that is easy
> to
> >> >> find if you google for it.
> >> >>
> >> >> Regards
> >> >> - henrik
> >> >>
> >> >>> Thanks
> >> >>>
> >> >>> --
> >> >>> 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/ee63fdad-2d0f-4914-b9c
> >> >>> a-0dbdb5044dc3%40googlegroups.com
> >> >>>
> >> >>> <
> https://groups.google.com/d/msgid/puppet-users/ee63fdad-2d0f-4914-b9ca-0dbdb5044dc3%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> >> >>> For more options, visit https://groups.google.com/d/optout.
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >>
> >> >> Visit my Blog "Puppet on the Edge"
> >

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Christopher Wood
It sounds like what you are thinking about is the roles/profiles paradigm, and 
your tool is r10k. Reading suggestions:

https://puppet.com/blog/git-workflows-puppet-and-r10k
http://somethingsinistral.net/blog/rethinking-puppet-deployment/
http://garylarizza.com/blog/2014/02/18/puppet-workflow-part-3/
https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/workflow-guide.mkd

It will help you to download your first set of modules from the puppet forge. 
There's not much point re-implementing automated ntp management for instance. 
Later on you can do your own modules for any proprietary bits.

https://forge.puppet.com/

Think of it as using git as a tool to implement. You are not retrofitting git 
on your workflow, you are using git to record it.

On Tue, May 24, 2016 at 07:41:19AM +1000, Alex Samad wrote:
> Hi
> 
> Is it really that painful to retro fit git. or is the way you think
> about the DB that different ?
> 
> Could you point a good starting point to read up on this ?
> 
> Thanks
> Alex
> 
> On 24 May 2016 at 07:16, Christopher Wood  wrote:
> > On Mon, May 23, 2016 at 03:51:58PM +1000, Alex Samad wrote:
> >> How hard is it to retro fit SVN / GIT onto a puppet install.
> >>
> >> I am building from scratch, working through the doco.
> >>
> >> Was thinking once I have a friendly setup then I would look at putting
> >> that into SVN/GIT.
> >
> > Do yourself a huge favour, use git as the tool you use to construct the 
> > setup. Use it from the start of the process, not just as what you put 
> > things into when you're done.
> >
> >> Thoughts are
> >> install puppet
> >> install puppetDB
> >> install heira ??
> >>
> >> setup environments, currently thinking
> >> Prod - all prod env
> >> SIM - testing for prod
> >> INF - inf
> >> NON Prod - anything thats not above
> >> dev - testing
> >> alex - personal
> >>
> >> Then I was going to create a whole bundle of profiles break up into
> >>
> >> OS app
> >> things like
> >> smtp
> >> ssh
> >> http
> >> etc
> >>
> >> have the default company setup
> >>
> >> Company Apps
> >> things that cover company apps
> >>
> >>
> >> Then build some roles - based solely from profiles.
> >>
> >> Then some how dynamically assign nodes to a roles / environment.
> >>
> >>
> >> Sounds okay ??
> >>
> >> A
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On 23 May 2016 at 10:47, Rilindo Foster  wrote:
> >> > You can use any VCS with Puppet. I know of one shop that uses Mercurial.
> >> >
> >> > Most of the tooling and integration are closely coupled with git and 
> >> > most of the workflows assumes that you will be using git. So it would be 
> >> > a good idea to get up to speed with it.
> >> >
> >> > Of note that you can use git with svn (which may be helpful if you are 
> >> > getting started:
> >> >
> >> > https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
> >> >
> >> > - Rilindo
> >> >
> >> > -Original Message-
> >> > From: puppet-users@googlegroups.com 
> >> > [mailto:puppet-users@googlegroups.com] On Behalf Of Alex Samad
> >> > Sent: Sunday, May 22, 2016 7:44 PM
> >> > To: puppet-users@googlegroups.com
> >> > Subject: Re: [Puppet Users] Puppet and SVN
> >> >
> >> > Ta
> >> >
> >> > I was at the last puppet (sydney ) users group. heard r10k mentioned a 
> >> > lot.
> >> >
> >> > Also I got the impression that git was more closely integrated with 
> >> > puppet.
> >> >
> >> > Should I be l looking at git ?
> >> >
> >> > A
> >> >
> >> >
> >> > On 23 May 2016 at 10:40, Henrik Lindberg  
> >> > wrote:
> >> >> On 22/05/16 12:41, Alex Samad wrote:
> >> >>>
> >> >>> Hi
> >> >>>
> >> >>> just starting out with puppet.
> >> >>> I found
> >> >>> this
> >> >>> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
> >> >>> old page
> >> >>>
> >> >>> talks about checking /etc/puppet into svn.
> >> >>>
> >> >>> But on my centos install I have /etc/puppetlabs/puppet
> >> >>>
> >> >>> do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
> >> >>> later what about my codedir ?
> >> >>>
> >> >>
> >> >> You probably want to use the project r10k to manage your
> >> >> manifests/configurations that are stored in a source code control
> >> >> repository.
> >> >>
> >> >> Here is the page that explains a bit about r10k and SVN:
> >> >> https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environment
> >> >> s/svn-environments.mkd
> >> >>
> >> >> There is also lots of material available on r10k itsef that is easy to
> >> >> find if you google for it.
> >> >>
> >> >> Regards
> >> >> - henrik
> >> >>
> >> >>> Thanks
> >> >>>
> >> >>> --
> >> >>> 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
> >> >>>
> >> >>> http

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Henrik Lindberg

On 24/05/16 01:03, Ramin K wrote:

On 5/22/16 3:41 AM, Alex Samad wrote:

Hi

just starting out with puppet.
I found
this
http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
old page

talks about checking /etc/puppet into svn.

But on my centos install I have /etc/puppetlabs/puppet

do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
later what about my codedir ?


I have one of the largest SVN backed Puppet systems. It's painful,
slows us down, and we're getting off it this quarter. Finally.

If you don't have much dev experience, the idea that each branch
exists as a set of files in SVN initially sounds great. However the
inability to split work off into branches both short and long lived
starts to take its toll. Also tooling it hard, can't push a branch for
someone else to check out. You end up having "scratch space" for tests
that eventually have to be merged. It makes it hard to do sweeping
changes as scratch space has to encompass it all at least in most
schemes I've observed.

I'm sure there are ways around some of the problems, but git based
branch development is ridiculously good with minimal investment. That
said git will seem like more work than you'd like when you have one or
two people working on the codebase. I never appreciated till I was on a
larger team.

Answering the other question, I recommend starting with
/etc/*puppetwhatever*/environments/{production|stage|etc}/ as releasses
of your src control rather than deploying directly to /etc/puppetlabs/
from src control.

Ramin



Alex, listen to Ramin!

Since I started coding, I have used (in order):

SCCS
RCS
CVS
ClearCase
Perforce
SVN
git

With the exception of git they have all been a total pain to use.

With git, being different from the others it may seem daunting at first. 
Also, at the beginning your are bound to make beginner mistakes.
Take the advice to start early with git. Even if you are just 
exploring/hacking/learning - that way if you screw things up it is not 
the end of the world, and you learn the right way. Contrast that with 
having to do everything with quality at some later point where you have 
a working system and "retrofitting" - now you have to figure out all the 
git related stuff at once without any prior experience.


Don't bother going first to SVN and then use the SVN to git. I have 
migrated SVN to git - it works, but then you have to learn that domain 
as well (it has its pitfalls).


As you go along you want to hang out on Slack or IRC (which ever suits 
you best). There you will find many helpful colleagues that will help 
you out, be it with puppet or git.


Best,
- henrik

--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
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/bc18a34f-ab2f-86a5-c9aa-d8ff1865c27b%40puppet.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Henrik Lindberg

On 23/05/16 23:16, Christopher Wood wrote:

On Mon, May 23, 2016 at 03:51:58PM +1000, Alex Samad wrote:

How hard is it to retro fit SVN / GIT onto a puppet install.

I am building from scratch, working through the doco.

Was thinking once I have a friendly setup then I would look at putting
that into SVN/GIT.


Do yourself a huge favour, use git as the tool you use to construct the setup. 
Use it from the start of the process, not just as what you put things into when 
you're done.



+1


Thoughts are
install puppet
install puppetDB
install heira ??



Since you are starting fresh. You are probably starting with something 
like Puppet 4.4.x and since puppet 4.0.0 the packaging is "all in one" 
for puppet. There is no need to install hiera separately.


- henrik


setup environments, currently thinking
Prod - all prod env
SIM - testing for prod
INF - inf
NON Prod - anything thats not above
dev - testing
alex - personal

Then I was going to create a whole bundle of profiles break up into

OS app
things like
smtp
ssh
http
etc

have the default company setup

Company Apps
things that cover company apps


Then build some roles - based solely from profiles.

Then some how dynamically assign nodes to a roles / environment.


Sounds okay ??

A









On 23 May 2016 at 10:47, Rilindo Foster  wrote:

You can use any VCS with Puppet. I know of one shop that uses Mercurial.

Most of the tooling and integration are closely coupled with git and most of 
the workflows assumes that you will be using git. So it would be a good idea to 
get up to speed with it.

Of note that you can use git with svn (which may be helpful if you are getting 
started:

https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion

- Rilindo

-Original Message-
From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] On 
Behalf Of Alex Samad
Sent: Sunday, May 22, 2016 7:44 PM
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Puppet and SVN

Ta

I was at the last puppet (sydney ) users group. heard r10k mentioned a lot.

Also I got the impression that git was more closely integrated with puppet.

Should I be l looking at git ?

A


On 23 May 2016 at 10:40, Henrik Lindberg  wrote:

On 22/05/16 12:41, Alex Samad wrote:


Hi

just starting out with puppet.
I found
this
http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
old page

talks about checking /etc/puppet into svn.

But on my centos install I have /etc/puppetlabs/puppet

do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
later what about my codedir ?



You probably want to use the project r10k to manage your
manifests/configurations that are stored in a source code control
repository.

Here is the page that explains a bit about r10k and SVN:
https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environment
s/svn-environments.mkd

There is also lots of material available on r10k itsef that is easy to
find if you google for it.

Regards
- henrik


Thanks

--
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/ee63fdad-2d0f-4914-b9c
a-0dbdb5044dc3%40googlegroups.com

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




--

Visit my Blog "Puppet on the Edge"
http://puppet-on-the-edge.blogspot.se/

--
You received this message because you are subscribed to a topic in the
Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/puppet-users/Q0ke0NzMRjY/unsubscribe.
To unsubscribe from this group and all its topics, 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/ac7d5df1-1798-e7d2-0215-b05166dc7b71%40puppet.com.

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/CAJ%2BQ1PVrqBsaznadB9z9wTAS6s%3DdEHMZZpwNAqtCtYES7OMCyg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups 
"Puppet Users" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/puppet-users/Q0ke0NzMRjY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Ramin K

On 5/22/16 3:41 AM, Alex Samad wrote:

Hi

just starting out with puppet.
I found
this http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
old page

talks about checking /etc/puppet into svn.

But on my centos install I have /etc/puppetlabs/puppet

do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
later what about my codedir ?


	I have one of the largest SVN backed Puppet systems. It's painful, 
slows us down, and we're getting off it this quarter. Finally.


	If you don't have much dev experience, the idea that each branch exists 
as a set of files in SVN initially sounds great. However the inability 
to split work off into branches both short and long lived starts to take 
its toll. Also tooling it hard, can't push a branch for someone else to 
check out. You end up having "scratch space" for tests that eventually 
have to be merged. It makes it hard to do sweeping changes as scratch 
space has to encompass it all at least in most schemes I've observed.


	I'm sure there are ways around some of the problems, but git based 
branch development is ridiculously good with minimal investment. That 
said git will seem like more work than you'd like when you have one or 
two people working on the codebase. I never appreciated till I was on a 
larger team.


	Answering the other question, I recommend starting with 
/etc/*puppetwhatever*/environments/{production|stage|etc}/ as releasses 
of your src control rather than deploying directly to /etc/puppetlabs/ 
from src control.


Ramin

--
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/93ef1e05-7b25-0ceb-0737-657ce36fe218%40badapple.net.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Alex Samad
Hi

Is it really that painful to retro fit git. or is the way you think
about the DB that different ?

Could you point a good starting point to read up on this ?

Thanks
Alex

On 24 May 2016 at 07:16, Christopher Wood  wrote:
> On Mon, May 23, 2016 at 03:51:58PM +1000, Alex Samad wrote:
>> How hard is it to retro fit SVN / GIT onto a puppet install.
>>
>> I am building from scratch, working through the doco.
>>
>> Was thinking once I have a friendly setup then I would look at putting
>> that into SVN/GIT.
>
> Do yourself a huge favour, use git as the tool you use to construct the 
> setup. Use it from the start of the process, not just as what you put things 
> into when you're done.
>
>> Thoughts are
>> install puppet
>> install puppetDB
>> install heira ??
>>
>> setup environments, currently thinking
>> Prod - all prod env
>> SIM - testing for prod
>> INF - inf
>> NON Prod - anything thats not above
>> dev - testing
>> alex - personal
>>
>> Then I was going to create a whole bundle of profiles break up into
>>
>> OS app
>> things like
>> smtp
>> ssh
>> http
>> etc
>>
>> have the default company setup
>>
>> Company Apps
>> things that cover company apps
>>
>>
>> Then build some roles - based solely from profiles.
>>
>> Then some how dynamically assign nodes to a roles / environment.
>>
>>
>> Sounds okay ??
>>
>> A
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On 23 May 2016 at 10:47, Rilindo Foster  wrote:
>> > You can use any VCS with Puppet. I know of one shop that uses Mercurial.
>> >
>> > Most of the tooling and integration are closely coupled with git and most 
>> > of the workflows assumes that you will be using git. So it would be a good 
>> > idea to get up to speed with it.
>> >
>> > Of note that you can use git with svn (which may be helpful if you are 
>> > getting started:
>> >
>> > https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
>> >
>> > - Rilindo
>> >
>> > -Original Message-
>> > From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] 
>> > On Behalf Of Alex Samad
>> > Sent: Sunday, May 22, 2016 7:44 PM
>> > To: puppet-users@googlegroups.com
>> > Subject: Re: [Puppet Users] Puppet and SVN
>> >
>> > Ta
>> >
>> > I was at the last puppet (sydney ) users group. heard r10k mentioned a lot.
>> >
>> > Also I got the impression that git was more closely integrated with puppet.
>> >
>> > Should I be l looking at git ?
>> >
>> > A
>> >
>> >
>> > On 23 May 2016 at 10:40, Henrik Lindberg  
>> > wrote:
>> >> On 22/05/16 12:41, Alex Samad wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> just starting out with puppet.
>> >>> I found
>> >>> this
>> >>> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
>> >>> old page
>> >>>
>> >>> talks about checking /etc/puppet into svn.
>> >>>
>> >>> But on my centos install I have /etc/puppetlabs/puppet
>> >>>
>> >>> do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
>> >>> later what about my codedir ?
>> >>>
>> >>
>> >> You probably want to use the project r10k to manage your
>> >> manifests/configurations that are stored in a source code control
>> >> repository.
>> >>
>> >> Here is the page that explains a bit about r10k and SVN:
>> >> https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environment
>> >> s/svn-environments.mkd
>> >>
>> >> There is also lots of material available on r10k itsef that is easy to
>> >> find if you google for it.
>> >>
>> >> Regards
>> >> - henrik
>> >>
>> >>> Thanks
>> >>>
>> >>> --
>> >>> 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/ee63fdad-2d0f-4914-b9c
>> >>> a-0dbdb5044dc3%40googlegroups.com
>> >>>
>> >>> .
>> >>> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Visit my Blog "Puppet on the Edge"
>> >> http://puppet-on-the-edge.blogspot.se/
>> >>
>> >> --
>> >> You received this message because you are subscribed to a topic in the
>> >> Google Groups "Puppet Users" group.
>> >> To unsubscribe from this topic, visit
>> >> https://groups.google.com/d/topic/puppet-users/Q0ke0NzMRjY/unsubscribe.
>> >> To unsubscribe from this group and all its topics, 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/ac7d5df1-1798-e7d2-0215-b05166dc7b71%40puppet.com.
>> >>
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google Group

Re: [Puppet Users] Puppet and SVN

2016-05-23 Thread Christopher Wood
On Mon, May 23, 2016 at 03:51:58PM +1000, Alex Samad wrote:
> How hard is it to retro fit SVN / GIT onto a puppet install.
> 
> I am building from scratch, working through the doco.
> 
> Was thinking once I have a friendly setup then I would look at putting
> that into SVN/GIT.

Do yourself a huge favour, use git as the tool you use to construct the setup. 
Use it from the start of the process, not just as what you put things into when 
you're done.

> Thoughts are
> install puppet
> install puppetDB
> install heira ??
> 
> setup environments, currently thinking
> Prod - all prod env
> SIM - testing for prod
> INF - inf
> NON Prod - anything thats not above
> dev - testing
> alex - personal
> 
> Then I was going to create a whole bundle of profiles break up into
> 
> OS app
> things like
> smtp
> ssh
> http
> etc
> 
> have the default company setup
> 
> Company Apps
> things that cover company apps
> 
> 
> Then build some roles - based solely from profiles.
> 
> Then some how dynamically assign nodes to a roles / environment.
> 
> 
> Sounds okay ??
> 
> A
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 23 May 2016 at 10:47, Rilindo Foster  wrote:
> > You can use any VCS with Puppet. I know of one shop that uses Mercurial.
> >
> > Most of the tooling and integration are closely coupled with git and most 
> > of the workflows assumes that you will be using git. So it would be a good 
> > idea to get up to speed with it.
> >
> > Of note that you can use git with svn (which may be helpful if you are 
> > getting started:
> >
> > https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
> >
> > - Rilindo
> >
> > -Original Message-
> > From: puppet-users@googlegroups.com [mailto:puppet-users@googlegroups.com] 
> > On Behalf Of Alex Samad
> > Sent: Sunday, May 22, 2016 7:44 PM
> > To: puppet-users@googlegroups.com
> > Subject: Re: [Puppet Users] Puppet and SVN
> >
> > Ta
> >
> > I was at the last puppet (sydney ) users group. heard r10k mentioned a lot.
> >
> > Also I got the impression that git was more closely integrated with puppet.
> >
> > Should I be l looking at git ?
> >
> > A
> >
> >
> > On 23 May 2016 at 10:40, Henrik Lindberg  wrote:
> >> On 22/05/16 12:41, Alex Samad wrote:
> >>>
> >>> Hi
> >>>
> >>> just starting out with puppet.
> >>> I found
> >>> this
> >>> http://projects.puppetlabs.com/projects/1/wiki/Puppet_Version_Control
> >>> old page
> >>>
> >>> talks about checking /etc/puppet into svn.
> >>>
> >>> But on my centos install I have /etc/puppetlabs/puppet
> >>>
> >>> do I add /etc/puppetlabs or /etc/puppetlabs/puppet to svn and if the
> >>> later what about my codedir ?
> >>>
> >>
> >> You probably want to use the project r10k to manage your
> >> manifests/configurations that are stored in a source code control
> >> repository.
> >>
> >> Here is the page that explains a bit about r10k and SVN:
> >> https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environment
> >> s/svn-environments.mkd
> >>
> >> There is also lots of material available on r10k itsef that is easy to
> >> find if you google for it.
> >>
> >> Regards
> >> - henrik
> >>
> >>> Thanks
> >>>
> >>> --
> >>> 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/ee63fdad-2d0f-4914-b9c
> >>> a-0dbdb5044dc3%40googlegroups.com
> >>>
> >>> .
> >>> For more options, visit https://groups.google.com/d/optout.
> >>
> >>
> >>
> >> --
> >>
> >> Visit my Blog "Puppet on the Edge"
> >> http://puppet-on-the-edge.blogspot.se/
> >>
> >> --
> >> You received this message because you are subscribed to a topic in the
> >> Google Groups "Puppet Users" group.
> >> To unsubscribe from this topic, visit
> >> https://groups.google.com/d/topic/puppet-users/Q0ke0NzMRjY/unsubscribe.
> >> To unsubscribe from this group and all its topics, 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/ac7d5df1-1798-e7d2-0215-b05166dc7b71%40puppet.com.
> >>
> >> 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/CAJ%2BQ1PVrqBsaznadB9z9wTAS6s%3DdEHMZZpwNAqtCtYES7OMCyg%40mail.gmail.com.
> > For more options, visit https://gr

Re: [Puppet Users] History of possible usage of EPP URIs in the form of "'puppet:////.epp"?

2016-05-23 Thread Eric Sorenson
I'm CC'ing Jo Rhett directly here in case he doesn't come across this 
organically --

The only place the puppet:/// syntax has ever been valid is in the 'source' 
attribute for File resources; the epp function, like template(), is 
expanded on the master during compilation and the contents are included in 
the catalog so it doesn't make sense to include a URL reference (which 
would be expanded on the agent).

--eric0

On Sunday, May 22, 2016 at 6:33:36 PM UTC-7, David Karr wrote:
>
> On 05/22/2016 06:22 PM, Henrik Lindberg wrote: 
> > On 23/05/16 03:07, David Karr wrote: 
> >> On Sunday, May 22, 2016 at 5:37:22 PM UTC-7, Henrik Lindberg wrote: 
> >> 
> >> On 23/05/16 02:26, David Karr wrote: 
> >> > In "Learning Puppet 4", there are a couple of variations of calls 
> >> to the 
> >> > "epp" function.  Some of them use the syntax that I find in the 
> >> actual 
> >> > Puppet docs, which is just "/.epp", but some of 
> them 
> >> use 
> >> > something that looks more like a URI, like 
> >> > "puppet:.epp".  I've determined that the former 
> >> is the 
> >> > only syntax that Puppet 4 accepts, unless I'm missing some 
> >> configuration 
> >> > option.  Did Puppet ever use the "puppet:.epp" 
> >> syntax, 
> >> > and if so, what was the history of that going away? 
> >> > 
> >> 
> >> It would be great if you could include pointers to where the 
> >> different 
> >> notations can be found. 
> >> 
> >> 
> >> You mean within the book?  If that's what you mean, I can provide 
> >> approximate search locations, but I'm reading the book on Safari, so I 
> >> don't have page numbers. 
> >> 
> > Duh, book - I did not read carefully enough. :-) I though you found 
> > examples in the puppet documentation or puppet site. 
>
> I had a feeling there was some confusion there.  :) I had earlier found 
> the official doc page (that you reference below), and it references the 
> "/.epp" syntax, which is the only one I found to work.  I 
> did report this in the book errata list, if it matters. 
>
> By your lack of an answer to my original actual question, I'm guessing 
> you know of no ancient Puppet implementation history where the 
> "puppet:.epp" syntax was valid? Although the syntax as 
> described this way in the book obviously doesn't work in Puppet 4 (and 
> the docs are consistent with that), I find it hard to believe the author 
> came up with this syntax on a lark :) , which makes me think that this 
> used to be valid at some point in the past. 
>
> > 
> >> The first occurrence is where the "epp()" function syntax is first 
> >> mentioned, in chapter 13, section "Using Puppet EPP Templates". On this 
> >> page, it has two clear examples, one using the "/.epp" 
> >> form, and the other using the "puppet:.epp" form, and 
> >> the text that describes the required syntax only mentions the latter. 
> >> 
> >> The next occurrence is in chapter 14, section "Calling Other Modules", 
> >> and this example uses the "puppet:.epp" syntax. 
> >> 
> >> I believe these are the only locations within the book that talk about 
> >> the syntax of the argument to the "epp()" function. 
> >> 
> >> 
> >> 
> >> IIRC, the implementation of EPP use the same resolution to find a 
> >> template as the ERB template support does, so some investigation is 
> >> needed to find the real answer. The documentation / examples may 
> >> be in 
> >> error too. 
> >> 
> >> 
> >> The book indicated that the ERB template syntax uses 
> >> "/.epp", but I didn't test that. 
> >> 
> > 
> > The official documentation is here: 
> > 
> https://docs.puppet.com/puppet/latest/reference/lang_template.html#referencing-files
>  
> > 
>
> Yup, found that already.  Thanks. 
>
> > 
> > - henrik 
> > 
> >> 
> >> -- 
> >> 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/9b00b220-6501-4209-827a-4368dacac105%40googlegroups.com
>  
> >> 
> >> <
> https://groups.google.com/d/msgid/puppet-users/9b00b220-6501-4209-827a-4368dacac105%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> >> 
> >> 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/cb657005-1e41-411a-9761-2cfee295ce31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Custom Facts for windows with powershell

2016-05-23 Thread Harish Kothuri
Hi, 

I'm trying to create a custom fact to get the installed software using 
powershell command in windows as follows...


*PS Command:-* 
Get-ItemProperty 
HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | 
where{$_.DisplayName -and $_.displayname -notmatch 'Update'} | 
Select-Object DisplayName, DisplayVersion | ForEach-Object {Write-Host 
$_.DisplayName"="$_.DisplayVersion}

*Output:-*
7-Zip 15.14 = 15.14
ActiveState ActiveTcl 8.4.20.0 = 8.4.20.0
Microsoft .NET Framework 4 Client Profile = 4.0.30319
Microsoft .NET Framework 4 Extended = 4.0.30319
Notepad++ = 6.9.1
Microsoft .NET Framework 4 Extended = 4.0.30319
Puppet = 3.8.7
Microsoft Visual C++ 2012 Redistributable (x86) - 11.0.61030 = 11.0.61030.0
Microsoft .NET Framework 4 Client Profile = 4.0.30319
MSXML 4.0 SP2 Parser and SDK = 4.20.9818.0
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.17 = 9.0.30729
VC9.0 SP0 Debug CRT DLLs = 1.0.0
Microsoft Visual C++ 2012 x86 Additional Runtime - 11.0.61030 = 11.0.61030
Microsoft Visual C++ 2012 x86 Minimum Runtime - 11.0.61030 = 11.0.61030
Microsoft Visual C++ 2010  x86 Redistributable - 10.0.40219 = 10.0.40219
ActivePerl 5.16.3 Build 1603 = 5.16.1603


i have created a powershellscript like  getinstalledlist.ps1 with above 
command and placed in facters.d folder. 

When i run puppet agent -t , i get the following error.

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Failed to parse inline template: `@7_zip_15_14 . 


Can someone help me to get this going?

Thanks & Regards,
Harish Kothuri

-- 
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/1c75c5fd-ed59-4b39-834d-b4466b583ca7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] manip of a hash

2016-05-23 Thread Andreas Zuber

Hi

You can just use variable interpolation: 
https://docs.puppet.com/hiera/1/variables.html .This will basically 
makes another hiera lookup to retrieve the value of ssl_pub_key and 
ssl_priv_key.


hieradata/myhost.yaml

my_apache::vhosts:
'my_new_vhost':
name:
port:
ssl_pub_key: "|%{hiera('|ssl_pub_key')}"
ssl_priv_key: "|%{hiera('|ssl_priv_key')}"


hieradata/common.yaml

ssl_pub_key: 'some pub key..'
ssl_priv_key: 'some priv key'

Additionally there are also tools available to manage keys outside of 
your yaml files you you don't have to check them into your version 
control: https://github.com/duritong/trocla


Greetings
Andreas

On 05/23/2016 05:17 PM, Albert Shih wrote:

Hi,

I'm running puppet 3.8.x

I try to do something like


   hieradata/myhost.yaml

 my_apache::vhosts:
   'my_new_vhost':
 name:
 port:
 ssl:
 etc..

   modules/my_apache/manifests/init.pp

 class my_apache($vhosts = {}) {
   validate_hash($vhosts)
   $hiera_vhosts  = hiera_hash("${module_name}::vhosts", undef)
   include 'apache'
   create_resources('apache::vhost', $hiera_vhosts)
 }

and it's working.

Now I would like to add

   ssl_cert and ssl_key inside the configuration of apache_vhost.

The point is I have two other variables inside

   hieradata/OS.yaml
   hieradata/common.yaml

like

   ssl_pub_key
   ssl_priv_key

who are the default place of the cert files

So I cannot put something

 my_apache::vhosts:
   'my_new_vhost':
 name:
 port:
 ssl: true
 ssl_cert: $ssl_pub_key
 ssl_key: $ssl_priv_key

I don't want to put the real information because that's mean I duplicate
the information.

I still want the ssl_pub_key/ssl_priv_key inside my hieradata/common.yaml
because those variables are use in other module.

So the only way I see it is to put inside my

   modules/my_apache/manifests/init.pp

something like

 class my_apache($vhosts = {}) {
   $ssl_pub_key= hiera('ssl_pub_key')
   $ssl_priv_key=hiera('ssl_priv_key')

   validate_hash($vhosts)
   $hiera_vhosts  = hiera_hash("${module_name}::vhosts", undef)
   include 'apache'
   create_resources('apache::vhost', $hiera_vhosts)
 }

but I don't see how I can put those two informations inside the
hiera_vhosts values.

Regards.







--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 23 mai 2016 17:04:46 CEST



--
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/57432526.1060801%40puzzle.ch.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] manip of a hash

2016-05-23 Thread Albert Shih
Hi,

I'm running puppet 3.8.x

I try to do something like


  hieradata/myhost.yaml

my_apache::vhosts:
  'my_new_vhost':
name:
port:
ssl:
etc..

  modules/my_apache/manifests/init.pp

class my_apache($vhosts = {}) {
  validate_hash($vhosts)
  $hiera_vhosts  = hiera_hash("${module_name}::vhosts", undef)
  include 'apache'
  create_resources('apache::vhost', $hiera_vhosts)
}

and it's working.

Now I would like to add

  ssl_cert and ssl_key inside the configuration of apache_vhost.

The point is I have two other variables inside

  hieradata/OS.yaml
  hieradata/common.yaml

like

  ssl_pub_key
  ssl_priv_key

who are the default place of the cert files

So I cannot put something

my_apache::vhosts:
  'my_new_vhost':
name:
port:
ssl: true
ssl_cert: $ssl_pub_key
ssl_key: $ssl_priv_key

I don't want to put the real information because that's mean I duplicate
the information.

I still want the ssl_pub_key/ssl_priv_key inside my hieradata/common.yaml
because those variables are use in other module.

So the only way I see it is to put inside my

  modules/my_apache/manifests/init.pp

something like

class my_apache($vhosts = {}) {
  $ssl_pub_key= hiera('ssl_pub_key')
  $ssl_priv_key=hiera('ssl_priv_key')

  validate_hash($vhosts)
  $hiera_vhosts  = hiera_hash("${module_name}::vhosts", undef)
  include 'apache'
  create_resources('apache::vhost', $hiera_vhosts)
}

but I don't see how I can put those two informations inside the
hiera_vhosts values.

Regards.







--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
lun 23 mai 2016 17:04:46 CEST

-- 
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/20160523151710.GA7687%40pcjas.obspm.fr.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Cert error after changing the node FQDN

2016-05-23 Thread Cesar
Hi all,

I have seen this behaviour and I am not sure of why it is happening.

There's a node that is using Puppet normally:

May 20 20:58:18 node1dot90 puppet-agent[50057]: Finished catalog run in 
41.90 seconds



Then Puppet was restarted, and after the restart the agent noticed that the 
FQDN had changed (from node1dot90 to node1dot90.myvpn.com). Therefore, it 
tried to recreate its cert:

May 20 20:58:26 node1dot90 puppet-agent[24886]: Caught TERM; calling stop
May 20 20:58:27 node1dot90 puppet-agent[62421]: Reopening log files
May 20 20:58:27 node1dot90 puppet-agent[62415]: Creating a new SSL key for 
node1dot90.myvpn.com
May 20 20:58:28 node1dot90 puppet-agent[62415]: Creating a new SSL 
certificate request for node1dot90.myvpn.com
May 20 20:58:28 node1dot90 puppet-agent[62415]: Certificate Request 
fingerprint (SHA256): BF:72:B6:08:C8:48:D3:3F:C8:E4:7C:E8:D0:CD:60:97:A1:2F:
DE:3A:4C:C3:5C:61:25:FE:A4:53:79:D2:C1:54
May 20 20:58:28 node1dot90 puppet-agent[62415]: Caching certificate for 
node1dot90.myvpn.com


The Puppetmaster signed the cert:

May 20 20:58:28 ms1dot90 puppet-master[45608]: node1dot90.myvpn.com has a 
waiting certificate request
May 20 20:58:28 ms1dot90 puppet-master[45608]: Signed certificate request 
for node1dot90.myvpn.com
May 20 20:58:28 ms1dot90 puppet-master[45608]: Removing file Puppet::SSL::
CertificateRequest node1dot90.myvpn.com at 
'/var/lib/puppet/ssl/ca/requests/node1dot90.myvpn.com.pem'


But then the agent failed because the certificate did not match

May 20 20:58:28 node1dot90 puppet-agent[62415]: Sleeping for 14 seconds (splay 
is enabled)
May 20 20:58:28 node1dot90 puppet-agent[62421]: Could not request 
certificate: The certificate retrieved from the master does not match the 
agent's private key.
May 20 20:58:28 node1dot90 puppet-agent[62421]: Certificate fingerprint: 
82:B5:A1:4E:51:69:8B:3B:7D:09:4D:02:79:93:37:CE:53:B0:EA:95:83:AD:0D:13:17:EE:95:81:31:20:9F:76
May 20 20:58:28 node1dot90 puppet-agent[62421]: To fix this, remove the 
certificate from both the master and the agent and then start a puppet run, 
which will automatically regenerate a certficate.
May 20 20:58:28 node1dot90 puppet-agent[62421]: On the master:
May 20 20:58:28 node1dot90 puppet-agent[62421]:   puppet cert clean 
node1dot90.myvpn.com
May 20 20:58:28 node1dot90 puppet-agent[62421]: On the agent:
May 20 20:58:28 node1dot90 puppet-agent[62421]:   rm -f 
/var/lib/puppet/ssl/certs/node1dot90.myvpn.com.pem
May 20 20:58:28 node1dot90 puppet-agent[62421]:   puppet agent -t


How is that possible? If the Puppetmaster signed the certificate one second 
before there should be no mismatch, right?

Thanks!
Cesar.

-- 
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. 
If you have received this email in error please notify the system manager. 
This message contains confidential information and is intended only for the 
individual named. If you are not the named addressee you should not 
disseminate, distribute or copy this e-mail.

-- 
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/c93a67f8-9775-4fb2-8177-c6bb4bc8d814%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppet/splunk Staging Dependency Cycle Issue

2016-05-23 Thread jcbollinger


On Friday, May 20, 2016 at 10:15:44 AM UTC-5, Joseph Karns wrote:
>
> Good Morning:
>
> I've started using puppetlabs/splunk module and I'm having a Dependency 
> Cycle Issue. Can someone help
>
> Error: Could not apply complete catalog: Found 1 dependency cycle:
> (File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]
>  
> => Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm] 
> => Package[splunkforwarder] => 
> File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm])
> Cycle graph written to /var/opt/lib/pe-puppet/state/graphs/cycles.dot.
>
>
> digraph Resource_Cycles {
>   label = "Resource Cycles"
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
>  
> -> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]" 
> -> "Package[splunkforwarder]" -> 
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
>  
> -> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]" 
> -> "Package[splunkforwarder]" -> "File[/opt/staging/splunk]" -> 
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
>  
> -> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]" 
> -> "Package[splunkforwarder]" -> "File[/opt/staging/splunk]" -> 
> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
>  
> -> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]" 
> -> "Package[splunkforwarder]" -> "File[/opt/staging]" -> 
> "File[/opt/staging/splunk]" -> 
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
> "File[/opt/staging/splunk/splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
>  
> -> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]" 
> -> "Package[splunkforwarder]" -> "File[/opt/staging]" -> 
> "File[/opt/staging/splunk]" -> 
> "Staging::File[splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm]"
> }
>
>
> heira
>
> splunk::params::version: '6.3.3'
> splunk::params::build: 'f44afce176d0'
> splunk::params::scr_root: 'puppet:///software/splunk'<-- File bucket 
> on Puppet Master
> splunk::params::server: 'x.x.x.x'
>
>
>
> Any information would be helpful.
>
>

This link in your cycle looks faulty:

Package[splunkforwarder] => File[/opt/staging/splunk/splunkforwarder-6.3.3-
f44afce176d0-linux-2.6-x86_64.rpm

It's not clear to me where that is being declared, but if you're presenting 
the File as the source for the Package, then the former must be managed 
prior to the latter, contrary to the relationship reported in your output.  
The splunk module appears to be setting a correct relationship between the 
two, but something causing the the given relationship to be declared as 
well.  I presume that no such relationship is declared specifically, so it 
it probably being introduced by a chain operator with a collection operand 
that happens to collect an unintended resource.

You have not presented manifests with which this error can be reproduced, 
so we cannot identify the error with any confidence, but I observe that the 
Splunk module itself contains just the kind of chain operations that I 
describe, in the form of several chains including these links:

Package<| $package_name |> -> File <| tag == 'splunk_server' |>

The same class later declares and explicitly tags several File resources 
that it intends to be collected by the latter collector, and of course 
those don't include the RPM file, but that's not the only way resources can 
be tagged.  It may be that the RPM file resource is obtaining the tag 
'splunk_server' via automatic tagging 
.
  
If the file does obtain that tag by any means, then you will end up with a 
cycle such as you present.


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/1437104e-0f7a-4f7c-8b2e-7072621ef0a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.