Re: [Puppet Users] Puppet agent is not running on Windows 11

2022-11-01 Thread Jim Moser
What does the contents of your puppet.conf look like on the host. It
appears that the agent is trying to reach the hostname puppet but cannot
resolve the name in DNS or on the local host file. You should have entries
in the puppet.conf that looks something like this

[main]
server=myserver.mydomain.com

[agent]
certname=mynode.mydomain.com

On Mon, Oct 31, 2022, 12:05 PM Stephanos Economides <
noveltymarket...@gmail.com> wrote:

> Hi Puppet Users,
>
> I am a new user of the puppet software and I ask your help to tackle the
> following problem:
>
> I have installed the puppet agent 7.20.0 as a standalone node that won't
> connect to a master, on my notebook (Windows 11 Home).
>
> I tried to run the puppet agent and I received an error (screenshot:
> puppet_agent_error_1).
>
> Then  I used the "puppet agent --test" command from cmd (run it as
> administrator) and  I received an error (screenshot: puppet_agent_error_2).
>
> Then I used the "puppet resource service puppetserver ensure=running"
> command from cmd (run it as administrator) and I received the error "Error:
> Will not start disabled service puppetserver without managing enable.
> Specify 'enable => false' to override.".  I tried to override by using the
> command "puppet resource service puppetserver enable=false" and then I used
> again the "puppet resource service puppetserver ensure=running" command but
> in vain (screenshot: puppet_agent_error_3).
>
> Then I created an inbound rule on Windows firewall for port 8140 but again
> I received the same error "Error: Connection to
> https://puppet:8140/puppet-ca/v1 failed, trying next route: Request to
> https://puppet:8140/puppet-ca/v1 failed after 2.698 seconds: Failed to
> open TCP connection to puppet:8140 (getaddrinfo: No such host is known. )".
>
> Lastly, I deactivated temporarily my Avast software but again connection
> to puppet:8140 failed.
>
> Could you please help me to resolve this issue?
>
> Thank you in advance for your time.
>
> Best regards,
>
> Stephanos
>
> --
> 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/4918e75e-85ed-48cc-b650-617f0280c505n%40googlegroups.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/CADnkZSOKH9JF3%2BxLnhzN6Z2GDhHgv4%2B5d%3DZWQqTet8YOsjdRBw%40mail.gmail.com.


Re: [Puppet Users] puppet master --compile giving "Warning: Unknown variable: " for Facts

2016-12-01 Thread Jim Perry
The prepended colons are actually the way Puppet 4 guides say to do it
now.  It is just odd and why I tossed it out to the forum.

On Dec 1, 2016 4:30 PM, "Rob Nelson"  wrote:

> You could try using `$osfamily` (no colons) or $facts['os']['family'] if
> you do not need to support anything older than 3.5.0. I kind of doubt it's
> related to the prepended colons, but maybe?
>
>
> Rob Nelson
> rnels...@gmail.com
>
> On Thu, Dec 1, 2016 at 11:09 AM, HPUX_PUPPET  wrote:
>
>> I am running into an odd issue in Puppet 4.8.0 running under Foreman
>> 1.13.2
>>
>> When, on the master, I run *puppet master --verbose --compile
>> myserver.domain.com  *I get an error on
>> basic facts with "Unknown Variable". I have had this happen on multiple
>> classes.
>>
>> puppet master --verbose --compile myserver.domain.com
>> Info: Caching node for myserver.domain.com
>> Warning: Unknown variable: '::osfamily'. at /etc/puppetlabs/code/environme
>> nts/development/modules/pam/manifests/init.pp:85:8
>> Warning: Unknown variable: '::osfamily'. at /etc/puppetlabs/code/environme
>> nts/development/modules/pam/manifests/init.pp:353:100
>> Error: Evaluation Error: Error while evaluating a Resource Statement,
>> Evaluation Error: Error while evaluating a Function Call, Pam is only
>> supported on RedHat and Suse osfamilies. Your osfamily is identified as <>.
>> at 
>> /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7
>> on node myserver.domain.com
>> Error: Evaluation Error: Error while evaluating a Resource Statement,
>> Evaluation Error: Error while evaluating a Function Call, Pam is only
>> supported on RedHat and Suse osfamilies. Your osfamily is identified as <>.
>> at 
>> /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7
>> on node myserver.domain.com
>> Error: Failed to compile catalog for node myserver.domain.com:
>> Evaluation Error: Error while evaluating a Resource Statement, Evaluation
>> Error: Error while evaluating a Function Call, Pam is only supported on
>> RedHat and Suse osfamilies. Your osfamily is identified as <>. at
>> /etc/puppetlabs/code/environments/development/modules/pam/manifests/init.pp:353:7
>> on node myserver.domain.com
>>
>> For reference the pam/manifests/init.pp:
>>
>> Line 85:   case $::osfamily {
>> Line 353: fail("Pam is only supported on RedHat and Suse osfamilies. Your
>> osfamily is identified as <${::osfamily}>.")
>>
>> The odd part here is that when I run the command with --debug I see that
>> it resolves osfamily from the hosts's facts yaml file:
>>
>> Debug: Facter: fact "osfamily" has resolved to "RedHat".
>>
>>
>> Do I need to make some sort of modification or setup change to ensure it
>> picks up the files correctly?
>>
>> This box worked fine previously when I was running a version < 4.8.0 as I
>> used it to do a lot of my coding and testing via the puppet master
>> --compile  to verify the code was compiling properly on the
>> master.
>>
>> Now the other odd thing is that the catalog compiles fine when I run
>> puppet agent --test --verbose on myserver.domain.com. So it seems
>> somehow ties to the *puppet master --compile* process.
>>
>> Anyone able to point me where to look check that I don't have a bad
>> config setting or something similar?
>>
>> Could this be a bug in Puppet 4.8.0?
>>
>> --
>> 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/ms
>> gid/puppet-users/3e06a1b7-0a1d-4bc7-8f6b-af9891210f03%40googlegroups.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/2x1CdXFDtTE/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/CAC76iT9pjhSY1YJAih4%3DaGsBGGZE2o%
> 3D6ZUE088wK2M0Ew9fKig%40mail.gmail.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 

Re: [Puppet Users] Best way to set variables based on packages installed on client?

2016-09-16 Thread Jim Perry
Thanks.

While I see that Ansible is a nice tool, the clientless access requiring a
login has a fatal flaw when compared to puppet.

More than once we have had a PAM, SSHD or similar setup get corrupted over
dozens, if not all, systems. We were able to fix in Puppet and get the
corrections pushed out. With Ansible we would have needed to hard shut then
down and come up in single user mode.

In fact this very post is related to ensuring we can fix issues with PAM
related to our third party AD with tool.  We had a typo in the setup that
locked all access, even console, out because we broke PAM.

On Sep 16, 2016 03:06, "Thomas Müller"  wrote:



Am Donnerstag, 15. September 2016 14:53:57 UTC+2 schrieb HPUX_PUPPET:
>
> ...
>
> This post was mainly about seeing if Puppet / Factor had been tweaked over
> the years to pull lists of installed RPMs given Red Hat Satellite 6 using
> Puppet as part of their software management and server build solution.
>
>  unfortunatly besides integration of Puppet in foreman GUI it's not very
sophisticated in sense of additonal features to manage RHEL systems. I
first hoped they will release supported puppet modules to make
configuration of basic stuff easy but this did not happen.

now they bought ansible I don't think they will make investments in better
support. IMHO Puppet 4 is still not supported on the satellite 6 server.

- Thomas

-- 
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/xJh1au94dqE/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/d48d5590-cda0-4052-a727-295ec3e891dc%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/CAO0AM%3DoFWPK%3DO7OKiO-vGy6MHcOj3t6ZOvGOtTwb7jc9H0GvEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: puppetserver unable to start after yum update

2016-09-03 Thread Jim Jim
Not sure why I am not able to see my email. I don't think it has any
offensive or rude language ?

On Fri, Sep 2, 2016 at 7:09 PM, Jim Jim <jiminfotechnolog...@gmail.com>
wrote:

> Hi Guys,
>
> I had a good running puppetserver daemon but after
>
> sudo yum update -y
>
> It is not running, complaining Specified bootstrap config file does not
> exist: '/etc/puppetlabs/puppetserver/bootstrap.cfg'.
> detailed log output from puppetserver-daemon.log is as below:
>
> OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m;
> support was removed in 8.0
> Exception in thread "main" java.lang.IllegalArgumentException:
> Specified bootstrap config file does not exist:
> '/etc/puppetlabs/puppetserver/bootstrap.cfg'
> at puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_
> error__14663$fn__14664.invoke(bootstrap.clj:131)
> at puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_
> error__14663.invoke(bootstrap.clj:127)
> at puppetlabs.trapperkeeper.bootstrap$eval14681$read_
> config__14686$fn__14687.invoke(bootstrap.clj:150)
> at puppetlabs.trapperkeeper.bootstrap$eval14681$read_
> config__14686.invoke(bootstrap.clj:134)
> at puppetlabs.trapperkeeper.bootstrap$eval14704$get_
> annotated_bootstrap_entries__14709$fn__14710$iter__14711__
> 14717$fn__14718.invoke(bootstrap.clj:160)
> at clojure.lang.LazySeq.sval(LazySeq.java:40)
> at clojure.lang.LazySeq.seq(LazySeq.java:49)
> at clojure.lang.RT.seq(RT.java:507)
> at clojure.core$seq__4128.invoke(core.clj:137)
> at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
> at clojure.core.protocols$fn__6506.invoke(protocols.clj:101)
> at clojure.core.protocols$fn__6452$G__6447__6465.invoke(
> protocols.clj:13)
> at clojure.core$reduce.invoke(core.clj:6519)
> at puppetlabs.trapperkeeper.bootstrap$eval14944$remove_
> duplicate_entries__14949$fn__14950.invoke(bootstrap.clj:284)
> at puppetlabs.trapperkeeper.bootstrap$eval14944$remove_
> duplicate_entries__14949.invoke(bootstrap.clj:263)
> at puppetlabs.trapperkeeper.bootstrap$eval14970$parse_
> bootstrap_configs_BANG___14977$fn__14978.invoke(bootstrap.clj:304)
> at puppetlabs.trapperkeeper.bootstrap$eval14970$parse_
> bootstrap_configs_BANG___14977.invoke(bootstrap.clj:293)
> at puppetlabs.trapperkeeper.core$
> eval15252$boot_with_cli_data__15259$fn__15260.invoke(core.clj:129)
> at puppetlabs.trapperkeeper.core$
> eval15252$boot_with_cli_data__15259.invoke(core.clj:95)
> at puppetlabs.trapperkeeper.core$eval15281$run__15286$fn__
> 15287.invoke(core.clj:151)
> at puppetlabs.trapperkeeper.core$eval15281$run__15286.invoke(
> core.clj:145)
> at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:173)
> at clojure.lang.RestFn.invoke(RestFn.java:457)
> at clojure.lang.Var.invoke(Var.java:394)
> at clojure.lang.AFn.applyToHelper(AFn.java:165)
> at clojure.lang.Var.applyTo(Var.java:700)
> at clojure.core$apply.invoke(core.clj:630)
> at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7)
> at clojure.lang.RestFn.invoke(RestFn.java:457)
> at clojure.lang.Var.invoke(Var.java:394)
> at clojure.lang.AFn.applyToHelper(AFn.java:165)
> at clojure.lang.Var.applyTo(Var.java:700)
> at clojure.core$apply.invoke(core.clj:630)
> at clojure.main$main_opt.invoke(main.clj:316)
> at clojure.main$main.doInvoke(main.clj:421)
> at clojure.lang.RestFn.invoke(RestFn.java:512)
> at clojure.lang.Var.invoke(Var.java:409)
> at clojure.lang.AFn.applyToHelper(AFn.java:178)
> at clojure.lang.Var.applyTo(Var.java:700)
> at clojure.main.main(main.java:37)
> Caused by: java.lang.IllegalArgumentException: URI is not absolute
> at java.net.URI.toURL(URI.java:1088)
> at clojure.java.io$fn__9197.invoke(io.clj:248)
> at clojure.java.io$fn__9102$G__9095__9109.invoke(io.clj:69)
> at clojure.java.io$fn__9163.invoke(io.clj:165)
> at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69)
> at clojure.java.io$reader.doInvoke(io.clj:102)
> at clojure.lang.RestFn.invoke(RestFn.java:410)
> at puppetlabs.trapperkeeper.bootstrap$eval14681$read_
> config__14686$fn__14687.invoke(bootstrap.clj:144)
> ... 37 more
> Information about puppetserver
>
> [jim@puppet ~]$ puppetserver --version
>

[Puppet Users] puppetserver unable to start after yum update

2016-09-02 Thread Jim Jim
Hi Guys,

I had a good running puppetserver daemon but after

sudo yum update -y

It is not running, complaining Specified bootstrap config file does not
exist: '/etc/puppetlabs/puppetserver/bootstrap.cfg'.
detailed log output from puppetserver-daemon.log is as below:

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m;
support was removed in 8.0
Exception in thread "main" java.lang.IllegalArgumentException:
Specified bootstrap config file does not exist:
'/etc/puppetlabs/puppetserver/bootstrap.cfg'
at
puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_error__14663$fn__14664.invoke(bootstrap.clj:131)
at
puppetlabs.trapperkeeper.bootstrap$eval14658$wrap_uri_error__14663.invoke(bootstrap.clj:127)
at
puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686$fn__14687.invoke(bootstrap.clj:150)
at
puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686.invoke(bootstrap.clj:134)
at
puppetlabs.trapperkeeper.bootstrap$eval14704$get_annotated_bootstrap_entries__14709$fn__14710$iter__14711__14717$fn__14718.invoke(bootstrap.clj:160)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.RT.seq(RT.java:507)
at clojure.core$seq__4128.invoke(core.clj:137)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
at clojure.core.protocols$fn__6506.invoke(protocols.clj:101)
at
clojure.core.protocols$fn__6452$G__6447__6465.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6519)
at
puppetlabs.trapperkeeper.bootstrap$eval14944$remove_duplicate_entries__14949$fn__14950.invoke(bootstrap.clj:284)
at
puppetlabs.trapperkeeper.bootstrap$eval14944$remove_duplicate_entries__14949.invoke(bootstrap.clj:263)
at
puppetlabs.trapperkeeper.bootstrap$eval14970$parse_bootstrap_configs_BANG___14977$fn__14978.invoke(bootstrap.clj:304)
at
puppetlabs.trapperkeeper.bootstrap$eval14970$parse_bootstrap_configs_BANG___14977.invoke(bootstrap.clj:293)
at
puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259$fn__15260.invoke(core.clj:129)
at
puppetlabs.trapperkeeper.core$eval15252$boot_with_cli_data__15259.invoke(core.clj:95)
at
puppetlabs.trapperkeeper.core$eval15281$run__15286$fn__15287.invoke(core.clj:151)
at
puppetlabs.trapperkeeper.core$eval15281$run__15286.invoke(core.clj:145)
at puppetlabs.trapperkeeper.core$main.doInvoke(core.clj:173)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:394)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:630)
at puppetlabs.trapperkeeper.main$_main.doInvoke(main.clj:7)
at clojure.lang.RestFn.invoke(RestFn.java:457)
at clojure.lang.Var.invoke(Var.java:394)
at clojure.lang.AFn.applyToHelper(AFn.java:165)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.core$apply.invoke(core.clj:630)
at clojure.main$main_opt.invoke(main.clj:316)
at clojure.main$main.doInvoke(main.clj:421)
at clojure.lang.RestFn.invoke(RestFn.java:512)
at clojure.lang.Var.invoke(Var.java:409)
at clojure.lang.AFn.applyToHelper(AFn.java:178)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at clojure.java.io$fn__9197.invoke(io.clj:248)
at clojure.java.io$fn__9102$G__9095__9109.invoke(io.clj:69)
at clojure.java.io$fn__9163.invoke(io.clj:165)
at clojure.java.io$fn__9115$G__9091__9122.invoke(io.clj:69)
at clojure.java.io$reader.doInvoke(io.clj:102)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at
puppetlabs.trapperkeeper.bootstrap$eval14681$read_config__14686$fn__14687.invoke(bootstrap.clj:144)
... 37 more
Information about puppetserver

[jim@puppet ~]$ puppetserver --version
puppetserver version: 2.5.0
[jim@puppet ~]$ puppet agent --version
4.6.1
[jim@puppet ~]$

Host Operating System:

CentOS 6.8

Any help would be greatly appreciated.

My latest observation:
This is what I observed:
[[root@puppet sysconfig]# diff puppetserver.rpmnew puppetserver
9c9
< JAVA_ARGS="-Xms2g -Xmx2g -XX:MaxPermSize=256m"
---
> JAVA_ARGS="-Xms1g -Xmx1g -XX:MaxPermSize=256m"
18c18
<
BOOTSTRAP_CONFIG="/etc/puppetlabs/puppetserver/services.d/,/opt/puppetlabs/server/apps/puppetserver/config/services.d/"
---
> BOOTSTRAP_CONFIG="/etc/puppetlabs/puppet

Re: [Puppet Users] Outofmemory error for puppetserver process

2016-05-31 Thread Jim
Hi Matthaus,

Assume its a production environment would we have allowed that ? What I'm 
interested in clean state of process listing when I run ps command.

Is that possible?

Regards,
Jim

On Tuesday, 31 May 2016 01:07:39 UTC+10, Matthaus Litteken wrote:
>
> Jim,
>
> The 'XX:OnOutOfMemoryError=kill -9 %p' in the process list doesn't 
> indicate that puppet server is out of memory, it is a Java flag that tells 
> Java what to do if puppet server hits an outofmemory error. The output you 
> have pasted looks totally normal to me.
>
> HTH
>
> On Monday, May 30, 2016, Jim <ameya...@gmail.com > wrote:
>
>> Hi Matthaus,
>>
>> My hostname is misleading. I upgraded at the time of posting to Ubuntu 
>> 15.10. Now I have upgraded to 16.04.
>>
>> I ran the command you suggested instead of service puppetserver start and 
>> I don't see OutOfMemory errors process.
>>
>> root@jim-Ubuntu1504:~# ps -aef|grep -i puppet|grep -v grep
>> root  1116 1  0 19:34 ?00:00:02 
>> /opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/puppet agent 
>> --no-daemonize
>> root  1719 1  0 19:38 ?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
>> root  2644  1544  0 22:35 pts/000:00:00 bash 
>> /opt/puppetlabs/server/apps/puppetserver/cli/apps/foreground
>> root  2650  2644  0 22:35 pts/000:00:00 runuser puppet -s 
>> /bin/bash -c /usr/bin/java -Xms512m -Xmx512m -XX:MaxPermSize=512m 
>> -Dlogappender=STDOUT  -cp 
>> /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar 
>>  clojure.main -m puppetlabs.trapperkeeper.main  --config 
>> /etc/puppetlabs/puppetserver/conf.d --bootstrap-config 
>> /etc/puppetlabs/puppetserver/bootstrap.cfg  
>> puppet2651  2650 55 22:35 ?00:00:42 /usr/bin/java -Xms512m 
>> -Xmx512m -XX:MaxPermSize=512m -Dlogappender=STDOUT -cp 
>> /opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar 
>> clojure.main -m puppetlabs.trapperkeeper.main --config 
>> /etc/puppetlabs/puppetserver/conf.d --bootstrap-config 
>> /etc/puppetlabs/puppetserver/bootstrap.cfg
>> root@jim-Ubuntu1504:~# 
>>
>>
>> Also when I do see that error as like below when I do Ctrl + C and 
>> execute service puppetserver start I get the OutOfMemory error like below.
>>
>> root@jim-Ubuntu1504:~# ps -aef|grep -i puppet|grep -v grep
>> root  1116 1  0 19:34 ?00:00:02 
>> /opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/puppet agent 
>> --no-daemonize
>> root  1719 1  0 19:38 ?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
>> puppet3386 1 66 22:41 ?00:00:45 /usr/bin/java 
>> -XX:OnOutOfMemoryError=kill -9 %p -Djava.security.egd=/dev/urandom -Xms512m 
>> -Xmx512m -XX:MaxPermSize=512m -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:~# 
>>
>> I wonder if I am doing start-up incorrectly ? Either even in this state 
>> where it sayOutOfMemoryError my puppetserver still serves all of its 
>> agents. The reason I say so is I changed motd file on all agents + 
>> installed vim package on agents.
>>
>> I am not sure which is the right method to start the server ? Also 
>> instead of running in foreground can I run it in background using nohup ?
>>
>> Regards,
>> Jim
>>
>>
>> On Friday, 27 May 2016 02:46:14 UTC+10, Matthaus Litteken wrote:
>>>
>>> Jim,
>>> For debugging failures on ubuntu 15.04, I would recommend trying 
>>> `/opt/puppetlabs/bin/puppetserver foreground`, it may show you the errors 
>>> that are causing the service to shutdown. Ubuntu 15.04 is a bit difficult 
>>> to debug on, because while it has systemd support, the puppetserver 
>>> packages for that platform still ship sysv init scripts. In my experience, 
>>> the sysv-systemd integration seems to swallow some startup errors and 
>>> messages that would usually go to journalctl on a systemd platform. We 
>>> started shipping systemd service files for puppetserver starting in Ubuntu 
>>> 16.04.

Re: [Puppet Users] Outofmemory error for puppetserver process

2016-05-30 Thread Jim
Hi Matthaus,

My hostname is misleading. I upgraded at the time of posting to Ubuntu 
15.10. Now I have upgraded to 16.04.

I ran the command you suggested instead of service puppetserver start and I 
don't see OutOfMemory errors process.

root@jim-Ubuntu1504:~# ps -aef|grep -i puppet|grep -v grep
root  1116 1  0 19:34 ?00:00:02 
/opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/puppet agent 
--no-daemonize
root  1719 1  0 19:38 ?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
root  2644  1544  0 22:35 pts/000:00:00 bash 
/opt/puppetlabs/server/apps/puppetserver/cli/apps/foreground
root  2650  2644  0 22:35 pts/000:00:00 runuser puppet -s /bin/bash 
-c /usr/bin/java -Xms512m -Xmx512m -XX:MaxPermSize=512m 
-Dlogappender=STDOUT  -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar 
 clojure.main -m puppetlabs.trapperkeeper.main  --config 
/etc/puppetlabs/puppetserver/conf.d --bootstrap-config 
/etc/puppetlabs/puppetserver/bootstrap.cfg  
puppet2651  2650 55 22:35 ?00:00:42 /usr/bin/java -Xms512m 
-Xmx512m -XX:MaxPermSize=512m -Dlogappender=STDOUT -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-server-release.jar 
clojure.main -m puppetlabs.trapperkeeper.main --config 
/etc/puppetlabs/puppetserver/conf.d --bootstrap-config 
/etc/puppetlabs/puppetserver/bootstrap.cfg
root@jim-Ubuntu1504:~# 


Also when I do see that error as like below when I do Ctrl + C and execute 
service puppetserver start I get the OutOfMemory error like below.

root@jim-Ubuntu1504:~# ps -aef|grep -i puppet|grep -v grep
root  1116 1  0 19:34 ?00:00:02 
/opt/puppetlabs/puppet/bin/ruby /opt/puppetlabs/puppet/bin/puppet agent 
--no-daemonize
root  1719 1  0 19:38 ?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
puppet3386 1 66 22:41 ?00:00:45 /usr/bin/java 
-XX:OnOutOfMemoryError=kill -9 %p -Djava.security.egd=/dev/urandom -Xms512m 
-Xmx512m -XX:MaxPermSize=512m -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:~# 

I wonder if I am doing start-up incorrectly ? Either even in this state 
where it sayOutOfMemoryError my puppetserver still serves all of its 
agents. The reason I say so is I changed motd file on all agents + 
installed vim package on agents.

I am not sure which is the right method to start the server ? Also instead 
of running in foreground can I run it in background using nohup ?

Regards,
Jim


On Friday, 27 May 2016 02:46:14 UTC+10, Matthaus Litteken wrote:
>
> Jim,
> For debugging failures on ubuntu 15.04, I would recommend trying 
> `/opt/puppetlabs/bin/puppetserver foreground`, it may show you the errors 
> that are causing the service to shutdown. Ubuntu 15.04 is a bit difficult 
> to debug on, because while it has systemd support, the puppetserver 
> packages for that platform still ship sysv init scripts. In my experience, 
> the sysv-systemd integration seems to swallow some startup errors and 
> messages that would usually go to journalctl on a systemd platform. We 
> started shipping systemd service files for puppetserver starting in Ubuntu 
> 16.04.
>
> HTH
>
> On Thu, May 26, 2016 at 6:56 AM, Jim <ameya...@gmail.com > 
> wrote:
>
>> Hi Trevor,
>>
>> No luck.
>>
>> 2016-05-26 23:46:26,745 INFO  [Thread-1] [p.t.internal] Shutting down due 
>> to JVM shutdown hook.
>> 2016-05-26 23:46:26,747 INFO  [Thread-1] [p.t.internal] Beginning 
>> shutdown sequence
>> 2016-05-26 23:46:26,761 INFO  [clojure-agent-send-pool-1] 
>> [p.s.j.jruby-puppet-agents] Flush request received; creating new JRuby pool.
>> 2016-05-26 23:46:26,765 INFO  [clojure-agent-send-pool-1] 
>> [p.s.j.jruby-puppet-agents] Replacing old JRuby pool with new instance.
>> 2016-05-26 23:46:26,765 INFO  [clojure-agent-send-pool-1] 
>> [p.s.j.jruby-puppet-agents] Swapped JRuby pools, beginning cleanup of old 
>> pool.
>> 2016-05-26 23:46:26,770 INFO  [clojure-agent-send-pool-1] 
>> [p.s.j.jruby-puppet-internal] Cleaned up old JRuby instance with id 1.
>> 2016-05-26 23:46:26,772 INFO  [Thread-1] [p.t.s.w.jetty9-service] 
>> Shutting down web server(s).
>> 2016-05-26 23:46:26,781 INFO  [Thread-1] [p.t.s.w.jetty9-core] Shutting 
>> down web server.
>> 2016-05-26 23:46:26,824 INFO  [Thread-1] [o.e.j.s.ServerConnector] 
>> Stopped ServerConnecto

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

2016-05-26 Thread Jim
Thanks heaps for that !

Cheers
Jim

On Wednesday, 25 May 2016 01:48:09 UTC+10, Rob Nelson wrote:
>
> `puppet --version` and `puppet agent --version` are effectively the same 
> and are testing the version of the puppet executable. This comes from a 
> puppet or puppet-agent package, depending on where you're getting it from. 
> The `puppetserver --version` is testing the puppetserver executable, which 
> is a Clojure JVM that runs the puppetmaster service. This is typically 
> provided by the package puppetserver.
>
> When it is time to upgrade, you would likely upgrade both puppetserver and 
> puppet/puppet-agent. In rpm parlance I would run `rpm -qa | grep puppet` to 
> see what puppet-related packages are present, and then upgrade those. If 
> you can do something similar with apt, you can determine what the package 
> names are and then upgrade them.
>
> For more details on upgrades, you can review 
> https://docs.puppet.com/puppet/4.5/reference/architecture.html. Always 
> read the release notes and upgrade directions all the way through before 
> beginning, as there are sometimes warnings and gotchas you need to be aware 
> of.
>
>
> Rob Nelson
> rnels...@gmail.com
>
> On Mon, May 23, 2016 at 9:10 PM, Jim <ameyaaga...@gmail.com> wrote:
>
>> 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
>>  
>> <https://groups.google.com/d/msgid/puppet-users/a2fa46b5-ae79-4095-8662-efd1fea2c7b0%40googlegroups.com?utm_medium=email_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/54517f12-a958-49a1-ac7b-58d3c3f5cbd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Outofmemory error for puppetserver process

2016-05-26 Thread Jim
] [o.e.j.s.h.ContextHandler] 
Started o.e.j.s.h.ContextHandler@dc925ec{/puppet,null,AVAILABLE}
2016-05-26 23:50:00,360 INFO  [async-dispatch-2] [o.e.j.s.h.ContextHandler] 
Started o.e.j.s.h.ContextHandler@55c827e3{/puppet-admin-api,null,AVAILABLE}
2016-05-26 23:50:00,360 INFO  [async-dispatch-2] [o.e.j.s.h.ContextHandler] 
Started o.e.j.s.h.ContextHandler@3b82279{/,null,AVAILABLE}
2016-05-26 23:50:00,472 INFO  [async-dispatch-2] [o.e.j.s.ServerConnector] 
Started ServerConnector@2fcb900d{SSL-HTTP/1.1}{0.0.0.0:8140}
2016-05-26 23:50:00,473 INFO  [async-dispatch-2] [o.e.j.s.Server] Started 
@41120ms
2016-05-26 23:50:00,486 INFO  [async-dispatch-2] [p.s.m.master-service] 
Puppet Server has successfully started and is now ready to handle requests
2016-05-26 23:50:00,488 INFO  [async-dispatch-2] 
[p.s.l.legacy-routes-service] The legacy routing service has successfully 
started and is now ready to handle requests
2016-05-26 23:50:00,602 INFO  [clojure-agent-send-off-pool-0] 
[p.d.version-check] Newer version 2.4.0 is available! Visit 
https://github.com/puppetlabs/puppetserver/tree/stable for details.
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 Thu 2016-05-26 23:50:01 AEST; 4min 55s ago
 Docs: man:systemd-sysv-generator(8)
  Process: 4397 ExecStart=/etc/init.d/puppetserver start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/puppetserver.service
   └─4403 /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p 
