Re: [Puppet Users] Remote site puppet infrastructure

2012-07-20 Thread Ohad Levy
On Wed, Jul 18, 2012 at 4:20 PM, Jake - USPS jacob.m.mcc...@usps.govwrote:

 I'm trying to figure out if there is a common/working setup that people
 are using to host puppet in remote sites.

 At first our setup was that we have several puppetmasters (PM) in site A
 and a couple in our smaller site B.  In site A we are also hosting Foreman
 and our mysql DB for storeconfigs.  site A and B are connected via a WAN
 that is fairly slow.

 With this setup the issue I ran into was a lot of puppet agent runs in
 site B would timeout.  They connect to their PM in site B just fine, but
 then the site B PM needs to connect to the storeconfigs DB in site A.  This
 connection usually takes too long.  So we end up with about 50% error rate
 in site B while having a 0% error rate in site A.

 I've tried to address this by using async_storeconfigs which seemed to
 help a lot but ran into https://projects.puppetlabs.com/issues/12140 which
 was a dealbreaker.

 Something else I've tried is just having agents in site B use the PMs in
 site A (so no more PM in site B).  This helps a lot, but we still get
 errors.  The 50% error rate drops down to about 1% error rate.  It seems
 the traffic from agent to PM is less then the traffic from PM to DB?  Not
 only did the error rate go down, but config retrievals sped up.

 One thing I'm wondering is if there is a way to setup a mysql storeconfigs
 DB in site B to reduce latency.  Either only nodes in site B will use
 storeconfigs in site B or maybe site A and B are 'clustered' somehow over
 WAN?  I'm not very strong with mysql skills though so I'm not sure what all
 can be done with it to address the issues I'm facing ...

 So I was wondering does anyone else manage remote sites?  Is there a way
 to do it while still maintaining a central storeconfigs DB and
 'dashboard/ENC' (don't want to have 'login here to view these nodes, login
 there to view these other nodes)?

 Thanks for all comments!


I think thats one of the known shortcoming of storeconfigs, and one of the
main reasons I've never used them personally in the past.
What is your usage case fore storeconfigs? I always found ways to avoid
using it (e.g. by storing the data i need somewhere else).

I had (job N-1) about 15 sites (each with PM's) working really nice, but
without storeconfigs..

Ohad

 Jake

 --
 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/-/Wb3Mae8Kd3YJ.
 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.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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] plusignment syntax?

2012-07-20 Thread Brett Maton

I'm trying to add elements to an array with the plusingment operator.
However the following results in 

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax 
error at '+'; expected '}' at /etc/puppet/modules/php/manifests/params.pp:17

(This isn't a question of whether or not php53 will be happy with 
php-pecl-memcache, its about extending arrays).

class php::params {
  case $osmajor {
'5': {
$phpService = 'php53'
$phpModules = [
'php-pecl-memcache',
  ]
  }
default: {
$phpService = 'php'
$phpModules = [
'php-pecl-memcached',
  ]
  }
  }
  $phpVersion = 'latest'
  $phpModules + [ ${phpService}-mysql,
   ${phpService}-xml,
   ${phpService}-mbstring,
   ${phpService}-cli,
   ${phpService}-gd,
   ${phpService}-soap,
 ]
}

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] Puppet gets stuck + CRON

2012-07-20 Thread Felix Frank


On 07/16/2012 12:03 PM, pierre-emmanuel degand wrote:
 Hi,
 
 I use Cron to avoid puppet to get stuck with this command : /bin/echo 
 | /bin/nc localhost 8139
 But I get this error : /USR/SBIN/CRON[11065]: (CRON) error (grandchild
 #11068 failed with exit status 1)
 
 At the beginning, i launched : echo  | nc localhost 8139, but I read
 that we have to put the path with the lastest cron version. 
 
 sudo uname -a
 Linux #.com 2.6.38.2-grsec--grs-ipv6-64 #2 SMP Thu Aug 25
 16:40:22 UTC 2011 x86_64 GNU/Linux
 
 If someone get an idea :)

Cron generates an e-mail with the stderr output. Get a hold of that, it
should tell you what's going wrong.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: plusignment syntax?

2012-07-20 Thread matonb
This does work though:

class php::params {
  case $osmajor {
'5': {
$phpService = 'php53'
$Modules = [
 'php-pecl-memcache',
   ]
  }
default: {
$phpService = 'php'
$Modules = [
 'php-pecl-memcached',
   ]
  }
  }
  $phpVersion = 'latest'
  $phpModules = [ ${phpService}-mysql,
  ${phpService}-xml,
  ${phpService}-mbstring,
  ${phpService}-cli,
  ${phpService}-gd,
  ${phpService}-soap,
  $Modules,
]
}


On Friday, 20 July 2012 08:58:15 UTC+1, Brett Maton wrote:


 I'm trying to add elements to an array with the plusingment operator.
 However the following results in 

 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Syntax error at '+'; expected '}' at 
 /etc/puppet/modules/php/manifests/params.pp:17

 (This isn't a question of whether or not php53 will be happy with 
 php-pecl-memcache, its about extending arrays).

 class php::params {
   case $osmajor {
 '5': {
 $phpService = 'php53'
 $phpModules = [
 'php-pecl-memcache',
   ]
   }
 default: {
 $phpService = 'php'
 $phpModules = [
 'php-pecl-memcached',
   ]
   }
   }
   $phpVersion = 'latest'
   $phpModules + [ ${phpService}-mysql,
${phpService}-xml,
${phpService}-mbstring,
${phpService}-cli,
${phpService}-gd,
${phpService}-soap,
  ]
 }



-- 
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/-/rpd4rOd-DYIJ.
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.



Re: [Puppet Users] Hierachy for facts?

2012-07-20 Thread Felix Frank
Hi,

On 07/16/2012 03:53 PM, ZJE wrote:
 For example, if I'm collecting infromation about the raid array, it
 would be something like this:
 ---
 custom_hw_localstorage_ctrl_0_array_0_raid = 1
 custom_hw_localstorage_ctrl_0_array_1_raid = 5
 ---
 
 Where the implied hierachy is something like:
 custom
   hw
 localstorage
   ctrl
 0: array
 0: raid = 1
 1: raid = 5

I believe that within the facter paradigm, this structure is as good as any.

As far as I know, facter is supposed to support structured data such as
arrays and hashes as fact values, but currently your workaround is
probably the next best thing.

Of course, accessing those dynamically will be quite an excercise, and
probably not possible from the puppet DSL without resorting to inline
templates.

Cheers,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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] rest api to do agent configuration

2012-07-20 Thread wen
Hi Guys,

Now, when I want to add a new module to an agent. I need to manually modify 
the /etc/puppet/manifests/nodes.pp and add a include directive to the agent 
configuration. 

I am wondering is there any server rest api that can do so? I need to write 
an application to interact with the puppet server to configure the agent.

Thanks a lot for the help. 

Regards,
Wen

-- 
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/-/Xh8A8vhx11MJ.
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.



Re: [Puppet Users] rest api to do agent configuration

2012-07-20 Thread Erik Dalén
On 20 July 2012 11:44, wen wen...@fruitscloud.com wrote:
 Hi Guys,

 Now, when I want to add a new module to an agent. I need to manually modify
 the /etc/puppet/manifests/nodes.pp and add a include directive to the agent
 configuration.

 I am wondering is there any server rest api that can do so? I need to write
 an application to interact with the puppet server to configure the agent.

Install and use either Puppet Dashboard or Foreman as external node
classifiers and use their rest APIs to set classes for your nodes.

Regards
-- 
Erik Dalén

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] Start puppet with a non root user different than default 'puppet'

2012-07-20 Thread Javi Legido
Thanks for reply, but your fix didn't worked.

I use debian, and below packages versions:

ii  puppet  2.6.2-5+squeeze5
Centralized configuration management - agent startup and compatibility
scripts
ii  puppet-common   2.6.2-5+squeeze5
Centralized configuration management
ii  puppetmaster2.6.2-5+squeeze5
Centralized configuration management - master startup and
compatibility scripts

Do you know how to pass the user as a parameter to the puppet script?

Below content of the /etc/init.d/puppetmaster script:

#! /bin/sh
### BEGIN INIT INFO
# Provides:  puppetmaster
# Required-Start:$network $named $remote_fs $syslog
# Required-Stop: $network $named $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop:  0 1 6
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/puppet
DAEMON_OPTS=
NAME=master
DESC=puppet master

test -x $DAEMON || exit 0

[ -r /etc/default/puppetmaster ]  . /etc/default/puppetmaster

. /lib/lsb/init-functions

if [ ! -d /var/run/puppet ]; then
mkdir -p /var/run/puppet
fi

chown puppet:puppet /var/run/puppet

is_true() {
if [ x$1 = xtrue -o x$1 = xyes -o x$1 = x0 ] ; then
return 0
else
return 1
fi
}

start_puppet_master() {
if is_true $START ; then
if [ $SERVERTYPE = mongrel ]
then
DAEMON_OPTS=$DAEMON_OPTS --servertype=mongrel
NUMSTART=0
STARTPORT=$PORT
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
start-stop-daemon --start --quiet
--pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid \
--startas $DAEMON -- $NAME $DAEMON_OPTS
--masterport=$STARTPORT
--pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid
STARTPORT=$(($STARTPORT + 1))
NUMSTART=$(($NUMSTART + 1))
done
else
start-stop-daemon --start --quiet --pidfile
/var/run/puppet/${NAME}.pid \
--startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$PORT
fi
else
echo 
echo puppetmaster not configured to start, please edit
/etc/default/puppetmaster to enable
fi
}

stop_puppet_master() {
if [ $SERVERTYPE = mongrel ]
then
NUMSTART=0
STOPPORT=$PORT
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
start-stop-daemon --stop --quiet --oknodo --pidfile
/var/run/puppet/${NAME}-${STOPPORT}.pid
rm -f /var/run/puppet/${NAME}-${STOPPORT}.pid
STOPPORT=$(($STOPPORT + 1))
NUMSTART=$(($NUMSTART + 1))
done
else
start-stop-daemon --stop --quiet --oknodo --pidfile
/var/run/puppet/${NAME}.pid
fi
}

