Skip to content

Commit 4c4b5cd

Browse files
committed
docs: add comprehensive configuration reference under docs/
- Add docs/ folder with an index plus topical pages for provisioners, installation, converge, cookbook resolution, paths, and target mode - Document every option exposed via default_config across CincBase, CincInfra, CincSolo, CincApply, and CincTarget - Replace the inline option list in README.md with links into docs/ Signed-off-by: Lance Albertson <lance@osuosl.org>
1 parent 35bbeff commit 4c4b5cd

8 files changed

Lines changed: 642 additions & 120 deletions

File tree

README.md

Lines changed: 16 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -103,126 +103,22 @@ platforms:
103103
104104
### Configuration Options
105105
106-
#### `product_name`
107-
108-
- **Type:** String
109-
- **Default:** `cinc`
110-
- **Description:** The product to install. Set to `cinc` for Cinc Client or `cinc-workstation` for Cinc Workstation.
111-
112-
#### `product_version`
113-
114-
- **Type:** String
115-
- **Default:** `latest`
116-
- **Description:** The version of Cinc Client to install. Can be a specific version (e.g., `19.2.12`) or `latest`.
117-
118-
#### `channel`
119-
120-
- **Type:** String/Symbol
121-
- **Default:** `stable`
122-
- **Options:** `stable`, `current`
123-
- **Description:** The release channel to install from.
124-
125-
#### `install_strategy`
126-
127-
- **Type:** String
128-
- **Default:** `once`
129-
- **Options:** `once`, `always`
130-
- **Description:** When to install Cinc. `once` only installs if not present, `always` reinstalls on every converge.
131-
132-
#### `download_url`
133-
134-
- **Type:** String
135-
- **Default:** none
136-
- **Description:** Override the download URL for custom package locations or air-gapped environments.
137-
138-
#### `checksum`
139-
140-
- **Type:** String
141-
- **Default:** none
142-
- **Description:** SHA256 checksum to verify the downloaded package. Used with `download_url`.
143-
144-
#### `platform`, `platform_version`, `architecture`
145-
146-
- **Type:** String
147-
- **Default:** Auto-detected
148-
- **Description:** Explicitly specify platform details for package selection.
149-
150-
#### `run_list`
151-
152-
- **Type:** Array
153-
- **Default:** `[]`
154-
- **Description:** The Cinc run list to execute.
155-
156-
#### `attributes`
157-
158-
- **Type:** Hash
159-
- **Default:** `{}`
160-
- **Description:** Node attributes to set during the converge.
161-
162-
#### `log_level`
163-
164-
- **Type:** String
165-
- **Default:** `auto`
166-
- **Description:** Cinc log level. Set to `debug` for verbose output, or `auto` to let Cinc decide.
167-
168-
#### `log_file`
169-
170-
- **Type:** String
171-
- **Default:** none
172-
- **Description:** Path to write the Cinc log file on the test instance.
173-
174-
#### `multiple_converge`
175-
176-
- **Type:** Integer
177-
- **Default:** `1`
178-
- **Description:** Number of times to run converge. Useful with `enforce_idempotency`.
179-
180-
#### `enforce_idempotency`
181-
182-
- **Type:** Boolean
183-
- **Default:** `false`
184-
- **Description:** When `true`, fails the run if the second converge makes changes. Requires `multiple_converge` >= 2.
185-
186-
#### `deprecations_as_errors`
187-
188-
- **Type:** Boolean
189-
- **Default:** `false`
190-
- **Description:** Treat Cinc deprecation warnings as errors.
191-
192-
### Policyfile Support
193-
194-
kitchen-cinc auto-detects `Policyfile.rb` in your cookbook directory and uses it for dependency resolution. You can also configure it explicitly:
195-
196-
```yaml
197-
provisioner:
198-
name: cinc_infra
199-
policyfile_path: path/to/Policyfile.rb
200-
policy_group: local
201-
always_update_cookbooks: true
202-
```
203-
204-
### Berkshelf Support
205-
206-
If no Policyfile is found, kitchen-cinc will fall back to Berkshelf if a `Berksfile` is present:
207-
208-
```yaml
209-
provisioner:
210-
name: cinc_infra
211-
berksfile_path: path/to/Berksfile
212-
always_update_cookbooks: true
213-
```
214-
215-
### Path Configuration
216-
217-
All paths are auto-calculated if not specified:
218-
219-
- `data_path` — Path to data directory
220-
- `data_bags_path` — Path to data bags
221-
- `environments_path` — Path to environments
222-
- `nodes_path` — Path to node definitions
223-
- `roles_path` — Path to roles
224-
- `clients_path` — Path to clients
225-
- `encrypted_data_bag_secret_key_path` — Path to encryption key
106+
Every option exposed by the provisioners is documented under
107+
[`docs/`](docs/README.md):
108+
109+
- [Provisioners](docs/provisioners.md) — overview of `cinc_infra`,
110+
`cinc_zero`, `cinc_solo`, `cinc_apply`, and `cinc_target`.
111+
- [Installation options](docs/installation.md) — `product_name`,
112+
`product_version`, `channel`, `install_strategy`, `download_url`,
113+
`checksum`, proxies, and the legacy omnibus options.
114+
- [Converge options](docs/converge.md) — `run_list`, `attributes`,
115+
logging, `multiple_converge`, `enforce_idempotency`, `client_rb` /
116+
`solo_rb`, Chef Zero host/port, and more.
117+
- [Cookbook resolution](docs/cookbook-resolution.md) — Policyfile and
118+
Berkshelf integration.
119+
- [Paths](docs/paths.md) — sandbox, on-instance, and binary paths.
120+
- [Target mode](docs/target-mode.md) — extra requirements and option
121+
overrides for `cinc_target`.
226122