-Djava.security.egd=/dev/urandom -Xms512m -Xmx512m -XX:MaxPermSize=512m -cp 
/opt/puppetlabs/server/apps/puppetserver/puppet-ser...

May 26 23:49:19 jim-Ubuntu1504 systemd[1]: Starting LSB: puppetserver...
May 26 23:50:01 jim-Ubuntu1504 systemd[1]: Started LSB: puppetserver.
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 
cat /etc/default/puppetserver
###
# Init settings for puppetserver
###

# Location of your Java binary (version 7 or higher)
JAVA_BIN="/usr/bin/java"

# Modify this if you'd like to change the memory allocation, enable JMX, etc
JAVA_ARGS="-Xms512m -Xmx512m -XX:MaxPermSize=512m"

# These normally shouldn't need to be edited if using OS packages
USER="puppet"
GROUP="puppet"
INSTALL_DIR="/opt/puppetlabs/server/apps/puppetserver"
CONFIG="/etc/puppetlabs/puppetserver/conf.d"
BOOTSTRAP_CONFIG="/etc/puppetlabs/puppetserver/bootstrap.cfg"
SERVICE_STOP_RETRIES=60

# START_TIMEOUT can be set here to alter the default startup timeout in
# seconds.  This is used in System-V style init scripts only, and will have 
no
# effect in systemd.
# START_TIMEOUT=120
root@jim-Ubuntu1504:/etc/puppetlabs/code/environments/production/manifests# 

Cheers
Jim

On Wednesday, 25 May 2016 19:56:43 UTC+10, Trevor Vaughan wrote:
>
> Hi Jim,
>
> Your logs should be in /var/log/puppetserver/puppetserver.log.
>
> Also, I'm guessing that you need to change the Xmx java option in your 
> puppetserver start script.
>
> Trevor
>
> On Tue, May 24, 2016 at 8:51 AM, Jim <ameya...@gmail.com > 
> wrote:
>
>> Any idea which log file to look at when I run the service puppetserver 
>> start command?
>>
>>
>> On Tuesday, 24 May 2016 22:44:03 UTC+10, Jim wrote:
>>>
>>> Hi Johan,
>>>
>>> I did try 512m option not just 256m before posting. and it didn't work. 
>>> The link which you have provided talks basically about 
>>>
>>> 1. Changing parameters for java options
>>> 2. max active instances(Its commented out by default)
>>> 3.num-cpus configuration. I did recursive grep but couldn't find it. 
>>> Puppetlabs says that they ship it anyway with low value so I don't think 
>>> that should be cause or concerb.
>>>
>>> I would probably get hold of logs and see if I can find any valuable 
>>> information.
>>>
>>> Kind Regards,
>>> Jim 
>>>
>>> On Tuesday, 24 May 2016 15:39:05 UTC+10, Johan De Wit wrote:
>>>>
>>>> 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 <ameya...@gmail.com>
>>>> *Sent:* Tuesday 24th M

Re: [Puppet Users] Outofmemory error for puppetserver process

2016-05-24 Thread Jim
Any idea which log file to look at when I run the service puppetserver 
start command?

On Tuesday, 24 May 2016 22:44:03 UTC+10, Jim wrote:
>
> Hi Johan,
>
> I did try 512m option not just 256m before posting. and it didn't work. 
> The link which you have provided talks basically about 
>
> 1. Changing parameters for java options
> 2. max active instances(Its commented out by default)
> 3.num-cpus configuration. I did recursive grep but couldn't find it. 
> Puppetlabs says that they ship it anyway with low value so I don't think 
> that should be cause or concerb.
>
> I would probably get hold of logs and see if I can find any valuable 
> information.
>
> Kind Regards,
> Jim 
>
> On Tuesday, 24 May 2016 15:39:05 UTC+10, Johan De Wit wrote:
>>
>> 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 <ameya...@gmail.com>
>> *Sent:* Tuesday 24th May 2016 4:54
>> *To:* Puppet Users <puppet...@googlegroups.com>
>> *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
>> 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.

Re: [Puppet Users] Outofmemory error for puppetserver process

2016-05-24 Thread Jim
Hi Johan,

I did try 512m option not just 256m before posting. and it didn't work. The 
link which you have provided talks basically about 

1. Changing parameters for java options
2. max active instances(Its commented out by default)
3.num-cpus configuration. I did recursive grep but couldn't find it. 
Puppetlabs says that they ship it anyway with low value so I don't think 
that should be cause or concerb.

I would probably get hold of logs and see if I can find any valuable 
information.

Kind Regards,
Jim 

On Tuesday, 24 May 2016 15:39:05 UTC+10, Johan De Wit wrote:
>
> 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 <ameya...@gmail.com >
> *Sent:* Tuesday 24th May 2016 4:54
> *To:* Puppet Users <puppet...@googlegroups.com >
> *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
> 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...@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
>  
> <https://groups.google.com/d/msgid/puppet-users/60c8e923-10ca-4d01-a09c-7e87a5036fdb%40googlegroups.com?utm_medium=email_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/7473f693-bbb1-47a2-b694-b59c5a8e21da%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 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.


[Puppet Users] Puppetlabs-firewall Parser Error

2015-08-20 Thread Jim Coulter
I have successfully tested the firewall module with puppetserver 1.0.8 and 
puppet agent 3.7.5 on test nodes with fresh installs of Rhel 6.6 but when I 
try running on an older node I'm getting the following error:

Error: /Stage[main]/Main/Resources[firewall]: Failed to generate additional 
resources using 'generate': Parser error: isfragment was meant to be a 
boolean but received value: 8

I confirmed all the nodes are running iptables 1.4.7

This is the output of puppet resource firewall --debug --verbose on the 
failing node:

Debug: Runtime environment: run_mode=user, ruby_version=1.8.7, 
puppet_version=3.7.5
Debug: Puppet::Type::Firewall::ProviderIptables: [instances]
Debug: Executing '/sbin/iptables-save'
Error: Could not run: Parser error: isfragment was meant to be a boolean 
but received value: 8


Does anyone have any idea what could be causing this error?


-- 
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/f9a33587-a9a0-4588-9cae-a5859c01c647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Create Windows Service

2015-08-17 Thread Jim Miller
Hello everyone,

I haven't seen a Puppet module to create a windows service so I've hacked 
something together as a Defined Type instead of a Parameterized Class 
(mainly because I want to call it for multiple services) and I would 
appreciate feedback and suggestions for improvements.  I'm having a few 
issues where it wants to install/setup the service multiple times as well 
as trying to start the service and wondering if there's a better way. 
 Please excuse type-o's and such, I wrote it pretty fast.

define windows::service(
  $service_zip_file = undef,  # Zip file of service exe, DLLs and 
config file to use - will be moving to Chocolatey
  $service_name   = undef,  
  $service_description  = undef,
  $service_base_path   = undef, # Had issues with 'paths'
  $service_full_path  = undef,
  $service_binary  = undef,
 ) {

  file { ${service_zip_file}:
path= ${service_base_path}/${service_zip_file},
source  = puppet:///modules/our_services/${service_zip_file},
  }

  acl { ${service_name}-acl:
  target   = ${service_base_path},
  target_type  = 'file',
  purge   = 'false',
  permissions = [
{ identity   = 'Administrator', 
rights  = ['full'], 
perm_type  = 'allow', 
child_types = 'all', 
affects= 'all' 
},
{ identity = 'Users', 
rights = ['read','execute'], 
perm_type= 'allow', 
child_types = 'all', 
affects = 'all' 
},
  ],
  owner  = 'Administrators', 
#Creator_Owner specific, doesn't manage unless specified 
  group   = 'Users', 
 #Creator_Group specific, doesn't manage unless specified
  inherit_parent_permissions = 'true',
  require = 
File[${service_name}-${service_ver}],
}

  windows::unzip { ${service_base_path}${service_zip_file}:
destination = ${service_full_path},
creates   = ${service_full_path}${service_binary},
require= File[${service_zip_file}],
  }
 
  Exec { path = $::path }
  $service_exists = powershell get-service -name ${service_name}
  $service_config = start= auto binPath= 
\${service_full_path}${service_binary}\
  # -
  exec { create_service-${service_name}:
 command = sc create ${service_name} ${service_config},
 unless = $service_exists,
   }
   -
  exec { update_service-${service_name}:
command = sc config ${service_name} ${service_config},
onlyif = $service_exists,
  }
  -
  exec { configure_recovery-${service_name}:
command = sc failure ${service_name} reset= 0 actions= 
restart/1/restart/1/restart/1,
  }
  -
  exec { disable_recovery-${service_name}:
command = sc failureflag ${service_name} 0,
  }
  -
  exec { stop_service-${service_name}:
command = powershell stop-process -name $process_name,
returns = [0, 1],
  }
  -
  exec { enable_recovery-${service_name}:
command = sc failureflag ${service_name} 1,
  }
  -
 # I may want to manage this somewhere else, because it keeps tring to 
start the service. 
 # I shouldn't be too hard to determine if a service is running or not
  exec { start_service-${service_name}:
command = sc start ${service_name},
  }
}
##
## Calling this at the node for 2 services
##
$svcName1 = 'OurService1'
$svcDisplayName1 = 'Our New Service1'
$svcPath1   = 'C:\\Program Files\\ourService1\\'
$svcFullPath1 = 'C:\\Program Files\\ourService1\\1.3\\'
$svcBin1 = 'ourservice1.exe'
$svcZip1 = 'ourservice1-1.3.zip'

$svcName1 = 'OurService2'
$svcDisplayName1 = 'Our New Service2'
$svcPath1   = 'C:\\Program Files\\ourService2\\'
$svcFullPath1 = 'C:\\Program Files\\ourService2\\1.3\\'
$svcBin1 = 'ourservice2.exe'
$svcZip1 = 'ourservice2-1.3.zip'

windows::service { ${$svcName1}:
 service_zip_file = ${$svcZip1},
 service_name   = ${$svcName1},
 service_description   = ${svcDisplayName1},
 service_base_path   = ${svcPath1},
 service_full_path  = ${svcFullPath1},
 service_binary  = ${svcBin1},
   }

windows::service { ${$svcName2}:
 service_zip_file = ${$svcZip2},
 service_name   = ${$svcName2},
 service_description   = ${svcDisplayName2},
 service_base_path   = ${svcPath2},
 service_full_path  = ${svcFullPath2},
 service_binary  = ${svcBin2},
   }

Thanks everyone for your time and brain-cycles.
--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

[Puppet Users] Not all host reports in PuppetDB

2015-07-06 Thread Jim Miller
Hello everyone,

I hadn't noticed until recently but a large % of host reports are not 
getting into PuppetDB and I looking for ways to determine what the cause 
is.  I could see an all or nothing but not this.  I'm not worried about the 
data for those hosts but I'm un-sure what steps to take.  I sure hope this 
is an easy fix.  

For example in the puppetdb.log file, I'm seeing for some hosts where 
reports are getting stored and facts and catalogs are getting replaced.  
For other hosts just replacing facts and catalogs are getting replaced.

I don't understand enough of the internals to know what to do here and I'm 
not sure how to peer into the database.  I did upgrade from an pretty old 
version of PuppetDB (1.x something to 2.3.3) and I can't help but feel that 
could be the cause but I'm just guessing.

We did use Puppetboard but now use Puppetboard.

Here's the relevant config values for puppet.conf -- just the master section
[master]
certname = puppet.ourdomain.com
report = true
# reports log, store for non-dashboard or puppetdb
# reports = log,store
reports = http,puppetdb,rrdgraph
reporturl = http://puppet.centric.com:3000/reports/upload  # Broke and 
no longer processing
   # removed by Jim 5/8/2015
   #  ### CONFIGS FOR PUPPET-DASHBOARD
   #  node_terminus = exec
   #  external_nodes = /usr/bin/env 
PUPPET_DASHBOARD_URL=http://puppet.centric.com:3000 
/usr/share/puppet-dashboard/bin/external_node
### CONFIGS FOR PUPPETDB
storeconfigs = true
storeconfigs_backend = puppetdb
ssldir = $vardir/ssl

We're running 
Puppet Server 3.7.5
PuppetDB and PuppetDB-Terminus 2.3.3





-- 
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/b9581bf2-e372-46e9-b06d-c75e193554cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Environments change after upgrading to 3.7.5

2015-05-13 Thread Jim Miller
Done anyone have any thoughts on this?



On Friday, May 8, 2015 at 2:23:27 PM UTC-5, Jim Miller wrote:

 Hi all,

 Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing 
 environments is depreciated.  I've followed a couple of docs* for how to do 
 this but seem to be missing something. Nodes can't seem to find modules.  
 For now it's not a big deal because it's just a warning but I'd like to 
 address the issue.

 *http://docs.puppetlabs.com/puppet/latest/reference/environments.html 
 (and linked docs)

 Here's the old config values in /etc/puppet/puppet.conf for environments:

 [main]
 
 
 modulepath = /etc/puppet/modules
 ...
 ...
 ...
 environment = production
 confdir = /etc/puppet

 [production]
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 [test]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 [development]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules



 PROPOSED:
 [main]
 
 
 # modulepath = /etc/puppet/modules
 environmentpath = $confdir/environments
 default_manifest = /etc/puppet/manifests/site.pp
 ...
 ...
 ...
 # environment = production
 confdir = /etc/puppet

 # [production]
 # manifest = $confdir/manifests/site.pp
 # modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 # [test]
 #manifest = $confdir/manifests/non-prod_site.pp
 #modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 # [development]
 # manifest = $confdir/manifests/non-prod_site.pp
 # modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Environments.conf
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Environments.conf for production:
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/puppet/environments/production/site

 Environments.conf for testing:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 Environments.conf for dev:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Nodes .pp settings for each environment
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 $puppet_env = production

 $puppet_env = test

 $puppet_env = development





-- 
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/b39c2885-ffb7-4c5c-acce-fa70e5b3afee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Environments change after upgrading to 3.7.5

2015-05-11 Thread Jim Miller
I do have one update to this.  The issue seems to be the modulepath, and 
what comes after the ':'
modulepath = $confdir/environments/dev/modules:
$confdir/environments/dev/site/modules

Puppet is not finding catalogs/modules after the ':'

err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not find class mywebsite::profiles::web::site_web_dev for 
. on node 



Again, 

Any suggestions would be _greatly_ appreciated.



Thanks,
Jim



On Friday, May 8, 2015 at 2:23:27 PM UTC-5, Jim Miller wrote:

 Hi all,

 Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing 
 environments is depreciated.  I've followed a couple of docs* for how to do 
 this but seem to be missing something. Nodes can't seem to find modules.  
 For now it's not a big deal because it's just a warning but I'd like to 
 address the issue.

 *http://docs.puppetlabs.com/puppet/latest/reference/environments.html 
 (and linked docs)

 Here's the old config values in /etc/puppet/puppet.conf for environments:

 [main]
 
 
 modulepath = /etc/puppet/modules
 ...
 ...
 ...
 environment = production
 confdir = /etc/puppet

 [production]
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 [test]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 [development]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules



 PROPOSED:
 [main]
 
 
 # modulepath = /etc/puppet/modules
 environmentpath = $confdir/environments
 default_manifest = /etc/puppet/manifests/site.pp
 ...
 ...
 ...
 # environment = production
 confdir = /etc/puppet

 # [production]
 # manifest = $confdir/manifests/site.pp
 # modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 # [test]
 #manifest = $confdir/manifests/non-prod_site.pp
 #modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 # [development]
 # manifest = $confdir/manifests/non-prod_site.pp
 # modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Environments.conf
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Environments.conf for production:
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/puppet/environments/production/site

 Environments.conf for testing:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 Environments.conf for dev:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Nodes .pp settings for each environment
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 $puppet_env = production

 $puppet_env = test

 $puppet_env = development





-- 
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/4620c1ca-2ffb-4021-aeaf-424f4aff5b83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Environments change after upgrading to 3.7.5

2015-05-11 Thread Jim Miller
Still wrestling with this.  Puppet is now seeing 'part' of the module paths 
but not all of them, one thing I had to change was using an absolute path 
and not '$confdir' and it's not using the correct site.pp file 
non-prod_site.pp

[ ~ ]# puppet config print --environment test |grep env
environment_timeout = 0
modulepath = /etc/puppet/environments/test/modules
:/etc/puppet/modules:/usr/share/puppet/modules
environment = test
environmentpath = /etc/puppet/environments
disable_per_environment_manifest = false

[ ~ ]# puppet config print --environment test |grep mani
manifest = /etc/puppet/manifests/site.pp
default_manifest = /etc/puppet/manifests/site.pp
genmanifest = false
manifestdir = /etc/puppet/manifests
disable_per_environment_manifest = false

[TEST] - environments.conf
[ ~ ]# cat /etc/puppet/environments/environments.conf
-
 # manifest = $confdir/manifests/non-prod_site.pp
 manifest = /etc/puppet/manifests/non-prod_site.pp
 # modulepath = 
$confdir/environments/test/modules:$confdir/environments/test/site/modules
 modulepath = 
/etc/puppet/environments/test/site/modules:/etc/puppet/environments/test/modules

Again, thank you for all advice.

--Jim


Hi all,

 Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing 
 environments is depreciated.  I've followed a couple of docs* for how to do 
 this but seem to be missing something. Nodes can't seem to find modules.  
 For now it's not a big deal because it's just a warning but I'd like to 
 address the issue.

 *http://docs.puppetlabs.com/puppet/latest/reference/environments.html 
 (and linked docs)

 Here's the old config values in /etc/puppet/puppet.conf for environments:

 [main]
 
 
 modulepath = /etc/puppet/modules
 ...
 ...
 ...
 environment = production
 confdir = /etc/puppet

 [production]
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 [test]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 [development]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules



 PROPOSED:
 [main]
 
 
 # modulepath = /etc/puppet/modules
 environmentpath = $confdir/environments
 default_manifest = /etc/puppet/manifests/site.pp
 ...
 ...
 ...
 # environment = production
 confdir = /etc/puppet

 # [production]
 # manifest = $confdir/manifests/site.pp
 # modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 # [test]
 #manifest = $confdir/manifests/non-prod_site.pp
 #modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 # [development]
 # manifest = $confdir/manifests/non-prod_site.pp
 # modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Environments.conf
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Environments.conf for production:
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/puppet/environments/production/site

 Environments.conf for testing:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 Environments.conf for dev:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Nodes .pp settings for each environment
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 $puppet_env = production

 $puppet_env = test

 $puppet_env = development





-- 
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/7548d542-a0c1-4978-8604-d89908b79a68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Puppet Environments change after upgrading to 3.7.5

2015-05-11 Thread Jim Miller
And finally when I add back to puppet.conf my environment, everything is 
found correctly:

 [test]
manifest = $confdir/manifests/non-prod_site.pp
modulepath = 
$confdir/environments/test/modules:$confdir/environments/test/site/modules
 


[ ~ ]# puppet config print --environment test |grep mani
Warning: Sections other than main, master, agent, user are deprecated in 
puppet.conf. Please use the directory environments feature to specify 
environments. (See 
http://docs.puppetlabs.com/puppet/latest/reference/environments.html)
   (at /usr/lib/ruby/site_ruby/1.8/puppet/settings/config_file.rb:82:in 
`unique_sections_in')
manifest = /etc/puppet/manifests/non-prod_site.pp
default_manifest = ./manifests
genmanifest = false
manifestdir = /etc/puppet/manifests
disable_per_environment_manifest = false

[ ~ ]# puppet config print --environment test |grep env
Warning: Sections other than main, master, agent, user are deprecated in 
puppet.conf. Please use the directory environments feature to specify 
environments. (See 
http://docs.puppetlabs.com/puppet/latest/reference/environments.html)
   (at /usr/lib/ruby/site_ruby/1.8/puppet/settings/config_file.rb:82:in 
`unique_sections_in')
environment_timeout = 0
modulepath = /etc/puppet/environments/test/modules:
/etc/puppet/environments/test/site/modules
environment = test
environmentpath = /etc/puppet/environments
disable_per_environment_manifest = false


On Friday, May 8, 2015 at 2:23:27 PM UTC-5, Jim Miller wrote:

 Hi all,

 Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing 
 environments is depreciated.  I've followed a couple of docs* for how to do 
 this but seem to be missing something. Nodes can't seem to find modules.  
 For now it's not a big deal because it's just a warning but I'd like to 
 address the issue.

 *http://docs.puppetlabs.com/puppet/latest/reference/environments.html 
 (and linked docs)

 Here's the old config values in /etc/puppet/puppet.conf for environments:

 [main]
 
 
 modulepath = /etc/puppet/modules
 ...
 ...
 ...
 environment = production
 confdir = /etc/puppet

 [production]
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 [test]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 [development]
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules



 PROPOSED:
 [main]
 
 
 # modulepath = /etc/puppet/modules
 environmentpath = $confdir/environments
 default_manifest = /etc/puppet/manifests/site.pp
 ...
 ...
 ...
 # environment = production
 confdir = /etc/puppet

 # [production]
 # manifest = $confdir/manifests/site.pp
 # modulepath = 
 $confdir/environments/production/modules:$confdir/environments/test/site/modules

 # [test]
 #manifest = $confdir/manifests/non-prod_site.pp
 #modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 # [development]
 # manifest = $confdir/manifests/non-prod_site.pp
 # modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Environments.conf
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Environments.conf for production:
 manifest = $confdir/manifests/site.pp
 modulepath = 
 $confdir/environments/production/modules:$confdir/puppet/environments/production/site

 Environments.conf for testing:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/test/modules:$confdir/environments/test/site/modules

 Environments.conf for dev:
 manifest = $confdir/manifests/non-prod_site.pp
 modulepath = 
 $confdir/environments/dev/modules:$confdir/environments/dev/site/modules


 Nodes .pp settings for each environment
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 $puppet_env = production

 $puppet_env = test

 $puppet_env = development





-- 
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/5efa4de7-d243-4ee9-96d5-4d31e8cff885%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Puppet Environments change after upgrading to 3.7.5

2015-05-08 Thread Jim Miller
Hi all,

Just upgraded from 3.4.something to 3.7.5 and it seems how we were doing 
environments is depreciated.  I've followed a couple of docs* for how to do 
this but seem to be missing something. Nodes can't seem to find modules.  
For now it's not a big deal because it's just a warning but I'd like to 
address the issue.

*http://docs.puppetlabs.com/puppet/latest/reference/environments.html (and 
linked docs)

Here's the old config values in /etc/puppet/puppet.conf for environments:

[main]


modulepath = /etc/puppet/modules
...
...
...
environment = production
confdir = /etc/puppet

[production]
manifest = $confdir/manifests/site.pp
modulepath = 
$confdir/environments/production/modules:$confdir/environments/test/site/modules

[test]
manifest = $confdir/manifests/non-prod_site.pp
modulepath = 
$confdir/environments/test/modules:$confdir/environments/test/site/modules

[development]
manifest = $confdir/manifests/non-prod_site.pp
modulepath = 
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules



PROPOSED:
[main]


# modulepath = /etc/puppet/modules
environmentpath = $confdir/environments
default_manifest = /etc/puppet/manifests/site.pp
...
...
...
# environment = production
confdir = /etc/puppet

# [production]
# manifest = $confdir/manifests/site.pp
# modulepath = 
$confdir/environments/production/modules:$confdir/environments/test/site/modules

# [test]
#manifest = $confdir/manifests/non-prod_site.pp
#modulepath = 
$confdir/environments/test/modules:$confdir/environments/test/site/modules

# [development]
# manifest = $confdir/manifests/non-prod_site.pp
# modulepath = 
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules


Environments.conf
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Environments.conf for production:
manifest = $confdir/manifests/site.pp
modulepath = 
$confdir/environments/production/modules:$confdir/puppet/environments/production/site

Environments.conf for testing:
manifest = $confdir/manifests/non-prod_site.pp
modulepath = 
$confdir/environments/test/modules:$confdir/environments/test/site/modules

Environments.conf for dev:
manifest = $confdir/manifests/non-prod_site.pp
modulepath = 
$confdir/environments/dev/modules:$confdir/environments/dev/site/modules


Nodes .pp settings for each environment
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$puppet_env = production

$puppet_env = test

$puppet_env = development



-- 
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/027ddef3-7ba2-47db-8be6-7b0ca98b0d8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Help with provider inheritance of Josh Cooper's Exec PowerShell Provider

2015-01-23 Thread Jim Ficarra
So for what it’s worth, I stopped inheriting the powershell provider and just 
utilized some of the code in the provider to build the powershell command 
method, write the file out to temp, return the native path, and call 
Puppet::Util::Execution.Execute() directly.  Seems to achieve what I want and 
lets me remove all the extraneous extra parameters I don’t need.

So in this case, provider inheritance wasn’t my friend. 

From: Jim Ficarra 
Sent: Thursday, January 22, 2015 6:26 PM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Help with provider inheritance of Josh Cooper's 
Exec PowerShell Provider

Ok – so it seems the the underlying base classes of my provider are expecting 
the parameters and their validations from the exec type instead of my new type 
– makes sense.  I was able to test that theory out by adding the parameters 
(and in many cases copying the parameters from the exec type) being validated 
to my new type, but that’s not exactly what I was hoping for.  I did get to the 
point where it’s writing out the temp ps1 file and executing, but now I have 
some challenges on the return output.

I was trying to avoid direct execution of calling cmd.exe with powershell and 
re-inventing the wheel because it’s been done so well with the powershell 
provider, and it avoids some of the escape hell with double quotes if trying to 
pass them on the command line.

I’m likely going about this the wrong way (e.g. going overboard) but if anyone 
wants to provide guidance from the realm of sanity, please feel free. 



From: Jim Ficarra 
Sent: Thursday, January 22, 2015 2:24 PM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] Help with provider inheritance of Josh Cooper's Exec 
PowerShell Provider

