Puppet Master/Agent installation on rhel7

Source: Internet
Author: User
Tags stomp

========================================================== ========================================================== ========================================================== ====================================
Master172.31.10.249 linux1 linux1.test.com
Agent172.31.10.220 linux2 linux2.test.com
========================================================== ========================================================== ========================================================== ====================================
Install puppet master

========================================================== ========================================================== ========================================================== ====================================
[[Email protected] Puppet] # Cat/etc/RedHat-release
Red Hat Enterprise Linux Server Release 7.0 (MAIPO)
[[Email protected] ~] # Hostname linux1
[[Email protected] ~] # Rpm-IVH http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
[[Email protected] ~] # Yum list | grep puppet
Puppet. noarch 3.7.2-1. el7 puppetlabs-Products
Puppet-server.noarch 3.7.2-1. el7 puppetlabs-Products
Puppetdb. noarch 2.2.2-1. el7 puppetlabs-Products
Puppetdb-terminus.noarch 2.2.2-1. el7 puppetlabs-Products
Puppetserver. noarch 0.3.0-1. el7 puppetlabs-Products
Ruby-shadow.x86_64. 2.0-2. el7 puppetlabs-deps
Rubygem-deep_merge.noarch 1.0.0-2. el7 puppetlabs-deps
Rubygem-puppet-lint.noarch 0.3.2-1. el7 puppetlabs-deps
Rubygem-stomp.noarch 1.3.2-1. el7 puppetlabs-deps
Rubygem-stomp-doc.noarch 1.3.2-1. el7 puppetlabs-deps
[[Email protected] ~] # Yum install puppet-Server
Installed:
Puppet-server.noarch 0: 3. 7.2-1. el7

Dependency installed:
Augeas-libs.x86_64. 1.0-12. el7 facter. x86_64. 2.0-1. el7 hiera. noarch. 3.4-1. el7 libselinux-ruby.x86_64 0: 2. 2.2-6. el7 pciutils. x86_64 0: 3. 2.1-4. el7
Puppet. noarch 0: 3. 7.2-1. el7 Ruby. x86_64 0: 2. 0.0.353-20. el7 ruby-augeas.x86_64 0: 0. 5.0-1. el7 ruby-irb.noarch 0: 2. 0.0.353-20. el7 ruby-libs.x86_64 0: 2. 0.0.353-20. el7
Ruby-shadow.x86_64. 2.0-2. el7 rubygem-bigdecimal.x86_64. 2.0-20. el7 rubygem-io-console.x86_64. 4.2-20. el7 rubygem-json.x86_64. 7.7-20. el7 rubygem-psych.x86_64. 0.0-20. el7.-20. el7
Rubygem-rdoc.noarch. 0.0-20. el7 rubygems. noarch. 0.14-20. el7

Complete!
[[Email protected] Puppet] # Vim/etc/puppet. conf
Dns_alt_names = linux1, linux1.test.com
Certname = linux1.test.com
Server = linux1.test.com

