puppet是做什麼的
Puppet is a cross platform framework enabling system administrators to perform common tasks using code. The code can do a variety of tasks from installing new software, to checking file permissions, or updating user accounts. Puppet is great not only during the initial installation of a system, but also throughout the system's entire life cycle. In most circumstances puppet will be used in a client/server configuration.
This section will cover installing and configuring Puppet in a client/server configuration. This simple example will demonstrate how to install Apache using Puppet.
這裡有一些配置
Now setup some resources for apache2. Create a file /etc/puppet/manifests/site.pp containing the following:
package {
'apache2':
ensure => installed
}
service {
'apache2':
ensure => true,
enable => true,
require => Package['apache2']
}
Next, create a node file /etc/puppet/manifests/nodes.pp with:
node 'meercat02.example.com' {
include apache2
}
sudo /etc/init.d/puppetmaster restart
sudo /etc/init.d/puppet start
為什麼這樣就可以安裝apache了呢??
《解決方案》
Puppet在系統中到底擔當什麼角色,負責哪些技術細節??
《解決方案》
學習了~~~~~~~~~~
《解決方案》
樓主貼出的配置是指 puppetmaster, 即 puppet 服務端定義的配置, 客戶端(puppet agent)通過讀取服務端(puppetmaster)定義的配置執行相應的操作, 譬如安裝軟體、配置等.
《解決方案》
很好用的東東哦
《解決方案》
其實puppet優點也在這裡:你不必要關心這個安裝過程,更不必寫出一個像shell一樣的過程腳本,告訴系統具體怎麼做,puppet會根據你想要得到的狀態結果自己去做這些事情。當然前提是根據不同的包管理器選擇不同的資源,puppet支持if和case等這樣的判斷和選擇條件。puppet是如何知道該利用什麼工具去安裝部署呢,這個就要利用fact了,fact這個工具可以獲取主機客戶端操作系統信息 提交給puppetmaster master會在編譯配置文件的時候 利用這些信息,選擇判斷相應的操作系統類型進行安裝操作。。。大概這個意思吧!
《解決方案》
掙點幣,可以在站內發信息,謝謝
《解決方案》
http://myunix.blog.51cto.com/191254/d-5
你看一下,希望對你有幫助。