I'm as newbie as they come to both Ruby and custom provider development, so 
apologies if I'm missing the obvious up front. :)

I want to write a custom type/provider to manage IIS Settings. I realize that 
there are at least 3 IIS modules in the forge already (and we are using one of 
them) but I am attempting to write my own because 1) I want to learn how to 
write custom providers and not just defined types in Puppet DSL and 2) The 
existing IIS modules don't hit all the granular configurations I need to manage 
so I have a bunch of execs I need to reign in.

That said, the first type/provider I'm playing with is to simply enable and 
disable Logging in IIS at the server and site level.  I am trying to inherit 
from Josh Cooper's Powershell provider because it executes PowerShell, does it 
well:)  

I sometimes see the temp powershell file being written to temp then disappear, 
but it seems I've hit a wall on the exists? method right out of the gate.  When 
I do a puppet run, I get the error:

Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not evaluate: 
Invalid parameter cwd(:cwd)

Any insight would be appreciated.  Relevant code below.



Running with --trace shows (partial stack trace):
-=-=-=-=-=-=-=-=-=-=-=-=-=
Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not evaluate: 
Invalid parameter cwd(:cwd)
C:/Tools/Puppet/puppet/lib/puppet/util/errors.rb:97:in `fail'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:618:in `[]'
C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/iis_logging/iis_logging.rb:21:in
 `exists?'
C:/Tools/Puppet/puppet/lib/puppet/property/ensure.rb:81:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1035:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:223:in 
`from_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:19:in 
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels) in 
evaluate'



The resource would be called like this
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

iis_logging {'TestLogging':
   ensure  = present,
   site   = 'applicationhost'
}

Type I've Defined
-=-=-=-=-=-=-=-=-=
Puppet::Type.newtype(:iis_logging) do
desc Puppet type to set the configuration of IIS Logging
ensurable
newparam(:site, :namevar = true) do
desc ApplicationHost for server level or the name of the site
munge do |value|
value.downcase
end 
end
end


Provider I've Defined (just showing the exists? method - that's the first 
hurdle)
(I've defined (copied) command(:powershell) in this provider because of the 
lack of inheritance of the commands method, but I get the same error with or 
w/out it)
(run method is already redefined in Josh's provider, which is inherited from 
the exec provider - didn't think I need to do antying else)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Puppet::Type.type

Re: [Puppet Users] Help with provider inheritance of Josh Cooper's Exec PowerShell Provider

2015-01-22 Thread Jim Ficarra
Ok – so it seems the the underlying base classes of my provider are expecting 
the parameters and their validations from the exec type instead of my new type 
– makes sense.  I was able to test that theory out by adding the parameters 
(and in many cases copying the parameters from the exec type) being validated 
to my new type, but that’s not exactly what I was hoping for.  I did get to the 
point where it’s writing out the temp ps1 file and executing, but now I have 
some challenges on the return output.

I was trying to avoid direct execution of calling cmd.exe with powershell and 
re-inventing the wheel because it’s been done so well with the powershell 
provider, and it avoids some of the escape hell with double quotes if trying to 
pass them on the command line.

I’m likely going about this the wrong way (e.g. going overboard) but if anyone 
wants to provide guidance from the realm of sanity, please feel free. 



From: Jim Ficarra 
Sent: Thursday, January 22, 2015 2:24 PM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] Help with provider inheritance of Josh Cooper's Exec 
PowerShell Provider

I'm as newbie as they come to both Ruby and custom provider development, so 
apologies if I'm missing the obvious up front. :)

I want to write a custom type/provider to manage IIS Settings. I realize that 
there are at least 3 IIS modules in the forge already (and we are using one of 
them) but I am attempting to write my own because 1) I want to learn how to 
write custom providers and not just defined types in Puppet DSL and 2) The 
existing IIS modules don't hit all the granular configurations I need to manage 
so I have a bunch of execs I need to reign in.

That said, the first type/provider I'm playing with is to simply enable and 
disable Logging in IIS at the server and site level.  I am trying to inherit 
from Josh Cooper's Powershell provider because it executes PowerShell, does it 
well:)  

I sometimes see the temp powershell file being written to temp then disappear, 
but it seems I've hit a wall on the exists? method right out of the gate.  When 
I do a puppet run, I get the error:

Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not evaluate: 
Invalid parameter cwd(:cwd)

Any insight would be appreciated.  Relevant code below.



Running with --trace shows (partial stack trace):
-=-=-=-=-=-=-=-=-=-=-=-=-=
Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not evaluate: 
Invalid parameter cwd(:cwd)
C:/Tools/Puppet/puppet/lib/puppet/util/errors.rb:97:in `fail'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:618:in `[]'
C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/iis_logging/iis_logging.rb:21:in
 `exists?'
C:/Tools/Puppet/puppet/lib/puppet/property/ensure.rb:81:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1035:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:223:in 
`from_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:19:in 
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels) in 
evaluate'



The resource would be called like this
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

iis_logging {'TestLogging':
   ensure  = present,
   site   = 'applicationhost'
}

Type I've Defined
-=-=-=-=-=-=-=-=-=
Puppet::Type.newtype(:iis_logging) do
desc Puppet type to set the configuration of IIS Logging
ensurable
newparam(:site, :namevar = true) do
desc ApplicationHost for server level or the name of the site
munge do |value|
value.downcase
end 
end
end


Provider I've Defined (just showing the exists? method - that's the first 
hurdle)
(I've defined (copied) command(:powershell) in this provider because of the 
lack of inheritance of the commands method, but I get the same error with or 
w/out it)
(run method is already redefined in Josh's provider, which is inherited from 
the exec provider - didn't think I need to do antying else)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Puppet::Type.type(:iis_logging).provide(:iis_logging, :parent = 
Puppet::Type.type(:exec).provider(:powershell)) do

commands :powershell =
if 
File.exists?(#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe)
  #{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe
elsif 
File.exists?(#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe)
  #{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe
else
  'powershell.exe'
end
desc Uses the Exec resource's PowerShell provider to configure IIS Logging 
Parameters
confine :operatingsystem

[Puppet Users] Help with provider inheritance of Josh Cooper's Exec PowerShell Provider

2015-01-22 Thread Jim Ficarra
I'm as newbie as they come to both Ruby and custom provider development, so 
apologies if I'm missing the obvious up front. :)

I want to write a custom type/provider to manage IIS Settings. I realize 
that there are at least 3 IIS modules in the forge already (and we are 
using one of them) but I am attempting to write my own because 1) I want to 
learn how to write custom providers and not just defined types in Puppet 
DSL and 2) The existing IIS modules don't hit all the granular 
configurations I need to manage so I have a bunch of execs I need to reign 
in.

That said, the first type/provider I'm playing with is to simply enable and 
disable Logging in IIS at the server and site level.  I am trying to 
inherit from Josh Cooper's Powershell provider because it executes 
PowerShell, does it well:)  

I sometimes see the temp powershell file being written to temp then 
disappear, but it seems I've hit a wall on the exists? method right out of 
the gate.  When I do a puppet run, I get the error:

Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not 
evaluate: Invalid parameter cwd(:cwd)

Any insight would be appreciated.  Relevant code below.



Running with --trace shows (partial stack trace):
-=-=-=-=-=-=-=-=-=-=-=-=-=
Error: /Stage[main]/Test_tools/Iis_logging[TestLogging]: Could not 
evaluate: Invalid parameter cwd(:cwd)
C:/Tools/Puppet/puppet/lib/puppet/util/errors.rb:97:in `fail'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:618:in `[]'
C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/iis_logging/iis_logging.rb:21:in
 
`exists?'
C:/Tools/Puppet/puppet/lib/puppet/property/ensure.rb:81:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1035:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:223:in 
`from_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:19:in 
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels) 
in evaluate'



The resource would be called like this
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

iis_logging {'TestLogging':
   ensure  = present,
   site   = 'applicationhost'
}

Type I've Defined
-=-=-=-=-=-=-=-=-=
Puppet::Type.newtype(:iis_logging) do
desc Puppet type to set the configuration of IIS Logging
 ensurable
 newparam(:site, :namevar = true) do
desc ApplicationHost for server level or the name of the site
munge do |value|
value.downcase
end 
end
end


Provider I've Defined (just showing the exists? method - that's the first 
hurdle)
(I've defined (copied) command(:powershell) in this provider because of the 
lack of inheritance of the commands method, but I get the same error with 
or w/out it)
(run method is already redefined in Josh's provider, which is inherited 
from the exec provider - didn't think I need to do antying else)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Puppet::Type.type(:iis_logging).provide(:iis_logging, :parent = 
Puppet::Type.type(:exec).provider(:powershell)) do

commands :powershell =
if 
File.exists?(#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe)
  
#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe
elsif 
File.exists?(#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe)
  
#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe
else
  'powershell.exe'
end
 desc Uses the Exec resource's PowerShell provider to configure IIS 
Logging Parameters
confine :operatingsystem = :windows
 def exists?
check = false
if resource[:site] == applicationhost
pscommand = Import-Module WebAdministration;(Get-WebConfiguration 
/system.webServer/httpLogging -PSPath IIS:\\).dontLog -eq \$False
output = run(pscommand, check)
if output.downcase == true
return true
else
return false
end
else
pscommand = Import-Module WebAdministration;(Get-WebConfiguration 
/system.webServer/httpLogging -PSPath IIS:\\ -Location 
#{resource[:site]}).dontLog -eq \$False
output = run(pscommand, check)
if output.downcase == true
return true
else
return false
end
end
end

-- 
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/fc5c3f6f-481d-4f37-a898-ec3d504ecb23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Best way to deploy the Puppet client to a large set of Windows servers?

2014-10-02 Thread Jim Ficarra
In our organization, we created a chocolatey package for the puppet client 
hosted on our internal nuget server.  We then created a powershell module that 
includes several tools for our environment, one of which remotely invokes the 
installation of chocolatey on windows systems in parallel, and another to 
invoke the installation of the chocolatey puppet package from our internal 
nuget server, also in parallel.  The chocolatey package contains the majority 
of the MSI properties for configuration, and we leverage the installargs option 
to pass in the puppet environment we need to point to.  The “meat” for this is 
just looping through a bunch of invoke-commands and running them as jobs after 
passing in one or more servers with a simple text file manifest.  This avoids 
the “patch party” scenario.

Of course the above depends on having WinRM configured as Rob mentioned.  If 
you do have WinRM enabled, you can take out the chocolatey package 
pre-requisite as in our case (e.g. if you don’t have a nuget server setup), and 
then still build a simple PowerShell script to use invoke-command kick off  the 
installation of the msi with parameters on multiple servers, as jobs, so they 
occur in parallel.  You could have the msi hosted on a share to access during 
the installation.

Do you have any tools such as Microsoft System Center to package and deploy? 
That would be another way to do this, or a myriad of other tools that can be 
used to deploy.  For example, I’ve not used psexec for puppet, but you could 
try to use psexec from www.sysinternals.com to execute as well.  It has an 
option (-c) to copy the the program to the remote system before it executes, so 
that can serve to ensure the MSI is available on the remote node.  Note that 
psexec does create a windows service on the remote server – so there’s a trace 
left behind you may need to clean up (yuck). 

Hope this helps.

-Jim




From: Brian Morris 
Sent: Thursday, October 02, 2014 6:24 PM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Best way to deploy the Puppet client to a large set 
of Windows servers?

Thank you, Rob. I have a lot of reading to do. :)

On Thu, Oct 2, 2014 at 3:12 PM, Rob Reynolds r...@puppetlabs.com wrote:



  On Wed, Oct 1, 2014 at 3:30 PM, Brian Morris nomadicextre...@gmail.com 
wrote:

Hello all, 

There may come a need for me to perform a wide deployment of the Puppet 
client to Windows servers. I am curious to know how others have accomplished 
this.

Concerns I have:

- No other tools are in place that readily come to mind for pushing the 
client out. VCM is in play, but is difficult at best to deploy other 
applications with. The client could certainly be placed on a central file 
share, but pulling rather than pushing sounds like it will require direct 
Sysadmin involvement.

- To ease the pain I could set the Puppet Master to auto-sign certificates 
for a small window of time, but am unsure if this would be worthwhile.

- I can imagine a patch party where a bunch of Sysadmins each get a list 
of servers to go hand perform the installation on, but I am hoping for 
something much cleaner than this.

  I'm not sure yet if we have an official/recommended way of getting the agent 
installed. I believe we are working on making this process easier though.

  So now an alternative recommendation of going about it - 

  Is WinRm configured on these servers? I'm guessing no b/c they are stock. If 
so you have a much easier time moving forward, but it is not configured by 
default. So the next option is Wmi calls.

  There is a really low level Wmi call you can make to  Win32_Process.Create[1] 
that you can use to create a process to install the puppet agent if you have 
administrative privileges. You can do this remotely. This works with Windows 
OOTB.


  If one could connect, you could pass a command to msiexec to run the 
installer with a url to the agent msi. You would want to put it on a file share 
that all of these servers can access (or use the official download).  Take a 
look at automated installation[2] and msi properties[3].

  So you could set your call as msiexec and args /qn /i 
\\file\share\location\of\puppet.msi PUPPET_MASTER_SERVER=puppet.example.com

  You could run that command as fire and forget and wait for them to all finish 
up as they check in with the master. I did a little searching and found a 
couple of gems out there that are related to WMI[4][5].

  Note: I once worked on a tool where we did something very similar to this.

  [1] http://msdn.microsoft.com/en-us/library/aa389388.aspx
  [2] 
https://docs.puppetlabs.com/guides/install_puppet/install_windows.html#automated-installation
  [3] 
https://docs.puppetlabs.com/guides/install_puppet/install_windows.html#msi-properties
  [4] https://rubygems.org/gems/ruby-wmi
  [5] https://rubygems.org/gems/wmi-lite

   
-- 
You received this message because you are subscribed to the Google Groups 
Puppet

Re: [Puppet Users] windows mount points

2014-09-01 Thread Jim Ficarra

Have you declared the folder before the file resource? Something like this:

file {'c:/srv':
   ensure = 'directory',
}

file {'c:/srv/newfile':
   ensure= 'file',
   source= 'puppet:///modules/mymodule/myfile.txt',
   require= File['c:/srv'],
}

It's not clear what the source of your file is so as part of the example I 
arbitrarily specified it coming from the files folder from puppet.  The key 
take-away item is to declare the folder and ensure that the file resource(s) 
are dependent on the folder being there regardless of your choice of 
chaining and ordering syntax you choose, variables, et.


Hope that helps.

-Jim

-Original Message- 
From: Benjamin Priestman

Sent: Monday, September 01, 2014 1:00 PM
To: puppet-users@googlegroups.com
Subject: [Puppet Users] windows mount points

Hi,

On windows hosts, I've taken to putting all my app data in c:\srv, mimicing 
the /srv location on Linux. Depending on the host, this may be a location on 
the system drive, or it is sometimes an additional disk mounted at that 
location. In the latter case, `puppet resource file ` shows this as a link 
whose target is the underlying volume.


An attempt to define a file resource within this location fails with:
'Parent directory C:/srv does not exist'
If I create subdirectories here by hand, the puppet run proceeds just fine. 
Has anyone else come across this behavior?


I'm running puppet 3.4.2 at the moment. Happy to upgrade but I can't find 
any big reports that indicate this is a known issue.


--
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/bc4867e4-4bf6-44a8-900c-1690512db21e%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/7D69BADFB2484A869FA9439E60A6A256%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] windows mount points

2014-09-01 Thread Jim Ficarra
whoops - disregard - I re-read and missed that the latter case was a linked 
location.




-Original Message- 
From: Jim Ficarra

Sent: Monday, September 01, 2014 2:59 PM
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] windows mount points

Have you declared the folder before the file resource? Something like this:

file {'c:/srv':
   ensure = 'directory',
}

file {'c:/srv/newfile':
   ensure= 'file',
   source= 'puppet:///modules/mymodule/myfile.txt',
   require= File['c:/srv'],
}

It's not clear what the source of your file is so as part of the example I
arbitrarily specified it coming from the files folder from puppet.  The key
take-away item is to declare the folder and ensure that the file resource(s)
are dependent on the folder being there regardless of your choice of
chaining and ordering syntax you choose, variables, et.

Hope that helps.

-Jim

-Original Message- 
From: Benjamin Priestman

Sent: Monday, September 01, 2014 1:00 PM
To: puppet-users@googlegroups.com
Subject: [Puppet Users] windows mount points

Hi,

On windows hosts, I've taken to putting all my app data in c:\srv, mimicing
the /srv location on Linux. Depending on the host, this may be a location on
the system drive, or it is sometimes an additional disk mounted at that
location. In the latter case, `puppet resource file ` shows this as a link
whose target is the underlying volume.

An attempt to define a file resource within this location fails with:
'Parent directory C:/srv does not exist'
If I create subdirectories here by hand, the puppet run proceeds just fine.
Has anyone else come across this behavior?

I'm running puppet 3.4.2 at the moment. Happy to upgrade but I can't find
any big reports that indicate this is a known issue.

--
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/bc4867e4-4bf6-44a8-900c-1690512db21e%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/420E8EC5F392412FAD140B31DA3D711A%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] How can we satisfy goals of having all data in hiera and not modifying the module code?

2014-08-25 Thread Jim Ficarra
You could setup setup the host-specific yaml as:

vhost:“first.example.com”
port:  “80”
priority:“10”
docroot:“/var/www/first”

Then your module:

$vhost = hiera(‘vhost’)
$port = hiera(‘port’)
$priority = hiera(‘priority’)
$docroot: = hiera(‘docroot’)

apache::vhost { $vhost:
  port= $port,
  priority = $priority,
  docroot = $docroot,
}

This would allow you completely segregate the configuration from the data and 
not require modification of the module code unless something in the 
configuration changes.  You could use common.yaml for configuration data that 
applies to all hosts.


From: JeremyCampbell 
Sent: Monday, August 25, 2014 5:04 AM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] How can we satisfy goals of having all data in hiera 
and not modifying the module code?

We understand that all site specific data should be in Hiera. We also 
understand that modules shouldn't have to be modified when they are well 
designed e.g. the puppetlabs/apache module. However, how do I setup apache 
using this module with a virtual host without putting data into the manifest. 
E.g to create a vhost according to the docs we need to use:


apache::vhost { 'first.example.com':
  port= '80',
  docroot = '/var/www/first',
}


As a define it would appear that we need to use create_resources() somewhere in 
the module and then create a hash in hiera e.g.


apache::my_vhosts:
  host1:
priority: 10
vhost_name: first.example.com
port: 80
docroot: /var/www/first


This means that we either need to put data into the manifest (e.g. first 
example) or to change the module code by implementing create_resources(). So 
how can we satisfy both goals of having all data in hiera and not modifying the 
module code?

-- 
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/6f9aaec5-0503-488c-b70a-30887af5b353%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/7F6002FD5CA14856A2B8F6025998126D%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] install windows package

2014-08-12 Thread Jim Ficarra
If you mean installing a windows package (such as an MSI or EXE) – you should 
review the package resource type documentation

https://docs.puppetlabs.com/puppet/latest/reference/resources_package_windows.html

https://docs.puppetlabs.com/references/latest/type.html#package

This works really well out of the box if your installer displays information in 
Control Panel/Installed Programs.  If your installer doesn’t, you should look 
at using Rob Reynold’s Chocolatey packaging tool in conjunction with Josh 
Cooper’s Chocolatey Provider for the package resource type.

-Jim

From: huhm4n 
Sent: Monday, August 11, 2014 5:22 PM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] install windows package

is it possible to install the windows package using puppet? I know I can do it 
using the Powershell but I want to dry run it to ensure if it is installed 
first? 
-- 
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/62c3ed1c-2dc4-4ac7-a605-d747de0083f8%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/AA972CB808994769B2841136239CB859%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Facter path issue

2014-07-18 Thread Jim Richard
 

Thanks for the quick reply Rob.

I went ahead and spun up a new Server2008R2 virtual machine to test a very 
basic install:

grabbed the iso from 
http://www.microsoft.com/en-us/download/details.aspx?id=11093
installed Windows as usual, did the Windows update dance reboot, reboot, etc
got the puppet agent from https://downloads.puppetlabs.com/windows/, 
I tried the most recent agent version and even the oldest, 2.7 version, 
both the same
I also tried installing to the Administrator account as well as installing 
to another account

And, I saw the same behavior.

I tried echo %PATH% and then environment.bat and that did give a clue. I 
ran environment.bat multiple times and each time the Path var in the Puppet 
shell grows. I've attached a screen shot so you can see what I mean.

So, it looks like the Puppet shell initialization process executes 
environment.bat twice; that happens for scheduled agent runs as well.

If I just wanted Facter to report back the true system Path, minus all of 
the puppet shell added stuff, what would you suggest. Pull it from the 
registry? Or via a custom fact, take what Facter reports and chop off all 
of the extra Puppet shell applied stuff with a regex?


https://lh3.googleusercontent.com/-1qTwaiZxz0s/U8k9oPOJYXI/B-k/YXycPbeOk9o/s1600/Screen+Shot+2014-07-18+at+11.26.54+AM.png






On Thursday, July 17, 2014 6:12:26 PM UTC-4, Rob Reynolds wrote:


 On Thu, Jul 17, 2014 at 2:37 PM, Jim Richard jimr...@gmail.com 
 javascript: wrote:

 Facter on a Windows 2008R2 server is doing something weird. Version of 
 facter is 2.0.2.

 If I, from the Puppet command prompt, do a echo %Path%, I see exactly 
 what I expect. But if I say facter Path, it shows me all of the Puppet 
 added path stuff twice, ie. the output is almost twice as much text.

 Oddly, the original pre: puppet agent install path data is still reported 
 by facter, correctly, not doubled up, but all of the path items added by 
 the puppet agent install process show up twice when I issue a facter 
 Path. 

 My real path:


 E:\oracle\product\11.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE


 What facter thinks is my Path:

 C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files 
 (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\tools\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\ruby\bin;C:\ProgramFiles(x86)\PuppetLabs\Puppet\sys\tools\bin;E:\oracle\product\11.2.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE


 Any ideas what might cause this?


 Note the first thing that facter.bat / puppet.bat runs is a call to 
 environment.bat, which ensures that the console has all of the right 
 environment variables set and it updates PATH as well.

 Why it is doubling up is another issue entirely.

 Try this - open a command line and call:
 echo %PATH%
 environment.bat
 echo %PATH%

 Oddly enough, I don't see  C:\Program Files (x86)\Puppet Labs\Puppet\bin 
 in your original path as I might expect to see.

 How did you install facter on your Windows system?

  -- 
 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/97685237-6523-40a3-81ad-38f98df86593%40googlegroups.com
  
 https://groups.google.com/d/msgid/puppet-users/97685237-6523-40a3-81ad-38f98df86593%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Rob Reynolds
 Developer, Puppet Labs

 *Join us at PuppetConf 2014 http://www.puppetconf.com/, September 
 20-24 in San Francisco*
 *Register by July 31st to take advantage of the Early Bird discount 
 https://puppetconf2014.eventbrite.com/?discount=EarlyBird **—**save 
 $249!*
  

-- 
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/94f5a2c0-5eae-427d-b77f-4ec7dbef0dcc%40googlegroups.com.
For more options, visit

[Puppet Users] Re: Facter path issue

2014-07-18 Thread Jim Richard
Yep, a custom fact. In case someone else happens upon this looking for a 
similar answer, here's my custom fact to override Facter's default path 
fact:

Facter.add('path') do
  confine :kernel = 'windows'
  setcode do
   my_fact = Facter::Util::Resolution.exec('C:\Windows\system32\cmd.exe /C 
reg query HKLM\SYSTEM\CurrentControlSet\Control\Session 
Manager\Environment /v Path')
   my_fact.rpartition('REG_EXPAND_SZ').slice(2).strip
  end
end

Thanks Rob !


On Thursday, July 17, 2014 3:37:03 PM UTC-4, Jim Richard wrote:

 Facter on a Windows 2008R2 server is doing something weird. Version of 
 facter is 2.0.2.

 If I, from the Puppet command prompt, do a echo %Path%, I see exactly 
 what I expect. But if I say facter Path, it shows me all of the Puppet 
 added path stuff twice, ie. the output is almost twice as much text.

 Oddly, the original pre: puppet agent install path data is still reported 
 by facter, correctly, not doubled up, but all of the path items added by 
 the puppet agent install process show up twice when I issue a facter 
 Path. 

 My real path:


 E:\oracle\product\11.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE

 What facter thinks is my Path:

 C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files 
 (x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\tools\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
 Labs\Puppet\sys\ruby\bin;C:\ProgramFiles(x86)\PuppetLabs\Puppet\sys\tools\bin;E:\oracle\product\11.2.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE


 Any ideas what might cause this?


-- 
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/a244e99f-3c11-4052-a0d4-f491089a1764%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Facter path issue

2014-07-17 Thread Jim Richard
Facter on a Windows 2008R2 server is doing something weird. Version of 
facter is 2.0.2.

If I, from the Puppet command prompt, do a echo %Path%, I see exactly 
what I expect. But if I say facter Path, it shows me all of the Puppet 
added path stuff twice, ie. the output is almost twice as much text.

Oddly, the original pre: puppet agent install path data is still reported 
by facter, correctly, not doubled up, but all of the path items added by 
the puppet agent install process show up twice when I issue a facter 
Path. 

My real path:

E:\oracle\product\11.2.0\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE

What facter thinks is my Path:

C:\Program Files (x86)\Puppet Labs\Puppet\puppet\bin;C:\Program Files 
(x86)\Puppet Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\sys\ruby\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\sys\tools\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\puppet\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\facter\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\hiera\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\bin;C:\Program Files (x86)\Puppet 
Labs\Puppet\sys\ruby\bin;C:\ProgramFiles(x86)\PuppetLabs\Puppet\sys\tools\bin;E:\oracle\product\11.2.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Unix;E:\oracle\product\11.2.0\db_1\OPatch;C:\jdk_release\bin;F:\RATEWARE


Any ideas what might cause this?

-- 
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/97685237-6523-40a3-81ad-38f98df86593%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] installation of package to a different folder

2014-06-26 Thread Jim Ficarra
Try the install_options attribute of the package type.  You need to know what 
the install option is for the JDK itself to go to another folder, then use the 
install_options attribute in puppet.

http://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options



From: bobby38 
Sent: Thursday, June 26, 2014 1:04 PM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] installation of package to a different folder

Hello All,

I am trying to install jdk package to a different folder rather than the 
default folder.
i am trying to install for instance to /operation/tools/jdk-1.7
is there anyway to do this in puppet?

Thanks and regards
Babak 
-- 
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/fb472935-a473-42e3-bf73-fe9404da7088%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/7CD82A228E59449380028A4617A66069%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] installation of package to a different folder