[[Email protected] Puppet] # ls-L/var/lib/puppet/
Total 0
Drwxr-x ---. 2 puppet 6 Oct 21 :54 reports
Drwxr-x ---. 2 puppet 6 Oct 21 17: 54 state
[[Email protected] Puppet] # puppet master -- verbose -- no-daemonize
Info: creating a new SSL Key for CA
Info: creating a new SSL certificate request for CA
Info: certificate request fingerprint (sha256): 72: 8d: 7b: 70: 02: 59: 01: F7: 95: C1: 77: 49: 87: 28: F6: 96: 23: 26: A1: 27: A8: DC: 58: CD: 34: F9: 44: 69: 4b: D5: 46: 60
Notice: signed certificate request for CA
Info: creating a new Certificate Revocation List
Info: creating a new SSL Key for linux1.cn-north-1.compute.internal
Info: csr_attributes file loading from/etc/puppet/csr_attributes.yaml
Info: creating a new SSL certificate request for linux1.cn-north-1.compute.internal
Info: certificate request fingerprint (sha256): 8e: 8c: 8c: C0: E1: 88: 2a: E1: FF: 65: E3: 06: 25: 79: 8B: b4: E3: B3: FB: 34: B1: 97: 4E: 48: 70: 1E: F8: C4: FD: 97: 72: 83
Notice: Linux 1.cn-north-1.compute.internal has a waiting certificate request
Notice: signed certificate request for linux1.cn-north-1.compute.internal
Notice: removing file puppet: SSL: certificaterequest linux1.cn-north-1.compute.internal at '/var/lib/puppet/SSL/CA/requests/linux1.cn-north-1.compute.internal.pem'
Notice: removing file puppet: SSL: certificaterequest linux1.cn-north-1.compute.internal at '/var/lib/puppet/SSL/certificate_requests/linux1.cn-north-1.compute.internal.pem'
Notice: Starting puppet master version 3.7.2
[[Email protected] Puppet] # ls-L/var/lib/puppet/
Total 4
Drwxr-x ---. 2 puppet 6 Oct 29 23:49 Bucket
Drwxr-XR-X. 2 root Root 6 Oct 29 23:49 facts. d
Drwxr-XR-X. 2 root Root 6 Oct 29 23:49 lib
Drwxr-x ---. 2 puppet 6 Oct 21 :54 reports
Drwxr-x ---. 2 puppet 6 Oct 29 23:49 RRD
Drwxr-x ---. 2 puppet 6 Oct 29 23:49 server_data
Drwxrwx -- X. 8 puppet 4096 Oct 29 SSL
Drwxr-XR-T. 2 puppet 6 Oct 21 :54 state
Drwxr-x ---. 2 puppet 6 Oct 29 23:49 yaml

[[Email protected] public_keys] # service puppetmaster start
Redirecting to/bin/systemctl start puppetmaster. Service

[[Email protected] public_keys] # puppet Cert list

========================================================== ========================================================== ========================================================== ====================================
Install puppet agent

========================================================== ========================================================== ========================================================== ====================================
[[Email protected] ~] # Cat/etc/RedHat-release
Red Hat Enterprise Linux Server Release 7.0 (MAIPO)
[[Email protected] ~] # Rpm-IVH http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
Retrieving http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
Warning:/var/tmp/rpm-tmp.905Pmg: Header V4 RSA/sha1 signature, key ID 4bd6ec30: nokey
Preparing... ################################### [100%]
Updating/installing...
1: puppetlabs-release-7-11 ################################# [100%]


[[Email protected] ~] # Yum install puppet
Installed:
Puppet. noarch. 7.2-1. el7

Dependency installed:
Augeas-libs.x86_64. 1.0-12. el7 facter. x86_64. 2.0-1. el7 hiera. noarch. 3.4-1. el7 libselinux-ruby.x86_64 0: 2. 2.2-6. el7 pciutils. x86_64 0: 3. 2.1-4. el7
Ruby. x86_64 0: 2. 0.0.353-20. el7 ruby-augeas.x86_64 0: 0. 5.0-1. el7 ruby-irb.noarch 0: 2. 0.0.353-20. el7 ruby-libs.x86_64 0: 2. 0.0.353-20. el7 ruby-shadow.x86_64. 2.0-2. el7
Rubygem-bigdecimal.x86_64. 2.0-20. el7 rubygem-io-console.x86_64. 4.2-20. el7 rubygem-json.x86_64. 7.7-20. el7 rubygem-psych.x86_64. 0.0-20. el7 rubygem-rdoc.noarch. 0.0-20. el7.-20. el7
Rubygems. noarch. 0.14-20. el7

Complete!
[[Email protected] ~] # Cat/etc/hosts
172.31.10.249 linux1 linux1.test.com
172.31.10.220 linux2 linux2.test.com

[[Email protected] ~] # Vim/etc/puppet. conf
Server = linux1.test.com
Certname = linux2.test.com

