summaryrefslogtreecommitdiffstats
path: root/recipes-support/puppet/README
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support/puppet/README')
-rw-r--r--recipes-support/puppet/README75
1 files changed, 75 insertions, 0 deletions
diff --git a/recipes-support/puppet/README b/recipes-support/puppet/README
new file mode 100644
index 0000000..2de808a
--- /dev/null
+++ b/recipes-support/puppet/README
@@ -0,0 +1,75 @@
1What is Puppet
2------------------------
3Puppet is a configuration management system that allows you to define the
4state of your IT infrastructure, then automatically enforces the correct state.
5
6
7Basic Requirements
8------------------------
9Ruby 1.8.7 or later
10Facter 1.7.0 or later
11Hiera 1.0 or later
12The json gem (any modern version)
13
14
15Simple Demo
16------------------------
17In this simple demo, we have a CA master server named 'master' and ip is 192.168.2.83
18and an agent node named 'agent', ip is 192.168.2.30.
19
20On master server, file 'test.cfg' is under /etc/puppet/files/, puppet will sync this
21file to /opt/ folder on agent node.
22
23Step 1: Configure Puppet CA Master Server
241) create a puppet group and user
25$ puppet resource group puppet ensure=presnt
26$ puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
27
282) create the CA certificate and the puppet master certificate
29$ puppet master --verbose --no-daemonize
30(Once it says Notice: Starting Puppet master version <VERSION>, type ctrl-C to kill the process)
31
323) $ vi /etc/hosts
33add new line:
34192.168.2.30 agent
35
364) start puppet master
37$ puppet master --verbose --no-daemonize &
38
39
40Step 2: Config Puppet Agent Node
411) Edit puppet.conf
42$ echo "[main]
43server = master" >> /etc/puppet/puppet.conf
44
452) $ vi /etc/hosts
46add new line:
47192.168.2.83 master
48
493) Request certificates
50$ puppet agent --test --ca_server=t2080qds -w 60
51(Accept the request on master server by this command: puppet cert sign --all)
52
53
54Step 3: Add site map on master
551) Edit /etc/puppet/fileserver.conf to make /etc/puppet/files available
56$ mkdir /etc/puppet/files
57$ touch /etc/puppet/files/test.cfg
58$ vi /etc/puppet/fileserver.conf
59add following lines:
60[extra_files]
61 path /etc/puppet/files
62 allow *
63
642) Add a new sitemap
65$ vi /etc/puppet/manifests/site.pp
66add follwing lines:
67file
68{ "/opt/test.cfg":
69source => "puppet:///extra_files/test.cfg",
70}
71
72
73Step 4: Run puppet on agent
74$ puppet agent --test
75$ ls /opt/