2014-06-26 Thread Jim Ficarra
You won’t find how to install the JDK on the puppet page describing the package 
resource.  You need to first find out how you would install the JDK to an 
alternate path – that will be in the JDK documentation and not Puppet.  Once 
you figure it out with the JDK you then specify the parameter in the puppet 
resource.

I did a quick look but can’t find it on the linux platform (I’m primarily a 
Windows guy - maybe someone can chime in), but I believe you need to create a 
properties file with the options you want to set during installation, and I 
believe it’s the USER_INSTALL_DIR property you’ll want to set.

So, find out how to do this silently first w/out puppet, and that will tell you 
what you need to tell puppet to install it where you want.

Sorry I couldn’t be more help on finding the specific parameters on the linux 
platform – the ones for Windows seem easier to find. 


From: bobby38 
Sent: Thursday, June 26, 2014 1:46 PM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] installation of package to a different folder

Hi Jim, 

Thank you for your reply.
i couldnt find anything related to JDK installation option in that page but I 
was thinking to do it this way ...

class java_rpm::install { 
$version = 'jdk-7u25-linux-x64.rpm' 
package { $version: provider = rpm, 
exec {$version: install_options = 
['-vh','--prefix=/operation/tools/jdk-1.7'], 
owner = operation,
group = admin,
mode = 0755, 
command = rpm -ivh --prefix=/operation/tools/jdk-1.7 jdk-7u25-linux-x64. rpm 
}
source = 
/etc/puppetlabs/puppet/environments/development/modules/java_rpm/files/jdk-7u25-linux-x64
 
}

Thanks,
On Thursday, June 26, 2014 1:30:31 PM UTC-4, Jim Ficarra wrote:
  Try the install_options attribute of the package type.  You need to know what 
the install option is for the JDK itself to go to another folder, then use the 
install_options attribute in puppet.

  
http://docs.puppetlabs.com/references/latest/type.html#package-attribute-install_options



  From: bobby38 
  Sent: Thursday, June 26, 2014 1:04 PM
  To: puppet...@googlegroups.com 
  Subject: [Puppet Users] installation of package to a different folder

  Hello All,

  I am trying to install jdk package to a different folder rather than the 
default folder.
  i am trying to install for instance to /operation/tools/jdk-1.7
  is there anyway to do this in puppet?

  Thanks and regards
  Babak 
  -- 
  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.
  To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/fb472935-a473-42e3-bf73-fe9404da7088%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/b4d8b1cc-d999-472f-a0fc-aa9c0137e23c%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/35C8105C6D464DEF99F0AF65385A8C48%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Chocolatey pre-fetch fails with Puppet - Could not prefetch package provider 'chocolatey': undefined method `each' for nil:NilClass

2014-06-23 Thread Jim Ficarra
It was installed on our puppet master which I don't control, so I'm not
100% sure - however this issue has been identified and fixed.  The issue
boiled down to the PSModulePath system environment variable.  It was
missing a semicolon between the stock path
(%SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\) and a new path I
had put in earlier to point to a set of powershell modules.

This got messed up in my ChocolateyUninstall.ps1 and instead of removing
the ';c:\path\to\modules' I had added,the uninstall messed it up and just
removed the semicolon.

The puppet master admins ended up putting in some debug code in the
chocolatey provider ruby code (execpipe where it fetches the list of
installed chocolatey packages via the provider pre-fetch) and it dumped out
a powershell error that it couldn't find split-path. The odd thing was
that I could use split-path when opening up a powershell prompt while the
PSModulePath was messed up.

This was a bit of a tough one to crack as the underlying powershell errors
were masked behind the ruby.





On Mon, Jun 23, 2014 at 1:10 PM, Rob Reynolds r...@puppetlabs.com wrote:




 On Tue, Jun 17, 2014 at 3:55 PM, Jim Ficarra jimfica...@gmail.com wrote:

 Hey Rob,

 Thanks for the response!

 Yes – chocolatey version 0.9.8.23 is installed on both servers (found via
 choco version).  They both respond to choco /?.  This is a customized
 version that has had the install path modified and the default repository
 restricted to an internal Nuget repository.

 I can also install chocolatey packages manually on both servers –
 specifically this package that is failing by typing “cinst carbon”.


 Are you using the puppet-chocolatey module from the forge or from github?



 I am running puppet as a windows service and ran the service with
 debug/trace (sc start puppet –debug –trace) to pull the previous errors
 from the event log, though they were a bit segregated across event entries.

 It's also worth noting that there are 4 resource types ahead of the one
 that's failing.  The 4 resourcs types (two files and two execs) are applied
 successfully.  I ran the puppet agent –td –verbose –trace and received a
 lot of output, but essentially the same errors that don't appear to have
 any new information.   The successful output shows that the 4 previous
 resource types ran.

 Included below is the start of when it begins to apply the package with
 the chocolatey provider:

 Notice:
 /Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]/returns:
 executed successfully
 Debug:
 /Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]: The
 container Class[Copy_externalfacts] will propagate my refresh event
 Debug: Class[Copy_externalfacts]: The container Stage[main] will
 propagate my refresh event
 Debug: Prefetching chocolatey resources for package
 Debug: Executing 'C:\Tools\Chocolatey\chocolateyInstall\chocolatey.cmd
 list -lo'
 Error: Could not prefetch package provider 'chocolatey': undefined method
 `each' for nil:NilClass
  C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in
 `prefetch_if_necessary'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
 C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
 `call'
 C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
 `traverse'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
 C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
 apply'
 C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
 C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in
 `as_logging_destination'
 C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
 C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in
 apply_catalog'
 C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
 C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
 C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
 C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
 C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
 C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
 C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
 C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
 C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
 C:/Tools/Puppet/puppet

[Puppet Users] Chocolatey pre-fetch fails with Puppet - Could not prefetch package provider 'chocolatey': undefined method `each' for nil:NilClass

2014-06-17 Thread Jim Ficarra
Chocolatey is installed as a shared module on the puppet master. Below is 
the specific part of the puppet code that uses the chocolatey provider to 
install a custom package.  


class install_carbon {
 package {'carbon':
 ensure = '1.7',
 provider = 'chocolatey',
 }
}


This class is part of a larger set of modules and classes that work 
together and execute completely and successfully on another host but fails 
on a second host with the error below.  Same puppet client version (3.4.2 
installed from an internal NuGet repo).  Chocolatey is also customized to 
point to an internal repo.

Any help/thoughts/insight would be appreciated.

Thanks!

Could not prefetch package provider 'chocolatey': undefined method `each' 
for nil:NilClass
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in 
`prefetch_if_necessary'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in `call'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in 
`traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in 
apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in 
`as_logging_destination'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in 
apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in `run_command'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels) 
in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Tools/Puppet/puppet/bin/puppet:4:in `main'

-- 
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/ed1ffcb8-f3da-4079-ae8b-d115a08f9d5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Chocolatey pre-fetch fails with Puppet - Could not prefetch package provider 'chocolatey': undefined method `each' for nil:NilClass

2014-06-17 Thread Jim Ficarra
/resource_harness.rb:19:in
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels)
in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:327:in `block in thinmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:326:in `thinmark'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:118:in
`traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in
`as_logging_destination'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in
apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in `run_command'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels)
in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Tools/Puppet/puppet/bin/puppet:4:in `main'
Notice: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]:
Dependency Package[carbon] has failures: true
Warning:
/Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]:
Skipping because of failed dependencies

(list of failed dependencies go on)





On Tue, Jun 17, 2014 at 4:15 PM, Rob Reynolds r...@puppetlabs.com wrote:

 Let's make sure everything is set up correctly. Do you have chocolatey
 (the client tool) already installed on both of those servers? If so what
 versions of chocolatey?

 Do they both respond to output? (choco /?)

 Moving up the chain to the provider, let's execute puppet agent -td
 --verbose --trace
 This should really get us to what might be causing the error.



 On Tue, Jun 17, 2014 at 12:51 PM, Jim Ficarra jimfica...@gmail.com
 wrote:

 Chocolatey is installed as a shared module on the puppet master. Below is
 the specific part of the puppet code that uses the chocolatey provider to
 install a custom package.


 class install_carbon {
  package {'carbon':
  ensure = '1.7',
  provider = 'chocolatey',
   }
 }


 This class is part of a larger set of modules and classes that work
 together and execute completely and successfully on another host but fails
 on a second host with the error below.  Same puppet client version (3.4.2
 installed from an internal NuGet repo).  Chocolatey is also customized to
 point to an internal repo.

 Any help/thoughts/insight would be appreciated.

 Thanks!

 Could not prefetch package provider 'chocolatey': undefined method `each'
 for nil:NilClass
 C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in
 `prefetch_if_necessary'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
 C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
 `call'
 C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in
 `traverse'
 C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
 C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in
 apply'
 C:/Tools/Puppet

Re: [Puppet Users] Chocolatey pre-fetch fails with Puppet - Could not prefetch package provider 'chocolatey': undefined method `each' for nil:NilClass

2014-06-17 Thread Jim Ficarra
/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:223:in 
`from_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:19:in 
`evaluate'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:174:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:187:in `eval_resource'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `call'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block (2 levels) in 
evaluate'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:327:in `block in thinmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:326:in `thinmark'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:117:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:118:in `traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149:in `with_destination'
C:/Tools/Puppet/puppet/lib/puppet/transaction/report.rb:108:in 
`as_logging_destination'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:163:in `apply'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:125:in `block in apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:161:in `block in benchmark'
C:/Tools/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:124:in `apply_catalog'
C:/Tools/Puppet/puppet/lib/puppet/configurer.rb:192:in `run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (4 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent/locker.rb:20:in `lock'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:44:in `block (3 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:114:in `with_client'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:41:in `block (2 levels) in run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:79:in `run_in_fork'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:40:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `call'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:179:in `controlled_run'
C:/Tools/Puppet/puppet/lib/puppet/agent.rb:38:in `run'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:355:in `onetime'
C:/Tools/Puppet/puppet/lib/puppet/application/agent.rb:321:in `run_command'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels) in 
run'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:470:in `plugin_hook'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `block in run'
C:/Tools/Puppet/puppet/lib/puppet/util.rb:478:in `exit_on_fail'
C:/Tools/Puppet/puppet/lib/puppet/application.rb:364:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:137:in `run'
C:/Tools/Puppet/puppet/lib/puppet/util/command_line.rb:91:in `execute'
C:/Tools/Puppet/puppet/bin/puppet:4:in `main'
Notice: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]: 
Dependency Package[carbon] has failures: true
Warning: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]: 
Skipping because of failed dependencies

(list of failed dependencies go on)






On Tue, Jun 17, 2014 at 4:15 PM, Rob Reynolds r...@puppetlabs.com wrote:

  Let's make sure everything is set up correctly. Do you have chocolatey (the 
client tool) already installed on both of those servers? If so what versions of 
chocolatey? 

  Do they both respond to output? (choco /?)

  Moving up the chain to the provider, let's execute puppet agent -td --verbose 
--trace
  This should really get us to what might be causing the error.




  On Tue, Jun 17, 2014 at 12:51 PM, Jim Ficarra jimfica...@gmail.com wrote:

Chocolatey is installed as a shared module on the puppet master. Below is 
the specific part of the puppet code that uses the chocolatey provider to 
install a custom package.  


class install_carbon {package {'carbon':ensure = '1.7',provider = 
'chocolatey',}}

This class is part of a larger set of modules and classes that work 
together and execute completely and successfully on another host but fails on a 
second host with the error below.  Same puppet client version (3.4.2 installed 
from an internal NuGet repo).  Chocolatey is also customized to point to an 
internal repo.



Any help/thoughts/insight would be appreciated.


Thanks!

Could not prefetch package provider 'chocolatey': undefined method `each' 
for nil:NilClass
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in 
`prefetch_if_necessary'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in `call'
C:/Tools/Puppet/puppet

Re: [Puppet Users] Chocolatey pre-fetch fails with Puppet - Could not prefetch package provider 'chocolatey': undefined method `each' for nil:NilClass

2014-06-17 Thread Jim Ficarra

Sorry if this is a duplicate – I tried to send earlier but it didn’t seem to 
hit the distro.  
Also truncating it for readability
=

Hey Rob,

Thanks for the response!

Yes – chocolatey version 0.9.8.23 is installed on both servers (found via choco 
version).  They both respond to choco /?.  This is a customized version that 
has had the install path modified and the default repository restricted to an 
internal Nuget repository.

I can also install chocolatey packages manually on both servers – specifically 
this package that is failing by typing “cinst carbon”.

I am running puppet as a windows service and ran the service with debug/trace 
(sc start puppet –debug –trace) to pull the previous errors from the event log, 
though they were a bit segregated across event entries.

It's also worth noting that there are 4 resource types ahead of the one that's 
failing.  The 4 resourcs types (two files and two execs) are applied 
successfully.  I ran the puppet agent –td –verbose –trace and received a lot of 
output, but essentially the same errors that don't appear to have any new 
information.   The successful output shows that the 4 previous resource types 
ran.  

Included below is the start of when it begins to apply the package with the 
chocolatey provider:

Notice: 
/Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]/returns: 
executed successfully
Debug: /Stage[main]/Copy_externalfacts/Exec[BuildStatusFacterFile_SetPerms]: 
The container Class[Copy_externalfacts] will propagate my refresh event
Debug: Class[Copy_externalfacts]: The container Stage[main] will propagate my 
refresh event
Debug: Prefetching chocolatey resources for package
Debug: Executing 'C:\Tools\Chocolatey\chocolateyInstall\chocolatey.cmd list -lo'
Error: Could not prefetch package provider 'chocolatey': undefined method 
`each' for nil:NilClass
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in `prefetch_if_necessary'
truncated
Debug: Executing 'C:\Tools\Chocolatey\chocolateyInstall\chocolatey.cmd list -lo'
Error: /Stage[main]/Install_carbon/Package[carbon]: Could not evaluate: 
undefined method `each' for nil:NilClass
C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/package/chocolatey.rb:66:in
 `query'
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:19:in `properties'
C:/Tools/Puppet/puppet/lib/puppet/type/package.rb:178:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1035:in `retrieve'
C:/Tools/Puppet/puppet/lib/puppet/type.rb:1063:in `retrieve_resource'
truncated
Notice: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]: 
Dependency Package[carbon] has failures: true
Warning: /Stage[main]/Install_iis/Windowsfeature[IIS]/Exec[add-feature-IIS]: 
Skipping because of failed dependencies

(list of failed dependencies go on)






On Tue, Jun 17, 2014 at 4:15 PM, Rob Reynolds r...@puppetlabs.com wrote:

  Let's make sure everything is set up correctly. Do you have chocolatey (the 
client tool) already installed on both of those servers? If so what versions of 
chocolatey? 

  Do they both respond to output? (choco /?)

  Moving up the chain to the provider, let's execute puppet agent -td --verbose 
--trace
  This should really get us to what might be causing the error.




  On Tue, Jun 17, 2014 at 12:51 PM, Jim Ficarra jimfica...@gmail.com wrote:

Chocolatey is installed as a shared module on the puppet master. Below is 
the specific part of the puppet code that uses the chocolatey provider to 
install a custom package.  


class install_carbon {package {'carbon':ensure = '1.7',provider = 
'chocolatey',}}

This class is part of a larger set of modules and classes that work 
together and execute completely and successfully on another host but fails on a 
second host with the error below.  Same puppet client version (3.4.2 installed 
from an internal NuGet repo).  Chocolatey is also customized to point to an 
internal repo.



Any help/thoughts/insight would be appreciated.


Thanks!