status_puppet_master() {
if is_true $START ; then
if [ $SERVERTYPE = mongrel ]
then
NUMSTART=0
STARTPORT=$PORT
while [ $NUMSTART -lt $PUPPETMASTERS ]; do
status_of_proc -p /var/run/puppet/${NAME}-${STARTPORT}.pid \
${DAEMON} ${NAME}-${STARTPORT}
STARTPORT=$(($STARTPORT + 1))
NUMSTART=$(($NUMSTART + 1))
done
else
status_of_proc -p /var/run/puppet/${NAME}.pid
${DAEMON} ${NAME}
fi
else
echo 
echo puppetmaster not configured to start
fi
}

case $1 in
start)
log_begin_msg Starting $DESC
start_puppet_master
log_end_msg $?
;;
stop)
log_begin_msg Stopping $DESC
stop_puppet_master
log_end_msg $?
;;
reload)
# Do nothing, as Puppetmaster rechecks its config automatically
;;
status)
status_puppet_master
;;
restart|force-reload)
log_begin_msg Restarting $DESC
stop_puppet_master
sleep 1
start_puppet_master
log_end_msg $?
;;
*)
echo Usage: $0 {start|stop|status|restart|force-reload} 2
exit 1
;;
esac


2012/7/18 Jan j...@agetty.de:
 Hi,

 On 07/18/2012 03:55 PM Javi wrote:
 Add:

 [main]
 ...
 user myuser

 And:

 [main]
 ...
 user myuser

 sudo /etc/init.d/pupettmaster restart

 But no luck. Any idea?

 which distribution you're running on? The user might be set by the init
 script by passing the necessary parameters directly to the process and
 AFAIK those parameters always take precedence for those specified within
 /etc/puppet/puppet.conf ..

 Kill the process and try starting it directly:

 8
 # sudo /etc/init.d/pupettmaster stop;
 # sudo su -;
 # puppetmasterd --config=/etc/puppet.conf;
 # ps aux | grep 'puppet';
 8

 Cheers
   - Jan


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To post to this group, send email to 

[Puppet Users] [RESOLVED] Start puppet with a non root user different than default 'puppet'

2012-07-20 Thread Javi Legido
Fixed changing below line:

chown my_user:my_user /var/run/puppet

Regards

2012/7/20 Javi Legido j...@legido.com:
 Thanks for reply, but your fix didn't worked.

 I use debian, and below packages versions:

 ii  puppet  2.6.2-5+squeeze5
 Centralized configuration management - agent startup and compatibility
 scripts
 ii  puppet-common   2.6.2-5+squeeze5
 Centralized configuration management
 ii  puppetmaster2.6.2-5+squeeze5
 Centralized configuration management - master startup and
 compatibility scripts

 Do you know how to pass the user as a parameter to the puppet script?

 Below content of the /etc/init.d/puppetmaster script:

 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:  puppetmaster
 # Required-Start:$network $named $remote_fs $syslog
 # Required-Stop: $network $named $remote_fs $syslog
 # Default-Start: 2 3 4 5
 # Default-Stop:  0 1 6
 ### END INIT INFO

 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/bin/puppet
 DAEMON_OPTS=
 NAME=master
 DESC=puppet master

 test -x $DAEMON || exit 0

 [ -r /etc/default/puppetmaster ]  . /etc/default/puppetmaster

 . /lib/lsb/init-functions

 if [ ! -d /var/run/puppet ]; then
 mkdir -p /var/run/puppet
 fi

 chown puppet:puppet /var/run/puppet

 is_true() {
 if [ x$1 = xtrue -o x$1 = xyes -o x$1 = x0 ] ; then
 return 0
 else
 return 1
 fi
 }

 start_puppet_master() {
 if is_true $START ; then
 if [ $SERVERTYPE = mongrel ]
 then
 DAEMON_OPTS=$DAEMON_OPTS --servertype=mongrel
 NUMSTART=0
 STARTPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 start-stop-daemon --start --quiet
 --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid \
 --startas $DAEMON -- $NAME $DAEMON_OPTS
 --masterport=$STARTPORT
 --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid
 STARTPORT=$(($STARTPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 start-stop-daemon --start --quiet --pidfile
 /var/run/puppet/${NAME}.pid \
 --startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$PORT
 fi
 else
 echo 
 echo puppetmaster not configured to start, please edit
 /etc/default/puppetmaster to enable
 fi
 }

 stop_puppet_master() {
 if [ $SERVERTYPE = mongrel ]
 then
 NUMSTART=0
 STOPPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 start-stop-daemon --stop --quiet --oknodo --pidfile
 /var/run/puppet/${NAME}-${STOPPORT}.pid
 rm -f /var/run/puppet/${NAME}-${STOPPORT}.pid
 STOPPORT=$(($STOPPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 start-stop-daemon --stop --quiet --oknodo --pidfile
 /var/run/puppet/${NAME}.pid
 fi
 }

 status_puppet_master() {
 if is_true $START ; then
 if [ $SERVERTYPE = mongrel ]
 then
 NUMSTART=0
 STARTPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 status_of_proc -p /var/run/puppet/${NAME}-${STARTPORT}.pid \
 ${DAEMON} ${NAME}-${STARTPORT}
 STARTPORT=$(($STARTPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 status_of_proc -p /var/run/puppet/${NAME}.pid
 ${DAEMON} ${NAME}
 fi
 else
 echo 
 echo puppetmaster not configured to start
 fi
 }

 case $1 in
 start)
 log_begin_msg Starting $DESC
 start_puppet_master
 log_end_msg $?
 ;;
 stop)
 log_begin_msg Stopping $DESC
 stop_puppet_master
 log_end_msg $?
 ;;
 reload)
 # Do nothing, as Puppetmaster rechecks its config automatically
 ;;
 status)
 status_puppet_master
 ;;
 restart|force-reload)
 log_begin_msg Restarting $DESC
 stop_puppet_master
 sleep 1
 start_puppet_master
 log_end_msg $?
 ;;
 *)
 echo Usage: $0 {start|stop|status|restart|force-reload} 2
 exit 1
 ;;
 esac


 2012/7/18 Jan j...@agetty.de:
 Hi,

 On 07/18/2012 03:55 PM Javi wrote:
 Add:

 [main]
 ...
 user myuser

 And:

 [main]
 ...
 user myuser

 sudo /etc/init.d/pupettmaster restart

 But no luck. Any idea?

 which distribution you're running on? The user might be set by the init
 script by passing the necessary parameters directly to the process and
 AFAIK those parameters always take precedence for those specified within
 /etc/puppet/puppet.conf ..

 Kill the process and try starting it directly:

 8
 # sudo /etc/init.d/pupettmaster stop;
 # sudo su -;
 # puppetmasterd --config=/etc/puppet.conf;
 # ps aux | grep 'puppet';
 

Re: [Puppet Users] [RESOLVED] Start puppet with a non root user different than default 'puppet'

2012-07-20 Thread Javi Legido
Correction: below actions are needed:

/etc/puppet/puppet.conf

[main]
...
user=my_user

/etc/init.d/puppetmaster

...
chown my_user:my_user /var/run/puppet

Cheers


2012/7/20 Javi Legido j...@legido.com:
 Fixed changing below line:

 chown my_user:my_user /var/run/puppet

 Regards

 2012/7/20 Javi Legido j...@legido.com:
 Thanks for reply, but your fix didn't worked.

 I use debian, and below packages versions:

 ii  puppet  2.6.2-5+squeeze5
 Centralized configuration management - agent startup and compatibility
 scripts
 ii  puppet-common   2.6.2-5+squeeze5
 Centralized configuration management
 ii  puppetmaster2.6.2-5+squeeze5
 Centralized configuration management - master startup and
 compatibility scripts

 Do you know how to pass the user as a parameter to the puppet script?

 Below content of the /etc/init.d/puppetmaster script:

 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:  puppetmaster
 # Required-Start:$network $named $remote_fs $syslog
 # Required-Stop: $network $named $remote_fs $syslog
 # Default-Start: 2 3 4 5
 # Default-Stop:  0 1 6
 ### END INIT INFO

 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 DAEMON=/usr/bin/puppet
 DAEMON_OPTS=
 NAME=master
 DESC=puppet master

 test -x $DAEMON || exit 0

 [ -r /etc/default/puppetmaster ]  . /etc/default/puppetmaster

 . /lib/lsb/init-functions

 if [ ! -d /var/run/puppet ]; then
 mkdir -p /var/run/puppet
 fi

 chown puppet:puppet /var/run/puppet

 is_true() {
 if [ x$1 = xtrue -o x$1 = xyes -o x$1 = x0 ] ; then
 return 0
 else
 return 1
 fi
 }

 start_puppet_master() {
 if is_true $START ; then
 if [ $SERVERTYPE = mongrel ]
 then
 DAEMON_OPTS=$DAEMON_OPTS --servertype=mongrel
 NUMSTART=0
 STARTPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 start-stop-daemon --start --quiet
 --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid \
 --startas $DAEMON -- $NAME $DAEMON_OPTS
 --masterport=$STARTPORT
 --pidfile=/var/run/puppet/${NAME}-${STARTPORT}.pid
 STARTPORT=$(($STARTPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 start-stop-daemon --start --quiet --pidfile
 /var/run/puppet/${NAME}.pid \
 --startas $DAEMON -- $NAME $DAEMON_OPTS --masterport=$PORT
 fi
 else
 echo 
 echo puppetmaster not configured to start, please edit
 /etc/default/puppetmaster to enable
 fi
 }

 stop_puppet_master() {
 if [ $SERVERTYPE = mongrel ]
 then
 NUMSTART=0
 STOPPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 start-stop-daemon --stop --quiet --oknodo --pidfile
 /var/run/puppet/${NAME}-${STOPPORT}.pid
 rm -f /var/run/puppet/${NAME}-${STOPPORT}.pid
 STOPPORT=$(($STOPPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 start-stop-daemon --stop --quiet --oknodo --pidfile
 /var/run/puppet/${NAME}.pid
 fi
 }

 status_puppet_master() {
 if is_true $START ; then
 if [ $SERVERTYPE = mongrel ]
 then
 NUMSTART=0
 STARTPORT=$PORT
 while [ $NUMSTART -lt $PUPPETMASTERS ]; do
 status_of_proc -p /var/run/puppet/${NAME}-${STARTPORT}.pid 
 \
 ${DAEMON} ${NAME}-${STARTPORT}
 STARTPORT=$(($STARTPORT + 1))
 NUMSTART=$(($NUMSTART + 1))
 done
 else
 status_of_proc -p /var/run/puppet/${NAME}.pid
 ${DAEMON} ${NAME}
 fi
 else
 echo 
 echo puppetmaster not configured to start
 fi
 }

 case $1 in
 start)
 log_begin_msg Starting $DESC
 start_puppet_master
 log_end_msg $?
 ;;
 stop)
 log_begin_msg Stopping $DESC
 stop_puppet_master
 log_end_msg $?
 ;;
 reload)
 # Do nothing, as Puppetmaster rechecks its config automatically
 ;;
 status)
 status_puppet_master
 ;;
 restart|force-reload)
 log_begin_msg Restarting $DESC
 stop_puppet_master
 sleep 1
 start_puppet_master
 log_end_msg $?
 ;;
 *)
 echo Usage: $0 {start|stop|status|restart|force-reload} 2
 exit 1
 ;;
 esac


 2012/7/18 Jan j...@agetty.de:
 Hi,

 On 07/18/2012 03:55 PM Javi wrote:
 Add:

 [main]
 ...
 user myuser

 And:

 [main]
 ...
 user myuser

 sudo /etc/init.d/pupettmaster restart

 But no luck. Any idea?

 which distribution you're running on? The user might be set by the init
 script by passing the necessary parameters directly to the process and
 AFAIK those parameters always take precedence for those specified within
 /etc/puppet/puppet.conf ..

 Kill the process and try starting it 