227123
## Development
228124

docs/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# kitchen-cinc Documentation
2+
3+
Reference documentation for every configuration option exposed by the
4+
kitchen-cinc provisioners.
5+
6+
## Contents
7+
8+
- [Provisioners](provisioners.md) — overview of the available provisioner
9+
classes (`cinc_infra`, `cinc_zero`, `cinc_solo`, `cinc_apply`,
10+
`cinc_target`) and when to use each.
11+
- [Installation options](installation.md) — controls how Cinc Client is
12+
downloaded and installed on the test instance (product, channel,
13+
version, download URL, omnibus options, proxies).
14+
- [Converge options](converge.md) — controls how Cinc is invoked during
15+
the converge phase (run list, attributes, logging, multiple converges,
16+
idempotency, JSON attributes, Chef Zero host/port, etc.).
17+
- [Cookbook resolution](cookbook-resolution.md) — Policyfile and
18+
Berkshelf integration, cookbook upload behavior.
19+
- [Paths](paths.md) — sandbox layout, on-instance paths, and the path
20+
defaults for Cinc binaries (`cinc-client`, `cinc-solo`, `cinc-apply`).
21+
- [Target mode](target-mode.md) — extra requirements and options for the
22+
`cinc_target` provisioner.
23+
24+
## Conventions
25+
26+
Every option below is documented with:
27+
28+
- **Type** — Ruby type accepted (`String`, `Integer`, `Boolean`,
29+
`Hash`, `Array`, `Symbol`).
30+
- **Default** — value used when the option is not set in `kitchen.yml`.
31+
`auto` means the value is derived at runtime; `none` means `nil`.
32+
- **Description** — what the option does and any relevant constraints.
33+
34+
Options marked **(advanced)** are rarely needed in normal use.

