summaryrefslogtreecommitdiff
path: root/README
blob: fa0e04ee72f9f05f44b0abe26febd000d8cdeee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
Puppet-Module for configuring Puppet itself, both the master and the clients
============================================================================

Use a seperate local module called "site_puppet", where you place your customized 
files, under:
 site_puppet/files/master/fileserver.conf
 site_puppet/files/master/puppet.conf

Usage
=====

The module currently looks for different variable values to adjust configuration
of the master.

Installing a specific versions
------------------------------

If you need to install a different version of puppet, other than the most recent,
you can pass the following parameter:

puppet_ensure_version => '2.7.18-1~bpo60+1'

You can also specify a different facter version by passing the following parameter:

facter_ensure_version => '1.6.9-2~bpo60+2'

Run puppet by cron:
-------------------

By default puppet runs as its own daemon. However, you might want to run puppet
by cron. To do this, you have to include `puppet::cron` instead of `puppet`. If
you include puppet::cron then by default puppet will run twice an hour, spread
amongst the half an hour depending on the host's fqdn. If you wish to change
that interval, you can tweak $crontime (NOTE: this variable only operates
on the minute cron field).

Clientbucket cleanup:
---------------------

The individual node client buckets aren't cleaned up automatically, unless you
specify cleanup_clientbucket => 'X', where X is a value that is valid for
passing to the tidy resource and how long you want to keep clientbucket files
for.

Use http compression
--------------------

To enable http compression on the clients, set puppet_http_compression => true

Puppetmaster Mode:
------------------

If you want to run the puppetmaster in a non-webrick based
mode, you can set the mode parameter either to:

* passenger, run puppetmaster as a passenger application, you will need the
  passenger module to take advantage of this

* cluster, run puppetmaster as a mongrel based cluster, you will need the
  nginx and mongrel modules to take advantage of this

In both cases you have to setup the appropriate frontends (apache vhost
configuration/nginx vhost configuration) on your own.

If you need to install a specific version of puppetmaster, you can specify the
version to be installed by doing the following:

ensure_version =>'2.7.18-1~bpo60+1'

NOTE: You will need the apt module in order to specify the puppetmaster version.
Also, this functionality is only implemented for Debian and derived distributions.


Munin
-----

If you are using munin, and have the puppet munin module installed, you can set
the parameter manage_munin => true to have graphs setup for you. The graphs that
will be setup track memory usage by the running puppetmasters; track the average
compile time of clients; and if you are using postgresql/mysql then a graph to
monitor resource counts.

Reports cleanup:
---------------

By default we clean up reports older than 30 days. If you want to change
that, you can set the parameter cleanup_reports to one of the following
values:

* 'X', where X is the amount of days you want to keep reports for false, to
* disable reports cleanup (use a value valid for the tidy resource)

If your reports are in a different place than the default, you can set
the reports_dir parameter to adjust their location.

Check last run:
---------------

We can check on the last run state of certain clients, to check whether they
still check in. You can do that by setting the lastruncheck_cron parameter:

* any cron time: '20 10,22 * * *' to run the script at a certain time
  by cron. Default: 40 10 * * *
* false: to disable check for last run

You will need the cron module to take advantage of this functionality. 

Stored configs:
---------------

If you want to use storedconfigs on your puppetmaster, there are some
pre-requisite modules: mysql, rails. In your puppetmaster node definition you
will need to pass the password to the hasdb class and set the storeconfigs
parameter to be true to enable stored configs.

Then you will need to either put in your node definition, or in
site_puppet/manifests/init.pp puppet::puppetmaster::hasdb to setup the database
with the right parameters. This will setup your storeconfigs database, adding to
the database the correct user, the correct grant permissions, and also setup
a munin graph, if you have manage_munin => true

Currently, only mysql is supported. See manifests/puppetmaster/hasdb.pp for the
define variables you can set.

Example:
--------

node puppetmaster {
  class { 'puppet::master':
    cron_time    => "0,12 * * * *",
    storeconfigs => true,
    mode         => 'passenger',
    manage_munin => true
  }
  puppet::master::hasdb { 'puppet':
    dbuser => 'puppet',
    dbpwd  => 'bar'
  }
...