Automation Tools
Puppet
要點
-agent-base
-Pull model
-TCP port 8140 to reach Master
-works on Linux/Unix
-Open source /paid enterprise
-domain-specific language (DSL)
架構
- Master (centralized server) / Replica [compiles manifests into catalogs(compiled format) -> client]
- Module [vvvvv]
- Manifests [vvvvv]
- Templates [set up configuration files]
- Files
- Catalogs [compiled format, Catalog = Facts + Manifests]
- Resource [basic unit of system configuration modeling]
- Class [organize the code]
- Module [vvvvv]
- Agent on nodes, clients
- Factor [有nodes的ip, os, uptime, int及send changes report to Master]
Module
- Collection of manifests, Templates, Files
- for organizing our Puppet code
- directory path “/etc/puppet/manifests/”
- facilitate sharing and reusing
Manifests
- Puppet configuration scripts (in Ruby code)
- “.pp” extension
- domain-specific language (DSL): Ruby language
指令
class cnos::vlan { cnos_vlan { '10': ensure => 'present', vlan_id => 10, admin_state => 'up', vlan_name => '9tut', } }
$ puppet apply vlan.pp Notice: Compiled catalog for puppetmaster.9tut in environment production in 0.03 seconds Notice: Finished catalog run in 0.03 seconds