41
Manifests of future past

Puppet Camp Amsterdam 2015: Manifests of Future Past

Embed Size (px)

Citation preview

Manifests of

future past

daenney• ~5.5 years • pypuppetdb • Puppetboard • puppetlabs-apt • github.com/puppet-community

Future parser

Know thy data!

No more validate_*

No more create_resources

Future parserType system

Hash  $var  =  {},

Hash[      Enum[a,  b]  ]  $var  =  {a  =>  true,                      b  =>  true                    },

Complex types

Struct[{a  =>  Boolean,                  b  =>  Integer,                }]  $var  =  ...  

Struct[{      policy    =>  Enum[changed,  always,                                      daily,  weekly],      timeout  =>  Optional[Integer],  ]}  $update  =  {  'policy'  =>  'changed'  },

Variant[      Integer,  String  ]  $port  =  1024,

Variant[      Integer[1024,  65536],        String  ]  $port  =  1024,

Variant[      Integer[1024,  65536],      String[4,  5],  ]  $port  =  1024,

Future parserDefaults and splat

File  {      owner  =>  0,      group  =>  0,      mode    =>  '0640',  }  

file  {  '/etc/fstab':      source  =>  'puppet:///...',  }  

file  {      default:            owner  =>  0,            group  =>  0,            mode    =>  '0640;      '/etc/fstab':            source  =>  'puppet:///...';  }  

$file_etc  =  {  'owner'  =>  0,                              'group'  =>  0,                              'mode'    =>  '0640',  }  

file  {  '/etc/fstab':      source  =>  'puppet:///...',      *            =>  $file_etc,  }

-­‐-­‐-­‐  file_etc:      owner:  0      group:  0      mode:  '0640'  

class  fstab  (      $file_etc,  ){      file  {  '/etc/fstab':          source  =>  'puppet:///...',          *            =>  $file_etc,      }  }

Define your own type?

Security

notice(md5("240610708")  ==  md5("QNKCDZO"))

Current parser: true

Future parser: false

Does anyone know why?

md5('240610708'): 0e462097431906509019562988736854

md5('QNKCDZO'): 0e830400451993494058024219903391

Roll-out

Masterless

Scaling the masters is easy

Scaling the workflow is not

Aligned Autonomy

Lots of testing

Testing environment

Production environment

Fall-back to old parser

Communicate, a lot!

Stuff will go wrong

People will complain

q?