blob: 9fee5b89ad6eee1104d70bce613c62864fbbde24 [file] [log] [blame]
Petr Michalec3ae395b2017-09-07 20:15:15 +02001---
2driver:
3 name: docker
4 use_sudo: false
5 volume:
6 - <%= ENV['PWD'] %>:/tmp/kitchen
7
8provisioner:
9 name: shell
Petr Michalec8abadb12018-03-16 15:12:44 +010010 script: .kitchen-verify.sh
11
12verifier:
13 name: inspec
14
15# Use: find classes/cluster/$cluster -name '*.env' | xargs -n1 source
16# TODO, Load and set ENV from **/*.env
17<%- saltver = ENV['SALT_VERSION'] || '2017.7' %>
18<%- btstrap = ENV['SALT_BOOTSTRAP'] || '0' %>
19<%- extrafo = ENV['EXTRA_FORMULAS'] || 'ntp' %>
20<%- formula = ENV['FORMULA_VERSION'] || 'master' %>
21<%- reclass = ENV['RECLASS_VERSION'] || 'develop' %>
Petr Michalec3ae395b2017-09-07 20:15:15 +020022
23platforms:
24 <% `find classes/cluster -maxdepth 1 -mindepth 1 -type d | tr '_' '-' |sort -u`.split().each do |cluster| %>
25 <% cluster=cluster.split('/')[2] %>
26 - name: <%= cluster %>
27 driver_config:
Petr Michalec8abadb12018-03-16 15:12:44 +010028 # image: epcim/salt:saltstack-ubuntu-xenial-salt-stable
29 # FIXME, USE ONCE RECLASS@DEVELOP IS IN MASTER, AND REQUIREDE FEATURES FROM FORMULA NIGHTLY REPO ARE IN STABLE
30 image: epcim/salt:saltmaster-reclass-ubuntu-xenial-salt-<%= saltver %>-formula-<%= formula %>
Petr Michalec3ae395b2017-09-07 20:15:15 +020031 platform: ubuntu
32 hostname: cfg01.<%= cluster %>.local
33 provision_command:
Petr Michalec8abadb12018-03-16 15:12:44 +010034 - test -e /srv/salt/bootstrap.sh || curl -qsSL https://raw.githubusercontent.com/salt-formulas/salt-formulas-scripts/develop/bootstrap.sh -o /srv/salt/bootstrap.sh
35 # Configure ENV options as needed, example:
Petr Michalec3ae395b2017-09-07 20:15:15 +020036 - echo "
Petr Michalec8abadb12018-03-16 15:12:44 +010037 export BOOTSTRAP=<%= btstrap %>;\n
Petr Michalec3ae395b2017-09-07 20:15:15 +020038 export CLUSTER_NAME=<%= cluster %>;\n
Petr Michalec8abadb12018-03-16 15:12:44 +010039 export EXTRA_FORMULAS='<%= extrafo %>';\n
40 export RECLASS_VERSION=<%= reclass %>;\n
Petr Michalec3ae395b2017-09-07 20:15:15 +020041 export RECLASS_IGNORE_CLASS_NOTFOUND=True;\n
Petr Michaleccb924c12017-11-15 18:27:37 +010042 export RECLASS_IGNORE_CLASS_REGEXP='service.*';\n
Petr Michalec3ae395b2017-09-07 20:15:15 +020043 " > /kitchen.env
Petr Michalec8abadb12018-03-16 15:12:44 +010044 #export FORMULAS_SOURCE=pkg;\n
Petr Michalec3ae395b2017-09-07 20:15:15 +020045 <% end %>
46
47suites:
48 - name: cluster
49