Strona główna / Społeczność / Blog / Puppet - first steps (using CentOS 7)

Puppet - first steps (using CentOS 7)

Installation

add following lines to /etc/puppetlabs/puppet/puppet.conf, of course, change puppetmaster to your host name:

you can reduce memory usage - edit /etc/sysconfig/puppetserver file and change JAVA_ARGS to:

then run service:

First manifests

To communicate with agents puppet use 8140 port - we try to open it using puppet in three steps:

  1. Install module to manage firewalld
  2. Create new puppet service
  3. Enable this service for public zone

Module installation

First we need module to manage firewalld - to install it create manifest file, ie. puppet.test.firewalld-install.pp (as you can see I used /root directory, but it does'n matter):

and test (--noop) first manifest:

after this you can apply (without --noop):

of course you could just run:

but it would be too simple ;-)

Create service

Now we can create firewalld service. Create file puppet.test.firewalld-service.pp:

and apply this:

(I cut warnings about depreciated validate functions)

As you can see there is a new file:

Again we could create this file manually, but what for?

Enable service

It's time to use this service. Create file puppet.test.firewalld-apply.pp:

(because public id default parameter zone can be omitted) and apply this:

and check:

This way is more interesting than boring:

Summary

As you can see setting up a test puppet master (and use them) is not so difficult. Configuration files and manifests are easy to understand.

Next step is to manage agents on other hosts...

Komentarze

Log in or create a user account to comment.

Ten kto umie pisze kod, ten kto nie umie pisze książki..., albo blog.

Pon Wt Śr Czw Pt So N
            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