|
Puppet subcommands Introduction
# Puppet -V // Check puppet version
# Puppet help // Check puppet supported subcommands
# Puppet agent --configprint confdir // view the directory profile
1, puppet master
# Puppet help master // viewing of common parameter of master
Start puppet by puppet master daemon mode and parameters as follows
# Puppet master --verbose --no-daemonize
2, puppet agent
# Puppet help agent // Check the agent commonly used parameters
Access test mode parameters are accessed through the puppet agent after the master for configuration information
# Puppet agent --server = monitor.comratings.com --test
The following is information after a request agent configuration information is displayed matser
3, puppet cert is a certificate signed by puppet administration command
Specific details we can see the puppet help cert, the following are a few simple, by English meaning we should all understand.
# Puppet cert list
# Puppet cert sign vpn.comratings.com
# Puppet cert sign --all
There is also a relatively safe way of signature, the "pre-signature scheme", that is, after the administrator in advance of the signing certificate file generation push on the agent machine, through the puppet cert --generate pick HOSTNAME way to pre-production-signed certificate. Command is as follows:
# Puppet cert --generate example.comratings.com
Here it will be pre-generated example.comratings.com, including the agent's private key, agent certificates and CA certificates, as follows:
/var/lib/puppet/ssl/certs/example.comratings.com.pem
/var/lib/puppet/ssl/certs/ca.pem
/var/lib/puppet/ssl/private_keys/example.comratings.com.pem
The top three certificate files to the agent on top of it, the bulk of access puppet relatively safe.
4, puppet apply is a tool to perform a separate code
We create a file test.pp
# Vim test.pp
notify { "hello world":}
# Puppet apply test.pp
We can also call the puppet snippet directly execute parameter puppet apply tools, as follows:
# Puppet apply --execute "notify { 'hello world':}"
5, puppet module is the base module puppet tool
It contains the download, update, search, update, create a base module and other functions, it can find a good puppet base module has been developed code to work for us from the puppet forge, in order to reduce duplication of effort operation and maintenance engineers.
First, find the search parameters puppet forge through the apache module related infrastructure, using the following command:
# Puppet module search apache
You can install the module required by install parameters and parameter to specify the version by version, using the following command:
# Puppet module install puppetlabs-apache
Uninstall
# Puppet module uninstall puppetlabs-apache
Installed base module according to master the main configuration file puppet.conf in modulepath parameter module into the base directory specified, the default path is / etc / puppet / modules. |
|
|
|