Puppet 4 : Changes
bogotobogo.com site search:
Puppet
Puppet with Amazon AWS I - Puppet accounts
Puppet with Amazon AWS II (ssh & puppetmaster/puppet install)
Puppet with Amazon AWS III - Puppet running Hello World
Puppet Code Basics - Terminology
Puppet with Amazon AWS on CentOS 7 (I) - Master setup on EC2
Puppet with Amazon AWS on CentOS 7 (II) - Configuring a Puppet Master Server with Passenger and Apache
Puppet master /agent ubuntu 14.04 install on EC2 nodes
Puppet master post install tasks - master's names and certificates setup,
Puppet agent post install tasks - configure agent, hostnames, and sign request
EC2 Puppet master/agent basic tasks - main manifest with a file resource/module and immediate execution on an agent node
Setting up puppet master and agent with simple scripts on EC2 / remote install from desktop
EC2 Puppet - Install lamp with a manifest ('puppet apply')
EC2 Puppet - Install lamp with a module
Puppet variable scope
Puppet packages, services, and files
Puppet packages, services, and files II with nginx
Puppet templates
Puppet creating and managing user accounts with SSH access
Puppet Locking user accounts & deploying sudoers file
Puppet exec resource
Puppet classes and modules
Puppet Forge modules
Puppet Express
Puppet Express 2
Puppet 4 : Changes
Puppet --configprint
Puppet with Docker
Puppet 6.0.2 install on Ubuntu 18.04
Note
In this chapter, we'll discuss the future changes in Puppet 4. Some of the features will be an error and some of them will get warnings.
import
Puppet's normal behavior is to compile a single manifest (the "site manifest") and autoload any referenced classes from modules (optionally doing the same with a list of classes from an ENC). Puppet's autoloading mechanism is a great feature, once you understand how it works. It makes code more readable as well as loading classes much faster. Before the autoloading mechanism existed though, there was the import statement.
The import keyword causes Puppet to compile more than one manifest without autoloading from modules.
"The import keyword is deprecated. Using it will cause deprecation warnings to be logged on the Puppet master, and we plan to remove import completely in Puppet 4." - Importing Manifests.
What to Use Instead?
New users should avoid the import keyword, and existing users should stop using it. Instead, do the following:
- To keep node definitions in separate files, specify a directory as main manifest.
- To load classes and defined types, use modules.
Together, these two features replace import completely.
node inheritance
A node is identified by the PuppetMaster by its hostname or certname.
We use the inherits keyword to allow nodes to inherit definitions from other nodes:
node 'streaming' inherits basenode {
include stream_server # /modules/manifests/stream_server.pp
class { 'in_stream':
brokerId => '1',
zookeeper => 'streaming:2181',
}
}
Node inheritance was a feature that was introduced well before we had roles & profiles and hiera. In Puppet 4.0,
Node inheritance is completely removed while in Puppet 3.7, node inheritance causes a deprecation warning.
We can use hiera:
hiera_include node ('classes')
Non-directory environment support
Directory environments have replaced config-file based environments and probably any non-directory environment support is going away.
Puppet
Puppet with Amazon AWS I - Puppet accounts
Puppet with Amazon AWS II (ssh & puppetmaster/puppet install)
Puppet with Amazon AWS III - Puppet running Hello World
Puppet Code Basics - Terminology
Puppet with Amazon AWS on CentOS 7 (I) - Master setup on EC2
Puppet with Amazon AWS on CentOS 7 (II) - Configuring a Puppet Master Server with Passenger and Apache
Puppet master /agent ubuntu 14.04 install on EC2 nodes
Puppet master post install tasks - master's names and certificates setup,
Puppet agent post install tasks - configure agent, hostnames, and sign request
EC2 Puppet master/agent basic tasks - main manifest with a file resource/module and immediate execution on an agent node
Setting up puppet master and agent with simple scripts on EC2 / remote install from desktop
EC2 Puppet - Install lamp with a manifest ('puppet apply')
EC2 Puppet - Install lamp with a module
Puppet variable scope
Puppet packages, services, and files
Puppet packages, services, and files II with nginx
Puppet templates
Puppet creating and managing user accounts with SSH access
Puppet Locking user accounts & deploying sudoers file
Puppet exec resource
Puppet classes and modules
Puppet Forge modules
Puppet Express
Puppet Express 2
Puppet 4 : Changes
Puppet --configprint
Puppet with Docker
Puppet 6.0.2 install on Ubuntu 18.04