[Puppet Users] QUERY : no resources for remote admin?

2012-09-05 Thread am-aaron
hello fellow engineers:

i am currently developing a Puppet manifest to Deploy (Install, Configure) 
a Software Package onto a number of Nodes from a Machine that is network 
connected to the Nodes (can ssh). the Yum Repo for the Nodes is on this 
Deployment Point.

it was and still is very surprising to find that Puppet does not have a *
Resource* to allow a *Remote Package* installation to be done. *Package{}*works 
on the current Node and will use 
yum by default to install a Software Package. however, if i want to do a yum 
install from another Deployment Point, Puppet does not offer a Resource.

Local Package Install:
package { 'ksh':
ensure => installed
}

i also found out by simply trying that i can do a installation using lists 
as in (also found on Puppet Cookbook much later):
package { [  'ksh', 'mksh' ]:
ensure => installed
}

but, if i want to install ksh onto Node node from Machine master, i need to 
use *Exec*:
# Install package
exec { 'remote-install':
  command   => "/usr/bin/ssh root@node 'yum -y install ksh'",
  returns   => 0,
  logoutput => on_failure,
}

what does Puppet Labs and the User Community recommend? is it better and 
more efficient to create a second Puppet manifest for the Nodes so that i 
can use Package{}? that would mean:
* additional Puppet manifests for the Nodes in addition to the manifest on 
the Deployment Point, which is used for configuration;
* additional communication between the Puppet Agent and Puppet master for 
package installation (?);
* additional overhead of maintaining two Puppet manifests;
* additional overhead of synchronizing the Installation on Nodes with the 
Configuration on Deployment Point.

why does PuppetLabs simply not offer simple Resources to do what we require 
here? is there some Puppet ic way of designing and coding manifests that i 
do not know about?

thank you very, very much in advance.

ciao,

Aaron
--
{ celltext Nokia E90 Communicator: +353-89-420-8033; Skype: am-aaron }


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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/hDwoUUw4RDwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: QUERY : no resources for remote admin?

2012-09-05 Thread am-aaron
hello Jenner:

thank you.

without intending to be rude or scornful: using MCollective? hmmm. instead, 
i can use a simple shell script, and it works great in minutes. Puppet 
makes us go bonkers and i do not think its really intuitive to understand. 
instead a procedural scipt is just great.

i find this restriction very strange, though i understood recently that you 
use Puppet to declare how a system should be.

i have a problem: i want to install a software package on multiple nodes 
and then have to run a configure program to configure all the nodes. its 
not distributing configuration files, i have to run the program only on 1 
of the nodes or from a separate machine. its not easy to synchronize all 
the nodes and to ensure that all machines are in the same state before you 
run the configure.

instead, it damn easy to run the Install and Configure from a single 
machine to all the Nodes. no synchronization problems and one manifest to 
maintain.

Puppet also has big issues with this scenario: from one machine to check 
the status of a file on another machine and to then take action. the File{} 
resource only applies to the local machine. so, how do i do distributed 
system admin or remote sys admin?

really puzzled,

Aaron

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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/bsJXZN0q448J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Puppet Users] Re: QUERY : no resources for remote admin?

2012-09-05 Thread am-aaron
hello Jenner:

thank you.

without intending to be rude or scornful: using MCollective? hmmm. instead, 
i can use a simple shell script, and it works great in minutes. Puppet 
makes us go bonkers and i do not think its really intuitive to understand. 
instead a procedural scipt is just great.

i find this restriction very strange, though i understood recently that you 
use Puppet to declare how a system should be.

i have a problem: i want to install a software package on multiple nodes 
and then have to run a configure program to configure all the nodes. its 
not distributing configuration files, i have to run the program only on 1 
of the nodes or from a separate machine. its not easy to synchronize all 
the nodes and to ensure that all machines are in the same state before you 
run the configure.

instead, it damn easy to run the Install and Configure from a single 
machine to all the Nodes. no synchronization problems and one manifest to 
maintain.

Puppet also has big issues with this scenario: from one machine to check 
the status of a file on another machine and to then take action. the File{} 
resource only applies to the local machine. so, how do i do distributed 
system admin or remote sys admin?

i spend so much time to learn Puppet, we pay a good deal for it, and we 
spend some time to understand how to use the declarative language, but i 
cannot do simple things. even doing an 'echo' to log output is so 
complicated. if we have to resort to using Ruby, its even more complicated. 
enhances my qualifications, but is it that vital to use it?

genuinely puzzled,

Aaron


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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/owt3q3AChhsJ.
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] PROBLEM : Cannot require an Exec

2012-10-02 Thread am-aaron
hello:

i currently am using Puppet to run some commands in a sequence. there are 
two sequences of exec resources. we found that we cannot use require => 
Exec and it does not work at all as expected. here is some sample code.

