|
| 1 | +# node_manager [](https://travis-ci.org/WhatsARanjit/prosvcs-node_manager) |
| 2 | + |
| 3 | +#### Table of Contents |
| 4 | +1. [Overview](#overview) |
| 5 | +1. [Requirements](#requirements) |
| 6 | +1. [node_group type](#node_group) |
| 7 | +1. [node_groups() function](#node_groups) |
| 8 | + |
| 9 | +## Overview |
| 10 | + |
| 11 | +Create and manage PE Console node groups as resources. |
| 12 | +The `https` provider is meant to erase the dependecy on |
| 13 | +the `puppetclassify` gem This helps will runtime issues |
| 14 | +when managing node_groups and installing the gem in the |
| 15 | +same agent run. To try it out: |
| 16 | + |
| 17 | +``` |
| 18 | +node_group { 'Test new provider': |
| 19 | + ensure => present, |
| 20 | + provider => 'https', |
| 21 | +} |
| 22 | +``` |
| 23 | + |
| 24 | +No changes need to be made. When the `puppetclassify` |
| 25 | +provider is dropped, the `https` provider will take over |
| 26 | +as a seamless swap-in. |
| 27 | + |
| 28 | +## Requirements: |
| 29 | + |
| 30 | +- *nix operating system |
| 31 | +- Puppet Enterprise >= 3.7.1 |
| 32 | + |
| 33 | +## Types |
| 34 | + |
| 35 | +### Node_group |
| 36 | + |
| 37 | +Node_groups will autorequire parent node_groups. |
| 38 | + |
| 39 | +Enumerate all node groups: |
| 40 | +* `puppet resource node_group`<br /> |
| 41 | + |
| 42 | +Example output for `puppet resource node_group 'PE MCollective'` |
| 43 | +``` |
| 44 | +node_group { 'PE MCollective': |
| 45 | + ensure => 'present', |
| 46 | + classes => {'puppet_enterprise::profile::mcollective::agent' => {}}, |
| 47 | + environment => 'production', |
| 48 | + id => '4cdec347-20c6-46d7-9658-7189c1537ae9', |
| 49 | + override_environment => 'false', |
| 50 | + parent => 'PE Infrastructure', |
| 51 | + rule => ['and', ['~', ['fact', 'pe_version'], '.+']], |
| 52 | +} |
| 53 | +``` |
| 54 | + |
| 55 | +#### Node_group parameters |
| 56 | + |
| 57 | +* `classes`<br /> |
| 58 | +Classes that are assigned to the node in hash format. Elements of the hash |
| 59 | +are class parameters. Default (empty hash): `{}` |
| 60 | + |
| 61 | +* `environment`<br /> |
| 62 | +Environment selected for this node group. Default: `production` |
| 63 | + |
| 64 | +* `name`<br /> |
| 65 | +(namevar) Node group's name. |
| 66 | + |
| 67 | +* `id`<br /> |
| 68 | +Universal ID for the group. This attribute is read-only. |
| 69 | + |
| 70 | +* `override_environment`<br /> |
| 71 | +Whether or not this group's environment ment setting overrides |
| 72 | +all other other environments. Default: `false` |
| 73 | + |
| 74 | +* `parent`<br /> |
| 75 | +The UID for the data group. Can be specified by group name or |
| 76 | +UID. Default: `All Nodes` |
| 77 | + |
| 78 | +* `rules`<br /> |
| 79 | +An array of classification rules. Default (empty array): `[]` |
| 80 | + |
| 81 | +## Functions |
| 82 | + |
| 83 | +### node_groups() |
| 84 | + |
| 85 | +Retrieve all or one node_group and its data. |
| 86 | + |
| 87 | +`node_groups()` will return: |
| 88 | + |
| 89 | +``` |
| 90 | +{ |
| 91 | + "All Nodes"=>{ |
| 92 | + "environment_trumps"=>false, |
| 93 | + "parent"=>"00000000-0000-4000-8000-000000000000", |
| 94 | + "name"=>"All Nodes", |
| 95 | + "rule"=>["and", ["~", "name", ".*"]], |
| 96 | + "variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000", |
| 97 | + "environment"=>"production", |
| 98 | + "classes"=>{} |
| 99 | + }, |
| 100 | + "Production environment"=>{ |
| 101 | + "environment_trumps"=>false, |
| 102 | + "parent"=>"00000000-0000-4000-8000-000000000000", |
| 103 | + "name"=>"Production environment", |
| 104 | + "rule"=>["and", ["~", "name", ".*"]], |
| 105 | + "variables"=>{}, |
| 106 | + "id"=>"7233f964-951e-4a7f-88ea-72676ed3104d", |
| 107 | + "environment"=>"production", |
| 108 | + "classes"=>{} |
| 109 | + }, |
| 110 | + ... |
| 111 | +} |
| 112 | +``` |
| 113 | + |
| 114 | +`node_groups('All Nodes')` will return: |
| 115 | + |
| 116 | +``` |
| 117 | +{ |
| 118 | + "All Nodes"=>{ |
| 119 | + "environment_trumps"=>false, |
| 120 | + "parent"=>"00000000-0000-4000-8000-000000000000", |
| 121 | + "name"=>"All Nodes", |
| 122 | + "rule"=>["and", ["~", "name", ".*"]], |
| 123 | + "variables"=>{}, "id"=>"00000000-0000-4000-8000-000000000000", |
| 124 | + "environment"=>"production", |
| 125 | + "classes"=>{} |
| 126 | + } |
| 127 | +} |
| 128 | + ``` |
| 129 | + |
| 130 | +_Type:_ rvalue |
| 131 | + |
| 132 | +## Maintainers |
| 133 | +This repositority is largely the work of some Puppet community members. |
| 134 | +It is not officially maintained by Puppet, or any individual in |
| 135 | +particular. Issues should be opened in Github. Questions should be directed |
| 136 | +at the individuals responsible for committing that particular code. |
0 commit comments