I received such error 'Cannot add or update a child row: a foreign key constraint fails' when trying to import a new Puppet class (sys_yumversionlock) into Foreman via the smart proxy. Based on the error message, it should be database related. I am not a DBA, but I am interested to give a try, as … Continue reading ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails
Tag: Puppet
Set up Puppet lab in docker
Just finished my first docker set up - building a puppet server and a puppet client in two separate containers. 1) My docker host is Fedora 20. [root@1004521 ~]# cat /etc/system-release Fedora release 20 (Heisenbug) 2) Install docker (https://docs.docker.com/installation/fedora/) [root@1004521 ~]# yum -y install docker-io [root@1004521 ~]# systemctl start docker [root@1004521 ~]# systemctl enable docker … Continue reading Set up Puppet lab in docker
Exclude configuration from puppet central management
In some cases, we need to test a configuration in a server that is managed by Puppet. Besides excluding the server in the manifest file, there are two more ways to do it: 1) Use "chattr +i <file>" to set the file to immunable to prevent even root from changing the file. Use "chattr -i" … Continue reading Exclude configuration from puppet central management
Puppet push Nagios
With the storeconfigs enabled, I am able to push Naigos via Puppet. It is really simple and straighforward, as Puppet already support nagios_* type. How it works? Below is my sample codes. It can be downloaded from here. sys_nagios::client is the class for Nagios client, it sends the hosts' facts to Puppet master then the data … Continue reading Puppet push Nagios
Puppet – Configuring Storeconfigs for MySQL
Exported resource allow node to share information with each other. This is useful when one node has information that another node needs in order to manage a resource. The common cases are monitoring and backups. To use exported resource in Puppet, the storeconfigs has to be enabled. This will allow puppet to save data (resources, … Continue reading Puppet – Configuring Storeconfigs for MySQL