[[Email protected] ~] # Ls-L/var/lib/puppet/
Total 0
Drwxr-x ---. 2 puppet 6 Oct 21 :54 reports
Drwxr-x ---. 2 puppet 6 Oct 21 17: 54 state

[[Email protected] ~] # Service puppet start
Redirecting to/bin/systemctl start puppet. Service

[[Email protected] ~] # Ls-L/var/lib/puppet/
Total 0
Drwxr-x ---. 2 root Root 6 Oct 30 clientbucket
Drwxr-x ---. 2 root Root 6 Oct 30 client_data
Drwxr-x ---. 2 root Root 6 Oct 30 client_yaml
Drwxr-XR-X. 2 root Root 6 Oct 30 facts. d
Drwxr-XR-X. 2 root Root 6 Oct 30 02-58 lib
Drwxr-x ---. 2 puppet 6 Oct 21 :54 reports
Drwxrwx -- X. 7 puppet 96 Oct 30 SSL
Drwxr-XR-T. 3 puppet 19 Oct 30 02: 58 State
========================================================== ========================================================== ========================================================== ====================================
Sign cert for the agent and verify connection

========================================================== ========================================================== ========================================================== ====================================
[[Email protected] Puppet] # puppet Cert list
"Linux2.test.com" (sha256) 9B: 00: 2C: 3f: 44: F2: D7: E1: 59: D9: 50: 4C: EE: 34: A1: ED: 34: BD: 1f: 2b: 58: BF: B6: Ea: 3D: 60: 6f: 1D: FB: 5b: 1f: Ea

[[Email protected] Puppet] # puppet Cert sign linux2.test.com
Notice: signed certificate request for linux2.test.com
Notice: removing file puppet: SSL: certificaterequest linux2.test.com at '/var/lib/puppet/SSL/CA/requests/linux2.test.com. pem'

[[Email protected] Puppet] # tail-F/var/log/puppet/masterhttp. Log
[03:09:01] 172.31.10.220--[30/OCT/2014: 03: 09: 01 EDT] "Get/production/Certificate/linux2.test.com? HTTP/1.1 "200 1980
[03:09:01]-->/production/Certificate/linux2.test.com?
[03:09:01] 172.31.10.220--[30/OCT/2014: 03: 09: 01 EDT] "Get/production/certificate_revocation_list/CA? HTTP/1.1 "200 991
[03:09:01]-->/production/certificate_revocation_list/CA?
[03:09:01] 172.31.10.220--[30/OCT/2014: 03: 09: 01 EDT] "Get/production/node/linux2.test.com? Transaction_uuid = 1816306d-94b3-4c84-b74c-1d3faad000048 & fail_on_404 = true HTTP/1.1 "200 85
[03:09:01]-->/production/node/linux2.test.com? Transaction_uuid = 1816306d-94b3-4c84-b74c-1d3faad31648 & fail_on_404 = true
[03:09:01] 172.31.10.220--[30/OCT/2014: 03: 09: 01 EDT] "Get/production/file_metadatas/pluginfacts? Links = manage & recurse = true & ignore =. SVN & ignore = CVS & ignore =. Git & checksum_type = MD5 HTTP/1.1 "200 278
[03:09:01]-->/production/file_metadatas/pluginfacts? Links = manage & recurse = true & ignore =. SVN & ignore = CVS & ignore =. Git & checksum_type = MD5
[03:09:01] 172.31.10.220--[30/OCT/2014: 03: 09: 01 EDT] "Get/production/file_metadatas/plugins? Links = manage & recurse = true & ignore =. SVN & ignore = CVS & ignore =. Git & checksum_type = MD5 HTTP/1.1 "200 278
[03:09:01]-->/production/file_metadatas/plugins? Links = manage & recurse = true & ignore =. SVN & ignore = CVS & ignore =. Git & checksum_type = MD5
[03:09:02] 172.31.10.220--[30/OCT/2014: 03: 09: 02 EDT] "post/production/CATALOG/linux2.test.com HTTP/1.1" 200 576
[03:09:02]->/production/CATALOG/linux2.test.com
[03:09:02] 172.31.10.220--[30/OCT/2014: 03: 09: 02 EDT] "Put/production/report/linux2.test.com HTTP/1.1" 200 9
[03:09:02]->/production/report/linux2.test.com

