Skip to content

Commit 545237e

Browse files
committed
config overview: replace extended yaml examples with pointer to 'complex config' page
1 parent 2c45ab1 commit 545237e

1 file changed

Lines changed: 7 additions & 69 deletions

File tree

docs/shadow_config_overview.md

Lines changed: 7 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -79,72 +79,10 @@ Examples: `20 B`, `100 MB`, `100 megabyte`, `10 kibibytes`, `30 MiB`, `1024 Mbyt
7979

8080
## YAML Extensions (Experimental)
8181

82-
Shadow has experimental support for extended YAML conventions. These can be
83-
enabled using the `--use-extended-yaml true` command line option.
84-
85-
### Merge/Override Mappings
86-
87-
To help reduce repeated configuration options, Shadow supports the YAML ["merge
88-
key (`<<`)"](https://yaml.org/type/merge.html) convention. This merges the keys
89-
of the child mapping into the parent mapping, and is useful when combined with
90-
[YAML anchors (`&` and `*`)](https://yaml.org/spec/1.2.2/#692-node-anchors).
91-
92-
Example:
93-
94-
```yaml
95-
general:
96-
# --snip--
97-
98-
network:
99-
# --snip--
100-
101-
hosts:
102-
server:
103-
# --snip--
104-
client-uk: &client
105-
network_node_id: 0
106-
processes:
107-
- path: /usr/bin/curl
108-
args: server --silent
109-
start_time: 5
110-
client-us:
111-
network_node_id: 1
112-
<<: *client
113-
```
114-
115-
For a longer example, see
116-
https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/.
117-
118-
### Extension Fields
119-
120-
When using the "merge key" feature above, putting common options in a separate
121-
configuration fragment may help make the configuration more readable. Shadow
122-
supports the "extension field" convention used by [Docker
123-
Compose](https://docs.docker.com/compose/compose-file/compose-file-v3/). Any
124-
top-level field containing a key that begins with `x-` will be ignored by
125-
Shadow.
126-
127-
Example:
128-
129-
```yaml
130-
x-client: &client-defaults
131-
processes:
132-
- path: /usr/bin/curl
133-
args: server --silent
134-
start_time: 5
135-
136-
general:
137-
# --snip--
138-
139-
network:
140-
# --snip--
141-
142-
hosts:
143-
server:
144-
# --snip--
145-
client-uk:
146-
network_node_id: 0
147-
<<: *client-defaults
148-
client-us:
149-
network_node_id: 1
150-
<<: *client-defaults
82+
Shadow has experimental support for extended YAML conventions. When these are
83+
enabled using the [`--use-extended-yaml true`](./shadow_config_spec.md#experimentaluse_extended_yaml) command line option, Shadow
84+
supports [merge keys](https://yaml.org/type/merge.html)
85+
and [extension
86+
fields](https://docs.docker.com/compose/compose-file/#extension)).
87+
88+
For examples, see [Managing Complex Configurations](./shadow_config_complex.md).

0 commit comments

Comments
 (0)