Could not prefetch package provider 'chocolatey': undefined method `each' 
for nil:NilClass
C:/Tools/Puppet/puppet/lib/puppet/provider/package.rb:4:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:277:in `prefetch'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:167:in 
`prefetch_if_necessary'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:67:in `block in evaluate'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in `call'
C:/Tools/Puppet/puppet/lib/puppet/graph/relationship_graph.rb:116:in 
`traverse'
C:/Tools/Puppet/puppet/lib/puppet/transaction.rb:108:in `evaluate'
C:/Tools/Puppet/puppet/lib/puppet/resource/catalog.rb:164:in `block in 
apply'
C:/Tools/Puppet/puppet/lib/puppet/util/log.rb:149

Re: [Puppet Users] Ability to wait for dotnet to complete installation

2014-06-04 Thread Jim Ficarra
Did you try using the package resource over the exec resource?  I install .NET 
4.0 using the package resource and it works just fine on Windows 2008 R2 
Enterprise  Standard, though I haven’t tried on Data Center but I’m not sure 
how different it would be.  I’ve done something similar with .net 4.5.   The 
package resource allows the installation of .NET to be idempotent as it is 
aware of packages installed/registered in Control Panel.


Here is one I use for .NET 4.5.1, but it’s the same pattern for 4.0 (I can’t 
find the one I had for 4.0, but it was similar).  Update the package name to 
match the description as it appears in Control Panel as well as the version.  
In my case I have a previous resource that I require that downloads the .exe to 
a temp folder for local execution(Download_file).  I also ensure that IIS is 
installed (Windowsfeature)

package { 'Microsoft .NET Framework 4.5.1': 
  
ensure = '4.5.50938',

source = 
'D:\temp\NDP451-KB2858728-x86-x64-AllOS-ENU.exe', 

install_options = ['/q','/norestart'],

require = 
[Download_file['NDP451-KB2858728-x86-x64-AllOS-ENU.exe_download'],Windowsfeature['IIS']],
 

}





As I said I can’t find the 4.0 package def I had, but let here’s a crack at 
what I remember.You’ll need to ensure that the source is updated to where 
you have it.  The source attribute works for local and UNC resources, but not 
http urls.  We use the download_file puppet resource type (from puppet forge) 
to download files from an HTTP url.



package { 'Microsoft .NET Framework Extended':  
 

ensure = '4.0.30319',

source = 
'D:\temp\dotNetFx40_full_x86_x64.exe', 

install_options = ['/q','/norestart'], 
  

}



.NET 4.0 installs both extended and client profile.  You *could* chain these 
together, but I haven’t tried.  Puppet will check that these are installed and 
if they are, will not install them again.  The first one would kick off and 
install both, then when the Client Profile was checked it would see it was 
installed.  You could use this to ensure that both were installed – if someone 
uninstalled the client profile but not extended, it would kick off the 
installer again, but I’ve not tried a repair option.  Perhaps .net would do a 
full refresh, but I don’t know for sure.





package { 'Microsoft .NET Framework Extended':  
 

ensure = '4.0.30319',

source = 
'D:\temp\dotNetFx40_full_x86_x64.exe', 

install_options = ['/q','/norestart'], 
  

} -



package { 'Microsoft .NET Framework Client Profile':
   

ensure = '4.0.30319',

source = 
'D:\temp\dotNetFx40_full_x86_x64.exe', 

install_options = ['/q','/norestart'], 
  

}


Hope this helps.

-Jim

From: Stephen Wallace 
Sent: Wednesday, June 04, 2014 2:15 AM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] Ability to wait for dotnet to complete installation

Hi all,
Interesting timing challenge around installing dotnet on Windows 2008 R2 Data 
Cente. 

In essence, when we run the following command, it appears to complete in a few 
seconds. The reality is that it spawns multiple new msiexecs to install and 
configure itself over the next 5 mins or so.

dotNetFx40_Full_x86_x64.exe /q /norestart

This causes an obvious issue if we need to install a bit of software with 
dotnet as a dependancy, unless, we can wait until dotnet has finished it's 5 
min dance.

From command line, this issue is resolved by adding a start /wait to the 
above command. The next challenge is how to get the correct syntax for my exec 
statement;

command   = start /wait 
${dotnet::params::deployment_root}\\dotNetFx40_Full_x86_x64.exe /q /norestart,


Without the start /wait, the above command works. 

With the start /wait, it complains as follows...

/Stage[main]//Dotnet[dotnet45]/Exec[install-dotnet-45]/returns:


Error: start /wait  
C:\ProgramData\PuppetLabs\puppet\etc\modules\dotnet\files\dotNetFx40_Full_x86_x64.exe
 /q /norestart returned 1 instead of one of [0]


Short of writing a new function called go for a cup of tea feeding it the 
required number of sleep seconds(!), does anybody have any experiences or ideas 
around this one??

-- 

Regs,

Stephen J Wallace
M +61 (0)415 306731
http://au.linkedin.com/in/stephenwallace

-- 
You received this message because you are subscribed

Re: [Puppet Users] Windows exe fork

2014-06-01 Thread Jim Ficarra
I’m not familiar with how the Reimann monitoring client runs – but if you run 
it at the command line and it runs within the shell and requires the command 
shell to run perpetually, you could try “start.exe reimannclient.exe” or 
whatever the name of the exe is.  There are a # of command line switches that 
you can look at in the help by typing start /? at the command line.  This would 
be a kludgey way to do it though to be honest.  You won’t have a very good way 
to control it.

Alternatively, it’s usually better to run these types of things within the 
service control manager as a service if they are supported which will give you 
more control over starting, stopping, and ensuring it starts up when the 
servers reboot, etc.  Hopefully your tool is able to run natively as a service. 
 if not, you can try to set up a service wrapper to run it as a service 
(Unfortunately you can’t just convert any exe natively into a Windows service). 
 SrvAny (the wrapper) and InstSrv (sets up the SrvAny wrapper in the 
registry/service control manager) were tools available in the Windows 2003 
Server Resource Kit.  I’ve recently read that those 2003 tools still work in 
2008, but keep in mind that they are not supported and your mileage may vary.

If your client is available as something that can run as a service that would 
be much better. 

You could use puppet to ensure the components are installed properly and that 
the service is set to run all the time.  

From: Bill N 
Sent: Friday, May 30, 2014 12:27 PM
To: puppet-users@googlegroups.com 
Subject: [Puppet Users] Windows exe fork

Hi,

Just wrote my first puppet module for Windows  provisioning. All is working 
well except I am having a problem running a windows exe file in that Puppet 
appears to wait for the exe to complete. At least this is the case when I run 
Puppet agent --test from the Windows Server command line. 

What I want to do here is install a set of files for a Riemann monitoring 
client on several Windows Server 2008 R1 VMs. These files include an exe, which 
I want to start and run in perpetuity. I don't want Puppet to wait for this 
process to complete. It appears I could run the exe in a separate shell using 
cmd.exe, but when I try that on the command line I do not see the named process 
running in the Resource Monitor. I only see cmd.exe running. This is not very 
informative.

My question is, what is the best way to run this executable via Puppet? Should 
I convert the exe to a Windows service, install that and run it as a service? 
Should I use shell cmd and live with the unhelpful Resource Monitor listing? Or 
should I use Power Shell to fork the process like I would in linux?

Any help would be most appreciated.  
-- 
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/c5d75b7c-531d-40d2-a027-f118910206af%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/1CEBC94EFF3A420684F90A61C5C65420%40JimHPPavilionG6.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g client install

2014-05-24 Thread Jim Ficarra
Sorry for not responding in a while – I moved on to automating other parts and 
now I’m back to this one.

It happens if I run puppet apply or puppet agent – either way it’s running as a 
domain service account.

I can run the installer perfectly fine outside of puppet with no user 
interaction whatsoever.  I have the appropriate command line options and the 
response file simply provides the settings that would’ve been requested through 
the UI – but as I said, I have it working w/out a lick of interaction required. 
 It’s just when I hit it in puppet this occurs.

Puppet is running as a domain service account.  Not sure what you mean by 
having an issue with the D: drive.  D: is a local drive, not a mapped drive, so 
we’re not trying to use localsystem across to a network/mapped drive.  Puppet 
has no issues install everything else from the same d:\build source – for 
example I’ve used it to install the MSDeploy MSI and a custom MSI to install 
some http modules in IIS.  These installers reside in D:\Build as well.  Also, 
the fact that it’s able to access the installer and unzip the files in the temp 
install directory is telling me that it has no issues accessing the files on D:.

That said, I just tried to execute it as the puppet service account 
interactively – I see an issue (maybe THE issue) - the installer throws a 
java.lang.NullPointerException.  I don’t get this when I run it as myself, so 
at least another lead with the specific user it’s executing under.  I’ll update 
this thread when I find out more but if you have any other diagnostic tips let 
me know.

Thanks!




From: Josh Cooper 
Sent: Tuesday, May 20, 2014 1:32 AM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g 
client install





On Mon, May 19, 2014 at 6:46 PM, Jim Ficarra jimfica...@gmail.com wrote:

  Thanks for replying, Josh.

  I just tried your suggestion but the same thing happens.  

  install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile', 'D:\Build\Ora11gclient.rsp'],


  It spawns several processes (javaw, oui, etc) and then it unzips the files (I 
see unzip.exe execute in task mgr, and I see the files expanded in the puppet 
users appdata/local/temp folder) then it hangs with the following processes 
hung (in the security context of the service account under which the puppet 
service is running) – 0% CPU utilization on these processes.

  conhost.exe (two of them), ruby.exe*32 (two of them), setup.exe*32, 
oui.exe*32, javaw.exe*32, cmd.exe*32 (two of them) hanging with 0 CPU 
utilization.

  I have turned on debugging and I get the following in the event log shortly 
before it hangs.
  Executing 'cmd.exe /c start puppet-install /w 
D:\Build\Oracle11gclient\setup.exe -silent -noconsole -waitforcompletion 
-responseFile D:\Build\Ora11gclient.rsp'

  It eventually times out.

  Any other thoughts?  The odd thing is that I can install this from the 
command line with the same options, so I know I have the options correct.  Are 
these processes getting orphaned? I’m guessing based on the behavior, but it 
looks like the install kicks off several processes, and after the unzip the 
other processes seem to be waiting for some signal that never happens.  

  Any additional thoughts?

Are you running `puppet apply` or `puppet agent` when the hang happens? In 
either case, I'd recommending using process explorer to find the child process 
that all of those are waiting on. As a first approximation, you can usually use 
procexp to see if one of the threads is calling MessageBoxA, e.g. a service 
that tries to display a message dialog on the service window station.

Second, is D: a mapped drive? If so, then puppet running as LocalSystem won't 
be able to access it (as specified).

Also, it would help if you could provide your response file with redacted 
passwords, etc.


  Thanks.

  -Jim




  From: Josh Cooper 
  Sent: Monday, May 19, 2014 3:44 PM
  To: puppet-users@googlegroups.com 
  Subject: Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g 
client install





  On Sun, May 18, 2014 at 10:57 AM, Jim Ficarra jimfica...@gmail.com wrote:

Trying the following in both package and exec providers 

D:\Build\Oracle11gclient\setup.exe -silent -waitforcompletion -noconsole 
-responseFile D:\Build\Ora11gclient.rsp


I can run this at the command line and install Oracle 11g client 
silently.Once I put it in a package or try to exec it, I get as far as the 
installer auto-unzipping the files needed for the install but then it just 
hangs and after 5 mins, puppet times out.  The processes are just hung.

I've tried the following two ways  (I have a custom fact that determines if 
oracle is installed which works correctly - if I install oracle outside of 
puppet the fact correctly determines if it's installed).  The files are placed 
in the source path by other statements that work as expected.

Attempted providers

Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g client install

2014-05-24 Thread Jim Ficarra
So I think I found the issue.  Others are having the same issue – the service 
account used to execute puppet is prefaced with an exclamation mark: ‘!’

Seems that others are having similar issues with accounts that have ! in them.

http://rprabu1984.wordpress.com/2014/02/03/java-lang-nullpointerexception-while-trying-to-install-oracle-software/



https://community.oracle.com/thread/1067522



Folks are indicating it’s a bug, but I haven’t found an official statement for 
Oracle indicating so – still this is pretty plausible given that others are 
having the same issue with accounts prefaced with ! and that in my case puppet 
has no issues installing other installers from the same location.  Either way, 
I have what I think is the root cause and a direction to address it.



Thanks for hanging through with this, Josh – much appreciated.  Also, great 
work on the powershell provider – that has saved me more than you can imagine!



If you have any additional thoughts, please feel free.



-Jim


From: Jim Ficarra 
Sent: Saturday, May 24, 2014 10:01 PM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g 
client install

Sorry for not responding in a while – I moved on to automating other parts and 
now I’m back to this one.

It happens if I run puppet apply or puppet agent – either way it’s running as a 
domain service account.

I can run the installer perfectly fine outside of puppet with no user 
interaction whatsoever.  I have the appropriate command line options and the 
response file simply provides the settings that would’ve been requested through 
the UI – but as I said, I have it working w/out a lick of interaction required. 
 It’s just when I hit it in puppet this occurs.

Puppet is running as a domain service account.  Not sure what you mean by 
having an issue with the D: drive.  D: is a local drive, not a mapped drive, so 
we’re not trying to use localsystem across to a network/mapped drive.  Puppet 
has no issues install everything else from the same d:\build source – for 
example I’ve used it to install the MSDeploy MSI and a custom MSI to install 
some http modules in IIS.  These installers reside in D:\Build as well.  Also, 
the fact that it’s able to access the installer and unzip the files in the temp 
install directory is telling me that it has no issues accessing the files on D:.

That said, I just tried to execute it as the puppet service account 
interactively – I see an issue (maybe THE issue) - the installer throws a 
java.lang.NullPointerException.  I don’t get this when I run it as myself, so 
at least another lead with the specific user it’s executing under.  I’ll update 
this thread when I find out more but if you have any other diagnostic tips let 
me know.

Thanks!




From: Josh Cooper 
Sent: Tuesday, May 20, 2014 1:32 AM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g 
client install





On Mon, May 19, 2014 at 6:46 PM, Jim Ficarra jimfica...@gmail.com wrote:

  Thanks for replying, Josh.

  I just tried your suggestion but the same thing happens.  

  install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile', 'D:\Build\Ora11gclient.rsp'],


  It spawns several processes (javaw, oui, etc) and then it unzips the files (I 
see unzip.exe execute in task mgr, and I see the files expanded in the puppet 
users appdata/local/temp folder) then it hangs with the following processes 
hung (in the security context of the service account under which the puppet 
service is running) – 0% CPU utilization on these processes.

  conhost.exe (two of them), ruby.exe*32 (two of them), setup.exe*32, 
oui.exe*32, javaw.exe*32, cmd.exe*32 (two of them) hanging with 0 CPU 
utilization.

  I have turned on debugging and I get the following in the event log shortly 
before it hangs.
  Executing 'cmd.exe /c start puppet-install /w 
D:\Build\Oracle11gclient\setup.exe -silent -noconsole -waitforcompletion 
-responseFile D:\Build\Ora11gclient.rsp'

  It eventually times out.

  Any other thoughts?  The odd thing is that I can install this from the 
command line with the same options, so I know I have the options correct.  Are 
these processes getting orphaned? I’m guessing based on the behavior, but it 
looks like the install kicks off several processes, and after the unzip the 
other processes seem to be waiting for some signal that never happens.  

  Any additional thoughts?

Are you running `puppet apply` or `puppet agent` when the hang happens? In 
either case, I'd recommending using process explorer to find the child process 
that all of those are waiting on. As a first approximation, you can usually use 
procexp to see if one of the threads is calling MessageBoxA, e.g. a service 
that tries to display a message dialog on the service window station.

Second, is D: a mapped drive? If so, then puppet running as LocalSystem won't 
be able to access

Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g client install

2014-05-19 Thread Jim Ficarra
Thanks for replying, Josh.

I just tried your suggestion but the same thing happens.  

install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile', 'D:\Build\Ora11gclient.rsp'],


It spawns several processes (javaw, oui, etc) and then it unzips the files (I 
see unzip.exe execute in task mgr, and I see the files expanded in the puppet 
users appdata/local/temp folder) then it hangs with the following processes 
hung (in the security context of the service account under which the puppet 
service is running) – 0% CPU utilization on these processes.

conhost.exe (two of them), ruby.exe*32 (two of them), setup.exe*32, oui.exe*32, 
javaw.exe*32, cmd.exe*32 (two of them) hanging with 0 CPU utilization.

I have turned on debugging and I get the following in the event log shortly 
before it hangs.
Executing 'cmd.exe /c start puppet-install /w 
D:\Build\Oracle11gclient\setup.exe -silent -noconsole -waitforcompletion 
-responseFile D:\Build\Ora11gclient.rsp'

It eventually times out.

Any other thoughts?  The odd thing is that I can install this from the command 
line with the same options, so I know I have the options correct.  Are these 
processes getting orphaned? I’m guessing based on the behavior, but it looks 
like the install kicks off several processes, and after the unzip the other 
processes seem to be waiting for some signal that never happens.  

Any additional thoughts?

Thanks.

-Jim




From: Josh Cooper 
Sent: Monday, May 19, 2014 3:44 PM
To: puppet-users@googlegroups.com 
Subject: Re: [Puppet Users] Puppet for Windows - Problems with Oracle 11g 
client install





On Sun, May 18, 2014 at 10:57 AM, Jim Ficarra jimfica...@gmail.com wrote:

  Trying the following in both package and exec providers 

  D:\Build\Oracle11gclient\setup.exe -silent -waitforcompletion -noconsole 
-responseFile D:\Build\Ora11gclient.rsp


  I can run this at the command line and install Oracle 11g client 
silently.Once I put it in a package or try to exec it, I get as far as the 
installer auto-unzipping the files needed for the install but then it just 
hangs and after 5 mins, puppet times out.  The processes are just hung.

  I've tried the following two ways  (I have a custom fact that determines if 
oracle is installed which works correctly - if I install oracle outside of 
puppet the fact correctly determines if it's installed).  The files are placed 
in the source path by other statements that work as expected.

  Attempted providers (unsuccessful)
  
  exec {'OracleInstall':
command  = 'D:\Build\Oracle11gclient\setup.exe -silent -waitforcompletion 
-noconsole -responseFile D:\Build\Ora11gclient.rsp',
  }

  exec {'OracleInstall':
command  = '  D:\Build\Oracle11gclient\setup.exe -silent 
-waitforcompletion -noconsole -responseFile D:\Build\Ora11gclient.rsp',
provider  = powershell,
  }

  #command = ' D:\Build\Oracle 11g client\setup.exe -silent 
-waitforcompletion -noconsole -responseFile D:\Build\Ora11gclient.rsp',


  package {'OracleInstall':
source = 'D:\Build\Oracle11gclient\setup.exe',
install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile D:\Build\Ora11gclient.rsp'],

Shouldn't that be:

install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile', 'D:\Build\Ora11gclient.rsp'],


Otherwise puppet will think you're passing a single argument with spaces in it, 
and will quote it.

  }
  


  When either of these run, it kicks off - I see the unzip.exe kick off and it 
begins to unpack the files.  I then see the java installer process and 
setup.exe in task manager but after a few seconds it stops and just hangs.  The 
installActions file shows the following - which is not complete compared to 
when I run the puppet module locally on the box (puppet apply 
oracle_install.pp).

  Contents of installAction log
  -
  Using paramFile: D:\Build\Oracle11gclient\install\oraparam.ini

  The commandline for unzip:
  D:\Build\Oracle11gclient\install\unzip -qqqo 
..\stage\Components\oracle.jdk\1.5.0.17.03\1\DataFiles/*.jar -d 
C:\Users\!CDCPU~1\AppData\Local\Temp\OraInstall2014-05-18_12-52-59PM 
  -

  So, it seems it's getting as far as unzipping but then just hangs - I'm 
thinking something is getting orphaned somewhere but I can't figure it out.  

  Hoping someone has some insight or suggestions.

  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/99bee03b-e71d-40fb-9546-d60359c5af3d%40googlegroups.com.
  For more options, visit https://groups.google.com/d/optout.





-- 

Josh Cooper

Developer

[Puppet Users] Puppet for Windows - Problems with Oracle 11g client install

2014-05-18 Thread Jim Ficarra
Trying the following in both package and exec providers

D:\Build\Oracle11gclient\setup.exe -silent -waitforcompletion -noconsole 
-responseFile D:\Build\Ora11gclient.rsp

I can run this at the command line and install Oracle 11g client 
silently.Once I put it in a package or try to exec it, I get as far as the 
installer auto-unzipping the files needed for the install but then it just 
hangs and after 5 mins, puppet times out.  The processes are just hung.

I've tried the following two ways  (I have a custom fact that determines if 
oracle is installed which works correctly - if I install oracle outside of 
puppet the fact correctly determines if it's installed).  The files are 
placed in the source path by other statements that work as expected.

Attempted providers (unsuccessful)

exec {'OracleInstall':
  command  = 'D:\Build\Oracle11gclient\setup.exe -silent 
-waitforcompletion -noconsole -responseFile D:\Build\Ora11gclient.rsp',
}

exec {'OracleInstall':
  command  = '  D:\Build\Oracle11gclient\setup.exe -silent 
-waitforcompletion -noconsole -responseFile D:\Build\Ora11gclient.rsp',
  provider  = powershell,
}

#command = ' D:\Build\Oracle 11g client\setup.exe -silent 
-waitforcompletion -noconsole -responseFile D:\Build\Ora11gclient.rsp',

package {'OracleInstall':
  source = 'D:\Build\Oracle11gclient\setup.exe',
  install_options = ['-silent', '-waitforcompletion', '-noconsole'. 
'-responseFile D:\Build\Ora11gclient.rsp'],
}


When either of these run, it kicks off - I see the unzip.exe kick off and 
it begins to unpack the files.  I then see the java installer process and 
setup.exe in task manager but after a few seconds it stops and just hangs. 
 The installActions file shows the following - which is not complete 
compared to when I run the puppet module locally on the box (puppet apply 
oracle_install.pp).

Contents of installAction log
-
Using paramFile: D:\Build\Oracle11gclient\install\oraparam.ini

The commandline for unzip:
D:\Build\Oracle11gclient\install\unzip -qqqo 
..\stage\Components\oracle.jdk\1.5.0.17.03\1\DataFiles/*.jar -d 
C:\Users\!CDCPU~1\AppData\Local\Temp\OraInstall2014-05-18_12-52-59PM 
-

So, it seems it's getting as far as unzipping but then just hangs - I'm 
thinking something is getting orphaned somewhere but I can't figure it out.

Hoping someone has some insight or suggestions.

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/99bee03b-e71d-40fb-9546-d60359c5af3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Re: Referencing a value from one level to another.

2014-04-17 Thread Jim Donnellan
John,

Thanks so much; this worked as expected. 

-- 
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/763eff2b-2dd4-4845-aa34-437b5c687714%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Setting validproperties fields in provider modules

2014-04-16 Thread Jim Perry
Thanks. I am still learning Ruby so I will look into accessors in more
detail.

What I am trying to do is call the HPUX provider and use it to set the min
and max age that gets passed back to the parent. Then I also need to be
able to verify the right commands are used to reset the expiration when the
user password is updated if it is a trusted setup.

On Apr 16, 2014 4:02 AM, Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 Hmm, I still don't really see what you are intent on doing specifically,
 to be honest.

 Looking at

https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/useradd.rb#L195
 does this problem not boil down to overriding the passcmd method and
 adding some kind of case statements to handle your different environments?

 You mentioned at the beginning of the thread that you're facing issues
 accessing the resource property values. These *should* work:

 min_age = resource.should(:password_min_age)
 max_age = resource.should(:password_max_age)

 If I'm not mistaken, this should be synonymous with e.g.
 resource[:password_min_age]. `resource` is the attr_accessor for
 `@resource`. I'm not sure why so much provider code ignores the accessors.

 Felix

 On 04/16/2014 03:11 AM, James Perry wrote:
  The HPUX code I am trying to modify is already in the existing Puppet
  code base at
 
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/hpux.rb
.
 
 
  The functionality I am trying to use is to set the value of a specific
  property so that I can specify the commands to run depending on which
  password aging scheme is required on a specific HPUX OS version and
  setup. Some are trusted computing, some use a version of the shadow
  password and others just a plain old password file.
 
  The module I found the functionality I want to extend is based on the
  snippet of code starting at line 11 of
 
https://github.com/adrienthebo/puppet-filemapper/blob/master/lib/puppetx/filemapper.rb
.
 
 
  Unfortunately I am unable to seem to get it to work and thus I am at a
  loss. I really need to be able to ensure that the proper expiry setups
  are in place for HPUX because while I managed to get the password
  functionality into the main stream code base, it is not likewise
  resetting the password expiration for another 90 days and thus the
  account gets locked out.

 --
 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/66hM1Vc8fYU/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/534E38FC.7090405%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/CAO0AM%3DrxT7fys4S3dRnT1uOszmrqjMZw6H1xNi-BMXsgvOyMfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Setting validproperties fields in provider modules

2014-04-14 Thread Jim Perry
Not so far. You are the first reply.
On Apr 14, 2014 11:52 AM, Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 Hi,

 sorry for the late reply.

 Did you ever get this fixed?

 Cheers,
 Felix

 On 02/20/2014 03:29 AM, HPUX_PUPPET wrote:
  I am still working to the HPUX provider to handle password expirations
  and I have gotten the max and min password age values extracted from the
  OS, but for the life of me I cannot seem to get them to assign to the
  :password_max_age and :password_min_age fields in the Ruby code.
 
  I know from looking at other modules that I can get the values from
  doing a loop on @resource.class.validproperties and set the value by
  doing value = @resource.should(loop var).
 
  I am still learning Ruby and I thought I had it down enough to handle
  assigning to this variable yet I am still missing something here.
 
  Can anyone provide me some guidance as to why I just cannot get this to
  assign and propagate back up the super class?
 
  Thanks!

 --
 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/66hM1Vc8fYU/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/534C0418.8060807%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/CAO0AM%3DqhORHuQHki0iuHmy76GPZCaV4ut8759F41s9KJxMkZRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Setting validproperties fields in provider modules

2014-04-14 Thread Jim Perry
Not yet. I don't have it working and I was asking how to get our data for
troubleshooting it first.
On Apr 14, 2014 11:59 AM, Felix Frank felix.fr...@alumni.tu-berlin.de
wrote:

 Okay then.

 Is your code up on github or pastebin for direct review?

 On 04/14/2014 05:53 PM, Jim Perry wrote:
  I know from looking at other modules that I can get the values from
  doing a loop on @resource.class.validproperties and set the value by
  doing value = @resource.should(loop var).

 --
 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/66hM1Vc8fYU/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/534C05E9.7000703%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/CAO0AM%3Dr73izCjVi2cB5UT3OUaXDj3-aaEVOBMNYC7cVg%2BOJz7g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] Referencing a value from one level to another.

2014-04-14 Thread Jim Donnellan
Puppeteers,

I'm trying to get something done in puppet/hiera, and I'm curious if it's 
possible. A bit of background:

We're using puppet and hiera to build out and maintain Apache Solr, and 
we're using Solr in a cloud structure. What this ends up meaning 
configuration-wise is that we have our data broken off into shards, and 
servers that are hosting different replicas of the shards for redundancy. 
For a simplified sense, say it looks like this...

Server1 hosts:
  shard1, replica 1
  shard2, replica 1

Server2 hosts:
  shard1, replica 2
  shard2, replica 2

Server3 hosts:
  shard3, replica 1
  shard4, replica 1

...and so on. So each shard exists on multiple hosts, each host has 
multiple shards, but not every shard is on every host. 

We were able to handle this just fine by using a hiera array to list the 
shards at the _host_.yaml level. No big deal. Done and done, works great in 
production.


The issue that has come up is that some of the shards (which are JVMs) have 
grown a bit and require a heap size greater than the default. Obviously 
this would be something we'd want to wrangle with puppet and hiera. We've 
come up with some initial attempts that seem to work, which involve just 
enhancing the hiera data when we declare the shards at a host level. So 
instead of:

Server1.yaml::
shards:
- shard1
- shard2

We have something like this:

Server1.yaml::
shards:
- shard1: 5G
- shard2: 7G

...which is workable. The thing I don't like about it is that I'm defining 
the heap size at the host level, even though they should be consistent for 
any given shard across servers. This is redundant at best, and leaves 
things open for inconsistency across servers at worst. I kind of want to 
raise the heap size declarations up above the host level, up to the 
application or environment level I guess. But I would still need to declare 
which shards are where at the host level. In short, I guess I need the 
deployment to look for what shards should be on a host at the host level, 
and then look up the chain a bit to see what heap size that shard should 
have. 

Does this sound doable?

Thanks in advance, 
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/23d97f6f-8d93-4a49-a56c-9afba920e118%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] Good resources for writing rspec tests for puppet code changes?

2014-02-19 Thread Jim Perry
Thanks for the links, I will take a look at them.

I would love to get some training on it, but the company won't spring for
it. So it looks like I am hacking it out with everyone's help and Google.


On Wed, Feb 19, 2014 at 4:44 AM, Martin Alfke tux...@gmail.com wrote:

 Hi,

 On 19 Feb 2014, at 07:44, Johan De Wit jo...@open-future.be wrote:

  On 02/19/2014 02:03 AM, HPUX_PUPPET wrote:
 
  Just a bit more explanation...
 
  When I was looking for references I was only finding puppet-lint and
 rspec-puppet for testing manifests, but not finding anything for writing
 the spec files to test module functionality or modifications to existing
 modules such as the HPUX user management.
 
 
  There is not that much documentation available.
 
  I did a talk on cfgmgmtcamp.eu about TDD and puppet.  Yoiu can find a
 little blog at the BPUG website : puppet-be.github.io. (there are some
 references in the slides)
 
  I look mostly at the puppet code for examples for writing rspec files.
  Some interesting links I also have to look at :
 
 
 http://www.morethanseven.net/2014/01/25/code-coverage-for-puppet-modules/
 
 http://hajee.github.io/2014/01/18/testing-your-system-installation-with-rspec
 
 
 https://github.com/ghoneycutt/puppet-module-nfs/blob/v1.6.2/spec/classes/init_spec.rb#L58-186
 
 Maybe you want to attend Extending Puppet using Ruby classes (
 https://puppetlabs.com/services/training/extending-puppet)

 Besides this I also did a small module with spec examples (
 https://github.com/tuxmea/tuxmea-stdmodule)

 hth,

 Martin


 --
 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/187mS-NiiyE/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/259F6EBC-480E-460B-9070-47682B78A344%40gmail.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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/CAO0AM%3Dr3Jo1X%3DqG1n5z5z0iMqJgaUHT-UedeD6jX8%3DBAT8sepQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] Puppetlabs-firewall and Logging

2013-12-13 Thread Jim Miller
These rules are being applied in the pre.pp so they run first.  Since we're 
just testing this out the only rules we have are in pre.pp and post.pp.  In 
pre.pp the rules are SSH and DNS, and post.pp drop everything else.  

I'm wondering how much traction this module has since it seems log and drop 
is not supported.  Again, I ask if anyone can generically share some 
working rules for tcp/udp.  Or if this isn't the module to use which one is?


Thanks all,


On Wednesday, December 11, 2013 10:02:08 PM UTC-6, Jeff Bachtel wrote:

  Are you seeing the not-working rules generate iptables rules (verify with 
 iptables-save after applying manifest)?

 Also, it's been a while since I dug into the ruby that generates the 
 rules, you should probably use the before operator - between rules to 
 enforce ordering, like

   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'udp', port = '53', action = 
 'accept', } -
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
 action = 'accept', }

 Jeff

 On 12/11/2013 10:24 PM, Jim Miller wrote:
  
 We're testing out the Puppetlabs-Firewall module.  And it seems I'm either 
 missing something fundamental or Logging/Accpet works/doesn't work in an 
 irregular way.  I would be most grateful for some input.

 *COMMON:*
   firewall { '002 accept related established rules INPUT': proto = 'all', 
 state = ['RELATED', 'ESTABLISHED'], action = 'accept' }
   firewall { '003 accept related established rules OUTPUT': chain = 
 'OUTPUT', proto = 'all', state = ['RELATED', 'ESTABLISHED'], action = 
 'accept' }

 *This works for new inbound SSH connections:*
   firewall { '007 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
 source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
 action = 'accept' }


 *This works for inbound SSH connections: *  firewallchain { 
 'ssh_in:filter:IPv4': ensure = present, }

   firewall { '008 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
 source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
 jump = 'ssh_in' }
   firewall { '009 ssh_in': chain = 'ssh_in', jump = 'LOG', log_prefix = 
 'ssh_in ' }
   firewall { '011 ssh_in': chain = 'ssh_in', action = 'accept' }


 *This works for DNS:*
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'udp', port = '53', action = 
 'accept', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
 action = 'accept', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x6', proto = 'udp', port = '53', action = 
 'accept', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x6', proto = 'tcp', state = 'NEW', port = '53', 
 action = 'accept', }


 *This does NOT work for DNS:*
   firewallchain { 'dns_out:filter:IPv4': ensure = present, }

   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'udp', port = '53', jump = 
 'dns_out', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
 jump = 'dns_out', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x6', proto = 'udp', port = '53', jump = 
 'dns_out', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x6', proto = 'tcp', state = 'NEW', port = '53', 
 jump = 'dns_out', }

   firewall { '024 dns_out': chain = 'dns_out', jump = 'LOG', log_prefix 
 = 'dns_out', }
   firewall { '025 dns_out': chain = 'dns_out', action = 'accept', }


 None of the above rules generates any errors. 
 My understanding of reading the doc is the default policy is 'accept' when 
 not specified (not sure about custom chains).  When I try to connect to the 
 server, I don't see logs being generated.

 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...@googlegroups.com javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/puppet-users/e12d97d9-2e43-482c-aa22-7bccaf6de17d%40googlegroups.com
 .
 For more options, visit https://groups.google.com/groups/opt_out.


  

-- 
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/b003cc8a-d0b6-4a0a-b120

Re: [Puppet Users] Puppetlabs-firewall and Logging

2013-12-13 Thread Jim Miller
I forgot to add, yes the rules are being generated and outbound DNS logs 
are being generated.. AND I FOUND THE ISSUE.  You have to specify a 
protocol in ALL chains.  Or in the case where you specified it earlier (for 
LOG and custom chains 'proto = 'any').

with no protocol specified rules default to tcp

-A dns_out -p tcp -m comment --comment 024 dns_out -j LOG --log-prefix 
dns_out
-A dns_out -p tcp -m comment --comment 025 dns_out -j ACCEPT
---

with proto = 'any' 
--
-A dns_out -m comment --comment 024 dns_out -j LOG --log-prefix dns_out
-A dns_out -m comment --comment 025 dns_out -j ACCEPT
-
I get the desired results.



*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:dns_out - [0:0]
:ssh_in - [0:0]
-A INPUT -p icmp -m comment --comment 000 accept all icmp -j ACCEPT
-A INPUT -i lo -m comment --comment 001 accept all to lo interface -j 
ACCEPT
-A INPUT -m comment --comment 002 accept related established rules INPUT 
-m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -s 10.xx.xx.0/23 -i eth0 -p tcp -m multiport --ports 22 -m comment 
--comment 005 fwd to ssh in -m state --state NEW -j ssh_in
-A INPUT -m comment --comment 998 drop all INPUT -j DROP
-A OUTPUT -m comment --comment 003 accept related established rules 
OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -d 10.xx.xx.2X/32 -o eth0 -p tcp -m multiport --ports 53 -m 
comment --comment 015 fwd to dns_out -m state --state NEW -j dns_out
-A OUTPUT -d 10.xx.X0.2x/32 -p udp -m multiport --ports 53 -m comment 
--comment 016 fwd to dns_out -j dns_out
-A OUTPUT -d 10.xx.X.2x/32 -o eth0 -p tcp -m multiport --ports 53 -m 
comment --comment 018 fwd to dns_out -m state --state NEW -j dns_out
-A OUTPUT -d 10.xx.X.2x/32 -p udp -m multiport --ports 53 -m comment 
--comment 026 fwd to dns_out -j dns_out
-A OUTPUT -m comment --comment 999 drop all OUTPUT -j DROP
-A dns_out -p tcp -m comment --comment 024 dns_out -j LOG --log-prefix 
dns_out
-A dns_out -p tcp -m comment --comment 025 dns_out -j ACCEPT
-A ssh_in -p tcp -m comment --comment 009 ssh_in -j LOG --log-prefix 
ssh_in
-A ssh_in -p tcp -m comment --comment 011 ssh_in -j ACCEPT
COMMIT


On Friday, December 13, 2013 6:15:25 PM UTC-6, Jim Miller wrote:

 These rules are being applied in the pre.pp so they run first.  Since 
 we're just testing this out the only rules we have are in pre.pp and 
 post.pp.  In pre.pp the rules are SSH and DNS, and post.pp drop everything 
 else.  

 I'm wondering how much traction this module has since it seems log and 
 drop is not supported.  Again, I ask if anyone can generically share some 
 working rules for tcp/udp.  Or if this isn't the module to use which one is?


 Thanks all,


 On Wednesday, December 11, 2013 10:02:08 PM UTC-6, Jeff Bachtel wrote:

  Are you seeing the not-working rules generate iptables rules (verify 
 with iptables-save after applying manifest)?

 Also, it's been a while since I dug into the ruby that generates the 
 rules, you should probably use the before operator - between rules to 
 enforce ordering, like

   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'udp', port = '53', action = 
 'accept', } -
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
 action = 'accept', }

 Jeff

 On 12/11/2013 10:24 PM, Jim Miller wrote:
  
 We're testing out the Puppetlabs-Firewall module.  And it seems I'm 
 either missing something fundamental or Logging/Accpet works/doesn't work 
 in an irregular way.  I would be most grateful for some input.

 *COMMON:*
   firewall { '002 accept related established rules INPUT': proto = 
 'all', state = ['RELATED', 'ESTABLISHED'], action = 'accept' }
   firewall { '003 accept related established rules OUTPUT': chain = 
 'OUTPUT', proto = 'all', state = ['RELATED', 'ESTABLISHED'], action = 
 'accept' }

 *This works for new inbound SSH connections:*
   firewall { '007 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
 source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
 action = 'accept' }


 *This works for inbound SSH connections: *  firewallchain { 
 'ssh_in:filter:IPv4': ensure = present, }

   firewall { '008 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
 source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
 jump = 'ssh_in' }
   firewall { '009 ssh_in': chain = 'ssh_in', jump = 'LOG', log_prefix 
 = 'ssh_in ' }
   firewall { '011 ssh_in': chain = 'ssh_in', action = 'accept' }


 *This works for DNS:*
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'udp', port = '53', action = 
 'accept', }
   firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
 destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
 action = 'accept', }
   firewall { '016 fwd to dns_out

[Puppet Users] Puppetlabs-firewall LOG and Drop

2013-12-11 Thread Jim Miller
Hello all,

We are beginning to implement the Puppetlabs-firewall module and have not 
been able to implement a final LOG, DROP rule (our standard policy is LOG 
and DROP everything which isn't explicitly allowed IN or OUT) in post.pp.  
Has anyone been able to implement a post.pp which does a LOG and DROP?  



We do something similar to this:
# Chain:
:droplog - [0:0]

 # Last INPUT rule
 -A INPUT -i eth0 -j droplog
 # Last OUTPUT rule
 -A OUTPUT -o eth0 -j droplog

 # LOG packets, then DROP.
 -A droplog -m limit --limit 10/min -j LOG --log-prefix dropped 
 -A droplog -j DROP

From what I've read, and tried, it does not seem possible since you can not 
combine an 'action' and a 'jump'.  And you only redefine the policy for 
built-in chains (INBOUND, FORWARD, OUTBOUND, ) So I can't write a 
custom firewallchain which has a default policy of drop.

To me this should work but it doesn't because the default action is 
'accept' .. it never hits 999
class firewall::post {
firewallchain {'droplog:filter:IPv4': ensure = 'present', }

firewall { '997 fwd to droplog': proto = 'all', jump = 'droplog', 
before = undef, }~
firewall { '998 droplog': chain = 'droplog', jump = 'LOG', log_prefix 
= 'dropped ', before = undef, }~
firewall { '999 Default Drop': chain = 'droplog', action = 'drop', 
before = undef,  }
}



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/ef6aaff6-6775-4601-9313-75b24011ed50%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Puppetlabs-firewall and Logging

2013-12-11 Thread Jim Miller
We're testing out the Puppetlabs-Firewall module.  And it seems I'm either 
missing something fundamental or Logging/Accpet works/doesn't work in an 
irregular way.  I would be most grateful for some input.

*COMMON:*
  firewall { '002 accept related established rules INPUT': proto = 'all', 
state = ['RELATED', 'ESTABLISHED'], action = 'accept' }
  firewall { '003 accept related established rules OUTPUT': chain = 
'OUTPUT', proto = 'all', state = ['RELATED', 'ESTABLISHED'], action = 
'accept' }

*This works for new inbound SSH connections:*
  firewall { '007 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
action = 'accept' }


*This works for inbound SSH connections:*  firewallchain { 
'ssh_in:filter:IPv4': ensure = present, }

  firewall { '008 fwd to ssh_in': chain = 'INPUT', iniface = 'eth0', 
source = '10.x8.xx1.0/24', proto = 'tcp', state = 'NEW', port = '22', 
jump = 'ssh_in' }
  firewall { '009 ssh_in': chain = 'ssh_in', jump = 'LOG', log_prefix = 
'ssh_in ' }
  firewall { '011 ssh_in': chain = 'ssh_in', action = 'accept' }


*This works for DNS:*
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x5', proto = 'udp', port = '53', action = 
'accept', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
action = 'accept', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x6', proto = 'udp', port = '53', action = 
'accept', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x6', proto = 'tcp', state = 'NEW', port = '53', 
action = 'accept', }


*This does NOT work for DNS:*
  firewallchain { 'dns_out:filter:IPv4': ensure = present, }

  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x5', proto = 'udp', port = '53', jump = 
'dns_out', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x5', proto = 'tcp', state = 'NEW', port = '53', 
jump = 'dns_out', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x6', proto = 'udp', port = '53', jump = 
'dns_out', }
  firewall { '016 fwd to dns_out': chain = 'OUTPUT', outiface = 'eth0', 
destination = '10.x8.x0.x6', proto = 'tcp', state = 'NEW', port = '53', 
jump = 'dns_out', }

  firewall { '024 dns_out': chain = 'dns_out', jump = 'LOG', log_prefix 
= 'dns_out', }
  firewall { '025 dns_out': chain = 'dns_out', action = 'accept', }


None of the above rules generates any errors. 
My understanding of reading the doc is the default policy is 'accept' when 
not specified (not sure about custom chains).  When I try to connect to the 
server, I don't see logs being generated.

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/e12d97d9-2e43-482c-aa22-7bccaf6de17d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] using GIT for environments

2013-08-19 Thread Jim Toth
On Sun, Aug 18, 2013 at 9:04 PM, me 1 solarflo...@gmail.com wrote:

 On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

 There are a few ways to go; probably the best way is to set up a bare
 repository that you push and pull from in both places, but I'd probably add
 the development environment as a remote in the in-production directory.

 cd /path/to/production/repository
 git remote add devel /path/to/development/directory
 git merge --ff-only devel/master

 (--ff-only because I'm paranoid -- that will give you the same sort of
 warnings that git push would give you if you the trees had diverged).



 So you're saying adding to the development environment as a remote in the
 in-production directory is an alternative to using a bare repository then?


Yes.


 I'm new to git and just trying to find an easy way, if using bare
 repositories is necessary, I don't think git is very good for this at all,
 its too much trouble for what its worth.  (except for extremely large
 environments, which is rare)


I'd say what it's good for is multi-user environments. Or single-user
environments, if that user happens to be familiar with git.  :-)

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] using GIT for environments

2013-08-19 Thread Jim Toth
Hmm...you might need to add git remote update in there.  git pull does
that by default.



On Mon, Aug 19, 2013 at 1:22 PM, me 1 solarflo...@gmail.com wrote:


 On Sun, Aug 18, 2013 at 9:04 PM, me 1 solar...@gmail.com wrote:

 On Sunday, August 18, 2013 6:13:38 PM UTC-4, Jim Toth wrote:

 There are a few ways to go; probably the best way is to set up a bare
 repository that you push and pull from in both places, but I'd probably add
 the development environment as a remote in the in-production directory.

 cd /path/to/production/repository
 git remote add devel /path/to/development/directory
 git merge --ff-only devel/master

 (--ff-only because I'm paranoid -- that will give you the same sort of
 warnings that git push would give you if you the trees had diverged).



 So you're saying adding to the development environment as a remote in
 the in-production directory is an alternative to using a bare repository
 then?


 Yes.


 I'm new to git and just trying to find an easy way, if using bare
 repositories is necessary, I don't think git is very good for this at all,
 its too much trouble for what its worth.  (except for extremely large
 environments, which is rare)


 I'd say what it's good for is multi-user environments. Or single-user
 environments, if that user happens to be familiar with git.  :-)



 ok, then here is the problem:

 $ git merge --ff-only preprod/master

 fatal: 'preprod/master' does not point to a commit

 $ git remote -v
 preprod /etc/puppet/environments/preprod/puppet/ (fetch)
 preprod /etc/puppet/environments/**preprod/puppet/ (push)

 $ pwd
 /etc/puppet


 --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Jim Toth
jjt...@vcu.edu
Applications Analyst, Technology Services
(804) 827-1227

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Puppet Users] using GIT for environments

2013-08-18 Thread Jim Toth
There are a few ways to go; probably the best way is to set up a bare
repository that you push and pull from in both places, but I'd probably add
the development environment as a remote in the in-production directory.

cd /path/to/production/repository
git remote add devel /path/to/development/directory
git merge --ff-only devel/master

(--ff-only because I'm paranoid -- that will give you the same sort of
warnings that git push would give you if you the trees had diverged).

-- Jim Toth


On Sun, Aug 18, 2013 at 2:36 PM, me 1 solarflo...@gmail.com wrote:

 On Sunday, August 18, 2013 3:24:40 AM UTC-4, James Polley wrote:

 The changes are being commited in the branch called master in your
 local checkout, but not being pushed nack up to the origin.

 http://git-scm.com/book/en/**Git-Basics-Working-with-**Remoteshttp://git-scm.com/book/en/Git-Basics-Working-with-Remotesexplains
  how to push your changes.



 Thanks, but I tried this already, but i'm still having errors:

  $ git push
 Counting objects: 5, done.
 Compressing objects: 100% (3/3), done.
 Writing objects: 100% (3/3), 308 bytes, done.
 Total 3 (delta 2), reused 0 (delta 0)
 Unpacking objects: 100% (3/3), done.
 remote: error: refusing to update checked out branch: refs/heads/master
 remote: error: By default, updating the current branch in a non-bare
 repository
 remote: error: is denied, because it will make the index and work tree
 inconsistent
 remote: error: with what you pushed, and will require 'git reset --hard'
 to match
 remote: error: the work tree to HEAD.
 remote: error:
 remote: error: You can set 'receive.denyCurrentBranch' configuration
 variable to
 remote: error: 'ignore' or 'warn' in the remote repository to allow
 pushing into
 remote: error: its current branch; however, this is not recommended unless
 you
 remote: error: arranged to update its work tree to match what you pushed
 in some
 remote: error: other way.
 remote: error:
 remote: error: To squelch this message and still keep the default
 behaviour, set
 remote: error: 'receive.denyCurrentBranch' configuration variable to
 'refuse'.
 To /etc/puppet/environments/preprod/../../../puppet
  ! [remote rejected] master - master (branch is currently checked out)
 error: failed to push some refs to
 '/etc/puppet/environments/preprod/../../../puppet'

  --
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Jim Toth
jjt...@vcu.edu
Applications Analyst, Technology Services
(804) 827-1227

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


[Puppet Users] Re: Passenger with Puppet 3.0, problems running under

2013-07-25 Thread Jim Toth
As I recall, if the config.ru itself isn't owned by the puppet user, we'll 
get similar errors from Passenger (spewing out an HTML error page, which 
the agents then unhelpfully log).

It might be something else -- given that it's HTML, you might want to just 
go to https://your puppet server:8140 in a browser and see what it's 
saying -- if all's well, then puppet will just say something like

The environment must be purely alphanumeric, not ''


And if that doesn't fix it, you could try uncommenting the debugging lines 
you quoted from puppet/util.rb.


I just took my own advice -- we're in the process of rebuilding a test 
puppet master, and in the process of writing this post I noticed that it 
was spewing HTML, and fairly clearly told me that I needed to do a bundle 
install since its Gemfile had changed (and the Gemfile.lock, which it was 
complaining about, is not owned by the puppet user by design).


On Wednesday, July 24, 2013 5:26:26 PM UTC-4, Forrie wrote:

 Since upgrading to 3.x I've had some problems running Puppet under 
 Passenger.   I've spent several /days/ debugging this.

 The first symptoms included a new agent could not get a CA cert from the 
 Puppet Master.   I checked my configs, permissions, etc.

 When I run puppet master in stand-alone mode, it works fine.  

 I wrote to the Phusion Passenger folks, but they are not familiar with 
 Puppet and so I'm still trying to figure out what is wrong. 

 We don't have selinux enabled.  sestatus confirms this.

 SELinux status: disabled


 Of the errors I see in the puppet logs relevant to this:

 puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Could not prepare 
 for execution: Got 3 failure(s) while initializing: Could not set 'file' on 
 ensure:
  Permission denied - /var/log/puppet/masterhttp.log; Could not set 'file' 
 on ensure: Permission denied - /var/log/puppet/masterhttp.log
 puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Wrapped exception:
 puppet.log:Jul 24 14:51:19 central puppet-master[30657]: Permission denied 
 - /var/log/puppet/masterhttp.log; change from absent to file failed: Could 
 not set
 'file' on ensure: Permission denied - /var/log/puppet/masterhttp.log

 I tried setting the ownership of the files in that directory to the same 
 as the apache User, no difference.   Again, under regular Puppet there's no 
 problem.

 This is all I have in my config.ru:

 $0 = master
 ARGV  --rack
 ARGV  --confdir  /etc/puppet
 ARGV  --vardir   /var/lib/puppet
 require 'puppet/util/command_line'
 run Puppet::Util::CommandLine.new.execute


 More logs:

 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011div
 id=site_header
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011ul
 class=corporate_identity
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011#011li
 class=logoa href=https://www.phusionpassenger.com; 
 https://www.phusionpassenger.comspanPhusion
 Passenger/span/a/li
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011/ul
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011/div
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011div
 id=site_body
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011h1
 class=error_titleWeb application could not be started/h1
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]: #011#011#011div
 id=content
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
 #011#011#011#011preexit (SystemExit)
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb:wbr518:wbrin
 `exitapos;
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb:wbr518:wbrin
 `exit_on_failapos;
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/application.rb:wbr362:wbrin
 `runapos;
 Jul 24 14:51:14 de-prod-archive puppet-agent[28391]:
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util/command_line.rb:wbr132:wbrin
 `runapos;



 It spits out a lot of HTML, CSS... and things I don't think should ever 
 happen, on the client side.


 Looks like it it exiting, mentioning line 518 of 
 /usr/local/lib/ruby/gems/1.8/gems/puppet-3.2.3/lib/puppet/util.rb, the code 
 of which 

 is:


   # Now we need to catch **any** other kind of exception, because we may 
 be calling third-party
   #  code (e.g. webrick), and we have no idea what they might throw.
   rescue Exception = err
 ## NOTE: when debugging spec failures, these two lines can be very 
 useful
 #puts err.inspect
 #puts Puppet::Util.pretty_backtrace(err.backtrace)
 Puppet.log_exception(err, Could not #{message}: #{err})
 Puppet::Util::Log.force_flushqueue()
 exit(code)
   end


 Anyway, I'm pretty stumped.   I am running Puppet 3.x on its own now.  We 
 only have 40 nodes, so it works.   But I'd like to figure out what the heck 
 

[Puppet Users] example42 puppet-squid

2013-05-13 Thread Jim Miller
I am using example42s squid module 
https://github.com/example42/puppet-modules/tree/master/squid, and trying 
to define certain user variable at the puppet/manifest/nodes.pp level   
This is the first module of their's I've tried,  I've read over their 
documentation and FAQ and for the life of me I can not figure this out.  To 
me their examples are VERY HIGH level and I'm _really_ new to puppet.  I'm 
sure I'm missing something fundamental but I'm just not seeing it.  I've 
also installed example42s 'common' module which is needed to make the type 
of changes I'm talking about.

The following works fine:
node 'xio99cdetest1.mygroup.com' {
 include squid
}

AND

node 'xio99cdetest1.mygroup.com' {
 class { 'squid':
   squid_port = '3030',
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Invalid parameter squid_port at /etc/puppet/manifests/nodes.pp:94 on node 
xio99cdejump01.centric.com

node 'xio99cdetest1.mygroup.com' {
 include common # example42's common module
 class { 'squid':
 squid_port = ['3030',],
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Invalid parameter squid_port at /etc/puppet/manifests/nodes.pp:94 on node 
xio99cdetest1.mygroup.com

node 'xio99cdetest1.mygroup.com' {
 include common # example42's common module
 class { 'squid':
 squid::config::$squid_port = ['3030',],
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: Syntax error at '{'; expected 
'}' at /etc/puppet/manifests/nodes.pp:92 on node xio99cdetest1.mygroup.com

node 'xio99cdetest1.mygroup.com' {
 include common # example42's common module
 class { 'squid':
 $squid_port = ['3030',],
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: Syntax error at '{'; expected 
'}' at /etc/puppet/manifests/nodes.pp:92 on node xio99cdejump01.centric.com


node 'xio99cdetest1.mygroup.com' {
 include common # example42's common module
 include squid
 class { 'squid::params':
 squid_port = ['3030',],
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Duplicate declaration: Class[Squid::Params] is already declared; cannot 
redeclare on node xio99cdetest1.mygroup.com


node 'xio99cdetest1.mygroup.com' {
 include common # example42's common module
 include squid
 class squid::params {
 squid_port = ['3030',],
  }
}

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Could not parse for environment production: Syntax error at '='; expected 
'}' at /etc/puppet/manifests/nodes.pp:93 on node xio99cdetest1.mygroup.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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Citrix Netscalers

2013-04-05 Thread jim

Hello all,

has anyone created a module for managing Citrix Netscalers using the Nitro 
API ?

Regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Encrypt Passwords in Manifests

2013-04-03 Thread jim
Hello all

I mainly use Puppet for managing windows hosts, and what to know they best 
way to either encrypt passwords in manifests or where to store them so they 
are encrypted and reference them as in a variable etc ? (if that makes 
sense)

e.g.

class roles::base::users {
user { 'Administrator':
ensure = present,
password   = 'Please_hide_me;01',
}


regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Windows Remote Desktop Services Custom Facts HELP, please

2013-04-03 Thread jim
Hello all,

I recently posted a question about a Windows Feature Remote Desktop 
Services (formaly known as Terminal Services)

https://groups.google.com/forum/?fromgroups=#!searchin/puppet-users/remote$20desktop/puppet-users/q71sP3TZZXQ/ymuAMqX5OTsJ

the basic problem is

fresh installed version of windows 2008 r2
use puppet to install remote desktop services
requires reboot
when server comes back online, its in protected mode (so no one can install 
applications without issuing the following command change user /install)
puppet agent fails to run 

what I discovered was, once remote desktop services was installed
if you run
change user /install
then run puppet agent it runs fine
then exit out of install mode
change user /execute

everything works how it should.

so i've tried to come up with something, but its not working can anyone 
help or advice

1.) create custom fact, to see if TerminalServer service is running equal 
true


Facter.add(remote_desktop) do
  setcode do

Facter::Util::Resolution.exec('C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
 
-ExecutionPolicy remotesigned -File 
C:\installs\Scripts\remote_desktop_installed_fact.ps1')
  end
end


1.1) Powershell Script remote_desktop_installed_fact.ps1

Function remote-desktop()
{
$Service=Get-Service TermService -ComputerName localhost
if ($Service.status -eq Running)
{
write-host true
}
else
{
Write-host false
}
}
remote-desktop

Then i thought the following would work but it doesn't, can you please help


if $::remote_desktop == true {
exec  { 'change_user_install':
command   = 'C:\Windows\System32\cmd.exe /c change user /install',
}-

exec { 'remote_desktop_services_install':
command   = 'C:/Windows\System32\WindowsPowerShell\v1.0\powershell.exe 
-executionpolicy remotesigned -file 
C:\Installs\Scripts\remote_desktop_services.ps1',
creates   = 
'c:/Installs/Puppet_Confirmation/Remote_Desktop_Services_Installed.txt',
require   = Class [ 'roles::base::dot_net' ],
}-

exec  { 'change_user_execute':
command   = 'C:\Windows\System32\cmd.exe /c change user /execute',
require   = exec['remote_desktop_services_install']
}
}
else {
exec { 'remote_desktop_services_install_1':
command   = 'C:/Windows\System32\WindowsPowerShell\v1.0\powershell.exe 
-executionpolicy remotesigned -file 
C:\Installs\Scripts\remote_desktop_services.ps1',
creates   = 
'c:/Installs/Puppet_Confirmation/Remote_Desktop_Services_Installed.txt',
require   = Class [ 'roles::base::dot_net' ],
}
}}



Here is the powershellscript - remote_desktop_services.ps1


$strFileName = c:\ProgramData\PuppetLabs\Puppet 
Enterprise\var\state\puppetlockd

Import-Module Servermanager
Add-WindowsFeature -Name RDS-RD-Server -IncludeAllSubFeature
Add-Content 
c:\Installs\Puppet_Confirmation\Remote_Desktop_Services_Installed.txt 
Windows has finished installing Remote Desktop Services
start-sleep -s 60
IF (Test-Path $strFileName){
Remove-Item $strFileName }

shutdown /r /t 60

Could it be becuase i've used
creates   = 
'c:/Installs/Puppet_Confirmation/Remote_Desktop_Services_Installed.txt',

on both scripts and one blocks out the other from running

hope this make sense

regards


James



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Dell Openmanage users

2013-04-02 Thread jim
Hello all

Has anyone out there written a Dell Openmange module for managing users on 
linux / windows phyiscal hosts ?

regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Windows Reboot

2013-03-21 Thread jim
Hi Guys

The way I get around it now, is by using a powershell script that creates a 
text file and delete puppetlockd if exists and then reboots, and then 
puppet checks if  text file exists upon next run and ignores

e.g. Powershell

Add-Content c:\Installs\Puppet_Confirmation\Joined_AD_domain.txt Windows 
has joined $domain
$strFileName = c:\ProgramData\PuppetLabs\Puppet 
Enterprise\var\state\puppetlockd
IF (Test-Path $strFileName){
Remove-Item $strFileName }
shutdown /r /t 60


e.g. Puppet manifest

exec { 'domain_join':
command   = 'C:/Windows\System32\WindowsPowerShell\v1.0\powershell.exe 
-executionpolicy remotesigned -file C:\Installs\Scripts\domain_join.ps1',
creates   = 'C:\Installs\Puppet_Confirmation\Joined_AD_domain.txt',


This approach seems to work ok for me, as I can then control, how puppet 
works by using another script to delete the text file, I so it will re-run 
if required

(if that make sense)

regards

James



On Thursday, 21 March 2013 05:26:27 UTC, ad wrote:

 Hi Josh,

 As you may recall, I'm the odd kid on the block using Puppet to manage 
 many many embedded Windows 7 and XP devices, so my needs are probably not 
 very representative of the Puppet community. I have no need for a reboot 
 message/code. Most our devices already have a nightly scheduled reboot. I 
 use run stages and a delayed shutdown to, for all practical purposes, 
 ensure a resource that requires a reboot runs last and give the agent 
 enough time to cleanly finish the run and send reports back. I also use a 
 schedule resource to control when devices are allowed to apply a resource 
 that requires a reboot.

 I'll check out your reboot provider, thanks. I just use an exec currently.

 Regards,

 Adam

 On Tuesday, March 19, 2013 11:42:19 PM UTC-5, Josh Cooper wrote:



 On Monday, March 11, 2013, ad wrote:

 James,

 Not yet, see http://projects.puppetlabs.com/issues/19162.

 My (ugly) approach for this now is a refreshonly exec with a delayed 
 shutdown. I'd like to see a reboot = true or such for all resources that 
 tell the agent to reboot after a run is complete when that resource is 
 applied.


 I did something similar, reboot resource type that is only triggered via 
 notify/subscribe relationship from another resource. See 
 https://github.com/joshcooper/puppetlabs-reboot

 Adam, I'm curious about the approach you're talking about also. If reboot 
 was a metaparameter, I don't think it would be possible to specify 
 the reboot message or reason code (for different resources) But perhaps 
 that's not really important? 


 Adam

 On Monday, March 11, 2013 6:55:46 AM UTC-5, jim wrote:

 Hi Guys

 I'm using puppet for my windows configuration, and was wondering when 
 installing / configuration something windowys, it requires a reboot, how 
 does this effect the puppet run

 e.g. join to domain ?
 e.g. removing old version of software
 e.g. host re-name

 Is there options you can tell puppet its going to reboot and to finish 
 that puppet run  upon restart 


 Regards

 James


  -- 
 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 post to this group, send email to puppet-users@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  



 -- 
 Josh Cooper
 Developer, Puppet Labs



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-14 Thread jim
Good Morning Vladimir

I think discovered what the problem is but not an experienced coder to be 
able to change the code to reflect my discovery.

Now the issue only happens when installing Remote Desktop Services, either 
by DISM or powershell, I finally worked ou,t that when the host reboots, it 
boots into a Terminal Server mode and doesn't allow user e.g. puppet 
agent to install anything via dism!

because the host is in terminal server mode, you need to run the following 
commands before and after dism for it to work.

change user /install
run puppet (works fine no error)

i've run puppet multiple times and no error, no trying to reinstall Remote 
Desktop Services - works fine

as soon as you run this command to close install mode

change user /execute

we start getting the error again

*Could not find a suitable provider for dism*

so Vladimir, what I think need to happen within the dism code 

when running dism, if feature equals AppServer run this command before 
change user /install
run dism part
then change mode back to execute
change user /execute
complete successful

Hope this make sense, and is possible

Kind Regards

Jim




On Wednesday, 13 March 2013 15:06:18 UTC, Vladimir Rutsky wrote:

 James,


 On Wed, Mar 13, 2013 at 6:42 PM, jim str...@gmail.com javascript:wrote:

 Hi Vladimir,

 I've also tried this approach


 exec {'dism':
 command = 'c:\windows\sysnative\dism.exe /online /enable-feature 
 /featurename:RDS-RD-Server',
 logoutput= true,
 }


  Here is the errors i'm getting:

 Exec[dism]/returns: Deployment Image Servicing and Management tool
 Exec[dism]/returns: Version: 6.1.7600.16385
 Exec[dism]/returns: Image Version: 6.1.7600.16385
 Exec[dism]/returns: Error: 0x800f080c
 Exec[dism]/returns: Feature name RDS-RD-Server is unknown.
 Exec[dism]/returns: A Windows feature name was not recognized.
 Exec[dism]/returns: Use the /Get-Features option to find the name of the 
 feature in the image and try the command again.
 Exec[dism]/returns: The DISM log file can be found at 
 C:\Windows\Logs\DISM\dism.log
 err: /Stage[main]/Exec[dism]/returns: change from notrun to 0 failed: 
 c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server returned 12 instead of one of [0] 
 at 
 /etc/puppetlabs/puppet/modules/roles/manifests/trm/remote_desktop_services.pp:12


 Looks like you don't have RDS-RD-Server feature in your system (I don't 
 have this feature in Windows 7 too).
 Puppet dism modules wraps 

   c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server

 command. Are you sure this works in administrative cmd.exe?

   c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server /NoRestart
  



 Regards

 James

 On Wednesday, 13 March 2013 14:08:54 UTC, jim wrote:

 Hi Vladimir,

  Here is the information you are after:

 debug: Dism[AppServer](provider=dism)**: Executing 
 'C:\Windows\sysnative\Dism.exe
 /online /Enable-Feature /FeatureName:AppServer /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::**Remote_desktop_services/Dism[**AppServer]/ensure:
  
 ch
 ange from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 debug: Dism[AppServer-UI](provider=**dism): Executing 
 'C:\Windows\sysnative\Dism.e
 xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
 err: /Stage[main]/Roles::Trm::**Remote_desktop_services/Dism[**
 AppServer-UI]/ensure:
  change from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 Then completes

 Machine is Rebooted

 Here is the logs after running puppet agent again


 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 notice: 
 /Stage[main]/Roles::Base::**Activate_windows_2008/Exec[**apply_activate_windows_2008]:
  
 Dependency Dism[NetFx3] has failures: true
 warning: 
 /Stage[main]/Roles::Base::**Activate_windows_2008/Exec[**apply_activate_windows_2008]:
  
 Skipping because of failed dependencies
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 err: Could not find a suitable provider for dism
 debug: Finishing transaction 141366492

Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-14 Thread jim
Hiya Vladimir

I think the issue is, if we remove Puppet and DISM and go back to Windows 
Remote Desktop Services, also known as Terminal Server.

When you install this feature, it requires a reboot for this feature to 
take effect

when the host comes back online, its a fully functioning RDS / Terminal 
Server

If you want to install software, you have to run this command first

change user /install
Then install software
revert back
change user /execute

Now add puppet / DISM module onto this, it will look like this

Server running puppet agent
install feature APPServer using DISM module
reboot host
hosts comes back online a functioning RDS / Terminal Server
try to run puppet agent again
Problem 
Due to RDS / Terminal Server still running in execute mode
Puppet Run will fail.

(this is an assumption, RDS / Terminal Server running in execute mode when 
applying ruby syntax for environment variables e..g 
commands :dism = #{Dir::WINDOWS}\\sysnative\\Dism.exe
will default to %userprofile% path thus *C:\Users\Administrator*
\WINDOWS\sysnative\Dism.exe

Now if the DISM module, could do the following, it would work for RDS / 
Terminal Server:

Server running puppet agent
install feature APPServer using DISM module
reboot host
hosts comes back online a functioning RDS / Terminal Server
run puppet agent again, if feature equals RDS / Terminal Server
execute change user / install mode
run dism module
execute change user /execute mode
Puppet Run will run successfully


hope this make sense

regards

Jim




On Thursday, 14 March 2013 13:32:43 UTC, Vladimir Rutsky wrote:

 Hello, James!

 I tested and looks like exitcode parameter doesn't work in DISM, sorry for 
 not working example. I filled bug about this into DISM bug tracker on 
 github: https://github.com/puppetlabs/puppetlabs-dism/issues/15 and 
 commited fix for this issue in my master branch of DISM fork.

 I recommend you to get version from there: 
 https://github.com/vrutsky/puppetlabs-dism , this should fix issue with 
 first error Unexpected exitcode: 194.

 Source of second issue, C:\Users\Administrator\WINDOWS\sysnative\Dism.exe 
 does not exist, not clear to me.

 --
 Vladimir Rutsky




 On Wed, Mar 13, 2013 at 8:00 PM, jim str...@gmail.com javascript:wrote:

 Hi Vladimir


 This error:

 Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist

 Just thought 

 this part of the error

 C:\Users\Administrator

 It looks like its picking up the %userprofile% and appending to the 
 environment part in dism module


 USERPROFILE=C:\Users\Administrator

   if Puppet.features.microsoft_windows?
 if ENV.has_key?('ProgramFiles(x86)')
   commands :dism = #{Dir::WINDOWS}\\sysnative\\Dism.exe
 else
   commands :dism = #{Dir::WINDOWS}\\system32\\Dism.exe
 end
   end

 if that make sense

 On Wednesday, 13 March 2013 15:51:07 UTC, jim wrote:

 I update my DISM module with your changes and added this to my manifest

 dism { 'AppServer':
 ensure  = present,
 exitcode= [0, 3010, 194],
 }


 Here is my SET information:

 C:\Users\Administratorset
 ALLUSERSPROFILE=C:\ProgramData
 APPDATA=C:\Users\**Administrator\AppData\Roaming
 CLIENTNAME=UKLSQL0156
 CommonProgramFiles=C:\Program Files\Common Files
 CommonProgramFiles(x86)=C:\**Program Files (x86)\Common Files
 CommonProgramW6432=C:\Program Files\Common Files
 COMPUTERNAME=TMS-A-TRM-01P
 ComSpec=C:\Windows\system32\**cmd.exe
 FP_NO_HOST_CHECK=NO
 HOMEDRIVE=C:
 HOMEPATH=\Users\Administrator
 LOCALAPPDATA=C:\Users\**Administrator\AppData\Local
 LOGONSERVER=\\TMS-A-TRM-01P
 NUMBER_OF_PROCESSORS=2
 OS=Windows_NT
 Path=C:\Windows\system32;C:\**Windows;C:\Windows\System32\**
 Wbem;C:\Windows\System32
 \WindowsPowerShell\v1.0\
 PATHEXT=.COM;.EXE;.BAT;.CMD;.**VBS;.VBE;.JS;.JSE;.WSF;.WSH;.**MSC
 PROCESSOR_ARCHITECTURE=AMD64
 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel
 PROCESSOR_LEVEL=6
 PROCESSOR_REVISION=2c02
 ProgramData=C:\ProgramData
 ProgramFiles=C:\Program Files
 ProgramFiles(x86)=C:\Program Files (x86)
 ProgramW6432=C:\Program Files
 PROMPT=$P$G
 PSModulePath=C:\Windows\**system32\WindowsPowerShell\v1.**0\Modules\
 PUBLIC=C:\Users\Public
 SESSIONNAME=RDP-Tcp#0
 SystemDrive=C:
 SystemRoot=C:\Windows
 TEMP=C:\Users\ADMINI~1\**AppData\Local\Temp\2
 TMP=C:\Users\ADMINI~1\AppData\**Local\Temp\2
 USERDOMAIN=TMS-A-TRM-01P
 USERNAME=Administrator
 USERPROFILE=C:\Users\**Administrator
 windir=C:\Windows
 windows_tracing_flags=3
 windows_tracing_logfile=C:\**BVTBin\Tests\installpackage\**
 csilogfile.log


 I re-cloned a pc and run a fresh puppet run, and still getting this 
 error on initial run:

 ebug: Dism[AppServer](provider=dism)**: Executing 
 'C:\Windows\sysnative\Dism.exe
 /online /Enable-Feature /FeatureName:AppServer /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::**Remote_desktop_services/Dism[**AppServer]/ensure:
  
 ch
 ange from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment

Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
Hi Rich

Thanks for the reply, i've updated the dism module from github, but that 
hasn't fixed the issue, as i'm still getting the same error

err: Could not find a suitable provider for dism

Can anyone out there provide an answer

Regards

Jim

On Tuesday, 12 March 2013 23:39:38 UTC, Rich Siegel wrote:

 I believe you need to use the copy on github as there was an issue with 
 using 32/64 dism iirc



-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
Hi Vladimir,

Here is the information you are after:

debug: Dism[AppServer](provider=dism): Executing 
'C:\Windows\sysnative\Dism.exe
/online /Enable-Feature /FeatureName:AppServer /NoRestart'
err: 
/Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer]/ensure: ch
ange from absent to present failed: Unexpected exitcode: 194
Error:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Enabling feature(s)
The operation completed successfully.


debug: Dism[AppServer-UI](provider=dism): Executing 
'C:\Windows\sysnative\Dism.e
xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
err: 
/Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer-UI]/ensure:
 change from absent to present failed: Unexpected exitcode: 194
Error:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Enabling feature(s)
The operation completed successfully.


Then completes

Machine is Rebooted

Here is the logs after running puppet agent again


debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
notice: 
/Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_windows_2008]:
 
Dependency Dism[NetFx3] has failures: true
warning: 
/Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_windows_2008]:
 
Skipping because of failed dependencies
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
err: Could not find a suitable provider for dism
debug: Finishing transaction 141366492

I hope this is what you are after

regards

James







On Wednesday, 13 March 2013 12:37:25 UTC, Vladimir Rutsky wrote:

 Can you provide complete log of running puppet agent --test --debug on 
 machine where you try to install Remote Desktop Services using Puppet?



 On Wed, Mar 13, 2013 at 4:12 PM, jim str...@gmail.com javascript:wrote:

 The error is only happening when trying to install Remote Desktop 
 Services (old Terminal Server), it works fine with other roles/features 
 like IIS etc

 I updated DISM from github by overwritting both lib / spec directorys


 On Wednesday, 13 March 2013 12:08:17 UTC, Vladimir Rutsky wrote:

 Hello,

 How you installed dism module?

 I intalled dism by copying dism git repository contents into 
 /etc/puppet/modules/dism/ and don't observe error that you have.

 --
 Vladimir Rutsky

  -- 
 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 post to this group, send email to puppet...@googlegroups.comjavascript:
 .
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
Hi Vladimir,

I've also tried this approach


exec {'dism':
command = 'c:\windows\sysnative\dism.exe /online /enable-feature 
/featurename:RDS-RD-Server',
logoutput= true,
}


Here is the errors i'm getting:

Exec[dism]/returns: Deployment Image Servicing and Management tool
Exec[dism]/returns: Version: 6.1.7600.16385
Exec[dism]/returns: Image Version: 6.1.7600.16385
Exec[dism]/returns: Error: 0x800f080c
Exec[dism]/returns: Feature name RDS-RD-Server is unknown.
Exec[dism]/returns: A Windows feature name was not recognized.
Exec[dism]/returns: Use the /Get-Features option to find the name of the 
feature in the image and try the command again.
Exec[dism]/returns: The DISM log file can be found at 
C:\Windows\Logs\DISM\dism.log
err: /Stage[main]/Exec[dism]/returns: change from notrun to 0 failed: 
c:\windows\sysnative\dism.exe /online 
/enable-feature/featurename:RDS-RD-Server returned 12 instead of one of [0] 
at 
/etc/puppetlabs/puppet/modules/roles/manifests/trm/remote_desktop_services.pp:12


Regards

James

On Wednesday, 13 March 2013 14:08:54 UTC, jim wrote:

 Hi Vladimir,

 Here is the information you are after:

 debug: Dism[AppServer](provider=dism): Executing 
 'C:\Windows\sysnative\Dism.exe
 /online /Enable-Feature /FeatureName:AppServer /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer]/ensure: ch
 ange from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 debug: Dism[AppServer-UI](provider=dism): Executing 
 'C:\Windows\sysnative\Dism.e
 xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer-UI]/ensure:
  change from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 Then completes

 Machine is Rebooted

 Here is the logs after running puppet agent again


 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 notice: 
 /Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_windows_2008]:
  
 Dependency Dism[NetFx3] has failures: true
 warning: 
 /Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_windows_2008]:
  
 Skipping because of failed dependencies
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist
 err: Could not find a suitable provider for dism
 debug: Finishing transaction 141366492

 I hope this is what you are after

 regards

 James







 On Wednesday, 13 March 2013 12:37:25 UTC, Vladimir Rutsky wrote:

 Can you provide complete log of running puppet agent --test --debug on 
 machine where you try to install Remote Desktop Services using Puppet?



 On Wed, Mar 13, 2013 at 4:12 PM, jim str...@gmail.com wrote:

 The error is only happening when trying to install Remote Desktop 
 Services (old Terminal Server), it works fine with other roles/features 
 like IIS etc

 I updated DISM from github by overwritting both lib / spec directorys


 On Wednesday, 13 March 2013 12:08:17 UTC, Vladimir Rutsky wrote:

 Hello,

 How you installed dism module?

 I intalled dism by copying dism git repository contents into 
 /etc/puppet/modules/dism/ and don't observe error that you have.

 --
 Vladimir Rutsky

  -- 
 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.
 To post to this group, send email to puppet...@googlegroups.com.
 Visit this group at http://groups.google.com/group/puppet-users?hl=en.
 For more options, visit https://groups.google.com/groups/opt_out.
  
  




-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
Hi Vladimir

Sorry

If you use powershell and import servermanager the feature is called 
RDS-Server, if you use DISM its called APPServer

regards

James

On Wednesday, 13 March 2013 15:06:18 UTC, Vladimir Rutsky wrote:

 James,


 On Wed, Mar 13, 2013 at 6:42 PM, jim str...@gmail.com javascript:wrote:

 Hi Vladimir,

 I've also tried this approach


 exec {'dism':
 command = 'c:\windows\sysnative\dism.exe /online /enable-feature 
 /featurename:RDS-RD-Server',
 logoutput= true,
 }


  Here is the errors i'm getting:

 Exec[dism]/returns: Deployment Image Servicing and Management tool
 Exec[dism]/returns: Version: 6.1.7600.16385
 Exec[dism]/returns: Image Version: 6.1.7600.16385
 Exec[dism]/returns: Error: 0x800f080c
 Exec[dism]/returns: Feature name RDS-RD-Server is unknown.
 Exec[dism]/returns: A Windows feature name was not recognized.
 Exec[dism]/returns: Use the /Get-Features option to find the name of the 
 feature in the image and try the command again.
 Exec[dism]/returns: The DISM log file can be found at 
 C:\Windows\Logs\DISM\dism.log
 err: /Stage[main]/Exec[dism]/returns: change from notrun to 0 failed: 
 c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server returned 12 instead of one of [0] 
 at 
 /etc/puppetlabs/puppet/modules/roles/manifests/trm/remote_desktop_services.pp:12


 Looks like you don't have RDS-RD-Server feature in your system (I don't 
 have this feature in Windows 7 too).
 Puppet dism modules wraps 

   c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server

 command. Are you sure this works in administrative cmd.exe?

   c:\windows\sysnative\dism.exe /online 
 /enable-feature/featurename:RDS-RD-Server /NoRestart
  



 Regards

 James

 On Wednesday, 13 March 2013 14:08:54 UTC, jim wrote:

 Hi Vladimir,

  Here is the information you are after:

 debug: Dism[AppServer](provider=dism)**: Executing 
 'C:\Windows\sysnative\Dism.exe
 /online /Enable-Feature /FeatureName:AppServer /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::**Remote_desktop_services/Dism[**AppServer]/ensure:
  
 ch
 ange from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 debug: Dism[AppServer-UI](provider=**dism): Executing 
 'C:\Windows\sysnative\Dism.e
 xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
 err: /Stage[main]/Roles::Trm::**Remote_desktop_services/Dism[**
 AppServer-UI]/ensure:
  change from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 Then completes

 Machine is Rebooted

 Here is the logs after running puppet agent again


 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 notice: 
 /Stage[main]/Roles::Base::**Activate_windows_2008/Exec[**apply_activate_windows_2008]:
  
 Dependency Dism[NetFx3] has failures: true
 warning: 
 /Stage[main]/Roles::Base::**Activate_windows_2008/Exec[**apply_activate_windows_2008]:
  
 Skipping because of failed dependencies
 debug: Puppet::Type::Dism::**ProviderDism: file C:\Users\Administrator\*
 *WINDOWS\sysnative\Dism.exe does not exist
 err: Could not find a suitable provider for dism
 debug: Finishing transaction 141366492

 I hope this is what you are after

 regards

 James







 On Wednesday, 13 March 2013 12:37:25 UTC, Vladimir Rutsky wrote:

 Can you provide complete log of running puppet agent --test --debug 
 on machine where you try to install Remote Desktop Services using Puppet?



 On Wed, Mar 13, 2013 at 4:12 PM, jim str...@gmail.com wrote:

 The error is only happening when trying to install Remote Desktop 
 Services (old Terminal Server), it works fine with other roles/features 
 like IIS etc

 I updated DISM from github by overwritting both lib / spec directorys


 On Wednesday, 13 March 2013 12:08:17 UTC, Vladimir Rutsky wrote:

 Hello,

 How you installed dism module?

 I intalled dism by copying dism git repository contents into 
 /etc/puppet/modules/dism/ and don't observe error that you have.

 --
 Vladimir Rutsky

  -- 
 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

Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
I update my DISM module with your changes and added this to my manifest

dism { 'AppServer':
ensure  = present,
exitcode= [0, 3010, 194],
}


Here is my SET information:

C:\Users\Administratorset
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\Administrator\AppData\Roaming
CLIENTNAME=UKLSQL0156
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=TMS-A-TRM-01P
ComSpec=C:\Windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\Administrator
LOCALAPPDATA=C:\Users\Administrator\AppData\Local
LOGONSERVER=\\TMS-A-TRM-01P
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2c02
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=RDP-Tcp#0
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\ADMINI~1\AppData\Local\Temp\2
TMP=C:\Users\ADMINI~1\AppData\Local\Temp\2
USERDOMAIN=TMS-A-TRM-01P
USERNAME=Administrator
USERPROFILE=C:\Users\Administrator
windir=C:\Windows
windows_tracing_flags=3
windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log


I re-cloned a pc and run a fresh puppet run, and still getting this error 
on initial run:

ebug: Dism[AppServer](provider=dism): Executing 
'C:\Windows\sysnative\Dism.exe
/online /Enable-Feature /FeatureName:AppServer /NoRestart'
err: 
/Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer]/ensure: ch
ange from absent to present failed: Unexpected exitcode: 194
Error:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Enabling feature(s)
The operation completed successfully.


debug: Dism[AppServer-UI](provider=dism): Executing 
'C:\Windows\sysnative\Dism.e
xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
err: 
/Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer-UI]/ensure:
 change from absent to present failed: Unexpected exitcode: 194
Error:
Deployment Image Servicing and Management tool
Version: 6.1.7600.16385

Image Version: 6.1.7600.16385

Enabling feature(s)
The operation completed successfully.



Also after the reboot - I still get the following:

debug: Class[Roles::Base::Powershell_remoting]: The container Stage[main] 
will p
ropagate my refresh event
debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
pson
debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
pson
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
notice: 
/Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_wind
ows_2008]: Dependency Dism[NetFx3] has failures: true
warning: 
/Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_win
dows_2008]: Skipping because of failed dependencies
debug: Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sys
native\Dism.exe does not exist
err: Could not find a suitable provider for dism

So i'm a bit confused

regards

James




On Wednesday, 13 March 2013 15:26:22 UTC, jim wrote:

 Hi Vladimir

 Sorry

 If you use powershell and import servermanager the feature is called 
 RDS-Server, if you use DISM its called APPServer

 regards

 James

 On Wednesday, 13 March 2013 15:06:18 UTC, Vladimir Rutsky wrote:

 James,


 On Wed, Mar 13, 2013 at 6:42 PM, jim str...@gmail.com wrote:

 Hi Vladimir,

 I've also tried this approach


 exec {'dism':
 command = 'c:\windows\sysnative\dism.exe /online /enable-feature 
 /featurename:RDS-RD-Server',
 logoutput= true,
 }


  Here is the errors i'm getting:

 Exec[dism]/returns: Deployment Image Servicing and Management tool
 Exec[dism]/returns: Version: 6.1.7600.16385
 Exec[dism]/returns: Image Version: 6.1.7600.16385
 Exec[dism]/returns: Error: 0x800f080c
 Exec[dism]/returns: Feature name RDS-RD-Server is unknown.
 Exec[dism]/returns: A Windows feature name was not recognized.
 Exec[dism]/returns: Use the /Get-Features option to find the name of the 
 feature in the image and try the command again.
 Exec[dism]/returns

Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-13 Thread jim
Hi Vladimir


This error:

Puppet::Type::Dism::ProviderDism: file 
C:\Users\Administrator\WINDOWS\sysnative\Dism.exe does not exist

Just thought 

this part of the error

C:\Users\Administrator

It looks like its picking up the %userprofile% and appending to the 
environment part in dism module


USERPROFILE=C:\Users\Administrator

  if Puppet.features.microsoft_windows?
if ENV.has_key?('ProgramFiles(x86)')
  commands :dism = #{Dir::WINDOWS}\\sysnative\\Dism.exe
else
  commands :dism = #{Dir::WINDOWS}\\system32\\Dism.exe
end
  end

if that make sense

On Wednesday, 13 March 2013 15:51:07 UTC, jim wrote:

 I update my DISM module with your changes and added this to my manifest

 dism { 'AppServer':
 ensure  = present,
 exitcode= [0, 3010, 194],
 }


 Here is my SET information:

 C:\Users\Administratorset
 ALLUSERSPROFILE=C:\ProgramData
 APPDATA=C:\Users\Administrator\AppData\Roaming
 CLIENTNAME=UKLSQL0156
 CommonProgramFiles=C:\Program Files\Common Files
 CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
 CommonProgramW6432=C:\Program Files\Common Files
 COMPUTERNAME=TMS-A-TRM-01P
 ComSpec=C:\Windows\system32\cmd.exe
 FP_NO_HOST_CHECK=NO
 HOMEDRIVE=C:
 HOMEPATH=\Users\Administrator
 LOCALAPPDATA=C:\Users\Administrator\AppData\Local
 LOGONSERVER=\\TMS-A-TRM-01P
 NUMBER_OF_PROCESSORS=2
 OS=Windows_NT

 Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
 \WindowsPowerShell\v1.0\
 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
 PROCESSOR_ARCHITECTURE=AMD64
 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 44 Stepping 2, GenuineIntel
 PROCESSOR_LEVEL=6
 PROCESSOR_REVISION=2c02
 ProgramData=C:\ProgramData
 ProgramFiles=C:\Program Files
 ProgramFiles(x86)=C:\Program Files (x86)
 ProgramW6432=C:\Program Files
 PROMPT=$P$G
 PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
 PUBLIC=C:\Users\Public
 SESSIONNAME=RDP-Tcp#0
 SystemDrive=C:
 SystemRoot=C:\Windows
 TEMP=C:\Users\ADMINI~1\AppData\Local\Temp\2
 TMP=C:\Users\ADMINI~1\AppData\Local\Temp\2
 USERDOMAIN=TMS-A-TRM-01P
 USERNAME=Administrator
 USERPROFILE=C:\Users\Administrator
 windir=C:\Windows
 windows_tracing_flags=3
 windows_tracing_logfile=C:\BVTBin\Tests\installpackage\csilogfile.log


 I re-cloned a pc and run a fresh puppet run, and still getting this error 
 on initial run:

 ebug: Dism[AppServer](provider=dism): Executing 
 'C:\Windows\sysnative\Dism.exe
 /online /Enable-Feature /FeatureName:AppServer /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer]/ensure: ch
 ange from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.


 debug: Dism[AppServer-UI](provider=dism): Executing 
 'C:\Windows\sysnative\Dism.e
 xe /online /Enable-Feature /FeatureName:AppServer-UI /NoRestart'
 err: 
 /Stage[main]/Roles::Trm::Remote_desktop_services/Dism[AppServer-UI]/ensure:
  change from absent to present failed: Unexpected exitcode: 194
 Error:
 Deployment Image Servicing and Management tool
 Version: 6.1.7600.16385

 Image Version: 6.1.7600.16385

 Enabling feature(s)
 The operation completed successfully.



 Also after the reboot - I still get the following:

 debug: Class[Roles::Base::Powershell_remoting]: The container Stage[main] 
 will p
 ropagate my refresh event
 debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
 pson
 debug: file_metadata supports formats: b64_zlib_yaml pson raw yaml; using 
 pson
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 notice: 
 /Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_wind
 ows_2008]: Dependency Dism[NetFx3] has failures: true
 warning: 
 /Stage[main]/Roles::Base::Activate_windows_2008/Exec[apply_activate_win
 dows_2008]: Skipping because of failed dependencies
 debug: Puppet::Type::Dism::ProviderDism: file 
 C:\Users\Administrator\WINDOWS\sys
 native\Dism.exe does not exist
 err: Could not find a suitable provider for dism

 So i'm a bit confused

 regards

 James




 On Wednesday, 13 March 2013 15:26:22 UTC, jim wrote:

 Hi Vladimir

 Sorry

 If you use powershell and import servermanager the feature is called 
 RDS-Server, if you use DISM its called APPServer

 regards

 James

 On Wednesday, 13 March 2013 15:06:18 UTC, Vladimir Rutsky wrote:

 James,


 On Wed

Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-12 Thread jim
Hello all

I think this is an actual bug with either puppet or puppet dism and not 
sure how to resolve this

I've installed the puppet dism module and written my manifest

class remote_desktop_services {
dism { 'AppServer':
ensure = present,
}
dism { 'AppServer-UI':
ensure = present,
}
dism { 'Printing-XPSServices-Features':
ensure = present,
}
}

upon reboot, when I re-run the puppet agent I keep getting the following 
error:

err: Could not find a suitable provider for dism

and keep getting this error until I remove the manifest then the puppet 
agent runs successfully again.

Then thought it could be the module not aware of Remote Desktop Services as 
a provider.

So thought i'll write a powershell script and get puppet to exec it, here 
is my script (its a bit dirty)


$strFileName = c:\ProgramData\PuppetLabs\Puppet 
Enterprise\var\state\puppetlockd

Import-Module Servermanager 
Add-WindowsFeature -Name RDS-RD-Server -IncludeAllSubFeature
Add-Content 
c:\Installs\Puppet_Confirmation\Remote_Desktop_Services_Installed.txt 
Windows has finished installing Remote Desktop Services
start-sleep -s 60
IF (Test-Path $strFileName){
Remove-Item $strFileName }
 
shutdown /r /t 60

After the reboot, I get the same error as above,

err: Could not find a suitable provider for dism

Was wondering if this is an error or not, but unable to install Remote 
Desktop Services using Puppet Enterprise / Puppet module DISM

Can you please help

Regards

Jim







On Monday, 11 March 2013 10:57:46 UTC, jim wrote:

  Hi Ryan

 I've checked my puppet.config and yes plugingsync is set to True

 pluginsync = true

 What's weird is it works for dot.net3 / IIS installs etc, etc

 Regards

 Jim

 On Thursday, 7 March 2013 23:04:34 UTC, Ryan Coleman wrote:


 On Thu, Mar 7, 2013 at 7:50 AM, jim str...@gmail.com wrote:

 Can anyone advise on this ??


 Hmm. Do you have pluginsync set to true in puppet.conf? It's possible 
 that the provider in the dism module is not being distributed from the 
 master to the agent. Here's a doc on the subject if you need it. 
 http://docs.puppetlabs.com/guides/plugins_in_modules.html
  


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-11 Thread jim
 Hi Ryan

I've checked my puppet.config and yes plugingsync is set to True

pluginsync = true

What's weird is it works for dot.net3 / IIS installs etc, etc

Regards

Jim

On Thursday, 7 March 2013 23:04:34 UTC, Ryan Coleman wrote:


 On Thu, Mar 7, 2013 at 7:50 AM, jim str...@gmail.com javascript:wrote:

 Can anyone advise on this ??


 Hmm. Do you have pluginsync set to true in puppet.conf? It's possible that 
 the provider in the dism module is not being distributed from the master to 
 the agent. Here's a doc on the subject if you need it. 
 http://docs.puppetlabs.com/guides/plugins_in_modules.html
  

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-07 Thread jim
Can anyone advise on this ??

On Wednesday, 6 March 2013 13:42:10 UTC, jim wrote:

 Hello all

 Was wondering if someone could help or advise where i'm going wrong 

 i'm trying to install Windows 2008 R2 Remote Desktop Services via Puppet 
 using either DISM or Powershell modules from the forge and getting the same 
 error

 When using DISM


 class roles::trm::remote_desktop_services {
 dism { 'AppServer':
 ensure = present,
 }
 dism { 'AppServer-UI':
 ensure = present,
 }
 dism { 'Printing-XPSServices-Features':
 ensure = present,
 }
 }

 when this initially runs, I get pink error messages which I assume its 
 because it requires a reboot to complete the install of this service.

 Question: Best approach for rebooting host, when installing features ?

 Once i've rebooted the host, and rerun the puppet agent I get the 
 following error:

 *err: Could not find a suitable provider for dism*

 So I thought it could be the dism module doesn't support Remote Desktop 
 Services.

 then tried the Powershell Module

 #exec { 'install_remote_desktop_services':
 #command   = 'Import-Module ServerManager
 #  Add-WindowsFeature -Name RDS-RD-Server -Restart  | 
 Out-File 
 c:\Installs\Puppet_Confirmation\install_remote_desktop_services.txt',
 #provider  = powershell,
 #creates   = 
 'C:/Installs/Puppet_Confirmation/install_remote_desktop_services.txt',
 #}


 which installs fine and reboots the host etc, but upon running the agent 
 again, I get the same error as above:

 *err: Could not find a suitable provider for dism*
 *
 *
 If anyone could help, it would be much appreciated

 regards

 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Windows Remote Desktop Services (Could not find a suitable provider for dism)

2013-03-06 Thread jim
Hello all

Was wondering if someone could help or advise where i'm going wrong 

i'm trying to install Windows 2008 R2 Remote Desktop Services via Puppet 
using either DISM or Powershell modules from the forge and getting the same 
error

When using DISM


class roles::trm::remote_desktop_services {
dism { 'AppServer':
ensure = present,
}
dism { 'AppServer-UI':
ensure = present,
}
dism { 'Printing-XPSServices-Features':
ensure = present,
}
}

when this initially runs, I get pink error messages which I assume its 
because it requires a reboot to complete the install of this service.

Question: Best approach for rebooting host, when installing features ?

Once i've rebooted the host, and rerun the puppet agent I get the following 
error:

*err: Could not find a suitable provider for dism*

So I thought it could be the dism module doesn't support Remote Desktop 
Services.

then tried the Powershell Module

#exec { 'install_remote_desktop_services':
#command   = 'Import-Module ServerManager
#  Add-WindowsFeature -Name RDS-RD-Server -Restart  | 
Out-File 
c:\Installs\Puppet_Confirmation\install_remote_desktop_services.txt',
#provider  = powershell,
#creates   = 
'C:/Installs/Puppet_Confirmation/install_remote_desktop_services.txt',
#}


which installs fine and reboots the host etc, but upon running the agent 
again, I get the same error as above:

*err: Could not find a suitable provider for dism*
*
*
If anyone could help, it would be much appreciated

regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Manage Cisco ASA

2013-02-28 Thread jim
Hello all,

Does anyone currently manage Cisco ASA's  out there via Puppet, if so how ?

Due to the size of our network it would be great if Puppet could manage 
Object-groups and ACL's etc to try and standardize across our ASA hosts.

e.g.

On one ASA an Object-group would be called

monitoring_server

on another ASA

mon_srv

another ASA

monsrv

It makes understanding the rules alot harder, when there is no uniform 
object-groups, this is manly to due different network engineers over the 
years and out network evolving

regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: Puppet Manage Cisco ASA

2013-02-28 Thread jim
I am aware of https://puppetlabs.com/blog/puppet-network-device-management/

but this doesn't manager ACL's or object-groups yet, and my programming 
skills aren't that great

Or has anyone used cisco one platform kit (onepk) via puppet 

regards

Jim


On Thursday, 28 February 2013 10:36:22 UTC, jim wrote:

 Hello all,

 Does anyone currently manage Cisco ASA's  out there via Puppet, if so how ?

 Due to the size of our network it would be great if Puppet could manage 
 Object-groups and ACL's etc to try and standardize across our ASA hosts.

 e.g.

 On one ASA an Object-group would be called

 monitoring_server

 on another ASA

 mon_srv

 another ASA

 monsrv

 It makes understanding the rules alot harder, when there is no uniform 
 object-groups, this is manly to due different network engineers over the 
 years and out network evolving

 regards

 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Variables within Manifests question

2013-02-22 Thread jim
Hello all

Can someone please help me or answer if this is possible

I'm using the puppet forge IIS module, and want to use variables within the 
syntax dependent up ip address

for example:

colo_a = 1.1.1.0
colo_b = 2.2.2.0

if $network_local_area_connection = 1.1.1.0
add colo_a
elseif $network_local_area_connection = 2.2.2.0
add colo_b


iis_site {'mysite.co.uk':
ensure = present,
bindings   = [ 'http/*:80:www.mysite.co.uk', 
'http/*:80:mysite.co.uk', 
'http/*:80:*colo_?*.mysite.co.uk', 
'http/*:80:*colo_?*.mysite.co.uk' ],
}

Any help or advise would be much appreciated

regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] defining hosts regex

2013-02-22 Thread jim
Hi Guys

all of our windows hosts, has the following naming convention:

3 characters for the product - Letter for location - class of service (3 
characters) - node number (2 digits)
e.g

pos-a-www-02
or
ocs-b-sql-01

therefore my regex would look something like

/^pos-(a|b)-www-\d\d$/
or
/^ocs-(a|b)-sql-\d\d$/

how do I make these regex case insensitive 

as or hosts can be named

pos-a-www-02
or
POS-A-WWW-02

regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: defining hosts regex

2013-02-22 Thread jim
Or does Puppet put everything into lowercase, as just checked my windows 
host and its name is in uppercase but when I look at inventory for this 
host the hostname is in lower case ???

regards


jim

On Friday, 22 February 2013 14:43:17 UTC, jim wrote:

 Hi Guys

 all of our windows hosts, has the following naming convention:

 3 characters for the product - Letter for location - class of service (3 
 characters) - node number (2 digits)
 e.g

 pos-a-www-02
 or
 ocs-b-sql-01

 therefore my regex would look something like

 /^pos-(a|b)-www-\d\d$/
 or
 /^ocs-(a|b)-sql-\d\d$/

 how do I make these regex case insensitive 

 as or hosts can be named

 pos-a-www-02
 or
 POS-A-WWW-02

 regards

 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Re: defining hosts regex

2013-02-22 Thread jim
sorry the clientcert is lowercase the hostname is still upper case so my 
question on case insensitive is still valid

regards

jim

On Friday, 22 February 2013 14:45:03 UTC, jim wrote:

 Or does Puppet put everything into lowercase, as just checked my windows 
 host and its name is in uppercase but when I look at inventory for this 
 host the hostname is in lower case ???

 regards


 jim

 On Friday, 22 February 2013 14:43:17 UTC, jim wrote:

 Hi Guys

 all of our windows hosts, has the following naming convention:

 3 characters for the product - Letter for location - class of service (3 
 characters) - node number (2 digits)
 e.g

 pos-a-www-02
 or
 ocs-b-sql-01

 therefore my regex would look something like

 /^pos-(a|b)-www-\d\d$/
 or
 /^ocs-(a|b)-sql-\d\d$/

 how do I make these regex case insensitive 

 as or hosts can be named

 pos-a-www-02
 or
 POS-A-WWW-02

 regards

 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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Variables within manifests questions

2013-02-22 Thread jim
Hello all again

just another quick question, 

we have some machines in different colo's on different subnets, 

colo a - 1.1.1.0/24
colo b - 2.2.2.0/24

If for example I was using a module from puppet forge for IIS, could I use 
variables within my manifest syntax to reference different colo's for 
example

if $network_local_area_connection = 1.1.1.0
add colo_a

elseif $network_local_area_connection = 2.2.2.0
add colo_b 


iis_site {'mysite.co.uk':
ensure = present,
bindings   = [ 'http/*:80:www.mysite.co.uk', 
'http/*:80:mysite.co.uk', 
'http/*:80:*colo_?*.mysite.co.uk', 
'http/*:80:*colo_?*.mysite.co.uk' ],
}

Hope this makes sense just unsure how to achieve this ???

Regards

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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Re: AWS OpsWorks announcement using Chef

2013-02-20 Thread jim watts
Great.

The company I work for is both a large AWS customer and user of puppet. 
Very interested in how this progresses.

-jim

On Wednesday, 20 February 2013 18:40:54 UTC+11, James Turnbull wrote:

 Vaidas Jablonskis wrote: 
  It makes sense for Amazon to go with something like Chef, because it is 
  more cloud oriented and it's easier to hack something up just to get it 
  up and running quicker. Chef is more like shell scripting on steroids I 
  would say, at least, that's how many people use it. 
  

 We're going to be talking to AWS about adding Puppet support to OpsWorks 
 soon. It is our understanding from them that this is based on an 
 acquisition they made of a Chef-based solution rather than an 
 endorsement of Chef. 

 More news when we have it! 

 Thanks 

 James 

 -- 
 James Turnbull 
 1-503-734-8571 
 To schedule a meeting with me: http://doodle.com/jamtur01 


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Windows MSI Error change from absent to present failed: Failed to install: Fail on INT 24.

2013-02-14 Thread jim
Hello Michael and Josh

Thanks for your quick responses, Michael The package { source = } 
directive for MSIs *must* use backslashes. worked a charm thanks again

would be nice in next versions, if this was all uniform

thanks again

James

On Tuesday, 12 February 2013 18:45:07 UTC, Michael O'Dea wrote:

 Answering my own question, and hopefully jim's as well! 

 I had just had my module open in Geppetto, which yelled at me for having 
 used backslashes in the MSI's package definition.  I switched them to 
 forward slashes to make it happy, and it appears as though jim's code above 
 also uses forward slashes in the source = directive.

 Noticing that was one of my changes on my last check-in, I reversed it, 
 and it worked.  Hope this helps, jim -- not sure if this would constitute a 
 bug, I've been seeing much more encouragement to use forward-slashes all 
 across Windows, some of it in contradiction to the documents.  Working with 
 mcollective-win, almost all paths even on the Windows filesystem are 
 forward slash, so I guess I assumed it would be OK here as well.  It is 
 not.  The package { source = } directive for MSIs *must* use backslashes.

 Cheers,

 --
 M

 On Tuesday, February 12, 2013 1:22:33 PM UTC-5, Michael O'Dea wrote:

 Hopefully not thread hijacking, hope my issue is the same.  Strangely, I 
 had this problem last week and then resolved it when I made a few more 
 changes to the MSI.  The issue has just now returned for me, and I'm not 
 clear how my latest changes (from a debug mode package to a release 
 package) would've triggered it.  I read somewhere online that INT 24 was an 
 ancient return code for access denied, and I seem to recall I fixed it then 
 by assigning 0777 permissions when I dropped the file.  It's worth noting 
 that my MSI installs fine when run with msiexec.exe /qn /i from an 
 Administrator command prompt.  The relevant section of --debug --trace is 
 below:

 notice: 
 /Stage[main]/Mcollective::Server::Package::Windows/File[C:/cfn/mcollective_win.msi]/mode:
  
 mode changed '0770' to '0777'
 debug: 
 /Stage[main]/Mcollective::Server::Package::Windows/File[C:/cfn/mcollective_win.msi]:
  
 The container Class[Mcollective::Server::Package::Windows] will propagate 
 my refresh event
 debug: Prefetching msi resources for package
 debug: Package[mcollective-win](provider=msi): Executing 'msiexec.exe 
 /qn /norestart /i C:/Cfn/mcollective_win.msi'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/provider/package/msi.rb:115:in `check_result'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/provider/package/msi.rb:78:in `install'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/type/package.rb:63:in `set_present'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/property.rb:81:in `send'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/property.rb:81:in `call_valuemethod'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/property.rb:288:in `set'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/property.rb:342:in `sync'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:114:in 
 `apply_parameter'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:56:in 
 `perform_changes'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction/resource_harness.rb:133:in 
 `evaluate'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:49:in `apply'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:84:in `eval_resource'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/util.rb:493:in `thinmark'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/util.rb:492:in `thinmark'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:104:in `evaluate'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:386:in `traverse'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/transaction.rb:99:in `evaluate'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:141:in `apply'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/configurer.rb:122:in 
 `retrieve_and_apply_catalog'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/util.rb:161:in `benchmark'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/util.rb:160:in `benchmark'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/configurer.rb:121:in 
 `retrieve_and_apply_catalog'
 C:/Program Files (x86)/Puppet 
 Labs/Puppet/puppet/lib/puppet/configurer.rb

[Puppet Users] Windows Firewall Question

2013-02-14 Thread jim
Hello all,

I'm currently running 2.7.19 (Puppet Enterprise 2.7.0)

I want to use puppet to add / amend or delete windows firewall rules, is 
there a tidy way of doing this 

exec { Check_MK_Firewall_Rule_create:
command = 'C:\Windows\System32\netsh.exe advfirewall firewall add rule 
name=Check_MK dir=in action=allow protocol=TCP localport=6556',
unless = 'C:\Windows\System32\netsh.exe advfirewall firewall show rule 
name=Check_MK',
}

## If I remove the unless statement, it will keep add the same rule over 
and over again, which will make the firewall rule list un-manageable


exec { Check_MK_Firewall_Rule_enable:
command = 'C:\Windows\System32\netsh.exe advfirewall firewall set rule 
name=Check_MK new enable=Yes',
}

## When I do a puppet run it keeps running this, is there a way to only run 
if disabled ???

Hope this make sense

regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Windows MSI Error change from absent to present failed: Failed to install: Fail on INT 24.

2013-02-12 Thread jim
Hello all,

i'm having a few issues whilst trying to install 2 different msi packages 
and getting the same error and was wondering if anyone could shed some 
light on where i'm going wrong:-


class roles::base::ntsyslog {

file { 'C:/Installs/NTSyslog2.msi':
source   = 'puppet:///modules/roles/NTSyslog2.msi',
mode = '0770',
owner= 'SYSTEM',
group= 'Administrators',
}

package { 'NTSyslog':

ensure= installed,
provider  = 'msi',
source= 'C:/Installs/NTSyslog2.msi',
}

}

also getting the same error when trying this msi, 

class roles::base::trend_av_agent {

file { 'C:/Installs/Trend_AV_Agent.msi':
source   = 'puppet:///modules/roles/Trend_AV_Agent.msi',
mode = '0770',
owner= 'SYSTEM',
group= 'Administrators',
}


package { 'Trend Micro OfficeScan Client':

ensure= installed,
provider  = 'msi',
source= 'C:/Installs/Trend_AV_Agent.msi',
}

}



Regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-08 Thread jim
Hello Josh

Thanks for reply so quickly, here is my manifest, thinking about it, I 
assume it because i'm installing the agent every time, do I need to do 
something like if service doesn't exist install else ignore ?

regards

James

file { 'C:/Installs/check-mk-agent-1.2.1i5.exe':
source   = 'puppet:///modules/base/check-mk-agent-1.2.1i5.exe',
mode = '0770',
owner= 'SYSTEM',
group= 'Administrators',
} -

exec { 'Check_MK_Agent':
command  = 'C:/Installs/check-mk-agent-1.2.1i5.exe /S',
} ~

service { 'Check_MK_Agent':
ensure   = 'running',
enable   = true,
require  = exec['Check_MK_Agent'],
}


On Thursday, 7 February 2013 16:24:10 UTC, Josh Cooper wrote:

 Hi Jim, 

 On Thu, Feb 7, 2013 at 7:15 AM, jim str...@gmail.com javascript: 
 wrote: 
  Hello all, 
  
  Can anyone please help, every time I push a config to my hosts, the 
 windows 
  service I have just defined keeps stopping and starting, and logging in 
 the 
  eventlog, 
  
  I only want the service to stop and start, if something has changed, and 
 to 
  my knowledge nothing has changed ? so it should stay running ? 
  
  Can some one please help or explain 
  
  regards 
  
  James 
  
  -- 
  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 post to this group, send email to 
  puppet...@googlegroups.comjavascript:. 

  Visit this group at http://groups.google.com/group/puppet-users?hl=en. 
  For more options, visit https://groups.google.com/groups/opt_out. 
  
  

 From http://docs.puppetlabs.com/references/latest/type.html#service, 
 Note that if a service receives an event from another resource, the 
 service will get restarted. 

 Can you post your manifest? Sounds like your service is subscribed to 
 some other resource, perhaps a package whose name doesn't match its 
 name in Add/Remove Programs? 

 Josh 

 -- 
 Josh Cooper 
 Developer, Puppet Labs 


-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Enterprise 3.x available ?

2013-02-08 Thread jim
Hello all,

I've seen post about Puppet 3.x being available for download but doesn't 
mention Enterprise ?

Is this the same thing ?  from puppet labs site i can only find 2.7.x

regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Manifest if statement not working

2013-02-08 Thread jim
Hello

Can someone please help or explain why this isn't working

as read http://docs.puppetlabs.com/guides/language_guide.html

It keeps adding the file NOT_present.txt

i've played around with == and != and True / false etc, and its not giving 
me the correct outcome telling if folder exists or not


$confdir = 'C:/windows'

if $confdir == 'True' {

file { 'C:/folder_present.txt': ensure = present }
} else {
file { 'C:/NOT_present.txt': ensure = present }
}


regards

james

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Windows Service keeps stopping/starting

2013-02-07 Thread jim
Hello all,

Can anyone please help, every time I push a config to my hosts, the windows 
service I have just defined keeps stopping and starting, and logging in the 
eventlog, 

I only want the service to stop and start, if something has changed, and to 
my knowledge nothing has changed ? so it should stay running ?

Can some one please help or explain 

regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Puppet Modules from Forge

2013-01-31 Thread jim
Thanks Guys for your advise and knowledge

On Wednesday, 30 January 2013 17:30:08 UTC, Nan Liu wrote:

 On Wed, Jan 30, 2013 at 9:55 AM, jim str...@gmail.com javascript:wrote:

 Hello all,

 I have some questions about the download puppet modules from puppetforge: 

 I'll take puppetlabs-dism as an example, once its installed its located:

 /etc/puppetlabs/puppet/modules/dism

 Can this be renamed to something else ? 

 Also if for example, I had a folder tree under modules e.g.

 /etc/puppetlabs/puppet/modules/windows
 |
 |- manifests
 |--base.pp
 |--networking.pp

 Can I move the DISM module folder under my windows folder ?


 This particular module is just a type/provider with no puppet manifest so 
 you can move the lib dir to another module.
  

 then I assume i'd call it by windows::dism?


 No, the resource is still called dism, because it's the name of the type 
 and moving the lib dir won't change this.


 https://github.com/puppetlabs/puppetlabs-dism/blob/master/lib/puppet/type/dism.rb#L1

  You can write your own custom define resource called windows::dism which 
 wraps the native dism resource. This is typically done if you need 
 environment defaults.

 HTH,

 Nan 
  

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Modules from Forge

2013-01-30 Thread jim
Hello all,

I have some questions about the download puppet modules from puppetforge: 

I'll take puppetlabs-dism as an example, once its installed its located:

/etc/puppetlabs/puppet/modules/dism

Can this be renamed to something else ? 

Also if for example, I had a folder tree under modules e.g.

/etc/puppetlabs/puppet/modules/windows
|
|- manifests
|--base.pp
|--networking.pp

Can I move the DISM module folder under my windows folder ?

then I assume i'd call it by windows::dism?

Regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Puppet Site.pp hierarchy (multi-tenant) question

2013-01-29 Thread jim
Hello all,

I was wondering if someone could please help or explain the best approach 
to setting up puppet as our first requirement is to support multi-tenant 
within our company  what I mean by this is we have different teams 
supporting different O/S or the same O/S but different configurations,

Team A - Windows O/S Config A
Team B - Linux O/S Config B
Department C - Windows O/S Configs C  D

From what I've been reading there seems multiple ways of doing this, some 
are being phased out, and some are aren't that clear.

The easiest option would be to add different manifests for different groups 
/ teams within site.pp, but if I make changes to the sub-manifests, i'd 
need to touch the site.pp file for changes to kick in, which could also 
effect the other teams / group changes and cause outages ?

Can some please recommend the best approach to multi-tenant or at least 
pass on your experiences ?

Kind Regards

James

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Puppet Users] Thoughts on roles/profiles class paradigm

2013-01-29 Thread jim
Hello Craig,


I was wondering if someone could please help or explain the best approach 
to setting up puppet as our first requirement is to support multi-tenant 
within our company  what I mean by this is we have different teams 
supporting different O/S or the same O/S but different configurations, and 
will probably call the same modules but can't touch the others 
configurations etc

Team A - Windows O/S Config A
Team B - Linux O/S Config B
Department C - Windows O/S Configs C  D

From what I've been reading there seems multiple ways of doing this, some 
are being phased out, and some are aren't that clear.

The easiest option would be to add different manifests for different groups 
/ teams within site.pp, but if I make changes to the sub-manifests, i'd 
need to touch the site.pp file for changes to kick in, which could also 
effect the other teams / group changes and cause outages ?

Can some please recommend the best approach to multi-tenant

Regards

James



On Wednesday, 9 January 2013 22:08:19 UTC, Craig Dunn wrote:

 On 09/01/2013 13:56, Roman Shaposhnik wrote: 
  I think I've seen this one before and got curious about it as well. It 
  seems that Craig is advocating 1-1 mapping between nodes and roles and 
  that makes me think of the 'roles' as a sort of poor man's ENC. As 
  such, I'd be very curious to hear what kind of issues do you think it 
  will help you solve. Now, having 'profiles' as the place to handle 
  inter-module dependencies seems like a pretty good idea. Thanks, Roman. 

 The point was not a 1-1 mapping between nodes and roles (although that 
 was mentioned), the key point I was trying to make is to add layers of 
 classes to provide abstraction between your node definition (whether 
 thats in an ENC or site.pp) and the components that get pulled in. 

 If my post is tl;dr I'll summarise it with; 

 I have two modules called 'roles' and 'profiles', and other modules 
 we'll just refer to as 'component modules' and nodes have role classes 
 applied to them, which include profiles, which include component modules 

 * A role contains business logic 
 * A profile defines the logical software stack that defines what 
 components are needed 
 * The component modules are the building blocks that manage resources 
 (eg: ssh, mysql, apache...) 

 Theres probably a few ways of achieving the same thing - but they key 
 here is abstracting the components from the nodes. 

 Craig 


 -- 
 Craig Dunn 
 Professional Services 
 Puppet Labs Inc. 
 http://www.puppetlabs.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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[Puppet Users] Explain Manifests and Modules

2013-01-09 Thread jim
Hello all,

Can someone please explain why there is a manifests folder 
in /etc/puppetlabs/puppet
e.g. /etc/puppetlabs/puppet/manifests

If there is a manifests folder within each modules folder 
in /etc/puppetlabs/puppet
e.g. /etc/puppetlabs/puppet/modules/ntp/manifests


Is this directory /etc/puppetlabs/puppet/manifests for building out your 
config tree's and calling modules etc.

if so how would you do this ?

regards

James



-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/5F0mAzP1N0QJ.
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] Windows Manifest Newline Syntax and Append to file Questions

2012-11-20 Thread jim
Hello all,

I'm fairly new to puppet and in the majority a windows shop

I have two questions

1.) As windows syntax is slight different than linux syntax, how do I 
create a new line within a bit of content, e.g. hosts file for windows not 
linux

e.g.

file {'c:/Windows/System32/drivers/etc/hosts':
content =
127.0.0.1  puppet.office \n
127.0.0.1   puppet8081.office,
}

As it seems to ignore the \n

2.) also can you append to a file, for example your base machines get the 
standard host file and futher down the tree it goes it might get host 
entries amended to it.

Kind Regards

James

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/IUFifHBoo6IJ.
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.



  1   2   >