docs/converge.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Converge Options
2+
3+
These options control how Cinc Client is invoked during the converge
4+
phase. Most apply to every provisioner; provisioner-specific notes are
5+
called out where relevant.
6+
7+
## Run list and attributes
8+
9+
### `run_list`
10+
11+
- **Type:** Array
12+
- **Default:** `[]`
13+
- The Cinc run list to execute. Items can be recipe names
14+
(`recipe[my_cookbook::default]`) or role names.
15+
16+
### `attributes`
17+
18+
- **Type:** Hash
19+
- **Default:** `{}`
20+
- Node attributes to set during the converge. Merged into the JSON
21+
attributes file or the `client.rb`/`solo.rb` config depending on
22+
provisioner.
23+
24+
### `named_run_list` (`cinc_infra` / `cinc_zero` / `cinc_target`)
25+
26+
- **Type:** Hash
27+
- **Default:** `{}`
28+
- Selects a named run list defined in a Policyfile.
29+
30+
### `policy_group`
31+
32+
- **Type:** String
33+
- **Default:** none
34+
- Policy group used when resolving a Policyfile. See
35+
[cookbook-resolution.md](cookbook-resolution.md).
36+
37+
### `json_attributes` (`cinc_infra` / `cinc_zero` / `cinc_target`)
38+
39+
- **Type:** Boolean
40+
- **Default:** `true`
41+
- When `true`, the provisioner writes a `dna.json` file to the sandbox
42+
and passes `--json-attributes` to `cinc-client`.
43+
44+
## Logging
45+
46+
### `log_level`
47+
48+
- **Type:** String
49+
- **Default:** `"auto"` (or `"debug"` if Test Kitchen debug is on)
50+
- Cinc log level. Common values: `"auto"`, `"info"`, `"warn"`,
51+
`"debug"`, `"trace"`.
52+
53+
### `log_file`
54+
55+
- **Type:** String
56+
- **Default:** none
57+
- Path to write the Cinc log file on the test instance. When set, the
58+
provisioner passes `--logfile <path>` to `cinc-client`.
59+
60+
### `profile_ruby`
61+
62+
- **Type:** Boolean
63+
- **Default:** `false`
64+
- When `true`, passes `--profile-ruby` to `cinc-client`.
65+
66+
### `slow_resource_report` (advanced, `cinc_infra` / `cinc_zero` / `cinc_target`)
67+
68+
- **Type:** Boolean or Integer
69+
- **Default:** none
70+
- When set, passes `--slow-report` (or `--slow-report N` if an integer
71+
is given) to `cinc-client`.
72+
73+
## Multiple converges and idempotency
74+
75+
### `multiple_converge`
76+
77+
- **Type:** Integer
78+
- **Default:** `1`
79+
- Number of times to invoke Cinc per converge. Useful in combination
80+
with `enforce_idempotency` to assert that a second run is a no-op.
81+
82+
### `enforce_idempotency`
83+
84+
- **Type:** Boolean
85+
- **Default:** `false`
86+
- When `true`, the final converge uses an alternate `client.rb` that
87+
fails the run if any resource reports `:updated`. Pair with
88+
`multiple_converge: 2` (or higher).
89+
90+
### `retry_on_exit_code`
91+
92+
- **Type:** Array of Integer
93+
- **Default:** `[35, 213]`
94+
- Exit codes that Test Kitchen should treat as a successful retry
95+
signal (used by Cinc reboot handling).
96+
97+
### `deprecations_as_errors`
98+
99+
- **Type:** Boolean
100+
- **Default:** `false`
101+
- Sets `treat_deprecation_warnings_as_errors true` in the rendered
102+
`client.rb` / `solo.rb` so any deprecation warning fails the run.
103+
104+
## Custom config injection
105+
106+
### `client_rb` (`cinc_infra` / `cinc_zero` / `cinc_target`)
107+
108+
- **Type:** Hash
109+
- **Default:** `{}`
110+
- Extra entries merged into the rendered `client.rb`. Keys become
111+
config attribute names; values are formatted with Ruby `inspect`
112+
semantics. Example:
113+
114+
```yaml
115+
provisioner:
116+
name: cinc_infra
117+
client_rb:
118+
chef_server_url: https://my-chef-server.example.com/organizations/test
119+
ssl_verify_mode: :verify_peer
120+
```
121+
122+
### `solo_rb` (`cinc_solo`)
123+
124+
- **Type:** Hash
125+
- **Default:** `{}`
126+
- Extra entries merged into the rendered `solo.rb`. Same semantics as
127+
`client_rb`.
128+
129+
### `config_path`
130+
131+
- **Type:** String
132+
- **Default:** none
133+
- Path to a `config.rb` that `ChefConfig::WorkstationConfigLoader`
134+
should load on startup, before any provisioner code runs. Lets you
135+
share workstation-level config (proxy settings, etc.) with
136+
kitchen-cinc.
137+
138+
## Chef Zero networking (`cinc_infra` / `cinc_zero` / `cinc_target`)
139+
140+
### `cinc_zero_host`
141+
142+
- **Type:** String
143+
- **Default:** `nil`
144+
- Value passed to `--chef-zero-host`. Leave unset for the Cinc default
145+
bind address.
146+
147+
### `cinc_zero_port`
148+
149+
- **Type:** Integer
150+
- **Default:** `8889`
151+
- Value passed to `--chef-zero-port`.

0 commit comments

Comments
 (0)