SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
PUPPET EVOLUTIONS
Alessandro Franceschi
@alvagante
Italian DevOps Day 2016
AL VAGANTE
• Founder and CTO at example42 GmbH
• Puppet user / trainer since 2007
• Author of the book "Extending Puppet"
• Author of ## Puppet modules, Puppi,Tiny Puppet
• github.com/alvagante
AGENDA
• Evolution of configuration management tools
• Puppet 4 and the evolution of the language
CFGMGMTTOOLS EVOLVE
• System resources (packages, services, files, users... )
• Applications (app specific resources)
What did we manage yesterday?
CFGMGMTTODAY
• Network devices
• Storage
• Cloud resources
• Containers
• Systems and applications, still
Managing whole IT infrastructures
MANAGING NETWORKS
• Proxy mode via puppet device
(Puppet code executed on a remote node)
• Native client (Cisco, Huawei,Arista, Cumulus
networks)
(Puppet code executed on the network device)
Alternative management modes
NETDEV STDLIB
• Puppet types for network resources
• Providers are in separated, vendor specific,
modules
Abstracting network resources
domain_name name_server network_dns network_interface network_snmp network_trunk
network_vlan ntp_config ntp_server port_channel radius radius_global radius_server
radius_server_group search_domain snmp_community snmp_notification
snmp_notification_receiver snmp_user syslog_server syslog_settings tacacs tacacs_global
tacacs_server tacacs_server_group
Common types
puppet module install puppetlabs-netapp
Sample code
node 'ontap01.example.com' {
netapp_aggregate { 'aggr1':
ensure => present,
diskcount => '6',
}
netapp_vserver { 'vserver01':
ensure => present,
rootvol => 'vserver01_root',
rootvolaggr => 'aggr1',
rootvolsecstyle => 'unix',
}
netapp_lif { 'vserver01_lif':
ensure => present,
homeport => 'e0c',
homenode => 'ontap01',
address => '10.0.207.5',
vserver => 'vserver01',
netmask => '255.255.255.0',
dataprotocols => ['nfs'],
}
}
node 'vserver01.example.com' {
netapp_export_policy { 'nfs_exports':
ensure => present,
}
netapp_export_rule { 'nfs_exports:1':
ensure => present,
clientmatch => '10.0.0.0/8',
protocol => ['nfs'],
superusersecurity => 'none',
rorule => ['sys','none'],
rwrule => ['sys','none'],
}
netapp_volume { 'vserver01_root':
exportpolicy => 'nfs_exports',
}
netapp_volume { 'nfsvol':
ensure => present,
aggregate => 'aggr1',
initsize => '200g',
exportpolicy => 'nfs_exports',
junctionpath => '/nfsvol',
}
netapp_qtree { 'qtree1':
ensure => present,
volume => 'nfsvol',
}
netapp_nfs { 'vserver01':
ensure => present,
state => 'on',
v3 => 'disabled',
MANAGING CLOUDS
• Public cloud resources management (AWS,Azure,
Google Cloud, Digital Ocean...)
• Private cloud infrastructure management
(VMWare, OpenStack)
Several cloud related modules
puppet module install puppetlabs-aws
ec2_instance { 'instance-name':
ensure => present,
region => 'us-west-1',
image_id => 'ami-123456',
instance_type => 't1.micro',
}
ec2_securitygroup { 'name-of-group':
ensure => present,
region => 'us-east-1',
description => 'a description of the group',
ingress => [{
protocol => 'tcp',
port => 80,
cidr => '0.0.0.0/0',
},{
security_group => 'other-security-group',
}],}
cloudwatch_alarm ec2_autoscalinggroup ec2_elastic_ip ec2_instance ec2_launchconfiguration
ec2_scalingpolicy ec2_securitygroup ec2_vpc ec2_vpc_customer_gateway ec2_vpc_dhcp_options
ec2_vpc_internet_gateway ec2_vpc_routetable ec2_vpc_subnet ec2_vpc_vpn ec2_vpc_vpn_gateway
elb_loadbalancer rds_db_parameter_group rds_db_securitygroup rds_instance route53_a_record
route53_aaaa_record route53_cname_record route53_mx_record route53_ns_record route53_ptr_record
route53_spf_record route53_srv_record route53_txt_record route53_zone sqs_queue
Sample code
Supported resources
puppet module install puppetlabs-azure
Sample code
azure_vm { 'sample':
ensure => present,
location => 'eastus',
image => 'canonical:ubuntuserver:14.04.2-LTS:latest',
user => 'azureuser',
password => 'Password',
size => 'Standard_A0',
resource_group => 'testresacc01',
}
MANAGING CONTAINERS
• Modules to install and configure Docker
components (Engine, Swarm, Registry...), images
and containers
• Modules to manage Docker ecosystem software
(Kubernetes, Mesos...)
Managing containers infrastructures
puppet module install puppetlabs-docker_platform
Sample code
class {'docker':
tcp_bind => 'tcp://127.0.0.1:4243',
socket_bind => 'unix:///var/run/docker.sock',
version => '0.5.5',
dns => '8.8.8.8',
docker_users => [ 'user1', 'user2' ],
}
docker::image { 'ubuntu':
ensure => 'present',
image_tag => 'precise',
docker_file => '/tmp/Dockerfile',
}
docker::run { 'helloworld':
image => 'base',
command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"',
}
docker::registry { 'example.docker.io:5000':
username => 'user',
password => 'secret',
email => 'user@example.com',
}
puppet module install puppetlabs-garethr-kubernetes
Sample code
kubernetes_pod { 'sample-pod':
ensure => present,
metadata => {
namespace => 'default',
},
spec => {
containers => [{
name => 'container-name',
image => 'nginx',
}]
},
}
kubernetes_aws_elastic_block_store_volume_source kubernetes_binding kubernetes_capabilities kubernetes_capability kubernetes_ceph_fs_volume_source kubernetes_cinder_volume_source
kubernetes_component_condition kubernetes_component_status kubernetes_component_status_list kubernetes_container kubernetes_container_port kubernetes_container_state
kubernetes_container_state_running kubernetes_container_state_terminated kubernetes_container_state_waiting kubernetes_container_status kubernetes_daemon_endpoint kubernetes_delete_options
kubernetes_downward_api_volume_file kubernetes_downward_api_volume_source kubernetes_empty_dir_volume_source kubernetes_endpoint_address kubernetes_endpoint_port kubernetes_endpoint_subset
kubernetes_endpoints kubernetes_endpoints_list kubernetes_env_var kubernetes_env_var_source kubernetes_event kubernetes_event_list kubernetes_event_source kubernetes_exec_action
kubernetes_fc_volume_source kubernetes_finalizer_name kubernetes_flocker_volume_source kubernetes_gce_persistent_disk_volume_source kubernetes_git_repo_volume_source
kubernetes_glusterfs_volume_source kubernetes_handler kubernetes_host_path_volume_source kubernetes_http_get_action kubernetes_iscsi_volume_source kubernetes_lifecycle kubernetes_limit_rang
kubernetes_limit_range_item kubernetes_limit_range_list kubernetes_limit_range_spec kubernetes_list_meta kubernetes_load_balancer_ingress kubernetes_load_balancer_status
kubernetes_local_object_reference kubernetes_namespace kubernetes_namespace_list kubernetes_namespace_spec kubernetes_namespace_status kubernetes_nfs_volume_source kubernetes_node
kubernetes_node_address kubernetes_node_condition kubernetes_node_daemon_endpoints kubernetes_node_list kubernetes_node_spec kubernetes_node_status kubernetes_node_system_info
kubernetes_object_field_selector kubernetes_object_meta kubernetes_object_reference kubernetes_patch kubernetes_persistent_volume kubernetes_persistent_volume_access_mode
kubernetes_persistent_volume_claim kubernetes_persistent_volume_claim_list kubernetes_persistent_volume_claim_spec kubernetes_persistent_volume_claim_status
kubernetes_persistent_volume_claim_volume_source kubernetes_persistent_volume_list kubernetes_persistent_volume_spec kubernetes_persistent_volume_status kubernetes_pod kubernetes_pod_condit
kubernetes_pod_list kubernetes_pod_security_context kubernetes_pod_spec kubernetes_pod_status kubernetes_pod_template kubernetes_pod_template_list kubernetes_pod_template_spec kubernetes_pr
kubernetes_rbd_volume_source kubernetes_replication_controller kubernetes_replication_controller_list kubernetes_replication_controller_spec kubernetes_replication_controller_status
kubernetes_resource_quota kubernetes_resource_quota_list kubernetes_resource_quota_spec kubernetes_resource_quota_status kubernetes_resource_requirements kubernetes_se_linux_options
kubernetes_secret kubernetes_secret_list kubernetes_secret_volume_source kubernetes_security_context kubernetes_service kubernetes_service_account kubernetes_service_account_list
kubernetes_service_list kubernetes_service_port kubernetes_service_spec kubernetes_service_status kubernetes_status kubernetes_status_cause kubernetes_status_details kubernetes_tcp_socket_a
kubernetes_volume kubernetes_volume_mount kubernetes_watch_event
Supported resources
(Puppet types automatically generated from APIs)
Manages kubernetes resources but not its installation
PUPPET 4 (R)EVOLUTION
• All In One packages
• Puppet Server , Puppet Agent , Facter 3
• NewType System
• Language improvements
• Deprecations
Better language, new foundations
ALL IN ONE PACKAGES
• Dedicated repositories (Software Collections)
• File paths changed (a lot!)
• Client: puppet-agent
Installs Puppet, Hiera, Mcollective and the full Ruby stack
• Server: puppetserver
Clojure application, running inside a JVM (JRuby for ruby code)
Full Stack packaging
FACTER EVOLUTIONS
• Structured facts (can be array, hashes, booleans...)
(Since Facter 2)
• Aggregated resolution
(Facts values can be resolved in multiple steps. Since Facter 2)
• CFacter (or native facter: way faster, written in C)
(Facter 3. Enabled by default from Puppet 4.2)
Facter reloaded
TYPE SYSTEM
• A new powerful type system
• Can be used for parameters evaluation
class myclass (
Integer[22-1024] $port,
Variant[Boolean,String] $ensure = present,
Hash $options_hash = { },
Boolean $test_enable = false,
Variant[Undef,String] $test_template = undef,
String[1] $debug_dir = '/tmp',
Everything has a type
ITERATIONS
• Iterations over resources are based on lambdas
• Dedicated functions: each, slice, filter, map, reduce
We can iterate inside our code, finally
# Iteration over arrays

$pkg = [ php,php-mysql,apa]
each($pkg) | $value | {
package { $value:
ensure => present,
}
}
# Iteration over hashes
$h = { '1' => ['a','b','c'], '2' => 'foo' }
each($h) | $key, $value | {
notice "$key = $value"
}
EPPTEMPLATES
• Alternative to Ruby Erb templates (still valid)
• Epp function accepts an hash of parameters
• Parameters have to be specified in the header (and can be
validated via theType system)
Templates using Puppet DSL
Declaration of parameters is part of the epp function and specified within a hash:
content = epp('<path to template>', {
'header' => 'Copyright example42',
'informations' => ['Puppet 4', 'EPP']
}),
Parameters need to be specified as a header:
<%- | String $header = '',
Array $informations = [] | -%>
<%= $header %>
List of informations:
<% $informations.each | String $info | { -%>
- <%= $info %>
<% } -%>
PUPPET DSL FUNCTIONS
• Ruby no more needed for Puppet functions
• Autoloaded from a module's function directory
cat tp/functions/is_empty.pp


function tp::is_empty (
Any $input,
) {
$output = $input ? {
false => true,
'' => true,
undef => true,
default => false,
}
}
Functions written in Puppet DSL
cat tp/functions/ensure2bool.pp
function tp::ensure2bool (
Variant[Boolean,String] $input =
present,
$default = undef,
) {
$output = $input ? {
'absent' => false,
false => false,
'present' => true,
true => true,
default => $default,
}
}
A LOT MORE...
• Directory environments
• Heredoc support
• New functions API (for ruby functions)
• A lot of code cleanups (and deprecations)
Other notable changes in Puppet 4
AND MORETO COME
• Puppet lookup function (Data in Modules)
• Puppet Communication / Execution protocol
• Application Orchestration
Experimental or more recent additions
DEPRECATIONS
• Goodbye nodes inheritance
• Empty strings evaluate are true in P4
• Goodbye classes and defines in ruby
• Variables can't start with capital letters or underscore
• Reference deprecations: Class ['Ssh'] must be Class['ssh']
• No more hyphens in classes, defines and modules names
• import statement
• Variables dynamic scoping in erb templates
Stuff no more supported or changed in Puppet 4
FUTURE DEPRECATIONS
• Webrick and rack Puppet Master (only Puppet Server)
• Support for Windows 2003
• Non-Strict variables (error when accessing undefined
variables)
• Automatic symlinks in file resources for ensure => /path
• APIs: Puppet.newtype (Use Puppet::Type.newtype instead)
• Puppet faces becomes a private API (custom faces in modules
won't be supported)
• Config settings: cfacter, configtimeout, ignorecache
What won't work in Puppet 5
– Louis D. Brandeis
“There are no shortcuts in evolution”
Prezzo Early Bird (iscrizioni entro 06/05): 1.790,00 € + IVA
Prezzo di Listino: 1.990,00 € + IVA
Organizers
Trainer
Alessandro Franceschi

Weitere ähnliche Inhalte

Was ist angesagt?

London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt LongLondon Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt LongOpenCredo
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Puppet
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Puppet
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaAlessandro Franceschi
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
Puppet and the Model-Driven Infrastructure
Puppet and the Model-Driven InfrastructurePuppet and the Model-Driven Infrastructure
Puppet and the Model-Driven Infrastructurelkanies
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Puppet
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE WorkshopPuppet
 
Test Driven Development with Puppet
Test Driven Development with Puppet Test Driven Development with Puppet
Test Driven Development with Puppet Puppet
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012Walter Heck
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Puppet
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...Puppet
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...Puppet
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugDavid Golden
 

Was ist angesagt? (20)

London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt LongLondon Hashicorp Meetup #8 -  Testing Programmable Infrastructure By Matt Long
London Hashicorp Meetup #8 - Testing Programmable Infrastructure By Matt Long
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014Test Driven Development with Puppet - PuppetConf 2014
Test Driven Development with Puppet - PuppetConf 2014
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
Puppet and the Model-Driven Infrastructure
Puppet and the Model-Driven InfrastructurePuppet and the Model-Driven Infrastructure
Puppet and the Model-Driven Infrastructure
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE Workshop
 
Test Driven Development with Puppet
Test Driven Development with Puppet Test Driven Development with Puppet
Test Driven Development with Puppet
 
OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012OlinData Puppet Presentation for MOSC 2012
OlinData Puppet Presentation for MOSC 2012
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020
 
C++ for the Web
C++ for the WebC++ for the Web
C++ for the Web
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
 
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
Orchestrated Functional Testing with Puppet-spec and Mspectator - PuppetConf ...
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
PuppetConf 2016: Getting to the Latest Puppet – Nate McCurdy & Elizabeth Witt...
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Cooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with JitterbugCooking Perl with Chef: Real World Tutorial with Jitterbug
Cooking Perl with Chef: Real World Tutorial with Jitterbug
 

Ähnlich wie Puppet evolutions

Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)DECK36
 
Cloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the CloudCloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the Cloudpetriojala123
 
Puppet atbazaarvoice
Puppet atbazaarvoicePuppet atbazaarvoice
Puppet atbazaarvoiceDave Barcelo
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operationsgrim_radical
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop AutomationRui Lapa
 
Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringAlessandro Franceschi
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)DECK36
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingTheofilos Papapanagiotou
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)DECK36
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationSean Chittenden
 
Puppet for Developers
Puppet for DevelopersPuppet for Developers
Puppet for Developerssagarhere4u
 
Puppet at Bazaarvoice
Puppet at BazaarvoicePuppet at Bazaarvoice
Puppet at BazaarvoicePuppet
 
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~Brocade
 
Ansible, voyage au centre de l'automatisation
Ansible, voyage au centre de l'automatisationAnsible, voyage au centre de l'automatisation
Ansible, voyage au centre de l'automatisationMickael Hubert
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Luca Lusso
 

Ähnlich wie Puppet evolutions (20)

Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
Our Puppet Story – Patterns and Learnings (sage@guug, March 2014)
 
Cloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the CloudCloud Meetup - Automation in the Cloud
Cloud Meetup - Automation in the Cloud
 
Puppet atbazaarvoice
Puppet atbazaarvoicePuppet atbazaarvoice
Puppet atbazaarvoice
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operations
 
Linux Desktop Automation
Linux Desktop AutomationLinux Desktop Automation
Linux Desktop Automation
 
Sierraware ARM hypervisor
Sierraware ARM hypervisor Sierraware ARM hypervisor
Sierraware ARM hypervisor
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
 
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model ServingKubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
Kubecon 2023 EU - KServe - The State and Future of Cloud-Native Model Serving
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern Automation
 
Puppet for Developers
Puppet for DevelopersPuppet for Developers
Puppet for Developers
 
Puppet at Bazaarvoice
Puppet at BazaarvoicePuppet at Bazaarvoice
Puppet at Bazaarvoice
 
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~
Event-driven automation, DevOps way ~IoT時代の自動化、そのリアリティとは?~
 
UVM TUTORIAL;
UVM TUTORIAL;UVM TUTORIAL;
UVM TUTORIAL;
 
Build Automation 101
Build Automation 101Build Automation 101
Build Automation 101
 
Ansible, voyage au centre de l'automatisation
Ansible, voyage au centre de l'automatisationAnsible, voyage au centre de l'automatisation
Ansible, voyage au centre de l'automatisation
 
Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!Do you know what your drupal is doing? Observe it!
Do you know what your drupal is doing? Observe it!
 
Monkey man
Monkey manMonkey man
Monkey man
 

Mehr von Alessandro Franceschi

Mehr von Alessandro Franceschi (14)

DevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdfDevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdf
 
Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!
 
ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!
 
Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?
 
Puppet Systems Infrastructure Construction Kit
Puppet Systems Infrastructure Construction KitPuppet Systems Infrastructure Construction Kit
Puppet Systems Infrastructure Construction Kit
 
Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
 
Raise the bar! Reloaded
Raise the bar! ReloadedRaise the bar! Reloaded
Raise the bar! Reloaded
 
Raise the bar!
Raise the bar!Raise the bar!
Raise the bar!
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
 
Puppet modules: An Holistic Approach
Puppet modules: An Holistic ApproachPuppet modules: An Holistic Approach
Puppet modules: An Holistic Approach
 
Spaghetti devops
Spaghetti devopsSpaghetti devops
Spaghetti devops
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 

Kürzlich hochgeladen

Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa494f574xmv
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxDyna Gilbert
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书zdzoqco
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 

Kürzlich hochgeladen (11)

Film cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasaFilm cover research (1).pptxsdasdasdasdasdasa
Film cover research (1).pptxsdasdasdasdasdasa
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Top 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptxTop 10 Interactive Website Design Trends in 2024.pptx
Top 10 Interactive Website Design Trends in 2024.pptx
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
办理多伦多大学毕业证成绩单|购买加拿大UTSG文凭证书
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 

Puppet evolutions

  • 2. AL VAGANTE • Founder and CTO at example42 GmbH • Puppet user / trainer since 2007 • Author of the book "Extending Puppet" • Author of ## Puppet modules, Puppi,Tiny Puppet • github.com/alvagante
  • 3. AGENDA • Evolution of configuration management tools • Puppet 4 and the evolution of the language
  • 4. CFGMGMTTOOLS EVOLVE • System resources (packages, services, files, users... ) • Applications (app specific resources) What did we manage yesterday?
  • 5. CFGMGMTTODAY • Network devices • Storage • Cloud resources • Containers • Systems and applications, still Managing whole IT infrastructures
  • 6. MANAGING NETWORKS • Proxy mode via puppet device (Puppet code executed on a remote node) • Native client (Cisco, Huawei,Arista, Cumulus networks) (Puppet code executed on the network device) Alternative management modes
  • 7. NETDEV STDLIB • Puppet types for network resources • Providers are in separated, vendor specific, modules Abstracting network resources domain_name name_server network_dns network_interface network_snmp network_trunk network_vlan ntp_config ntp_server port_channel radius radius_global radius_server radius_server_group search_domain snmp_community snmp_notification snmp_notification_receiver snmp_user syslog_server syslog_settings tacacs tacacs_global tacacs_server tacacs_server_group Common types
  • 8. puppet module install puppetlabs-netapp Sample code node 'ontap01.example.com' { netapp_aggregate { 'aggr1': ensure => present, diskcount => '6', } netapp_vserver { 'vserver01': ensure => present, rootvol => 'vserver01_root', rootvolaggr => 'aggr1', rootvolsecstyle => 'unix', } netapp_lif { 'vserver01_lif': ensure => present, homeport => 'e0c', homenode => 'ontap01', address => '10.0.207.5', vserver => 'vserver01', netmask => '255.255.255.0', dataprotocols => ['nfs'], } } node 'vserver01.example.com' { netapp_export_policy { 'nfs_exports': ensure => present, } netapp_export_rule { 'nfs_exports:1': ensure => present, clientmatch => '10.0.0.0/8', protocol => ['nfs'], superusersecurity => 'none', rorule => ['sys','none'], rwrule => ['sys','none'], } netapp_volume { 'vserver01_root': exportpolicy => 'nfs_exports', } netapp_volume { 'nfsvol': ensure => present, aggregate => 'aggr1', initsize => '200g', exportpolicy => 'nfs_exports', junctionpath => '/nfsvol', } netapp_qtree { 'qtree1': ensure => present, volume => 'nfsvol', } netapp_nfs { 'vserver01': ensure => present, state => 'on', v3 => 'disabled',
  • 9. MANAGING CLOUDS • Public cloud resources management (AWS,Azure, Google Cloud, Digital Ocean...) • Private cloud infrastructure management (VMWare, OpenStack) Several cloud related modules
  • 10. puppet module install puppetlabs-aws ec2_instance { 'instance-name': ensure => present, region => 'us-west-1', image_id => 'ami-123456', instance_type => 't1.micro', } ec2_securitygroup { 'name-of-group': ensure => present, region => 'us-east-1', description => 'a description of the group', ingress => [{ protocol => 'tcp', port => 80, cidr => '0.0.0.0/0', },{ security_group => 'other-security-group', }],} cloudwatch_alarm ec2_autoscalinggroup ec2_elastic_ip ec2_instance ec2_launchconfiguration ec2_scalingpolicy ec2_securitygroup ec2_vpc ec2_vpc_customer_gateway ec2_vpc_dhcp_options ec2_vpc_internet_gateway ec2_vpc_routetable ec2_vpc_subnet ec2_vpc_vpn ec2_vpc_vpn_gateway elb_loadbalancer rds_db_parameter_group rds_db_securitygroup rds_instance route53_a_record route53_aaaa_record route53_cname_record route53_mx_record route53_ns_record route53_ptr_record route53_spf_record route53_srv_record route53_txt_record route53_zone sqs_queue Sample code Supported resources
  • 11. puppet module install puppetlabs-azure Sample code azure_vm { 'sample': ensure => present, location => 'eastus', image => 'canonical:ubuntuserver:14.04.2-LTS:latest', user => 'azureuser', password => 'Password', size => 'Standard_A0', resource_group => 'testresacc01', }
  • 12. MANAGING CONTAINERS • Modules to install and configure Docker components (Engine, Swarm, Registry...), images and containers • Modules to manage Docker ecosystem software (Kubernetes, Mesos...) Managing containers infrastructures
  • 13. puppet module install puppetlabs-docker_platform Sample code class {'docker': tcp_bind => 'tcp://127.0.0.1:4243', socket_bind => 'unix:///var/run/docker.sock', version => '0.5.5', dns => '8.8.8.8', docker_users => [ 'user1', 'user2' ], } docker::image { 'ubuntu': ensure => 'present', image_tag => 'precise', docker_file => '/tmp/Dockerfile', } docker::run { 'helloworld': image => 'base', command => '/bin/sh -c "while true; do echo hello world; sleep 1; done"', } docker::registry { 'example.docker.io:5000': username => 'user', password => 'secret', email => 'user@example.com', }
  • 14. puppet module install puppetlabs-garethr-kubernetes Sample code kubernetes_pod { 'sample-pod': ensure => present, metadata => { namespace => 'default', }, spec => { containers => [{ name => 'container-name', image => 'nginx', }] }, } kubernetes_aws_elastic_block_store_volume_source kubernetes_binding kubernetes_capabilities kubernetes_capability kubernetes_ceph_fs_volume_source kubernetes_cinder_volume_source kubernetes_component_condition kubernetes_component_status kubernetes_component_status_list kubernetes_container kubernetes_container_port kubernetes_container_state kubernetes_container_state_running kubernetes_container_state_terminated kubernetes_container_state_waiting kubernetes_container_status kubernetes_daemon_endpoint kubernetes_delete_options kubernetes_downward_api_volume_file kubernetes_downward_api_volume_source kubernetes_empty_dir_volume_source kubernetes_endpoint_address kubernetes_endpoint_port kubernetes_endpoint_subset kubernetes_endpoints kubernetes_endpoints_list kubernetes_env_var kubernetes_env_var_source kubernetes_event kubernetes_event_list kubernetes_event_source kubernetes_exec_action kubernetes_fc_volume_source kubernetes_finalizer_name kubernetes_flocker_volume_source kubernetes_gce_persistent_disk_volume_source kubernetes_git_repo_volume_source kubernetes_glusterfs_volume_source kubernetes_handler kubernetes_host_path_volume_source kubernetes_http_get_action kubernetes_iscsi_volume_source kubernetes_lifecycle kubernetes_limit_rang kubernetes_limit_range_item kubernetes_limit_range_list kubernetes_limit_range_spec kubernetes_list_meta kubernetes_load_balancer_ingress kubernetes_load_balancer_status kubernetes_local_object_reference kubernetes_namespace kubernetes_namespace_list kubernetes_namespace_spec kubernetes_namespace_status kubernetes_nfs_volume_source kubernetes_node kubernetes_node_address kubernetes_node_condition kubernetes_node_daemon_endpoints kubernetes_node_list kubernetes_node_spec kubernetes_node_status kubernetes_node_system_info kubernetes_object_field_selector kubernetes_object_meta kubernetes_object_reference kubernetes_patch kubernetes_persistent_volume kubernetes_persistent_volume_access_mode kubernetes_persistent_volume_claim kubernetes_persistent_volume_claim_list kubernetes_persistent_volume_claim_spec kubernetes_persistent_volume_claim_status kubernetes_persistent_volume_claim_volume_source kubernetes_persistent_volume_list kubernetes_persistent_volume_spec kubernetes_persistent_volume_status kubernetes_pod kubernetes_pod_condit kubernetes_pod_list kubernetes_pod_security_context kubernetes_pod_spec kubernetes_pod_status kubernetes_pod_template kubernetes_pod_template_list kubernetes_pod_template_spec kubernetes_pr kubernetes_rbd_volume_source kubernetes_replication_controller kubernetes_replication_controller_list kubernetes_replication_controller_spec kubernetes_replication_controller_status kubernetes_resource_quota kubernetes_resource_quota_list kubernetes_resource_quota_spec kubernetes_resource_quota_status kubernetes_resource_requirements kubernetes_se_linux_options kubernetes_secret kubernetes_secret_list kubernetes_secret_volume_source kubernetes_security_context kubernetes_service kubernetes_service_account kubernetes_service_account_list kubernetes_service_list kubernetes_service_port kubernetes_service_spec kubernetes_service_status kubernetes_status kubernetes_status_cause kubernetes_status_details kubernetes_tcp_socket_a kubernetes_volume kubernetes_volume_mount kubernetes_watch_event Supported resources (Puppet types automatically generated from APIs) Manages kubernetes resources but not its installation
  • 15. PUPPET 4 (R)EVOLUTION • All In One packages • Puppet Server , Puppet Agent , Facter 3 • NewType System • Language improvements • Deprecations Better language, new foundations
  • 16. ALL IN ONE PACKAGES • Dedicated repositories (Software Collections) • File paths changed (a lot!) • Client: puppet-agent Installs Puppet, Hiera, Mcollective and the full Ruby stack • Server: puppetserver Clojure application, running inside a JVM (JRuby for ruby code) Full Stack packaging
  • 17. FACTER EVOLUTIONS • Structured facts (can be array, hashes, booleans...) (Since Facter 2) • Aggregated resolution (Facts values can be resolved in multiple steps. Since Facter 2) • CFacter (or native facter: way faster, written in C) (Facter 3. Enabled by default from Puppet 4.2) Facter reloaded
  • 18. TYPE SYSTEM • A new powerful type system • Can be used for parameters evaluation class myclass ( Integer[22-1024] $port, Variant[Boolean,String] $ensure = present, Hash $options_hash = { }, Boolean $test_enable = false, Variant[Undef,String] $test_template = undef, String[1] $debug_dir = '/tmp', Everything has a type
  • 19. ITERATIONS • Iterations over resources are based on lambdas • Dedicated functions: each, slice, filter, map, reduce We can iterate inside our code, finally # Iteration over arrays
 $pkg = [ php,php-mysql,apa] each($pkg) | $value | { package { $value: ensure => present, } } # Iteration over hashes $h = { '1' => ['a','b','c'], '2' => 'foo' } each($h) | $key, $value | { notice "$key = $value" }
  • 20. EPPTEMPLATES • Alternative to Ruby Erb templates (still valid) • Epp function accepts an hash of parameters • Parameters have to be specified in the header (and can be validated via theType system) Templates using Puppet DSL Declaration of parameters is part of the epp function and specified within a hash: content = epp('<path to template>', { 'header' => 'Copyright example42', 'informations' => ['Puppet 4', 'EPP'] }), Parameters need to be specified as a header: <%- | String $header = '', Array $informations = [] | -%> <%= $header %> List of informations: <% $informations.each | String $info | { -%> - <%= $info %> <% } -%>
  • 21. PUPPET DSL FUNCTIONS • Ruby no more needed for Puppet functions • Autoloaded from a module's function directory cat tp/functions/is_empty.pp 
 function tp::is_empty ( Any $input, ) { $output = $input ? { false => true, '' => true, undef => true, default => false, } } Functions written in Puppet DSL cat tp/functions/ensure2bool.pp function tp::ensure2bool ( Variant[Boolean,String] $input = present, $default = undef, ) { $output = $input ? { 'absent' => false, false => false, 'present' => true, true => true, default => $default, } }
  • 22. A LOT MORE... • Directory environments • Heredoc support • New functions API (for ruby functions) • A lot of code cleanups (and deprecations) Other notable changes in Puppet 4
  • 23. AND MORETO COME • Puppet lookup function (Data in Modules) • Puppet Communication / Execution protocol • Application Orchestration Experimental or more recent additions
  • 24. DEPRECATIONS • Goodbye nodes inheritance • Empty strings evaluate are true in P4 • Goodbye classes and defines in ruby • Variables can't start with capital letters or underscore • Reference deprecations: Class ['Ssh'] must be Class['ssh'] • No more hyphens in classes, defines and modules names • import statement • Variables dynamic scoping in erb templates Stuff no more supported or changed in Puppet 4
  • 25. FUTURE DEPRECATIONS • Webrick and rack Puppet Master (only Puppet Server) • Support for Windows 2003 • Non-Strict variables (error when accessing undefined variables) • Automatic symlinks in file resources for ensure => /path • APIs: Puppet.newtype (Use Puppet::Type.newtype instead) • Puppet faces becomes a private API (custom faces in modules won't be supported) • Config settings: cfacter, configtimeout, ignorecache What won't work in Puppet 5
  • 26. – Louis D. Brandeis “There are no shortcuts in evolution”
  • 27. Prezzo Early Bird (iscrizioni entro 06/05): 1.790,00 € + IVA Prezzo di Listino: 1.990,00 € + IVA Organizers Trainer Alessandro Franceschi