Skip to content

Commit 18dea12

Browse files
committed
Ensure that Dynamic Configuration section isn't stricly followed.
Otherwise, the user following along may get confused when an OpenStack installation is required :)
1 parent d487c72 commit 18dea12

File tree

1 file changed

+7
-33
lines changed

1 file changed

+7
-33
lines changed

docs/source/docs/getting-started/dynamic-configuration.md

Lines changed: 7 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,23 @@ next:
88
url: "fixing-converge"
99
---
1010

11-
There are a few basic ways of dynamically configuring test-kitchen:
11+
There are a few basic ways of dynamically configuring Test Kitchen:
1212

13-
The YAML file can contain `<% erb %>`, which you could use for selecting drivers, etc. based on which platform your currently running, or based of environment variables.
13+
* A local configuration will be looked for in `.kitchen.local.yml` which could be used for development purposes. This is a file that is not typically checked into version control.
14+
* A global configuration file will also be looked for in `$HOME/.kitchen/config.yml` to set preferred defaults for all your projects.
15+
* Finally, each YAML file can contain ERB fragments, which you could use for selecting drivers, etc. based on which platform your currently running, or based of environment variables.
1416

15-
Test-kitchen well also look for a `.kitchen.local.yml` which could be used for development purposes. This is a file that's not typically checked into version control.
16-
17-
Test Kitchen allows a "global" configuration file that you can drop off to set preferred defaults in ~/.kitchen/config.yml. That, along with allowing ERB, should provide plenty of customizability.
18-
19-
20-
We're going to add some erb to our config by opening `.kitchen.yml` in your editor of choice so that it looks similar to:
17+
For example, you could modify `.kitchen.yml` (or `.kitchen.local.yml`, or `$HOME/.kitchen/config.yml`) to look like:
2118

2219
~~~yaml
2320
---
24-
<% if ENV['KITCHEN_ENV'] == 'development' %>
25-
driver:
26-
name: vagrant
27-
28-
provisioner:
29-
name: chef_solo
30-
<% elsif ENV['KITCHEN_ENV'] == 'test' %>
3121
driver:
3222
name: openstack
3323
openstack_username: <%= ENV['YOUR_OPENSTACK_USERNAME'] %>
3424
openstack_api_key: <%= ENV['YOUR_OPENSTACK_API_KEY'] %>
3525
openstack_auth_url: <%= ENV['YOUR_OPENSTACK_AUTH_URL'] %>
3626
image_ref: <%= ENV['SERVER_IMAGE_ID'] %>
3727
flavor_ref: <%= ENV['SERVER_FLAVOR_ID'] %>
38-
provisioner:
39-
name: chef_zero
40-
<% end %>
41-
42-
platforms:
43-
- name: ubuntu-12.04
44-
- name: ubuntu-10.04
45-
- name: centos-6.4
46-
47-
suites:
48-
- name: default
49-
run_list:
50-
- recipe[git::default]
51-
attributes:
52-
- name: server
53-
run_list:
54-
- recipe[git::server]
55-
attributes:
5628
~~~
29+
30+
Keep in mind, this assumes you have an OpenStack deployment setup and ready to use. If this doesn't apply, let us continue.

0 commit comments

Comments
 (0)