[Puppet Users] Re: Overriding parametrised class parameter

2012-07-20 Thread Fred Gansevles


Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik





-- 
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/-/W3UucsSZ49oJ.
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: Overriding parametrised class parameter

2012-07-20 Thread Fred Gansevles
Hi,

I had the same problem, i.e. overriding parameters with (seemingly) no 
effect

After some digging, I found that the parameters *are* set, since the 
changes are reflected in the compiled catalog
but the Puppet::Parser::Scope::lookupvar method *didn't look in the right 
place*. 

I've made a patch that makes lookupvar take resource parameters into account

In my case, everything else kept working but I don't know if this patch 
affects other pars of puppet

Maybe others are also interested in this patch (puppetlabs?) 

It is against puppet-2.7.16 and patches puppet/parser/scope.rb

Fred.

Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik




Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik




Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik




Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik




Op woensdag 18 juli 2012 15:32:10 UTC+2 schreef Rik Theys het volgende:

 Hi,

 I have a parametrised class to manage /etc/security/access.conf that 
 accepts an entries parameter.
 I've included this class in a generic node definition:

 node common-node {
   class{'pam_access':
 entries = [+ : ALL : ALL],
   }
 }

 My real nodes inherit this node definition:

 node 'test01' inherits common-node {
 }

 How can I override this class parameter in the test01 node? I've tried 
 setting

 Class['pam_access'] {
   entries = [- : idiot : ALL ],
 }

 But it doesn't seem to have any effect. The initial settings remain active 
 and no error is logged.

 How can I do this type of change with parametrised classes?

 Regards,

 Rik





-- 
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/-/IwD3r_jbYp8J.
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.



Re: [Puppet Users] See puppet output in stdout when running --no-daemonize inside a bash script

2012-07-20 Thread Felix Frank
On 07/19/2012 03:46 AM, Sam Simmons wrote:
 Ah ha! The problem was --autosign
 http://docs.puppetlabs.com/references/latest/configuration.html#autosign
 is a bit more than just a boolean arg so you have to explicitly say true
 or false.
 
 #!/bin/bash
 puppet master --mkusers --autosign true --verbose --no-daemonize
 
 Using the args I had originally causes it to appear to hang, but you can
 still get catalogs from it with an agent so it actually just oddly
 silences output.

insert obvious exclamation about not using autosign ever here ;-)

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] `require': cannot load such file -- puppet/util/command_line (LoadError)

2012-07-20 Thread Felix Frank
Hi,

On 07/19/2012 04:01 AM, ColinDNZ wrote:
 # puppet --version
 /usr/local/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
 cannot load such file -- puppet/util/command_line (LoadError)
 from
 /usr/local/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
 from /usr/bin/puppet:3:in `main'
 
 don't know what (or how I've stuffed up)
 but I cannot find the puppet/application dir anywhere
 tried zypper remove puppet (  puppet-server)
 and reinstalling,
 but still produces same error

hmm, I'm neither really familiar with opensuse nor am I very
knowledgeable about ruby, but it strikes me as odd that
custom_require.rb is being used from a rubygems location, even though
puppet is not installed as a gem but via zypper instead.

Make sure there are no gem issues with your ruby installation.

If this does not help, I'd scrutinize environment variables that pertain
to ruby, such as RUBYLIB. Try the manpages and look through the various
lib locations in your system.

HTH,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] auto generate client certificates for deployment installation solution

2012-07-20 Thread Felix Frank
Hi,

On 07/19/2012 05:07 PM, Laurence Lenberg wrote:
 I'm looking for a solution which manages generation and installation of
 client certificates. This is required we have a lot of re-installations,
 so we want to reuse already in place certificates. For security it is
 sufficient that the host to be part of our-domain.com
 
 The solution that comes closest to this requirement is this
 http://www.google.de/url?sa=trct=jq=esrc=ssource=webcd=1ved=0CFcQFjAAurl=http%3A%2F%2Fpuppet-manifest-share.googlecode.com%2Ffiles%2Fpuppet_certificate.pdfei=th4IUK__FMTZtAaxqdSYAwusg=AFQjCNFinQKIAjCpcpltaq1ST01rjYb3xA
 http://www.google.de/url?sa=trct=jq=esrc=ssource=webcd=1ved=0CFcQFjAAurl=http%3A%2F%2Fpuppet-manifest-share.googlecode.com%2Ffiles%2Fpuppet_certificate.pdfei=th4IUK__FMTZtAaxqdSYAwusg=AFQjCNFinQKIAjCpcpltaq1ST01rjYb3xA
 by http://code.google.com/u/huangmingyou/
 but I haven't heard of anyone using it. Has anyone tried this out yet or
 has a similar setup or solution? Are the scripts gen_cert_tgz.sh and
 gen_agent_cert.sh described in the document available for download
 somewhere else?

Does not compute. A quick glance at the linked document suggests it's a
description of the normal way puppet certificates are handled. Please
point out what you perceive as a possible solution to your problem.

Reusing certificates is no problem, provided you set up an
infrastrucutre that
- stores certificates
- includes those certificates to your machines during provisioning
I.e., during re-installation of the OS, the signed cert is transferred
to the machine somehow.

If you manage to do that in a secure manner, you should be all set.

HTH,
Felix

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] Digest for puppet-users@googlegroups.com - 25 Messages in 12 Topics

2012-07-20 Thread Felix Frank
On 07/19/2012 07:09 PM, Dan Stranathan wrote:
 Unsubscribe
...
 To unsubscribe from this group, send email to
 puppet-users+unsubscr...@googlegroups.com.

No twinkie!

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: plusignment syntax?

2012-07-20 Thread jcbollinger


On Friday, July 20, 2012 2:58:15 AM UTC-5, Brett Maton wrote:


 I'm trying to add elements to an array with the plusingment operator.
 However the following results in 

 err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
 Syntax error at '+'; expected '}' at 
 /etc/puppet/modules/php/manifests/params.pp:17

 (This isn't a question of whether or not php53 will be happy with 
 php-pecl-memcache, its about extending arrays).

 class php::params {
   case $osmajor {
 '5': {
 $phpService = 'php53'
 $phpModules = [
 'php-pecl-memcache',
   ]
   }
 default: {
 $phpService = 'php'
 $phpModules = [
 'php-pecl-memcached',
   ]
   }
   }
   $phpVersion = 'latest'
   $phpModules + [ ${phpService}-mysql,
${phpService}-xml,
${phpService}-mbstring,
${phpService}-cli,
${phpService}-gd,
${phpService}-soap,
  ]
 }


You can never, under any circumstances, by any means, change the value of a 
Puppet variable once it is set.  This is a Puppet invariant.

The plussignment operator gives the *illusion* of appending to an array 
variable that belongs to a different scope, but would normally be visible 
in the current scope as a result of dynamic scoping.  It is best to think 
of it as creating a new variable of the same name in the current scope, 
with a value derived from the original one's as directed by the 
plussignment.

Plussignment cannot be applied to a variable that has already been declared 
in the current scope, either directly or by a different plussignment, on 
account of the prohibition against changing existing variables' values.

Also, be aware that scoping in Puppet does not follow the same rules as it 
does in many programming languages.  Most blocks (delimited in Puppet by 
curly braces, {}) do not establish new scopes.  Aside from the global 
scope, only class bodies, definition bodies, and node declarations 
establish new scopes.

Because plussignment is inherently connected to dynamic scoping, and 
dynamic scoping is deprecated, it would be best to find a different way to 
do what you're trying to do.


John

-- 
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/-/dEjkXBituqIJ.
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: problem with dashboard

2012-07-20 Thread llow...@oreillyauto.com

I ran into this too.

'sudo gem install rdoc' should clear things up for you.


On Thursday, July 19, 2012 11:06:35 PM UTC-5, 刘亚丹 wrote:

 Hi:

  When I start the dashboard server,but all ways failed . Someone 
 can help me ?

  

  #sudo -u puppet-dashboard ./script/server -e production

  Missing these required gems:

rack  = 0

  

 You're running:

ruby 1.8.7.174 at /usr/bin/ruby1.8

rubygems 1.8.24 at /usr/lib/ruby/gems/1.8, /root/.gem/ruby/1.8

  

 Run `rake gems:install` to install the missing gems.

  

  

  And now,I EXECUTE “rake gems:install”,

  # rake gems:install

 rake aborted!

 no such file to load -- rdoc/task

 /data/puppet-dashboard/Rakefile:9

 (See full trace by running task with --trace)

  

 root@puppet:/data/puppet-dashboard# more /data/puppet-dashboard/Rakefile

 # Add your own tasks in files placed in lib/tasks ending in .rake,

 # for example lib/tasks/capistrano.rake, and they will automatically be 
 available to Rake.

  

 require(File.join(File.dirname(__FILE__), 'config', 'boot'))

 require 'thread'

  

 require 'rake'

 require 'rake/testtask'

 require 'rdoc/task'

  

 require 'tasks/rails'

  

   

 How can I do?

  

  

  