exec { "exec-AAA":
  command => "/bin/true",
  returns => 0,
  notify  => Exec["exec-BBB"],
}
exec { "exec-BBB":
  refreshonly => true,
  command => "/bin/false",
  returns => 0,
  notify  => Exec["exec-CCC"],
}
exec { "exec-CCC":
  refreshonly => true,
  command => "/bin/touch /tmp/CCC",
  returns => 0,
}

exec { "exec-DDD":
  require => Exec["exec-CCC"],
  command => "/bin/true",
  returns => 0,
  notify  => Exec["exec-EEE"],
}
exec { "exec-EEE":
  refreshonly => true,
  command => "/bin/false",
  notify  => Exec["exec-FFF"],
}
exec { "exec-FFF":
  refreshonly => true,
  command => "/bin/touch /tmp/FFF",
  returns => 0,
}

*ms1:/root/aaron> puppet apply t1.pp*

notice: /Stage[main]//Exec[exec-AAA]/returns: executed successfully
err: /Stage[main]//Exec[exec-BBB]: Failed to call refresh: /bin/false 
returned 1 instead of one of [0] at /root/aaron/t1.pp:11
notice: /Stage[main]//Exec[exec-DDD]/returns: executed successfully
err: /Stage[main]//Exec[exec-EEE]: Failed to call refresh: /bin/false 
returned 1 instead of one of [0] at /root/aaron/t1.pp:28
notice: Finished catalog run in 0.36 seconds

in the example above, how did Exec["exec-DDD"] run when Exec["exec-CCC"] 
did not run and Exec["exec-DDD"] require Exec["exec-CCC"]?

*ms1:/root/aaron> puppet apply --debug t1.pp*

info: Applying configuration version '1349209769'
debug: /Stage[main]//Exec[exec-DDD]/require: requires Exec[exec-CCC]
debug: /Stage[main]//Exec[exec-DDD]/notify: subscribes to Exec[exec-EEE]
debug: /Stage[main]//Exec[exec-BBB]/notify: subscribes to Exec[exec-CCC]
debug: /Stage[main]//Exec[exec-AAA]/notify: subscribes to Exec[exec-BBB]
debug: /Stage[main]//Exec[exec-EEE]/notify: subscribes to Exec[exec-FFF]
debug: /Schedule[never]: Skipping device resources because running on a host
debug: /Schedule[daily]: Skipping device resources because running on a host
debug: /Schedule[monthly]: Skipping device resources because running on a 
host
debug: /Schedule[puppet]: Skipping device resources because running on a 
host
debug: /Schedule[hourly]: Skipping device resources because running on a 
host
debug: /Schedule[weekly]: Skipping device resources because running on a 
host
debug: Exec[exec-AAA](provider=posix): Executing '/bin/true'
debug: Executing '/bin/true'
notice: /Stage[main]//Exec[exec-AAA]/returns: executed successfully
debug: /Stage[main]//Exec[exec-AAA]: The container Class[Main] will 
propagate my refresh event
info: /Stage[main]//Exec[exec-AAA]: Scheduling refresh of Exec[exec-BBB]
debug: Exec[exec-BBB](provider=posix): Executing '/bin/false'
debug: Executing '/bin/false'
err: /Stage[main]//Exec[exec-BBB]: Failed to call refresh: /bin/false 
returned 1 instead of one of [0] at /root/aaron/t1.pp:11
debug: Exec[exec-DDD](provider=posix): Executing '/bin/true'
debug: Executing '/bin/true'
notice: /Stage[main]//Exec[exec-DDD]/returns: executed successfully
debug: /Stage[main]//Exec[exec-DDD]: The container Class[Main] will 
propagate my refresh event
info: /Stage[main]//Exec[exec-DDD]: Scheduling refresh of Exec[exec-EEE]
debug: Exec[exec-EEE](provider=posix): Executing '/bin/false'
debug: Executing '/bin/false'
err: /Stage[main]//Exec[exec-EEE]: Failed to call refresh: /bin/false 
returned 1 instead of one of [0] at /root/aaron/t1.pp:28
debug: Class[Main]: The container Stage[main] will propagate my refresh 
event
debug: Finishing transaction 70054935787440
debug: Storing state
debug: Stored state in 0.06 seconds
notice: Finished catalog run in 0.37 seconds
debug: /File[/var/lib/puppet/rrd]/seluser: Found seluser default 'system_u' 
for /var/lib/puppet/rrd
debug: /File[/var/lib/puppet/rrd]/selrole: Found selrole default 'object_r' 
for /var/lib/puppet/rrd
debug: /File[/var/lib/puppet/rrd]/seltype: Found seltype default 
'puppet_var_lib_t' for /var/lib/puppet/rrd
debug: /File[/var/lib/puppet/rrd]/selrange: Found selrange default 's0' for 
/var/lib/puppet/rrd
debug: Finishing transaction 70054934905120
debug: Recieved report to process from ms1
debug: Processing report from ms1 with processor Puppet::Reports::Store