[[Email protected] Puppet] # service puppetmaster status
Oct 30 03:02:32 linux1 puppet [10681]: Notice: Starting puppet master version 3.7.2
Oct 30 03:09:02 linux1 puppet [10681]: Notice: compiled catalog for linux2.test.com in environment production in 0.01 seconds

[[Email protected] Puppet] # service puppet status
Oct 30 03:07:01 linux2 puppet-agent [1157]: did not receive certificate
Oct 30 03:09:01 linux2 puppet-agent [1157]: Starting puppet Client Version 3.7.2
Oct 30 03:09:02 linux2 puppet-agent [1230]: Finished catalog run in 0.01 seconds

[[Email protected] Puppet] # puppet agent -- Test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: caching catalog for linux2.test.com
Info: Applying configuration version '20140901'
Notice: Finished catalog run in 0.01 seconds

[[Email protected] Puppet] # puppet agent -- Test
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: caching catalog for linux1.test.com
Info: Applying configuration version '20140901'
Info: Creating state file/var/lib/puppet/State. yaml
Notice: Finished catalog run in 0.01 seconds
========================================================== ========================================================== ========================================================== ====================================
Install a module from the forge

========================================================== ========================================================== ========================================================== ====================================
[[Email protected] Puppet] # puppet module list
/Etc/puppet/modules (no modules installed)
/Usr/share/puppet/modules (no modules installed)

[[Email protected] Puppet] # puppet module search Apache | grep puppetlabs
Notice: Searching https://forgeapi.puppetlabs.com...
Puppetlabs-Apache Puppet module for Apache @ puppetlabs Apache Web httpd centos RHEL Ubuntu SSL wsgi proxy
Puppetlabs-Passenger puppet module for passpet @ puppetlabs Apache passenger rails rack
[[Email protected] Puppet] # puppet module install puppetlabs-Apache
Notice: preparing to install into/etc/puppet/modules...
Notice: downloading from https://forgeapi.puppetlabs.com...
Notice: Installing -- do not interrupt...
/Etc/puppet/modules
 "€â" ¬ puppetlabs-Apache (v1.1.1)
 "œ â" €â "€puppetlabs-Concat (v1.1.2)
 "€â" €puppetlabs-stdlib (v4.3.2)

[[Email protected] Puppet] # puppet module list
/Etc/puppet/modules
 "œ â" €â "€puppetlabs-Apache (v1.1.1)
 "œ â" €â "€puppetlabs-Concat (v1.1.2)
 "€â" €puppetlabs-stdlib (v4.3.2)
/Usr/share/puppet/modules (no modules installed)

[[Email protected] Puppet] # ls-L/etc/puppet/modules/
Total 12
Drwxr-XR-X. 8 Root 4096 Jul 18 14:08 Apache
Drwxr-XR-X. 7 Root 4096 Oct 28 15:13 Concat
Drwxr-XR-X. 6 Root 4096 Jul 16 :11 stdlib


Other command
[[Email protected] Puppet] # puppet module uninstall puppetlabs-Apache
[[Email protected] Puppet] # puppet module upgrade puppetlabs-Apache -- version 0.0.3
[[Email protected] Puppet] # puppet module install -- module_repository http://dev-forge.example.com puppetlabs-Apache
[[Email protected] Puppet] # puppet module install ~ /Puppetlabs-apache-0.10.0.tar.gz -- ignore-dependencies
========================================================== ========================================================== ========================================================== ====================================
Https://docs.puppetlabs.com/

Puppet Master/Agent installation on rhel7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.