blob: 82fca450aba1f12c64892a21c83e4ecb89b7b1c9 [file] [log] [blame]
Filip Pytloun49768a42015-10-06 16:28:32 +02001
2=======
3reclass
4=======
5
6reclass is an external node classifier (ENC) as can be used with automation tools, such as Puppet, Salt, and Ansible. It is also a stand-alone tool for merging data sources recursively.
7
8Sample pillars
9==============
10
11Reclass storage with data fetched from git
12
13.. code-block:: yaml
14
15 reclass:
16 storage:
17 enabled: true
18 base_dir: /srv/reclass
19 data_source:
20 engine: git
21 address: git@repo.domain.com:reclass/reclass-project.git
22 revision: master
23
24Reclass storage with local data source
25
26.. code-block:: yaml
27
28 reclass:
29 storage:
30 enabled: true
31 base_dir: /srv/reclass
32 data_source:
33 engine: local
34
Ales Komareka4a9f572016-12-03 20:15:50 +010035Reclass model with single node definition
36
37.. code-block:: yaml
38
39 reclass:
40 storage:
41 enabled: true
42 node:
43 service_node01:
44 name: svc01
45 domain: deployment.local
46 classes:
47 - cluster.deployment_name.service.role
48 params:
49 salt_master_host: <<salt-master-ip>>
50 linux_system_codename: trusty
51 single_address: <<node-ip>>
52
53Reclass model with multiple node defined
54
55.. code-block:: yaml
56
57 reclass:
58 storage:
59 enabled: true
60 repeat_replace_symbol: '<<count>>'
61 node:
62 service_node01:
63 name: node<<count>>
64 domain: deployment.local
65 classes:
66 - cluster.deployment.service.role
67 repeat:
68 count: 2
69 start: 5
70 digits: 2
71 params:
72 single_address:
73 value: 10.0.0.<<count>>
74 start: 100
75 deploy_address:
76 value: part-<<count>>-whole
77 start: 5
78 digits: 3
79 params:
80 salt_master_host: <<salt-master-ip>>
81 linux_system_codename: trusty
82
Filip Pytloun49768a42015-10-06 16:28:32 +020083Reclass storage with arbitrary class mappings
84
85.. code-block:: yaml
86
87 reclass:
88 storage:
89 enabled: true
90 ...
91 class_mappings:
92 - target: '\*'
93 class: default
94
95Read more
96=========
97
98* http://reclass.pantsfullofunix.net/index.html
99* http://reclass.pantsfullofunix.net/operations.html
100* http://ryandlane.com/blog/2014/12/10/reloading-grains-and-pillars-during-a-saltstack-run/