Puppet

notify和require要成对使用

如何检查puppet的class文件语法: This is how to do a a syntax check on a file.

puppet parser validate <filename> #e.g. ruby-server.pp
err: Could not parse for environment development: Syntax error at ';'; expected ']'
at /etc/puppet/manifests/classes/ruby-server.pp:2

打印puppet配置文件

puppet agent --configprint all|grep 00
puppet master --configprint libdir

生成相关用户和目录

puppet master --mkusers
puppet agent --mkusers

puppet dashborad

DB初始化

rake RAILS_ENV=production db:migrate

dashboard.conf

Listen 3000
NameVirtualHost *:3000

<VirtualHost *:3000>
  DocumentRoot /usr/share/puppet-dashboard/public/
  ErrorLog /var/log/httpd/dashboard_error.log
  CustomLog /var/log/httpd/dashboard_access.log combined

  RailsAutoDetect On
  AddDefaultCharset UTF-8

  RailsEnv production

  <Location "/">
    Order           deny,allow
    Deny from       all
    Allow from      all
  </Location>
</VirtualHost>

puppetmaster.conf

Listen 8140

<VirtualHost *:8140>
        SSLEngine on
        SSLProtocol -ALL +SSLv3 +TLSv1
        SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP

        SSLCertificateFile      /etc/puppet/ssl/certs/jack94202.mobcon.inside.pem
        SSLCertificateKeyFile   /etc/puppet/ssl/private_keys/jack94202.mobcon.inside.pem
        SSLCertificateChainFile /etc/puppet/ssl/ca/ca_crt.pem
        SSLCACertificateFile    /etc/puppet/ssl/ca/ca_crt.pem
        # If Apache complains about invalid signatures on the CRL, you can try disabling
        # CRL checking by commenting the next line, but this is not recommended.
        SSLCARevocationFile     /etc/puppet/ssl/ca/ca_crl.pem
        SSLVerifyClient optional
        SSLVerifyDepth  1
        SSLOptions +StdEnvVars

        DocumentRoot /etc/puppet/rack/puppetmaster/public/
        RackBaseURI /
        <Directory /etc/puppet/rack/puppetmaster>
                Options None
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
</VirtualHost>

passenger.conf

# The passenger module path should match ruby gem version
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/local/bin/ruby

# you probably want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RackAutoDetect Off
RailsAutoDetect Off

foreman.conf

Listen 3001
NameVirtualHost *:3001

<virtualhost *:3001>
  DocumentRoot /usr/share/foreman/public

  RailsAutoDetect On
  AddDefaultCharset UTF-8

  RailsEnv production

  ErrorLog /var/log/httpd/foreman_error.log
  CustomLog /var/log/httpd/foreman_access.log combined

  <Location "/">
    Order           deny,allow
    Deny from       all
    Allow from      all
  </Location>
</virtualhost>

gem相关依赖包

gem list --local

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.3.12, 2.3.5)
actionpack (2.3.12, 2.3.5)
activemodel (3.0.9)
activerecord (3.0.9, 2.3.12, 2.3.5)
activeresource (3.0.9, 2.3.12, 2.3.5)
activesupport (3.0.9, 2.3.12, 2.3.5)
amqp (0.7.3)
arel (2.0.10)
bluecloth (2.1.0)
builder (2.1.2)
bundler (1.0.15)
daemon_controller (0.2.6)
erubis (2.6.6)
eventmachine (0.12.10)
facter (1.6.0)
fastthread (1.0.7)
gli (1.3.2)
i18n (0.5.0)
json (1.5.3)
mail (2.2.19)
mime-types (1.16)
mocha (0.9.12)
mysql (2.8.1)
nokogiri (1.5.0)
passenger (2.2.11)
polyglot (0.3.2)
puppet (2.7.1)
puppet-module (0.3.3)
rack (1.1.0)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (2.3.12, 2.3.5)
railties (3.0.9)
rake (0.9.2)
rdoc (3.9.1)
rest-client (1.4.0)
ruby-shadow (2.1.2)
rubygems-update (1.6.2)
showoff (0.4.2)
sinatra (1.2.6)
stomp (1.1.9)
term-ansicolor (1.0.5)
thor (0.14.6)
tilt (1.3.2)
treetop (1.4.10)
tzinfo (0.3.29)

facter rpm安装包

cp: cannot stat `COPYING': No such file or directory
cp: cannot stat `README': No such file or directory

从facter.spec中注释掉
/home1/yepnnet/public_html/wiki/data/pages/puppet.txt · 最后更改: 2011/10/25 00:43 由 admin
到顶部
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0