-- 
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/-/7QAQWBa_0DoJ.
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.



Re: [Puppet Users] Remote site puppet infrastructure

2012-07-20 Thread Jake - USPS
Ohad,

Thanks very much for the reply.  Functionally we do not use storeconfigs 
(no exported resources).  We just like having all of the facts available to 
query/search against (CMDBish).  I guess since we use Foreman this means we 
really don't need to use storeconfigs to do what we want, but can instead 
push facts from our PMs to our Foreman DB which I see now after reading 
some more from the Foreman FAQ.

Thanks!
Jake

-- 
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/-/SnJV2MG0r_0J.
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] hiera and dynamic variables

2012-07-20 Thread asq
hi, 

we're currently evaluating hiera to get rid of hordes of global variables 
and prepare our manifests for next iteration of puppet.
now, we have some variables, used by classes, which set properties based on 
facts, ie. we set approperiate interface address which should be used on 
monitoring server, ie:

$nagiosip = $ipaddress_bond0_1234

now, we can convert it to:

class { nagios::host: ip = $ipaddress_bond0_1234 }

but... we'll need to include this on every single node (now we use node 
inheritance and just set $nagiosip on top node level for group of hosts 
that share the same vlan). 

is it possible to achieve the same thing with hiera (then we could just set 
default parameter of nagios::host class to hiera)? we're currently 
evaluating yaml backend, puppet backend is not as easy to understand to me 
and i'm not sure if we can mix both (ie. define separate calling_modules 
and search hierarchies for both).


-- 
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/-/IhWZNvwQQNgJ.
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.



Re: [Puppet Users] See puppet output in stdout when running --no-daemonize inside a bash script

2012-07-20 Thread Sam Simmons
Ya ya.

I'm just running it on my home net to init master (--mkusers) and my server 
(--autosign). Then run master normally after that. Removes a step.

On Friday, July 20, 2012 7:05:13 AM UTC-5, Felix.Frank wrote:

 On 07/19/2012 03:46 AM, Sam Simmons wrote: 
  Ah ha! The problem was --autosign 
  
 http://docs.puppetlabs.com/references/latest/configuration.html#autosign 
  is a bit more than just a boolean arg so you have to explicitly say true 
  or false. 
  
  #!/bin/bash 
  puppet master --mkusers --autosign true --verbose --no-daemonize 
  
  Using the args I had originally causes it to appear to hang, but you can 
  still get catalogs from it with an agent so it actually just oddly 
  silences output. 

 insert obvious exclamation about not using autosign ever here ;-) 


-- 
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/-/BQOEplVjSXQJ.
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.



Re: [Puppet Users] Hierachy for facts?

2012-07-20 Thread Zak Estrada
Thanks for the reply, it really helps to know that I'm not missing
something. I'm doing this mostly in a custom type, so something like
Facter[custom_hw_localstorage_ctrl_#{ctrlid}_array_#{arrayid}_raid].value
does the trick. I'm imagining if I needed to do this at the manifest
level the ruby DSL would help, but I haven't tested it.

On Fri, Jul 20, 2012 at 3:37 AM, Felix Frank wrote:
 Hi,

 On 07/16/2012 03:53 PM, ZJE wrote:
 For example, if I'm collecting infromation about the raid array, it
 would be something like this:
 ---
 custom_hw_localstorage_ctrl_0_array_0_raid = 1
 custom_hw_localstorage_ctrl_0_array_1_raid = 5
 ---

 Where the implied hierachy is something like:
 custom
   hw
 localstorage
   ctrl
 0: array
 0: raid = 1
 1: raid = 5

 I believe that within the facter paradigm, this structure is as good as any.

 As far as I know, facter is supposed to support structured data such as
 arrays and hashes as fact values, but currently your workaround is
 probably the next best thing.

 Of course, accessing those dynamically will be quite an excercise, and
 probably not possible from the puppet DSL without resorting to inline
 templates.

 Cheers,
 Felix

 --
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 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.


-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] problems with puppetdb

2012-07-20 Thread Chris Price
OK, yes, the most important bit from that log output is this:

SelectChannelConnector@localhost:8080

If you hit port 8080 with a browser and/or via telnet, it should be open. 
 Ideally there should also be some output about opening port 8081 for SSL 
connections, but it's entirely possible that the packaging issues that you 
brought to our attention are the reason that that did not get configured 
properly.  We can dig into your jetty.ini file to investigate that if 
needed.

As for the netstat output: what arguments are you calling it with?  On my 
system, I get (filtered down to the relevant bits):

cprice@localhost ~/work/puppetdb $ netstat -ntpl
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State   
PID/Program name 
tcp6   0  0 127.0.0.1:8080  :::*LISTEN 
 24802/java  
tcp6   0  0 192.168.101.134:8081:::*LISTEN 
 24802/java  

So, I can see port 8080 and 8081 open.  It's possible that there may be a 
few additional IPv4/tcp ports open that are owned by java processes--these 
could perhaps be attributed to ActiveMQ or our embedded database.  Would 
love to see how this output matches up with yours.

Thanks
Chris


On Thursday, July 19, 2012 8:15:37 PM UTC-7, Pete wrote:

 On 20 July 2012 11:20, Chris Price ch...@puppetlabs.com wrote: 
  Hello Pete, 
  
  Do you have a reliable way to reproduce the port issue that you 
 mentioned? 
  We'd like to troubleshoot it further but haven't found any way to 
 reproduce 
  it on our end yet. 
  
  If you're not getting log output in /var/log/puppetdb, can you please 
 try 
  the following?: 
  
  1. Edit the file /etc/puppetdb/conf.d/config.ini, and comment out the 
  logging-config line. 
  2. Run this command: 
  
  java -jar /usr/share/puppetdb/puppetdb.jar services -c 
 /etc/puppetdb/conf.d 

 I tried that but only got INFO level logging 
 I edited the log4j.properties file and turned on debug level console 
 logging and got this output 


 root@korolev:~# java -jar /usr/share/puppetdb/puppetdb.jar services -c 
 /etc/puppetdb/conf.ini 
 2012-07-20 13:03:40,982 INFO  [puppetlabs.jetty] Removing buggy 
 security provider SunPKCS11-NSS version 1.7 
 2012-07-20 13:03:46,916 INFO  [cli.services] PuppetDB version 0.9.2 
 2012-07-20 13:03:48,490 INFO  [cli.services] Starting broker 
 2012-07-20 13:03:51,892 INFO  [cli.services] Starting 2 command 
 processor threads 
 2012-07-20 13:03:51,896 INFO  [cli.services] Starting query server 
 2012-07-20 13:03:51,897 INFO  [cli.services] Starting database 
 compactor (60 minute interval) 
 2012-07-20 13:03:52,015 INFO  [cli.services] Beginning database compaction 
 org.eclipse.jetty.ssl.password : 2012-07-20 13:03:52,420 INFO 
 [cli.services] Finished database compaction 
 ^C2012-07-20 13:08:27,976 INFO  [cli.services] Shutdown request 
 received; puppetdb exiting. 
 root@korolev:~# java -jar /usr/share/puppetdb/puppetdb.jar services -c 
 /etc/puppetdb/conf.ini 
 2012-07-20 13:08:44,944 INFO  [puppetlabs.jetty] Removing buggy 
 security provider SunPKCS11-NSS version 1.7 
 2012-07-20 13:08:50,008 INFO  [main] [cli.services] PuppetDB version 0.9.2 
 2012-07-20 13:08:50,008 DEBUG [main] [bonecp.BoneCPDataSource] JDBC 
 URL = jdbc:postgresql://127.0.0.1:5432/puppetdb, Username = puppet, 
 partitions = 5, max (per partition) = 10, min (per partition) = 1, 
 helper threads = 3, idle max age = 60 min, idle test period = 240 min 
 2012-07-20 13:08:50,348 INFO  [main] [cli.services] Starting broker 
 2012-07-20 13:08:54,677 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:54,744 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:54,748 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:54,748 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:54,748 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:54,757 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:55,652 INFO  [main] [journal.Journal] ignoring zero 
 length, partially initialised journal data file: db-1.log number = 1 , 
 length = 0 
 2012-07-20 13:08:56,247 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:56,247 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:56,250 DEBUG [main] [index.BTreeIndex] loading 
 2012-07-20 13:08:56,310 INFO  [main] [cli.services] Starting 2 command 
 processor threads 
 2012-07-20 13:08:56,315 INFO  [main] [cli.services] Starting query server 
 2012-07-20 13:08:56,316 INFO  [main] [cli.services] Starting database 
 compactor (60 minute interval) 
 2012-07-20 13:08:56,351 INFO  [clojure-agent-send-off-pool-3] 
 [cli.services] Beginning database compaction 
 2012-07-20 13:08:56,372 DEBUG [clojure-agent-send-off-pool-2] 
 [component.Container] Container 
 org.eclipse.jetty.server.Server@3c716932 + 

[Puppet Users] rspec-puppet and create_resources

2012-07-20 Thread Mark Roggenkamp
Using rspec-puppet should I be able to check for resources created as a 
result of a create_resources call within a class?

Regards,
Mark

-- 
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/-/bUD_CitDYCAJ.
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: puppet-spec-helper / rspec and hiera

2012-07-20 Thread llow...@oreillyauto.com


On Thursday, July 19, 2012 5:09:30 PM UTC-5, Bill O'Neill wrote:

 I ran into the same issue. The workaround is to checkout the v0.3.0 tag of 
 hiera-puppet. 

 Since I couldn't figure out a way to do it via the .fixtures.yml file I 
 created a new rake task in Rakefile:

 desc Checkout the correct tag release of hiera
 task :spec_prep_hiera do
 Rake::Task[:spec_prep].invoke
 system(cd spec/fixtures/modules/hiera-puppet  git checkout v0.3.0)
 end


