blob: d4c55b64e71ffbf51798128150b24aeb4f331b0f [file] [log] [blame]
Petr Michalec993e3fa2016-07-15 15:56:34 +02001
2# usage: `KITCHEN_LOCAL_YAML=.kitchen.openstack.yml kitchen test`
3
4# https://docs.chef.io/config_yml_kitchen.html
5# https://github.com/test-kitchen/kitchen-openstack
6
7---
8driver:
9 name: openstack
10 openstack_auth_url: <%= ENV['OS_AUTH_URL'] %>/tokens
11 openstack_username: <%= ENV['OS_USERNAME'] || 'ci' %>
12 openstack_api_key: <%= ENV['OS_PASSWORD'] || 'ci' %>
13 openstack_tenant: <%= ENV['OS_TENANT_NAME'] || 'ci_jenkins' %>
14
15 #floating_ip_pool: <%= ENV['OS_FLOATING_IP_POOL'] || 'nova' %>
16 key_name: <%= ENV['BOOTSTRAP_SSH_KEY_NAME'] || 'bootstrap_insecure' %>
17 private_key_path: <%= ENV['BOOTSTRAP_SSH_KEY_PATH'] || "#{ENV['HOME']}/.ssh/id_rsa_bootstrap_insecure" %>
18
19
20platforms:
21 - name: ubuntu-14.04
22 driver:
23 username: <%= ENV['OS_UBUNTU_IMAGE_USER'] || 'root' %>
24 image_ref: <%= ENV['OS_UBUNTU_IMAGE_REF'] || 'ubuntu-14-04-x64-1455869035' %>
25 flavor_ref: m1.medium
26 network_ref:
27 <% if ENV['OS_NETWORK_REF'] -%>
28 - <% ENV['OS_NETWORK_REF'] %>
29 <% else -%>
30 - ci-net
31 <% end -%>
32 # force update apt cache on the image
33 run_list:
34 - recipe[apt]
35 attributes:
36 apt:
37 compile_time_update: true
38transport:
39 username: <%= ENV['OS_UBUNTU_IMAGE_USER'] || 'root' %>
40
Petr Michalec3f949f62016-11-15 23:21:56 +010041{%- if cookiecutter.kitchen_driver =='openstack' %}
42
43verifier:
44 name: {{ cookiecutter.kitchen_verifier }}
45 sudo: true
46
47
48suites:
49 {%- if cookiecutter.kitchen_suites == "" %}
50 - name: default
51 # provisioner:
52 # pillars-from-files:
53 # {{ cookiecutter.kitchen_formula }}.sls: tests/pillar/default.sls
54 {%- else %}
55 {%- for suite in cookiecutter.kitchen_suites.split() %}
56
57 - name: {{ suite }}
58 provisioner:
59 pillars-from-files:
60 {{ cookiecutter.kitchen_formula }}.sls: tests/pillar/{{suite}}.sls
61 {%- endfor %}
62 {%- endif %}
63
64{%- endif %}
65
Petr Michalec993e3fa2016-07-15 15:56:34 +020066# vim: ft=yaml sw=2 ts=2 sts=2 tw=125