27. ● ENC
(external node
classifier)
Node classification
= an executable that
can be called by the
PuppetMaster
Returns yaml hash
- classes
- parameters
- environment
Takes one
parameter:
node FQDN
29. An API interlude
APIs exist for:
● Puppet Master (Server)
● Certificate Authority
● PuppetDB
● Console
30. An API interlude
Step 1: Authentication of the requesting server
Need:
an ssl certificate for myserver (--cert)
the private key for the certificate (--key)
the CA certificate of the master (--cacert)
Do:
puppet cert generate myserver.vm
Copy from master to myserver:
ssl/certs/myserver.pem
ssl/private_keys/myserver.pem
ssl/certs/ca.pem
31. An API interlude
Step 2: Configuration of API service
● Puppet Master / Server / CA:
Edit auth.conf:
path /puppet/v3/status
method find
allow *
path /puppet-ca/v1/certificate_status
method find, save
auth any
allow myserver
Edit ca.conf:
certificate-authority: {
certificate-status: {
client-whitelist:
[myserver]
}
}
}
32. An API interlude
Step 2: Configuration of API service
● PuppetDB:
Edit: certificate-whitelist (optional)
myserver
33. An API interlude
Step 2: Configuration of API service
● Puppet console:
Edit: rbac-certificate-whitelist
myserver
40. code
git repo
PuppetMaster
VM created
OS +
puppet
installed
Connected to
PuppetMaster
Installed and
running
Output
test
results
unit
tests
acceptanc
e tests
Workflow
for testing
VM created
VM created
OS +
puppet
installed
OS +
puppet
installed
Connected to
PuppetMaster
Connected to
PuppetMaster
Installed and
running
Installed and
running
Workflow
FOR testing
Different OSs
41. code
git repo
Load
increas
e -> VM
request
PuppetMaster
Connected to
PuppetMaster
Installed and
running
VM put into
production
VM created
from golden
image
Rapid-scaling
workflow
44. Planning your workflow
What timescales are normal for you?
“ we need rapid
scalability
to cope with load - we
create and destroy
tens of VMs a day”
“ we spin up new
machines less than
once a month, and they
remain in service for
years “