I tried this, and I am getting the same error as before.
 


 On Thursday, July 19, 2012 1:43:22 PM UTC-4, llo...@oreillyauto.com wrote:

 I am trying to write some rspec tests for my modules. Most of them now 
 use hiera.

 I have a .fixures.yml:


 ---

 fixtures:
   repositories:
 stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
 hiera-puppet: https://github.com/puppetlabs/hiera-puppet.git
   symlinks:
 mongodb: #{source_dir}


 ---

 and a spec/classes/mongodb_spec.rb:


 ---

 require 'spec_helper'

 describe 'mongodb', :type = 'class' do

   context On an Ubuntu install, admin and single user do
 let :facts do
   {
 :osfamily = 'Debian',
 :operatingsystem = 'Ubuntu',
 :operatingsystemrelease = '12.04'
   }
 end

 it {
   should contain_user('').with( { 'uid' = '***' } )
   should contain_group('').with( { 'gid' = '***' } )
   should contain_package('mongodb').with( { 'name' = 'mongodb' } )
   should contain_service('mongodb').with( { 'name' = 'mongodb' } )
 }
   end
 end

 ---
  


 but when I run the spec test, I get:


 ---

 # rake spec
 /usr/bin/ruby1.8 -S rspec spec/classes/mongodb_spec.rb --color
 F

 Failures:

   1) mongodb On an Ubuntu install, admin and single user
  Failure/Error: should contain_user('').with( { 'uid' = '***' } )
  LoadError:
