introduction to parameters in foreman

45
Introduction To Parameters Tomer Brisker && Ori Rabin

Upload: tomer-brisker

Post on 13-Apr-2017

549 views

Category:

Software


0 download

TRANSCRIPT

Introduction To Parameters

Tomer Brisker && Ori Rabin

About Us

Tomer Brisker● Lives in Tel Aviv● Software Engineer @

Red Hat● Father of Luna

About Us

Tomer Brisker● Lives in Tel Aviv● Software Engineer @

Red Hat● Father of Luna

About Us

Tomer Brisker● Lives in Tel Aviv● Software Engineer @

Red Hat● Father of Luna

Ori Rabin● Lives 5 minutes from

the office● Software Engineer @

Red Hat● Is the only girl on the

team

Parameters – what is it good for?

Well, actually quite a few things...

● Templating:– Provisioning templates– Partition table templates– Remote Execution job templates

● Configuration Management:– Puppet variables– Puppet class parameters– Salt pillars– Ansible host and group variables

● Scripting● Anywhere you wish!

Two kinds of parameters

“Smart” Parameters● More flexible● Types● User-defined order● Validations● Mergeable overrides● Attached to puppet

classes (for now)

“Simple” Parameters● Key-value● Strings● Fixed order● No validation● Only overrides

Global Parameters

Global Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Class Parameters

Smart Variables

Smart Variables

Smart Variables

Host YAML

Host YAML

Host YAML

Host YAML

Classification

CC-BY-2.5 Drew R. Eddy, Julia A. Clarke - http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0017932

Classification

We looked at the code

But, it's actually pretty simple...

● Override order: fqdn, hostgroup, os● Matchers:

– fqdn = myHost.example.com value = “lions”

– hostgroup = example value = “tigers”

– os = myWeirdOs value = “bears”

● Default value: “oh my!”● You decide the order● Globals are a bit different● And that's it!

Host(group) Form

Host(group) Form

Host(group) Form

Host(group) Form

Host(group) Form

Host(group) Form

Host(group) Form

Host(group) Form

Audits

Audits

Plans for the future

● Make all parameters smart● Continue UI improvements● Organization/Location scoping● Versioning● Import/Export

Questions?

Thank you!

You can find us:

#theforeman and #theforeman-dev on freenode

[email protected]

@tbrisker_pro on twitter