Installation Guide
2-6
Cisco Intelligent Automation for Cloud Installation Guide
OL-29971-02
Chapter 2 Installing and Configuring Optional Software
Configuring Puppet Labs for Cisco IAC Integration
Working With Class Parameter Overrides
The IAC integration with Puppet allows class parameter value overrides to be configured and exposed
to users ordering servers. This is done through special JSON files that reside in the same location as your
profile module’s puppet code (under manifests). Class override parameters are always defined in the
profile module, and, if present, have the same name as profile or profile subclass followed by
“.params.json”.
Below is a sample of “webserver.params.json” corresponding to the profile class called “webserver”. For
each parameter, you provide a friendly name, description, default value, and most importantly, what
class parameter you are overriding. You can alternatively define an externally defined fact for a node by
specifying ‘fact’, ‘factor’ or an empty value for the class_param attribute of the parameter.
If you provide a comma-separated options list, users will have to choose one of the values in the list.
Override values are added to the hiera node classification file along with the role that includes the
profiles requiring these parameter values. Because class parameter overrides are handled in Hiera node
classification, be careful of parameter override precedence. Any values provided in a “class” inclusion
block, will take precedence over those values provided by Hiera.
Profile Class Parameter Overrides JSON Example
{
"id": "profile::webserver",
"parameters": {
"customer.name": {
"display_name": "Customer Name",
"description": "The customer name",
"help_text": "Please select a valid customer.", "options": "PuppetLabs,Cisco
Systems,ACME Bread",
"data_type": "string",
"validation": "", "value": "PuppetLabs", "required": "yes",
"class_param": "myapp::custname"
},
"customer.greeting": {
"display_name": "Customer Greeting",
"description": "Greeting to display to customer.",
"help_text": "Please select a customer greeting. For example, Hello.",
"options": "", "data_type": "string", "validation": "", "value": "Hello",
"required": "yes",
"class_param": ”facter"
},
"http.port": {
"display_name": "HTTP Port",
"description": "The HTTP port to use.",
"help_text": "Please select an HTTP port for the web page. Default is 80.",
"options": "", "data_type": "integer", "validation": "", "value": "99",
"required": "no",
"class_param": "apache::port"
}
}
}