as you can see in the debug run, even though Exec["exec-DDD"] require 
Exec["exec-CCC"], and the latter does not run, the former runs. what is 
going on here?

thank you for your time.

have a nice day,

Aaron
--
{<-encapsulation->}


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

-- 
You receive

[Puppet Users] Re: QUERY : no resources for remote admin?

2013-08-27 Thread am-aaron
good afternoon Jenner and JC Bollinger:

the question is connected to deployment (installation and configuration) of 
VCS. since VCS is quite popular in the indiustry, this will help many 
people.

thank you Jenner and JCB for your informative responses. i apologize 
because my initial response to Jenner was not really nice. i was stressed 
due to the deadline. i Normally do not use ¬that language and tone¬.

initially, i hesitated to explain which software had to be deployed, but 
now, here goes:
- we want to deploy Veritas Cluster Server (high-availability cluster 
software) onto multiple RHEL Nodes from a separate RHEL management node.
- Puppet Master runs on the Manager and each Node runs Puppet Agent.
- VCS software is a collection of RPMs with a separate installer executable.
- software can be installed using the Installer that uses SSH to install 
the RPMs onto multiple nodes, given the list.
- software can also be installed by simply installing the RPMs directly on 
each Node.
- the VCS RPMs have to be installed in a specifc order.
- once the RPMs are installed, a second Installer program is available on 
each Node, allowing Cluster Creation from one of the Nodes.

Questions
- which Puppet resource can we use to run the VCS software installer 
executable from the Puppet Master?
  the list of Nodes is to be passed to the Installer.

- if we want to install the VCS RPMs directly ourselves onto multiple 
Nodes, we can:
  - use Puppet 'package' on each Node or
  - use 'exec' on the manager to ssh and yum RPMs to multiple Nodes.
  is there a better way to use Puppet for this?

- VCS comes with:
  - an Installer to install VCS software onto all Nodes;
  - an Config program to create the Cluster;
  - CLI commands to create resources to be monitored.
  so, i think that it would be best to use Exec to run these programs.

finally, we are also considering the use of MCollective.

thank you,

Aaron

On Wednesday, September 5, 2012 10:57:09 PM UTC+1, Jenner La Fave wrote:
>
> Like I said, these aren't "issues" with Puppet, you're just using a 
> screwdriver to hit a nail. All resources only apply to the local machine. 
> Your manifests are supposed to declaratively describe what the state and 
> configuration of a node should be, and the Puppet agent makes it so after 
> compiling the node's catalog.
>
> Without knowing the details of the software you are trying to deploy, I 
> would say either fix your deployment procedure so that Puppet can manage 
> the configuration files on each node (with the typical Package, File, 
> Service), or don't use Puppet at all.
>
> -- Jenner
>
> On Wednesday, September 5, 2012 2:35:45 PM UTC-7, am-aaron wrote:
>>
>> hello Jenner:
>>
>> thank you.
>>
>> without intending to be rude or scornful: using MCollective? hmmm. 
>> instead, i can use a simple shell script, and it works great in minutes. 
>> Puppet makes us go bonkers and i do not think its really intuitive to 
>> understand. instead a procedural scipt is just great.
>>
>> i find this restriction very strange, though i understood recently that 
>> you use Puppet to declare how a system should be.
>>
>> i have a problem: i want to install a software package on multiple nodes 
>> and then have to run a configure program to configure all the nodes. its 
>> not distributing configuration files, i have to run the program only on 1 
>> of the nodes or from a separate machine. its not easy to synchronize all 
>> the nodes and to ensure that all machines are in the same state before you 
>> run the configure.
>>
>> instead, it damn easy to run the Install and Configure from a single 
>> machine to all the Nodes. no synchronization problems and one manifest to 
>> maintain.
>>
>> Puppet also has big issues with this scenario: from one machine to check 
>> the status of a file on another machine and to then take action. the File{} 
>> resource only applies to the local machine. so, how do i do distributed 
>> system admin or remote sys admin?
>>
>> i spend so much time to learn Puppet, we pay a good deal for it, and we 
>> spend some time to understand how to use the declarative language, but i 
>> cannot do simple things. even doing an 'echo' to log output is so 
>> complicated. if we have to resort to using Ruby, its even more complicated. 
>> enhances my qualifications, but is it that vital to use it?
>>
>> genuinely puzzled,
>>
>> Aaron
>>
>>
>> This email and any files transmitted with it are confidential and 
>> intended solely for the use of the individual or entity to whom they are 
>> addressed. If you have received this email in error please notify the 
&g