Hi,
I want to install a service on e.g. 10 Nodes. In each Config of this service all other nodes have to be configured.
So I need a possibillity to get an array of nodes with this Class in a manifest.
How can I achieve this?
Thanks in advance
↧
Use Facts in puppet manifest
↧
Server Built Process
I want to complete automate our linux builds from start to finish. A lot of parameters need to get passed to puppet in order to execute the modules effectively. For example a user and group need to be passed to the module as well as details regarding any filesystems, that kinds of thing.
How do I pass values to puppet like that? I know of parameterized classes. But how do I set those values with the ones I need to?
thanks,
↧
↧
Could not retrieve update information
Hi,
On a brand new puppet master running puppet 4.8.1 ( server v 2.7.2 ), I started seing exception messages such as this one :
[clojure-agent-send-off-pool-0] [p.d.version-check] Could not retrieve update information (http://updates.puppetlabs.com)
java.net.ConnectException: Connection timed out
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
[...]
Coming from puppet 3.x, I am assuming that puppet now has an internal self-update check mechanism which attempts to contact the aformentioned URL ( which of course fails when the server has no Internet connection )
How can I disable such check ?
↧
Collect all Puppet Reports
Can the Puppet server keep track of full reports from every node in a log? I've found that the server has a log located by default at /var/log/puppetlabs/puppetserver/puppetserver.log but it seems to only contain certain information and does not contain the full report. I have tried changing the log level to warning and error but doesn't seem to have any effect as then no information at all is logged. Here is the current logback.xml file. Am I approaching this problem from the wrong angle?%d %-5p [%t] [%c{2}] %m%n /var/log/puppetlabs/puppetserver/puppetserver.log true %d %-5p [%t] [%c{2}] %m%n
↧
puppetdb Coult not retrieve facts
I have a new puppetserver and puppetdb on the same node.
I followed the instructions for puppetdb setup here: https://docs.puppet.com/puppetdb/4.0/connect_puppet_master.html
I have also setup postgres backend as mentioned in the docs.
I have signed the certificates with
puppet cert --allow-dns-alt-names sign masternode.company.com
puppetdb ssl-setup -f
I have restarted the puppet server after the changes were made.
Questions:
1) Why is the facts not retrieved from puppetdb?
2) Why is the puppetdb dashboard not working? http://masternode.company.com:8080/pdb/dashboard/index.html
3) When we are installing the puppet server and puppet db for the first time, is it something that is missing in the documentation?
Error:
#sudo puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Could not retrieve facts for masternode.company.com: Failed to find facts from PuppetDB at masternode.company.com:8140: Failed to execute '/pdb/query/v4/nodes/ masternode.company.com/facts' on at least 1 of the following 'server_urls': https://masternode.company.com:8081
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed to execute '/pdb/cmd/v1? checksum=9a9040e8262d915c5b49bef7a71fe1f6d4ca0946&version=5&certname= masternode.company.com&command=replace_facts' on at least 1 of the following 'server_urls': https:// masternode.company.com:8081
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
↧
↧
Password change not working from puppet master to its agent
I have written a site.pp to change a password from the puppet master. Below is the site.pp. It is changing the password on agent host idrac-h868gm1, but when I try to login with the changed password (In this case devuser888) it is not working.
I used single and double quotes but it still does not work. I manually changed the password to devuser888 and it is working.
node default {
class { 'ntp':
servers => ['ntp1','ntp2']
}
include ntp
}
node /^(prod|dev)\d+$/ {
include mounts
include nis
}
node idrac-h868gm1 {
user { 'dev':
ensure => present,
password => "devuser888"
}
}
Puppet server version: 2.7.1 (open source)
Puppet agent version: 4.8.0
Puppet agent OS: RHEL7.2
Below is the debug logs from puppet agent link
[link text](http://chelsious-my.sharepoint.com/personal/vidyasagar_asicdesigners_com/_layouts/15/guestaccess.aspx?guestaccesstoken=GaTobTW0sbrzL4u3oWvIZQVdjHkTGc2g1YUapTJhpAw%3d&docid=1f22eb1f7c8d54d61b5ce74553e38a694&rev=1)
↧
lvm on linux
hi ,
Thank you for the help in advanced. I have a question related to this module .
https://forge.puppet.com/puppetlabs/lvm
I am using this module to create the logical volume, create the volume group and mount the filesystem. I have added this module in the puppet file and below is the code that I am using to create the required volume group, logical volume and filesystem. This works very well but when I restart my server after configuring the disk through the below code , I am not able to login back to the server this has happened second time in row. Below is the code for the lvm
There are two physical volume that is created as vg_root and vg_app from thr physical disk /dev/xvdm1 and /dev/xvdl1 . PLease help me in finding this issue
class profile::glic_wasnd::glic_wasbase::lvmmanage {
$ppvroot = '/dev/xvdm1'
$pvgroot = 'vg_root'
$plvrootmwd = 'mwadmin'
$pfsrootmwd = "/dev/${pvgroot}/$plvrootmwd"
$pfshumreadrootmwd = '/home/mwadmin'
$plvroottemp = 'temp'
$pfsroottemp = "/dev/${pvgroot}/${plvroottemp}"
$pfshumreadroottemp = '/tmp'
$pfstype = 'ext4'
$poptions = 'defaults'
$pfixed_pass = '1'
$pfixed_dump = '1'
$ppvapp = '/dev/xvdl1'
$pvgapp = 'vg_app'
$plvappihs = 'ihs'
$pfsappihs = "/dev/${pvgapp}/${plvappihs}"
$pfshumreadapptihs = "/opt/${plvappihs}"
$plvappwas = 'was'
$pfsappwas = "/dev/${pvgapp}/${plvappwas}"
$pfshumreadapptwas = "/opt/${plvappwas}"
$plvapplogr = 'logr'
$pfsapplogr = "/dev/${pvgapp}/${plvapplogr}"
$pfshumreadapptlogr = "/${plvapplogr}"
#Step 1 Create the root vg group
physical_volume { $ppvroot :
ensure => present,
unless_vg => "$pvgroot",
}
volume_group { $pvgroot :
ensure => present,
physical_volumes => "$ppvroot",
createonly => true,
require => Physical_volume[$ppvroot] ,
}
# Step for the adding the mwadmin in vg root
logical_volume { $plvrootmwd :
ensure => present,
volume_group => "$pvgroot",
size => '5G',
require => Volume_group[$pvgroot],
}
filesystem { $pfsrootmwd :
ensure => present,
fs_type => 'ext4',
options => '-b 4096 -E stride=32,stripe-width=64',
require => Logical_volume[$plvrootmwd],
}
mount { $pfshumreadrootmwd :
ensure => mounted,
name => $pfshumreadrootmwd,
device => $pfsrootmwd ,
fstype => "${pfstype}",
options => $poptions,
pass => $pfixed_pass,
dump => $pfixed_dump,
atboot => true,
require => Filesystem[$pfsrootmwd] ,
}
# Step for the adding the temp in vg root
logical_volume { $plvroottemp :
ensure => present,
volume_group => "$pvgroot",
size => '5G',
require => Volume_group[$pvgroot],
}
filesystem { $pfsroottemp:
ensure => present,
fs_type => 'ext4',
options => '-b 4096 -E stride=32,stripe-width=64',
require => Logical_volume[$plvroottemp],
}
mount { $pfshumreadroottemp :
ensure => mounted,
name => $pfshumreadroottemp,
device => $pfsroottemp ,
fstype => "${pfstype}",
options => $poptions,
pass => $pfixed_pass,
dump => $pfixed_dump,
atboot => true,
require => Filesystem[$pfsroottemp] ,
}
# Step 2 - For vg-app
physical_volume { $ppvapp :
ensure => present,
unless_vg => "$pvgapp",
}
volume_group { $pvgapp :
ensure => present,
physical_volumes => "$ppvapp",
createonly => true,
require => Physical_volume[$ppvapp] ,
}
# Step for the adding the ihs in vg app
logical_volume { $plvappihs :
ensure => present,
volume_group => "$pvgapp",
size => '4G',
require => Volume_group[$pvgapp],
}
filesystem { $pfsappihs:
ensure => present,
fs_type => 'ext4',
options => '-b 4096 -E stride=32,stripe-width=64',
require => Logical_volume[$plvappihs],
}
mount { $pfshumreadapptihs :
ensure => mounted,
name => $pfshumreadapptihs,
device => $pfsappihs ,
fstype => "${pfstype}",
options => $poptions,
pass => $pfixed_pass,
dump => $pfixed_dump,
atboot => true,
require => Filesystem[$pfsappihs] ,
}
# Step for the adding the was in vg app
logical_volume { $plvappwas :
ensure => present,
volume_group => "$pvgapp",
size => '20G',
require => Volume_group[$pvgapp],
}
filesystem { $pfsappwas:
ensure => present,
fs_type => 'ext4',
options => '-b 4096 -E stride=32,stripe-width=64',
require => Logical_volume[$plvappwas],
}
mount { $pfshumreadapptwas :
ensure => mounted,
name => $pfshumreadapptwas,
device => $pfsappwas ,
fstype => "${pfstype}",
options => $poptions,
pass => $pfixed_pass,
dump => $pfixed_dump,
atboot => true,
require => Filesystem[$pfsappwas] ,
}
# Step for the adding the logr in vg app
logical_volume { $plvapplogr :
ensure => present,
volume_group => "$pvgapp",
size => '10G',
require => Volume_group[$pvgapp],
}
filesystem { $pfsapplogr:
ensure => present,
fs_type => 'ext4',
options => '-b 4096 -E stride=32,stripe-width=64',
require => Logical_volume[$plvapplogr],
}
mount { $pfshumreadapptlogr :
ensure => mounted,
name => $pfshumreadapptlogr,
device => $pfsapplogr ,
fstype => "${pfstype}",
options => $poptions,
pass => $pfixed_pass,
dump => $pfixed_dump,
atboot => true,
require => Filesystem[$pfsapplogr] ,
}
}
↧
Get all passed parameters (e.g $@ in shell)
Is there a way to get all the arguments passed to a class? The reason being is I don't want to end up with brittle if guards for each contain as shown here: https://github.com/example42/control-repo/blob/production/site/profile/manifests/base/linux.pp.
I would much rather have something like:
``$@.each | k | {
if $k != '' {
contain $k
}
}``
↧
How to execute runInstaller of oracle database using puppet
I have created a script like below to install oracle database but not able to run it. Kindly suggest the proper steps for execution.
Puppet scripts are created by root user and script is executing from root user but the installation should be executed from oracle user.
exec{"DB Installation": command => "/u01/saket/software/database/runInstaller -silent -ignorePrereq -showProgress -responseFile /u01/saket/software/db_response.rsp'", user => "oracle", cwd => "/u01/saket/software/database", environment => ['TMP=/u01/saket/app/tmp','ORACLE_BASE=/u01/saket/app','ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/db_1','LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib','CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib'], }
↧
↧
how to pass selector value to hiera in rspec-puppet
Hi,
I have following code in puppet,
class module_name {
$val = hiera('ONOFF')
case $val {
'off' : {
service { 'servicename' :
ensure => stopped,
enable => false,
}
}
'on' : {
service { 'servicename' :
ensure => running,
enable => true,
}
}
default: {}
}
}
Below is the test case
describe 'module_name' do
context 'with defaults valuess' do
let(:facts) {{ :operatingsystemmajrelease => '7', :osfamily => 'RedHat'}}
it { should contain_class('module_name') }
end
context 'test case for off' do
let(:facts) {{ :operatingsystemmajrelease => '7', :osfamily => 'RedHat' }}
let(:hiera_config) { 'spec/fixtures/hiera.yaml' }
hiera = Hiera.new({ :config => 'spec/fixtures/hiera.yaml' })
it { should contain_service('servicename').with(
'ensure' => 'stopped',
'enable' => 'false'
)}
end
context 'test case for on' do
let(:facts) {{ :operatingsystemmajrelease => '7', :osfamily => 'RedHat' }}
let(:hiera_config) { 'spec/fixtures/hiera.yaml' }
hiera = Hiera.new({ :config => 'spec/fixtures/hiera.yaml' })
it { should contain_service('servicename').with(
'ensure' => 'running',
'enable' => 'true'
)}
end
end
===============================================
default.yaml
---
ONOFF: 'on'
Getting below error
expected that the catalogue would contain Service[servicename] with ensure set to "stopped" but it is set to "running", and parameter enable set to "false" but it is set to true
How I can write test case to pass both selector "on" and "off".
↧
Error 500: Could not find declared class
I have a dedicated server. It runs CoreOS->Docker->puppet/puppetserver-standalone, committed once certificates had been set up as sa0001. This is started with the command
docker run -d --restart unless-stopped --name puppet -p 8140:8140 -v /home/core/modules:/etc/puppetlabs/code/environments/production/modules -v /home/core/manifests:/etc/puppetlabs/code/environments/production/manifests sa0001
The reason for using volumes is that the container has no editor (not even vi). I had been editing files outside the container and copying them in - which worked - but this is not DRY, and as the system grows, the dangers of having the wrong version somewhere will become too high for my liking. I have changed the user and permissions from inside the container. The relevant trees are (irrelevances snipped):
Outside the container:
core@puppet ~ $ ls -laR
.:
total 108
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 .
drwxr-xr-x. 3 root root 4096 Nov 1 06:12 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 manifests
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 modules
./manifests:
total 24
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 .
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 ..
-rwxr-xr-x. 1 root root 86 Dec 11 13:23 site.pp
./modules:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 ..
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 keyboard
./modules/keyboard:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 manifests
./modules/keyboard/manifests:
total 32
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
-rwxr-xr-x. 1 root root 60 Dec 11 13:33 init.pp
-rwxr-xr-x. 1 root root 462 Dec 15 15:15 microsoft.pp
Inside the container:
root@9aead11be978:/etc/puppetlabs/code# ls -laR
.:
total 32
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 .
drwxr-xr-x. 1 root root 4096 Dec 8 18:48 ..
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 environments
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 modules
./environments:
total 24
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 .
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 ..
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 production
./environments/production:
total 48
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 .
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 ..
-rw-r--r--. 1 root root 879 Sep 1 19:20 environment.conf
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 hieradata
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 manifests
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 modules
./environments/production/hieradata:
total 16
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
./environments/production/manifests:
total 24
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
-rwxr-xr-x. 1 root root 86 Dec 11 13:23 site.pp
./environments/production/modules:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 keyboard
./environments/production/modules/keyboard:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 manifests
./environments/production/modules/keyboard/manifests:
total 32
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
-rwxr-xr-x. 1 root root 60 Dec 11 13:33 init.pp
-rwxr-xr-x. 1 root root 462 Dec 15 15:15 microsoft.pp
./modules:
total 16
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 .
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 ..
These three files are adaptations from https://docs.puppet.com/puppet/4.8/quick_start_helloworld.html and contain the following:
core@puppet ~ $ ls -laR
.:
total 108
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 .
drwxr-xr-x. 3 root root 4096 Nov 1 06:12 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 manifests
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 modules
./manifests:
total 24
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 .
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 ..
-rwxr-xr-x. 1 root root 86 Dec 11 13:23 site.pp
./modules:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 5 core core 4096 Dec 15 15:06 ..
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 keyboard
./modules/keyboard:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 manifests
./modules/keyboard/manifests:
total 32
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
-rwxr-xr-x. 1 root root 60 Dec 11 13:33 init.pp
-rwxr-xr-x. 1 root root 462 Dec 15 15:15 microsoft.pp
Inside the container:
root@9aead11be978:/etc/puppetlabs/code# ls -laR
.:
total 32
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 .
drwxr-xr-x. 1 root root 4096 Dec 8 18:48 ..
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 environments
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 modules
./environments:
total 24
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 .
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 ..
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 production
./environments/production:
total 48
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 .
drwxr-xr-x. 3 root root 4096 Dec 9 23:39 ..
-rw-r--r--. 1 root root 879 Sep 1 19:20 environment.conf
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 hieradata
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 manifests
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 modules
./environments/production/hieradata:
total 16
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
./environments/production/manifests:
total 24
drwxr-xr-x. 2 root root 4096 Dec 15 15:06 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
-rwxr-xr-x. 1 root root 86 Dec 11 13:23 site.pp
./environments/production/modules:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 5 root root 4096 Dec 9 23:39 ..
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 keyboard
./environments/production/modules/keyboard:
total 24
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 manifests
./environments/production/modules/keyboard/manifests:
total 32
drwxr-xr-x. 2 root root 4096 Dec 15 15:15 .
drwxr-xr-x. 3 root root 4096 Dec 15 15:01 ..
-rwxr-xr-x. 1 root root 60 Dec 11 13:33 init.pp
-rwxr-xr-x. 1 root root 462 Dec 15 15:15 microsoft.pp
./modules:
total 16
drwxr-xr-x. 2 root root 4096 Sep 1 19:21 .
drwxr-xr-x. 4 root root 4096 Dec 16 13:13 ..
These three files are adaptations from https://docs.puppet.com/puppet/4.8/quick_start_helloworld.html and contain the following:
core@puppet ~ $ cat manifests/site.pp node default { class { 'pi_keyboard': } class { 'pi_keyboard::microsoft': } } core@puppet ~ $ cat modules/keyboard/manifests/init.pp class pi_keyboard { notify { 'pi_keyboard running': } } core@puppet ~ $ cat modules/keyboard/manifests/microsoft.pp class pi_keyboard::microsoft { file { 'keyboard': path => '/etc/default/keyboard', ensure => 'present', replace => 'yes', content => '# KEYBOARD CONFIGURATION FILE # Consult the keyboard(5) manual page. Update 2016-12-15 15:15 XKBMODEL="pc105" XKBLAYOUT="gb" XKBVARIANT="" XKBOPTIONS="numpad:microsoft" BACKSPACE="guess"', owner => 'root', group => 'root', mode => '0644', } }Trying to run an explicit update on a Raspberry Pi fails thus:
dr@pi247:~$ puppet agent -t Info: Retrieving pluginfacts Info: Retrieving plugin Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not find declared class pi_keyboard at /etc/puppetlabs/code/environments/production/manifests/site.pp:2:5 on node pi247.lan.davies.systems","issue_kind":"RUNTIME_ERROR"An extremely long stack trace follows. I suspect that it's something to do with ownership and/or permissions because the change I made was telling docker to use volumes from outside the container and some of the files had user of 500 when seen from inside before I chowned them. But now I'm stuck and the docs my searches have found aren't getting me anywhere. Which docs should I have read, please? TIA & regards, John Davies
↧
How do you use the Cloudera Puppet Module?
I have two RedHat 6.7 servers. One is a Puppet Master, and one is a Puppet Agent.
On the Puppet Master I installed two dependencies of the Cloudera module and the Cloudera Module itself. I used this link (and the links to its dependencies): https://forge.puppet.com/razorsedge/cloudera
I do not want to deviate from the standard module whenever possible.
When I run the "puppet agent -t -d" command on the Puppet Agent, I get this error:
> Error: Could not retrieve the catalog> from remote server: Error 400 on> SERVER: Evaluation Error: Error while> evaluating a Resource Statement,> Evaluation Error: Error while> evaluating a Resource Statement,> Duplicate declaration:> Class[Cloudera::Java5] is already> declared; cannot redeclare at> /etc/puppetlabs/code.../init.pp
I don't know why I received this. I am using a plain server without customizing the Cloudera module.
To work around this problem, I commented out the class of "cloudera::java5" from the init.pp file that comes with the Cloudera module on the Puppet Master server. I then ran "puppet agent -t -d" again from the Puppet Agent server.
This time I get a very similar error except it deals with a duplicate declaration of Class[Cloudera::Cm5].
What am I supposed to do to get the Cloudera module to work? Comment out many different sections of the init.pp file?
↧
Puppet Service fails to start
My puppet service wont start. Running 16.04 ubuntu. When I run puppet agent --test is runs just fine with now issues.
terminal gives me this job for puppet.service failed because a timeout was exceeded. See "systemctl status puppet.service" and "journalctl -xe" for details.
Here is the log output
==> /var/log/syslog <== Dec 18 18:58:26 1 systemd[1]: puppet.service: Start operation timed out. Terminating.
==> /var/log/syslog <== Dec 18 18:58:26 1 systemd[1]: Failed to start Puppet agent. Dec 18 18:58:26 1 systemd[1]: puppet.service: Unit entered failed state. Dec 18 18:58:26 1 systemd[1]: puppet.service: Failed with result 'timeout'.
Here is the conf that I stripped
[main] vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl
[agent] server = puppet.whonodes.org pluginsync = true runinterval = 15m
↧
↧
Puppet [agent] service fails to start
My puppet service wont start. Running 16.04 ubuntu. When I run puppet agent --test is runs just fine with now issues.
terminal gives me this job for puppet.service failed because a timeout was exceeded. See "systemctl status puppet.service" and "journalctl -xe" for details.
Here is the log output
==> /var/log/syslog <== Dec 18 18:58:26 1 systemd[1]: puppet.service: Start operation timed out. Terminating.
==> /var/log/syslog <== Dec 18 18:58:26 1 systemd[1]: Failed to start Puppet agent. Dec 18 18:58:26 1 systemd[1]: puppet.service: Unit entered failed state. Dec 18 18:58:26 1 systemd[1]: puppet.service: Failed with result 'timeout'.
Here is the conf that I stripped
[main] vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl
[agent] server = puppet.whonodes.org pluginsync = true runinterval = 15m
↧
Impact of network stability
Hello everyopne,
I am checking if puppet could be a solution for us to deploy software to RaspberryPis and / or manage them even if they are mounted in vehicles. This scenario can not ensure a stable network connection and I am wondering how puppet is dealing with that effect.
Is puppet reverting changes if during the configuration process errors (network losses) are happening? Does puppet first try to get all external files before starting to apply changes?
Does somebody has experiences with this?
Thank you!
Thomas
↧
Do I need to use 'environment' with r10k?
Hi,
We would like to start using r10k. The only problem is that we would have to change the use of **environment** in our code base.
Current situation
-----------------
We use **environment** to distinguish between production/accreditation/stress_test environments.
We roll out the **master** branch of our repo to the puppet master. We can only roll out one branch at any one time. Each environment is defined using the following files:
- environments/accreditation/manifests/site.pp
- environments/production/manifests/site.pp
- environments/stress_test/manifests/site.pp
Problem
---
We would like to use r10k so we can access multiple branches at the same time. The problem is that would need to change every occurrence of **environment** to use a different name e.g. int_environment.
r10k maps branches 1:1 with environments. It would be better if we could use r10k and instead of it relying on environment, we could replace it with branch or some other term.
I'm aware that this probably seems like a strange question. I just dont see how we can use r10k without a major refactor of the code base and that means either: a. subverting that problem, or b. investing the effort to refactor. So worth me asking.
↧
Using variable does not work in some circonstance in a manifest
Hello all,
I do face a strange problem using an auto-generated variable data. If the variable is define literally, it work fine.
Hope someone can explain me why this is not working.
On the second part (working one), I added ******* to show the differences.
Non Working Manifest :
# Note : $myprogram_version is retrieved from a facter
class myprogram {
# Define path of the latest myprogram installation file
# Maybe this ca be change to provide puppet:/// URL but not sure....
$myprogram_path = "/etc/puppetlabs/code/environments/production/modules/plex/files"
# Retrieve version on the share folder
#
# Get version from the dowloaded installation file
$myprogram_version_latest = generate ("/bin/bash", "-c", "ls $myprogram_path/myprogram_* | awk -F'[_]' '{print \$2}' | cut -d- -f1")
# Get the istallation file full URL (including name
$myprogram_source = generate ("/bin/bash", "-c", "ls $myprogram_path/myprogram_*")
# Get only the basename using stdlib
$myprogram_filename = basename($myprogram_source)
# Check if a newer version is existing
if versioncmp($myprogram_version_latest, $myprogram_version) > 0 {
# New Version is Available - Check Sessions
if Integer($myprogram_session) == 0 {
# No myprogram Session Running
# The update code goes below this note
file { "myprogram_installation_file":
path => "/tmp/$myprogram_filename",
ensure => file,
mode => '0777',
source => "puppet:///modules/plex/$myprogram_filename",
}
package { "myprogram_installation_process":
ensure => installed,
provider => dpkg,
source => "/tmp/$myprogram_filename",
subscribe => File['myprogram_installation_file'],
}
# End of the update code
} else {
notify { "Update available but session is running - ABORT": }
}
} else {
# No update, closing
#notify { "No update available : Current = $myprogram_version : New = $myprogram_latest": }
}
}
----------
Now, the working version :
# Note : $myprogram_version is retrieved from a facter
class myprogram {
# Define path of the latest myprogram installation file
# Maybe this ca be change to provide puppet:/// URL but not sure....
$myprogram_path = "/etc/puppetlabs/code/environments/production/modules/plex/files"
# Fill the installation filename directly
# ******************************************************
$install_file = 'myprogram_1.3.3_amd64.deb'
# ******************************************************
# Retrieve version on the share folder
#
# Get version from the dowloaded installation file
$myprogram_version_latest = generate ("/bin/bash", "-c", "ls $myprogram_path/myprogram_* | awk -F'[_]' '{print \$2}' | cut -d- -f1")
# Get only the basename using stdlib
$myprogram_filename = basename($myprogram_source)
# Check if a newer version is existing
if versioncmp($myprogram_version_latest, $myprogram_version) > 0 {
# New Version is Available - Check Sessions
if Integer($myprogram_session) == 0 {
# No myprogram Session Running
# The update code goes below this note
file { "myprogram_installation_file":
path => "/tmp/$myprogram_filename",
ensure => file,
mode => '0777',
# This is the change
# *****************************************************
source => "puppet:///modules/plex/$install_file",
# *****************************************************
}
package { "myprogram_installation_process":
ensure => installed,
provider => dpkg,
source => "/tmp/$myprogram_filename",
subscribe => File['myprogram_installation_file'],
}
# End of the update code
} else {
notify { "Update available but session is running - ABORT": }
}
} else {
# No update, closing
#notify { "No update available : Current = $myprogram_version : New = $myprogram_latest": }
}
}
----------
Thanks in advance for any advice !
↧
↧
Using r10K with AWS CodeCommit
Has anyone gotten r10k to work with AWS CodeCommit? In our environment, we can only connect to git repositories with HTTPS and not SSH due to security limitations. However, when using CodeCommit HTTPS, you need to implement the AWS Credential Helper in order to authenticate. I haven't figured out any solutions at this point and just wanted to see anyone has experience with this.
↧
Does Puppet actually support agentless mode
As in the title, we all know that Ansible and even Chef support agentless mode, does Puppet support agentless mode?
↧
mco rpc shell start... using ruby 1.8.7?
Hi everyone,
I have over 1000 machines using ruby 1.8.7. I want to use the mcollective command
mco rpc shell start command=/usr/local/sbin/some.sh -I somehost
At first I was getting an error regarding securerandom.uuid. I was able to backport that code. Now I'm getting
undefined method 'spawn' for Process:Module
Can someone give me a hint as to how to solve this without upgrading ruby to 1.9.3? Thanks.
↧