Design question (integrate foreman)

I need some design assistance. I would like to combine foreman on one box
with puppet on another box and nagios on another box. I would like to be
able to remove a target host from nagios when it gets moved from its
current network configuration which currently works with puppet. How do I
use foreman with this? We are currently using a different method to manage
hosts and I would like to move to foreman. I have looked at this ENC and it
doesn't look like it fits. Stored configs might be an option but I delete
the stored configs when a target host gets re-provisioned (moved from its
current network config). Same with yaml facts these are deleted when the
target host is re-provisioned. if I use stored-configs how do I maintain
just the hardware facts only?

http://theforeman.org/projects/foreman/wiki/Puppet_Facts

Thanks,
David Garvey

> I need some design assistance. I would like to combine foreman on one box
> with puppet on another box and nagios on another box. I would like to be
> able to remove a target host from nagios when it gets moved from its
> current network configuration which currently works with puppet. How do I
> use foreman with this? We are currently using a different method to manage
> hosts and I would like to move to foreman. I have looked at this ENC and it
> doesn't look like it fits. Stored configs might be an option but I delete
> the stored configs when a target host gets re-provisioned (moved from its
> current network config). Same with yaml facts these are deleted when the
> target host is re-provisioned. if I use stored-configs how do I maintain
> just the hardware facts only?
>
> Puppet Facts - Foreman

You could give
http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.htmla
try.

Ohad

··· On Thu, Jul 19, 2012 at 12:00 AM, david.garvey@gmail.com < david.garvey@gmail.com> wrote:

Thanks,
David Garvey


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Hi David,

I'm using puppet and foreman and nagios. Nagios isn't currently integrated with puppet/foreman. I didn't really understand how you have integrated them, but the typical design pattern is using puppet store configs. If you move a change a hosts network config it will appear as a completely different host to puppet/foreman. Stored configs are stored on the puppet master's database and associated with the hostname. Reprovisioning the host will completely break it's ties with the old stored configs.

Lard

I am thinking that I could rely on subversion to keep track of the change
control of hosts.

Something like this:

#!/bin/bash

username:puppetmaster passwd:secret

url https://mysubversion-server/svn/repos/puppet

export LANG=en_US.UTF-8
export
PATH=/usr/local/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
REPO_PATH=/etc/puppet
LOGFILE=/var/log/puppet_svn.log

cd $REPO_PATH

I often ruminate with vi and don't wanta get caught with my pants down

lets not check in this stuff "dotswp file" also problems with new prop

had to remove everything

so I placed a exclusion in the .subversion/conf:global-ignores

"global-ignores = *.swp"

#svn delete will not do a delete just mark for deletion
svn status |grep -q '^!'
if [ $? == 0 ]; then
del_files=$(svn status |grep '^!')
del_files=$(echo $del_files | awk '{print$2}')
len=${#del_files[@]}
i=0
while [ $i -lt $len ]; do
#echo "deleting ${del_files[$i]}"
svn delete ${del_files[$i]} > $LOGFILE
let i++
done
fi

#svn add marks file for addition to the repo
svn status |grep -q '^?'
if [ $? == 0 ];then
echo "Looks like we have new files"
svn add --force * >> $LOGFILE
fi

#commits on modified or added file
svn status |grep -q '^M'
if [ $? == 0 ]; then
echo "Doing cron commit"
svn commit -m "cron commit" >> $LOGFILE
fi
svn status |grep -q '^A'
if [ $? == 0 ]; then
echo "Doing cron commit"
svn commit -m "cron commit" >> $LOGFILE
fi
svn status |grep -q '^D'
if [ $? == 0 ]; then
echo "Doing cron commit"
svn commit -m "cron commit" >> $LOGFILE
fi

··· On Thu, Jul 19, 2012 at 1:44 AM, Lard Farnwell wrote:

Hi David,

I’m using puppet and foreman and nagios. Nagios isn’t currently integrated
with puppet/foreman. I didn’t really understand how you have integrated
them, but the typical design pattern is using puppet store configs. If you
move a change a hosts network config it will appear as a completely
different host to puppet/foreman. Stored configs are stored on the puppet
master’s database and associated with the hostname. Reprovisioning the host
will completely break it’s ties with the old stored configs.

Lard


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


David Garvey