no such file to load -- hiera_puppet
  # 
 ./spec/fixtures/modules/hiera-puppet/lib/puppet/parser/functions/hiera.rb:3:in
  
 `function_hiera'
  # ./spec/classes/mongodb_spec.rb:15

 Finished in 0.05415 seconds
 1 example, 1 failure

 Failed examples:

 rspec ./spec/classes/mongodb_spec.rb:14 # mongodb On an Ubuntu install, 
 admin and single user
 rake aborted!
 /usr/bin/ruby1.8 -S rspec spec/classes/mongodb_spec.rb --color failed

 Tasks: TOP = spec_standalone
 (See full trace by running task with --trace)

 ---

 What did I do wrong? Most of my modules use hiera now, or soon will, so 
 gettng this figured out whould realyl help.

 I am using Ubuntu 12.04 LTS, puppet 2.7.17 and hiera 0.3.0.



-- 
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/-/lZt3qBrmgCUJ.
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] Lookup another node's hiera data - fqdn hierarchy

2012-07-20 Thread treydock
I've begun using Hiera in combination with Foreman, primarily storing data 
that is best left in Array/Hash form.  I'd like to be able to have a 
module, in this case BackupPC, query all the Hiera data for each node where 
the backup directories/databases are stored.  Then use all that information 
on the BackupPC server to generate proper configuration files for each 
node's backups.  Here's what I have so far...

$ cat /etc/puppet/hiera.yaml 
---
:hierarchy:
  - %{fqdn}
  - common
:backends:
  - yaml
  - puppet
:yaml:
  :datadir: '/etc/puppet/hieradata'
:puppet:
  :datasource: data


An example of the BackupPC information in hiera
$ cat /etc/puppet/hieradata/dc-ctrl.tamu.edu.yaml 
---
backuppc_db_dumps:
  foreman:
backup_dir: '/usr/share/foreman'
  mysql:
backup_dir: '/etc'

I am currently using that data to create dump scripts on each node, and 
would like to re-use the same information to automatically configure the 
backup server to grab those locations.

This attempt may work, but it doesn't 'feel' right to me by overriding the 
fqdn fact.

/etc/puppet/modules/test  $ cat manifests/hiera_lookup.pp 
class test::hiera_lookup {
  $nodes = foreman('fact_values', 'fact = fqdn')

  if $nodes {
create_resources('test::hiera_lookup::get_data', $nodes)
  }
}

define test::hiera_lookup::get_data (
  $fqdn
) {

 $data = hiera(backuppc_db_dumps, false)

  if $data { notify { $data: } }

}

Is there a better approach to override scope and grab what data from hiera 
that would normally not be available to a node?

Thanks
- Trey

-- 
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/-/KPHH_bR-4wsJ.
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.



Re: [Puppet Users] rspec-puppet and create_resources

2012-07-20 Thread Jeff McCune
On Fri, Jul 20, 2012 at 9:31 AM, Mark Roggenkamp
mark.roggenk...@gmail.comwrote:

 Using rspec-puppet should I be able to check for resources created as a
 result of a create_resources call within a class?


Yes, any resource in the catalog should work with rspec-puppet.

-Jeff

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] What is the intention of thin_storeconfigs?

2012-07-20 Thread Daniel Pittman
On Fri, Jul 13, 2012 at 2:08 AM, Brice Figureau
brice-pup...@daysofwonder.com wrote:
 On 12/07/12 10:29, Bernd Adamowicz wrote:
 I started doing some experiments with the configuration option
 'thin_storeconfigs=true' by adding this option to one of my Puppet
 masters. However, I could not determine any change in behavior.

 As others already have explained, with thin_storeconfigs, only exported
 resources, facts and nodes are persisted to the DB. With regular (thick)
 storeconfigs every resources are persisted to the database.

...and to follow up on this late: when you use PuppetDB, not only is
performance better than full storeconfigs, it is usually better than
thin storeconfigs.  PuppetDB delivers this *without* giving up any
information.

I can't recommend strongly enough that you look to PuppetDB before you
look to thin storeconfigs in production.

-- 
Daniel Pittman
⎋ Puppet Labs Developer – http://puppetlabs.com
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: Can't create pdf from puppet doc

2012-07-20 Thread Giovanni Torres
I installed puppetd/puppetmasterd on an OpenBSD laptop and tried the same 
command:

sudo puppet doc -m pdf -r configuration

...and I get a little further with a different error:

creating pdf
/tmp/puppetdoc.txt:1198: (ERROR/3) Unknown target name: confdir

The puppetdoc.txt file that gets generated in /tmp before actually creating 
the pdf has this near line 1198:

### vardir

Where Puppet stores dynamic and growing data.  The default for this 
parameter 
is calculated specially, like `confdir`_.

- *Default*: /var/puppet



Why is it so hard just to convert to pdf?  I tried on CentOS 6 and OpenBSD 
5.1 ... no dice.  Is it just me? Am I missing some external package that is 
causing this error?  It had previously complained about not finding the 
rst2latex command, but I got past that error by downloading the docutils 
package.

Anyone getting this to work without issue on CentOS 6 or OpenBSD 5.1?




On Monday, July 16, 2012 11:30:25 AM UTC-4, llo...@oreillyauto.com wrote:



 On Monday, July 16, 2012 9:50:54 AM UTC-5, Giovanni Torres wrote:

 I'm trying to use puppet doc to create a pdf version of my modules. 
  According to the help file, `puppet doc -m pdf -r configuration` is the 
 syntax to accomplish this.  However, I keep getting this error:

 creating pdf
 Could not run: wrong number of arguments (1 for 2)


 I've been having this same problem, and have previously asked for help on 
 this list to no avail.

 If you do find a solution, please share, as it would be much appreciated.
  

 I search elsewhere on the web for others having a similar issue with pdf 
 generation, but no real luck finding a solution.

 I am running CentOS 6 with
 ruby-1.8.7
 puppet-server-2.7.18

 Is this a bug?  I did not find a bug describing this issue in the Issues 
 section of the Puppet website.

 Is there a --verbose or --debug that I could use with `puppet doc`?



-- 
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/-/3tYVmDNZng4J.
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.



Re: [Puppet Users] stdlib empty() function not working?

2012-07-20 Thread Dave Lloyd
Success!  I've figured out what happened! It looks like not just custom
functions disappeared, but also functions that are part of puppet
disappeared (like split()). In fact, it looks like anything that was loaded
into puppet via Puppet::Parser::Functions had disappeared (not knowing much
about Puppet internals, I'm guessing that there's a table or hash that the
functions are stored in, or they're added as methods).

One of the modules I use is ghoneycutt's puppet-xinetd module:
https://github.com/ghoneycutt/puppet-xinetd . This module includes spec
test files. Once I removed the spec directory and restarted the puppet
master, all was well.

I expect that the real issue here is that all of Puppet's internal
functions got whacked because of bad tests in the spec direcotry in
puppet-xinetd. The error messge, while technically true, didn't do much to
point me in the right direction. Is there a way that Puppet can test
whether or not expected functions are present, refuse to start if they are
not, and log a more informative error?

--dlloyd



On Wed, Jul 18, 2012 at 4:17 PM, Dave Lloyd d...@davelloyd.com wrote:

 Nan:

 Since my test module worked and copying and pasting would be at best
 cumbersome, I've just created a github project with my module:
 https://github.com/ibikestl/puppet-netif

 Examples should be in the tests.

 Thanks again for your help on this,

 --dlloyd




-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: Can't create pdf from puppet doc

2012-07-20 Thread Nick Fagerlund
Here's your problem: puppet doc is actually TWO tools, both of which have 
major problems right now. You're mixing up invocations of the two. Which is 
a perfectly reasonable mistake and not really your fault. Anyway, the 
upshot is that you CAN'T generate PDFs from your module documentation. The 
tool just has never been able to do that. 

Puppet doc's two uses are: 

* Module docs, for use by Puppet users -- extracts rdoc strings from 
comments and metadata about your classes and defined types, and builds an 
rdoc-style website. Can ONLY build a website. That's all it does. 

* Puppet reference generation, for use by Puppet Labs employees -- extracts 
Markdown fragments from the Puppet code around config settings (that's the 
command y'all were trying to use), types and providers, functions, and some 
more esoteric stuff like indirections.  Can build larger Markdown documents 
and I guess it maybe used to be able to build a PDF, but if so it's been 
super-busted for a WHILE, since it seems to be expecting RST input and we 
switched to Markdown fragments before I even joined the company. 

Obviously these are completely unrelated, and having them mixed in the same 
tool is dumb. We need to separate them. 

Anyway, back to the point: I recommend that you start a new thread on this 
group talking about what you and your people need in terms of module 
documentation formats. Ryan Coleman, the product owner for modules and the 
Puppet Forge, is the person who will be figuring out our requirements for 
that tool going forward, and I think he's already been doing some thinking 
about it, but he could use your input and real-life use cases. What makes a 
PDF of module docs a good fit for your site? What else could fit those 
needs? Do you want to be able to write your comments in something other 
than Rdoc format? That kind of thing. 

Sorry for the downer, and for the confusing nature of the tool!

N
Puppet Labs docs team

On Friday, July 20, 2012 12:45:05 PM UTC-7, Giovanni Torres wrote:

 I installed puppetd/puppetmasterd on an OpenBSD laptop and tried the same 
 command:

 sudo puppet doc -m pdf -r configuration

 ...and I get a little further with a different error:

 creating pdf
 /tmp/puppetdoc.txt:1198: (ERROR/3) Unknown target name: confdir

 The puppetdoc.txt file that gets generated in /tmp before actually 
 creating the pdf has this near line 1198:

 ### vardir

 Where Puppet stores dynamic and growing data.  The default for this 
 parameter 
 is calculated specially, like `confdir`_.

 - *Default*: /var/puppet



 Why is it so hard just to convert to pdf?  I tried on CentOS 6 and OpenBSD 
 5.1 ... no dice.  Is it just me? Am I missing some external package that is 
 causing this error?  It had previously complained about not finding the 
 rst2latex command, but I got past that error by downloading the docutils 
 package.

 Anyone getting this to work without issue on CentOS 6 or OpenBSD 5.1?




 On Monday, July 16, 2012 11:30:25 AM UTC-4, llo...@oreillyauto.com wrote:



 On Monday, July 16, 2012 9:50:54 AM UTC-5, Giovanni Torres wrote:

 I'm trying to use puppet doc to create a pdf version of my modules. 
  According to the help file, `puppet doc -m pdf -r configuration` is the 
 syntax to accomplish this.  However, I keep getting this error:

 creating pdf
 Could not run: wrong number of arguments (1 for 2)


 I've been having this same problem, and have previously asked for help on 
 this list to no avail.

 If you do find a solution, please share, as it would be much appreciated.
  

 I search elsewhere on the web for others having a similar issue with pdf 
 generation, but no real luck finding a solution.

 I am running CentOS 6 with
 ruby-1.8.7
 puppet-server-2.7.18

 Is this a bug?  I did not find a bug describing this issue in the Issues 
 section of the Puppet website.

 Is there a --verbose or --debug that I could use with `puppet doc`?



-- 
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/-/PscduxVfpwcJ.
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.



Re: [Puppet Users] Re: Can't create pdf from puppet doc

2012-07-20 Thread Ryan Coleman
On Fri, Jul 20, 2012 at 2:25 PM, Nick Fagerlund
nick.fagerl...@puppetlabs.com wrote:
 Anyway, back to the point: I recommend that you start a new thread on this
 group talking about what you and your people need in terms of module
 documentation formats. Ryan Coleman, the product owner for modules and the
 Puppet Forge, is the person who will be figuring out our requirements for
 that tool going forward, and I think he's already been doing some thinking
 about it, but he could use your input and real-life use cases.

Yep, thanks Nick!

I have indeed been thinking about this tool a lot lately and will be
getting some improvements to it into the pipeline soon. To that end,
I'd absolutely to hear more about what you want to achieve. Nevermind
what the tool does today.. what did you want to do with it?

As Nick said, starting a new thread about what you want from the tool
would be awesome. Please do!

 What makes a
 PDF of module docs a good fit for your site? What else could fit those
 needs? Do you want to be able to write your comments in something other than
 Rdoc format? That kind of thing.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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] Documentation Requirements

2012-07-20 Thread llow...@oreillyauto.com
Starting this thread to discuss changes to puppet doc as was recommended in 
a different thread.

Once I finally got the rdoc documentation generation working, I rather like 
it. Especially when paired with The Foreman.

It would be nice if the help was clearer, and it was easier to find a list 
of the gems/tools that are required to be able to use it. Or better yet, if 
they were included when you installed the puppet package.

Being able to generate PDF files would be very helpful, as they are easy to 
print, and also easy to move around or have as a reference on a mobile 
device (such as phone or personal laptop) that may not have network access 
to the puppet master.

As far as the rdoc thing, it's fine with me, but it would be nice if there 
was a way to scrape params from the classes w/o having to list out each in 
the comments, which I think is part of the actual Ruby rdoc functionality.

- Lee

-- 
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/-/SXtkkUteXkUJ.
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.



Re: [Puppet Users] Documentation Requirements

2012-07-20 Thread Ken Barber
 As far as the rdoc thing, it's fine with me, but it would be nice if there
 was a way to scrape params from the classes w/o having to list out each in
 the comments, which I think is part of the actual Ruby rdoc functionality.

Yeah - repeating yourself is awful. /me has written quite a few puppet
doc headers in my time and this is a pet peave. On this line of
thought - I'd prefer to have it grok the description of the param from
a comment field near the property/param or something (like above?),
this would feel more natural.

ken.

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: Documentation Requirements

2012-07-20 Thread Nick Fagerlund
Manually generating module docs is kind of a drag. It'd be cool to have 
them served dynamically directly from the modulepath, with some kind of 
simple web app. (I think Nigel has already mentioned this internally, but I 
wanted to get it out in the public thread too.) 

-- 
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/-/CmMmLsI120YJ.
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] Announce: Hiera 1.0.0rc4 Available

2012-07-20 Thread Matthaus Litteken
Hiera 1.0.0rc4 is a feature release candidate with bug-fixes, better
windows support and packaging improvements.

Downloads are available:
 * Source http://puppetlabs.com/downloads/hiera/hiera-1.0.0rc4.tar.gz
 * Apt and yum devel repos
 * Mac packages http://puppetlabs.com/downloads/mac/hiera-1.0.0rc4.dmg
 * Pre-release gem: http://rubygems.org/downloads/hiera-1.0.0rc4.gem
or `gem install hiera --pre`

It includes contributions from the following people:
Kelsey Hightower, Patrick Carlisle, Timur Batyrshin, and Matthaus Litteken

See the Verifying Puppet Download section at:
 
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.0.0rc4:
 http://projects.puppetlabs.com/projects/hiera


## Hiera 1.0.0rc4 Release Notes ##

(#14867) Add windows support

Without this patch Hiera does not work on Windows and fails with the
following error:

Failed to start Hiera: RuntimeError: Config file /etc/hiera.yaml not
found

Following the standard set by the Puppet installer, Hiera now uses the
following configuration and var directories on Windows:

C:\ProgramData\PuppetLabs\hiera\etc
C:\ProgramData\PuppetLabs\hiera\var

This patch introduces a new `Hiera::Util` module which utilizes the
`win32-dir` gem for locating the correct base directories on Windows.

(#12122) Correctly fall through backends during loop

When calling lookup for hash or array types Hiera would
incorrectly return an
empty result from a backend that did not find a value instead of
checking the
next backend. This happened because the empty hash and empty array were used
internally to represent a failed lookup. This changes it to use nil
everywhere. A distinct sentinel value would be ideal, but since Hiera
currently has no way to communicate to the outside world the difference
between lookup up nil and a failed lookup, it is sufficient to use
nil internally.

(#12122) Merge arrays and hashes across backends

This implements merging for arrays and hashes across the returned values for
all backends, using the same logic as merging within a backend.

## Hiera 1.0.0rc4 Changelog ##

Kelsey Hightower (7):
  cdd7364 (#14867) Add windows support
  1b7f787 Add specs for Hiera::Util
  07366d8 Use File::ALT_SEPARATOR to test platform
  92a148f (maint) Fix failing Hiera::Util specs
  fcd3d2c (maint) Hiera now has a LICENSE file
  4698cf1 (#15105) Update README YAML examples
  6887137 (maint) Add Getting Started tutorial

Matthaus Litteken (5):
  d0fcc57 Add default config to hiera
  ca47463 Remove datadir value in hiera.yaml
  7947dd6 Consolidate changelog, update erb templates
  091fea3 Overhaul Hiera packaging
  772ff45 Update CHANGELOG for 1.0.0rc4

Patrick Carlisle (2):
  480d86c (#12122) Correctly fall through backends during loop
  16c3dd3 (#12122) Merge arrays and hashes across backends

Timur Batyrshin (1):
  3ec4165 match data in puppet ${::fact} style to get rid of
puppet deprecation warnings

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: Can't create pdf from puppet doc

2012-07-20 Thread Giovanni Torres
Thanks for clearing this up.  The puppet-doc man page has the following 
example:

'puppet doc -m pdf -r configuration'

This led me to believe that it converts different portions to pdf. 
 Regardless.  Documentation is always useful and I will contribute my ideas 
to the new thread.

Thanks.

On Friday, July 20, 2012 5:25:51 PM UTC-4, Nick Fagerlund wrote:

 Here's your problem: puppet doc is actually TWO tools, both of which have 
 major problems right now. You're mixing up invocations of the two. Which is 
 a perfectly reasonable mistake and not really your fault. Anyway, the 
 upshot is that you CAN'T generate PDFs from your module documentation. The 
 tool just has never been able to do that. 

 Puppet doc's two uses are: 

 * Module docs, for use by Puppet users -- extracts rdoc strings from 
 comments and metadata about your classes and defined types, and builds an 
 rdoc-style website. Can ONLY build a website. That's all it does. 

 * Puppet reference generation, for use by Puppet Labs employees -- 
 extracts Markdown fragments from the Puppet code around config settings 
 (that's the command y'all were trying to use), types and providers, 
 functions, and some more esoteric stuff like indirections.  Can build 
 larger Markdown documents and I guess it maybe used to be able to build a 
 PDF, but if so it's been super-busted for a WHILE, since it seems to be 
 expecting RST input and we switched to Markdown fragments before I even 
 joined the company. 

 Obviously these are completely unrelated, and having them mixed in the 
 same tool is dumb. We need to separate them. 

 Anyway, back to the point: I recommend that you start a new thread on this 
 group talking about what you and your people need in terms of module 
 documentation formats. Ryan Coleman, the product owner for modules and the 
 Puppet Forge, is the person who will be figuring out our requirements for 
 that tool going forward, and I think he's already been doing some thinking 
 about it, but he could use your input and real-life use cases. What makes a 
 PDF of module docs a good fit for your site? What else could fit those 
 needs? Do you want to be able to write your comments in something other 
 than Rdoc format? That kind of thing. 

 Sorry for the downer, and for the confusing nature of the tool!

 N
 Puppet Labs docs team

 On Friday, July 20, 2012 12:45:05 PM UTC-7, Giovanni Torres wrote:

 I installed puppetd/puppetmasterd on an OpenBSD laptop and tried the same 
 command:

 sudo puppet doc -m pdf -r configuration

 ...and I get a little further with a different error:

 creating pdf
 /tmp/puppetdoc.txt:1198: (ERROR/3) Unknown target name: confdir

 The puppetdoc.txt file that gets generated in /tmp before actually 
 creating the pdf has this near line 1198:

 ### vardir

 Where Puppet stores dynamic and growing data.  The default for this 
 parameter 
 is calculated specially, like `confdir`_.

 - *Default*: /var/puppet



 Why is it so hard just to convert to pdf?  I tried on CentOS 6 and 
 OpenBSD 5.1 ... no dice.  Is it just me? Am I missing some external package 
 that is causing this error?  It had previously complained about not finding 
 the rst2latex command, but I got past that error by downloading the 
 docutils package.

 Anyone getting this to work without issue on CentOS 6 or OpenBSD 5.1?




 On Monday, July 16, 2012 11:30:25 AM UTC-4, llo...@oreillyauto.com wrote:



 On Monday, July 16, 2012 9:50:54 AM UTC-5, Giovanni Torres wrote:

 I'm trying to use puppet doc to create a pdf version of my modules. 
  According to the help file, `puppet doc -m pdf -r configuration` is the 
 syntax to accomplish this.  However, I keep getting this error:

 creating pdf
 Could not run: wrong number of arguments (1 for 2)


 I've been having this same problem, and have previously asked for help 
 on this list to no avail.

 If you do find a solution, please share, as it would be much appreciated.
  

 I search elsewhere on the web for others having a similar issue with 
 pdf generation, but no real luck finding a solution.

 I am running CentOS 6 with
 ruby-1.8.7
 puppet-server-2.7.18

 Is this a bug?  I did not find a bug describing this issue in the 
 Issues section of the Puppet website.

 Is there a --verbose or --debug that I could use with `puppet doc`?



-- 
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/-/ziqghtmpxZkJ.
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: Documentation Requirements

2012-07-20 Thread Giovanni Torres
Lee,

You have some good points.  The Rdoc to html conversion is nice.  You can 
put it on an internal webserver and share with other members of your team. 
 It is a bit tedious, however, and scraping the params from the classes 
would be a great feature.

NIST provides guidelines for RHEL, along with many other operating systems 
and applications. I was very excited to see that they are distributing 
puppet modules in conjunction with the typical, unwieldy spreadsheet to 
demonstrate the changes! (
http://usgcb.nist.gov/usgcb/rhel/download_rhel5.html)

Puppet is touted as self-documenting, but what happens when we want to 
print out the documentation or incorporate into our existing documentation 
formats?

I use Sphinx for documentation which is based on the fairly simple RST 
format.  I'm sure people out there use a variety of documentation 
applications to wrangle all their IT docs in one central place.  I often 
update my documentation and periodically print it out and create a binder 
for reference.  I would love to be able to append my puppet modules to this 
binder.  This would make my documentation whole!

Before I drift, it seems there are different ideas within the doc module. 
 Here are a few of my thoughts as to how puppet-doc could be useful to me 
and others similarly (hopefully):

* Semi-automated rdoc markup generation would be nice.
* An option to output documentation in multiple formats, such as (rdoc, 
rst, pdf, html, etc.)
* An option to convert everything under a single module/ directory directly 
to output format of choice 
* An option to convert all documentation under /etc/puppet to output of 
choice

I'm sure others have some other cools ways of how they can use this module. 
 Please contribute your ideas and help shape this useful feature.

Giovanni

On Friday, July 20, 2012 5:43:01 PM UTC-4, llo...@oreillyauto.com wrote:

 Starting this thread to discuss changes to puppet doc as was recommended 
 in a different thread.

 Once I finally got the rdoc documentation generation working, I rather 
 like it. Especially when paired with The Foreman.

 It would be nice if the help was clearer, and it was easier to find a list 
 of the gems/tools that are required to be able to use it. Or better yet, if 
 they were included when you installed the puppet package.

 Being able to generate PDF files would be very helpful, as they are easy 
 to print, and also easy to move around or have as a reference on a mobile 
 device (such as phone or personal laptop) that may not have network access 
 to the puppet master.

 As far as the rdoc thing, it's fine with me, but it would be nice if there 
 was a way to scrape params from the classes w/o having to list out each in 
 the comments, which I think is part of the actual Ruby rdoc functionality.

 - Lee


-- 
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/-/bZRAsobu0kgJ.
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] Announce: Hiera-Puppet 1.0.0rc2 Available

2012-07-20 Thread Matthaus Litteken
Hiera-Puppet 1.0.0rc2 is a feature release candidate. Hiera-Puppet is
the Puppet backend for Hiera and contains the parser functions for
Puppet.

Downloads are available:
 * Source http://puppetlabs.com/downloads/hiera/hiera-puppet-1.0.0rc2.tar.gz
 * Apt and yum development repositories
 * Apple package http://puppetlabs.com/downloads/mac/hiera-puppet-1.0.0rc2.dmg
 * Prerelease gem:
https://rubygems.org/downloads/hiera-puppet-1.0.0rc2.gem or `gem
install hiera-puppet --pre`

It includes contributions from the following people:
Andrew Parker, Jeff McCune, Kelsey Hightower, Matthaus Litteken, and
Patrick Carlisle

See the Verifying Puppet Download section at:
 
http://projects.puppetlabs.com/projects/puppet/wiki/Downloading_Puppet#Verifying+Puppet+Downloads

Please report feedback via the Puppet Labs Redmine site, using an
affected version of 1.0.0rc2:
 http://projects.puppetlabs.com/projects/hiera-puppet

## Hiera-Puppet 1.0.0rc2 Release Notes ##

(#15184) Refactor parser functions

This patch refactors the parser functions which centralizes hiera
configuration and lookups into a new `HieraPuppet` module.

The spec tests have be reorganized into a better hierarchy.

Updated specs and acceptance tests are included.

(#12122) Use nil as default answer in lookup

Synchronize with the way backends work in Hiera 1.0 by starting with nil
instead of Backend.empty_answer


## Hiera-Puppet 1.0.0rc2 Changelog ##

Andrew Parker (1):
  89cde8d (Maint) Create a test for the puppet backend

Jeff McCune (4):
  def41d5 Add watchr script
  d840325 (Maint) Use PuppetlabsSpec::PuppetSeams.parser_scope
  88c5f9a (Maint) Fix mock error with hiera module
  7ac4a54 (Maint) Fix missing spec_helper lines in some tests

Kelsey Hightower (6):
  01e9122 (maint) Follow Puppet Labs style guide + code cleanup
  95d7058 (maint) parser functions do not require hiera.yaml
  8a49eab (maint) Add acceptance tests
  bdb8563 (#15184) Refactor parser functions
  9ab901f (maint) Hiera Puppet now has a LICENSE file
  44bc7cb (#15105) Update README YAML examples

Matthaus Litteken (7):
  378a1a2 Tweak debian packaging
  9c23e9d Remove puppetlabs_spec_helper require from root Rakefile
  8e4e76a (maint) Replace .should on blocks with .to
  2fa4251 Update hiera-puppet package tasks
  c686adb Update debian package task to handle orig version
properly and use the correct directory name when building.
  416f098 Update hiera-puppet hiera dependency to ~ 1.0

Patrick Carlisle (4):
  dbdda00 (#12122) Use nil as default answer in lookup
  7a458a4 (#14841) Give useful error for array or hash lookup failure
  d76a9d8 (#14841) Add test for hiera_hash parser function
  b166328 (#14841) Add test coverage for remaining hiera parser functions

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] puppet over ansible

2012-07-20 Thread Marc Lucke
… well there you have it.  No advantages.  Or nobody cares about this better 
system.  Or nobody knows :)

On 18/07/2012, at 8:54 AM, Marc Lucke wrote:

 So I'm seeing a lot of hype around Ansible.  It seems to be a compelling 
 story.  I've looked around and found a lot of stories about why you would use 
 it over puppet, but not puppet over ansible.  Can anyone relate personal 
 experiences or point to some interesting reading?
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 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.
 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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.



Re: [Puppet Users] puppet over ansible

2012-07-20 Thread Chamberlain, Darren
* Marc Lucke marc at marcsnet.com [2012/07/20 20:11]:
 ...well there you have it.  No advantages.  Or nobody cares about
 this better system.  Or nobody knows :)
 
 On 18/07/2012, at 8:54 AM, Marc Lucke wrote:
  So I'm seeing a lot of hype around Ansible.  It seems to be a
  compelling story.  I've looked around and found a lot of stories
  about why you would use it over puppet, but not puppet over
  ansible.  Can anyone relate personal experiences or point to
  some interesting reading?

I've been investigating ansible over the last few weeks and I've
found it to have a lot of interesting things going for it: Ansible
is small, fast, lightweight, and consise, but also young, immature,
and rapidly evolving. Puppet has a vast and interesting ecosystem
around it, with lots of integration points with external tools;
ansible, by virtue of its youth, has none of that -- yet. For
example, if you want to set up a centralized dashboard to manage
your ansible jobs, you need to build it from scratch[*], while with
puppet, you have several mature alternates to choose from or build
upon. There are also numerous examples of puppet manifests and best
practices on the web, countless puppet modules freely available on
puppetforge and github, and many blog posts and presentations from
which to learn puppet, while ansible has basically just the mailing
lists (which is fairly active), the official docs, and a few github
repos of examples, but since ansible is evolving so rapidly these
examples are potentially of limited value. (Michael DeHaan has done
an admirable job of keeping the docs up-to-date, though.)

The speed of ansible's evolution is actually my biggest concern
about it right now; I don't want to get in a situation where my
playbooks (ansible-speak for what puppet calls manifests and what
cfengine calls promises) become outdated and need to be rewritten.
(I have hit this problem with puppet, too, though; I unintentionally
used several features that have been changed or deprecated as puppet
evolved, especially ones involving variable scope.)

Having said that, ansible is already incredibly usable and I haven't
yet found anything that I'm currently doing in puppet that I cannot
do in ansible. I'm using puppet to manage over 400 mixed-OS nodes in
a distributed, masterless environment, and I'm not using the
foreman, mcollective, puppetdb, storeconfigs, or any of those types
of features, so my environment might be fairly atypical.

As for why one should choose puppet over ansible, I think the
deciding factors for most people will be the tool ecosystem, the
developer ecosystem, and your comfort with evolving tools. I am
personally of the opinion that the tools managing your
infrastructure should be as mature and surprise-free as possible,
since any change in those tools could cause all sorts of problems
down the line; with the changes coming in puppet 3.0, I think the
playing field is about level here -- ansible may be young, but
Michael seems to have a very clearly defined end goal for what
ansible will become, and I don't see that changing much. Puppet
obviously has the lead in the tool and developer ecosystem fronts,
by virtue of its maturity (as I mentioned above), so if reporting,
long-term trending, and the like is a hard requirement then ansible
cannot be considered.

[*] I've actually got a very usable ansible dashboard setup using
Jeknins, pulling playbooks and inventory lists from subversion.

-- 
Darren Chamberlain dar...@boston.com

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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: can't authenticate based on IP? what? huh?

2012-07-20 Thread Nick Lewis
On Tuesday, July 17, 2012 3:46:21 PM UTC-7, Jo wrote:

 Okay, I totally did see this in the release notes but I read it that you 
 weren't allowing certificates with IP addresses in them, not that you 
 wouldn't allow IP authentication in auth.conf at all.  

 Jul 17 14:52:46 sj2-puppet puppet-master[13998]: Authentication based on 
 IP address is deprecated; please use certname-based rules instead

 I don't feel that it is reasonable to expect that every puppet customer 
 match up their naming scheme to their IP blocks, nor to want to list every 
 possible naming scheme in their authorization list when an IP bitmask will 
 do the job much more simply.

 I don't mind or care about IPs in certificates--I've never seen this, and 
 don't expect to. But disallowing IP-based authentication is going to be 
 very difficult at many sites, and possibly allow things which were never 
 intended. Please reconsider this.


This is actually something of a misleading deprecation warning, I'm afraid. 
The change we plan to make is to distinguish allow and allow_ip, to 
avoid confusing IPs and certnames. So the change you will need to make is 
to explicitly use allow_ip if you want to do IP-based authentication. 
However, adding that feature to 2.7.x, though backward compatible, turns 
out to require a fairly significant rework of some of the auth code, which 
is a risk we don't feel is appropriate. So the feature won't be in until 3, 
at which point it will be required.

That means we're in the awkward position of issuing a warning you can't 
actually fix yet, which is *really* not something we like to do. But it 
seems better to at least give some alert that you'll need to make a change 
in the future than to have it suddenly occur without forewarning. So yes, 
there's definitely a bit of an issue here, but I assure you we don't intend 
to remove IP-based authentication entirely.

Nick Lewis
 

 -- 
 Jo Rhett
 Net Consonance : net philanthropy to improve open source and internet 
 projects.


  


-- 
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/-/DtGsIKqCOTsJ.
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: Calling a definition multiple times but with different parameters

2012-07-20 Thread Mark Roggenkamp
First, I'll say this sort of thing comes up rather often. It seems that 
perhaps there's a void in dynamic generation of resources based on some 
data structure (where you wish you had full langage features to do so). 
However, you may be able to make use of the create_resources function if it 
makes sense for you to have $links look like this:

$links = {
  'link1' = {
'ensure' = 'link',
'target' = 'target1',
  },
}

and then: create_resources(File, $links). the hash key will be used for 
$name passed to File and the value (hash) is used to feed the other params 
of File.

You may also need to specify your own defined type that takes a base path 
instead of File. Or, you could use the prepend function in stdlib to 
pregenerate the file paths if need be. Or, regsubst.

Good luck :)

Mark

On Friday, July 20, 2012 4:40:42 PM UTC-4, Tim Bishop wrote:

 I've got a bit stuck trying to implement something in Puppet. I'm hoping 
 I'm just looking at it the wrong way and somebody can point me in the 
 right direction :-) 

 So here's what I have. A definition that creates a site (it doesn't 
 really matter what it's creating): 

 define mymodule::site ($path) { 
   # ... do some stuff ... 
 } 

 mymodule::site { 'sitename': 
   path  = '/some/path', 
 } 

 This is fine. But what I want to do is create an arbitrary set of 
 symlinks along with the site. So I extend it something like this: 

 define mymodule::site ($path, $links) { 
   # ... do some stuff ... 
   mymodule::links { $links: 
 path = $path, 
   } 
 } 

 define mymodule::links () { 
   # create a link: $name - $path 
 } 

 mymodule::site { 'sitename': 
   path  = '/some/path', 
   links = [ 'foo', 'bar' ], 
 } 

 So this works. It creates my site, and calls mymodule::links for each link 
 separately. 

 The problem comes if I want to call mymodule::links with more than just 
 one changing parameter (I'm using $name above). I'd like to be able to 
 do something like this, but can't see how to make it work: 

 mymodule::site { 'sitename': 
   path  = '/some/path', 
   links = [ { 'link1' = 'target1' }, { 'link2' = 'target2' }, ], 
 } 

 But you can't pass a hash in through $name, and I can't see how I can 
 pass separate parameters each call of the definition. I'd like a for 
 loop really! 

 Any pointers? Am I looking at this completely the wrong way? 

 The only alternative I've come up with is to just manually create the 
 links with file resources where I call mymodule::site, but I ideally 
 wanted to encapsulate all the behaviour within the module. 

 Thanks in advance, 

 Tim. 

 -- 
 Tim Bishop 
 http://www.bishnet.net/tim/ 
 PGP Key: 0x5AE7D984 


-- 
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/-/ls16Czyh10cJ.
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.



Re: [Puppet Users] rspec-puppet and create_resources

2012-07-20 Thread Mark Roggenkamp
Thx. That helped me stay on course while troubleshooting a test failure. I 
hadn't reached the 'trust what the test is telling you' stage yet. :) 

Mark

On Friday, July 20, 2012 2:38:06 PM UTC-4, Jeff McCune wrote:

 On Fri, Jul 20, 2012 at 9:31 AM, Mark Roggenkamp 
 mark.roggenk...@gmail.com wrote:

 Using rspec-puppet should I be able to check for resources created as a 
 result of a create_resources call within a class?


 Yes, any resource in the catalog should work with rspec-puppet.

 -Jeff 


-- 
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/-/8KuWlFWXfeEJ.
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.



Re: [Puppet Users] puppet over ansible

2012-07-20 Thread Marc Lucke
On 21/07/2012, at 11:41 AM, Chamberlain, Darren wrote:

 * Marc Lucke marc at marcsnet.com [2012/07/20 20:11]:
 ...well there you have it.  No advantages.  Or nobody cares about
 this better system.  Or nobody knows :)
 
 On 18/07/2012, at 8:54 AM, Marc Lucke wrote:
 So I'm seeing a lot of hype around Ansible.  It seems to be a
 compelling story.  I've looked around and found a lot of stories
 about why you would use it over puppet, but not puppet over
 ansible.  Can anyone relate personal experiences or point to
 some interesting reading?
 
 I've been investigating ansible over the last few weeks and I've
 found it to have a lot of interesting things going for it: Ansible
 is small, fast, lightweight, and consise, but also young, immature,
 and rapidly evolving. Puppet has a vast and interesting ecosystem
 around it, with lots of integration points with external tools;
 ansible, by virtue of its youth, has none of that -- yet. For
 example, if you want to set up a centralized dashboard to manage
 your ansible jobs, you need to build it from scratch[*], while with
 puppet, you have several mature alternates to choose from or build
 upon. There are also numerous examples of puppet manifests and best
 practices on the web, countless puppet modules freely available on
 puppetforge and github, and many blog posts and presentations from
 which to learn puppet, while ansible has basically just the mailing
 lists (which is fairly active), the official docs, and a few github
 repos of examples, but since ansible is evolving so rapidly these
 examples are potentially of limited value. (Michael DeHaan has done
 an admirable job of keeping the docs up-to-date, though.)
 
 The speed of ansible's evolution is actually my biggest concern
 about it right now; I don't want to get in a situation where my
 playbooks (ansible-speak for what puppet calls manifests and what
 cfengine calls promises) become outdated and need to be rewritten.
 (I have hit this problem with puppet, too, though; I unintentionally
 used several features that have been changed or deprecated as puppet
 evolved, especially ones involving variable scope.)
 
 Having said that, ansible is already incredibly usable and I haven't
 yet found anything that I'm currently doing in puppet that I cannot
 do in ansible. I'm using puppet to manage over 400 mixed-OS nodes in
 a distributed, masterless environment, and I'm not using the
 foreman, mcollective, puppetdb, storeconfigs, or any of those types
 of features, so my environment might be fairly atypical.
 
 As for why one should choose puppet over ansible, I think the
 deciding factors for most people will be the tool ecosystem, the
 developer ecosystem, and your comfort with evolving tools. I am
 personally of the opinion that the tools managing your
 infrastructure should be as mature and surprise-free as possible,
 since any change in those tools could cause all sorts of problems
 down the line; with the changes coming in puppet 3.0, I think the
 playing field is about level here -- ansible may be young, but
 Michael seems to have a very clearly defined end goal for what
 ansible will become, and I don't see that changing much. Puppet
 obviously has the lead in the tool and developer ecosystem fronts,
 by virtue of its maturity (as I mentioned above), so if reporting,
 long-term trending, and the like is a hard requirement then ansible
 cannot be considered.
 
 [*] I've actually got a very usable ansible dashboard setup using
Jeknins, pulling playbooks and inventory lists from subversion.
 
 -- 
 Darren Chamberlain dar...@boston.com
 
 -- 
 You received this message because you are subscribed to the Google Groups 
 Puppet Users group.
 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.
 
Thanks Darren.  One thing that struck me about puppet was that it seems like 
you can easily spend more time managing puppet than managing your machines 
until you hit some sort of critical mass even if you are more dev than ops.  
Ansible promises to lower the learning curve and simplify which is pulling some 
of the team I work in away from puppet because they resent having to write and 
debug code (if that's what they wanted to do, they'd have just been devs to 
begin with).  The traditional old school stomping grounds of a sysadmin are 
procedural, predictable, pretty easy to use and relatively bug free which seems 
to be in stark contrast with puppet; if Ansible solves those problems then it's 
a compelling story.

Marc

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
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