Your "source" line needs 3 slashes after "puppet:"
    source => "puppet:///$puppetserver/modules/httpd/ParserService-1.0.esb",


❧ Brian Mathis
@orev


On Thu, Jun 26, 2014 at 2:47 PM, Satish Katuru <satishkat...@gmail.com>
wrote:

> Hi Brian Mathis,
>
> I tired to copy the jar files and Zip files from Master to agent machine
> but i am unable to do this.
> My init.pp looks like below:
>
> class httpd
> {
>
>
> file {
> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/deploy/ParserService-1.0.esb":
> ensure => present,
> owner => "katusa02",
> group => "katusa02",
> mode => "0777",
> source => "puppet://$puppetserver/modules/httpd/ParserService-1.0.esb",
>
> }
>
> }
>
> I tired with ensure => file and ensure =>"present" but didn't work.
> Can you please guide me how to do this?
>
> Moreover I got following error message:
>
>
> Error:
> /Stage[main]/Httpd/File[/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/deploy/ParserService]:
> Could not evaluate: Could not retrieve information from environment
> production source(s) puppet://
> dayrhetamp076.enterprisenet.org/modules/httpd/ParserService
>
> Regards,
> Sathish.
>
> On Saturday, June 21, 2014 3:56:43 AM UTC+5:30, Brian Mathis wrote:
>
>> Summary: Do not try to control processes directly with Puppet and instead
>> properly integrate your service into your operating system.
>>
>> -----
>>
>> It sounds like you are misunderstanding how Puppet integrates into the
>> rest of the system.  Puppet should not "kill processes" directly like you
>> would with the 'kill' command (actually, it can, but this is almost
>> certainly NOT what you want).  I think you may also be misunderstanding
>> some basic concepts of running a Linux/Unix server.
>>
>> A process is not the same thing as a service.  A single service may have
>> many processes, and they are typically controlled by a script in the
>> /etc/init.d directory (or maybe somewhere else if you are on a newfangled
>> system running systemd).  If your process does not have a control script in
>> /etc/init.d, then is is NOT a "service", it's just a process you happen to
>> have running for a long time.  For Puppet to consider it a service, it must
>> be controllable using the 'service' command (on RedHat based systems), or
>> the equivalent for your version of Linux/Unix.
>>
>> What you really want is to be making and installing a bash script to
>> control your java process in /etc/init.d.  Once written, you can use Puppet
>> to install the script by using the "file" resource.  After you have that
>> done, then you can use the "service" resource to control the service as you
>> are tying to do.  The name of the service will be the name that you call
>> your script in /etc/init.d, for example: /etc/init.d/my_service.  Please do
>> not call your service "java", as it makes no sense to name a service after
>> the programming language it is written in.  If it's an accounting system
>> for example, call the service "accounting_system", or something like that.
>>
>>
>> You are bound to get some other replies telling you how to use an 'exec'
>> resource to call the "kill" command, etc..., since this is *possible* with
>> Puppet, but it is grossly abusive of its capabilities and you really should
>> not be doing that.  Please do this correctly by setting up your software as
>> a real service and then control it correctly with the "service" resource in
>> Puppet.
>>
>> I strongly suggest you walk through the Puppet tutorials at
>> https://puppetlabs.com/learn before trying to control your own custom
>> applications with it.
>>
>>
>> ❧ Brian Mathis
>> @orev
>>
>>
>> On Fri, Jun 20, 2014 at 6:02 AM, Satish Katuru <satish...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am new to Puppet and We are trying to stop and start any one of the
>>> services running on the Puppet master /agent machine.
>>>
>>> Here is the Scenario:
>>>
>>>
>>> 1. we have a Jboss service running on Puppet master and I am trying to
>>> kill this service thru puppet.(this service is runnning with my userid)
>>>
>>> Service name is "java".
>>>
>>> 2. In /etc/puppet/manifests/nodes.pp I have written code like this
>>>
>>> node "servername"
>>> {
>>>
>>> Service {
>>>
>>> "java":
>>> ensure = >"Stopped",
>>>
>>> }
>>> }
>>>
>>> after this I ran this command
>>>
>>> puppet apply nodes.pp
>>>
>>> Nothing has happend.Still the process is running.(I am able to see the
>>> process id : ps -ef|grep java)
>>>
>>> 3.After this i created a module and place this code in init.pp in
>>> /etc/puppet/modues/httpd/
>>>
>>> node "servername"
>>> {
>>> inlcude httpd
>>> }
>>>
>>> puppet apply nodes.pp
>>>
>>>
>>> Nothing happend.
>>>
>>> Can you please guide us how to kill a process?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>  --
>>> 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/c81e168e-38f0-416c-b0c2-bd0124c9e760%
>>> 40googlegroups.com
>>> <https://groups.google.com/d/msgid/puppet-users/c81e168e-38f0-416c-b0c2-bd0124c9e760%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/2fc0d692-421c-4ea8-87d5-5ce229942e9b%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/2fc0d692-421c-4ea8-87d5-5ce229942e9b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

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

Reply via email to