blob: 9fee5b89ad6eee1104d70bce613c62864fbbde24 [file] [log] [blame]
---
driver:
name: docker
use_sudo: false
volume:
- <%= ENV['PWD'] %>:/tmp/kitchen
provisioner:
name: shell
script: .kitchen-verify.sh
verifier:
name: inspec
# Use: find classes/cluster/$cluster -name '*.env' | xargs -n1 source
# TODO, Load and set ENV from **/*.env
<%- saltver = ENV['SALT_VERSION'] || '2017.7' %>
<%- btstrap = ENV['SALT_BOOTSTRAP'] || '0' %>
<%- extrafo = ENV['EXTRA_FORMULAS'] || 'ntp' %>
<%- formula = ENV['FORMULA_VERSION'] || 'master' %>
<%- reclass = ENV['RECLASS_VERSION'] || 'develop' %>
platforms:
<% `find classes/cluster -maxdepth 1 -mindepth 1 -type d | tr '_' '-' |sort -u`.split().each do |cluster| %>
<% cluster=cluster.split('/')[2] %>
- name: <%= cluster %>
driver_config:
# image: epcim/salt:saltstack-ubuntu-xenial-salt-stable
# FIXME, USE ONCE RECLASS@DEVELOP IS IN MASTER, AND REQUIREDE FEATURES FROM FORMULA NIGHTLY REPO ARE IN STABLE
image: epcim/salt:saltmaster-reclass-ubuntu-xenial-salt-<%= saltver %>-formula-<%= formula %>
platform: ubuntu
hostname: cfg01.<%= cluster %>.local
provision_command:
- 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
# Configure ENV options as needed, example:
- echo "
export BOOTSTRAP=<%= btstrap %>;\n
export CLUSTER_NAME=<%= cluster %>;\n
export EXTRA_FORMULAS='<%= extrafo %>';\n
export RECLASS_VERSION=<%= reclass %>;\n
export RECLASS_IGNORE_CLASS_NOTFOUND=True;\n
export RECLASS_IGNORE_CLASS_REGEXP='service.*';\n
" > /kitchen.env
#export FORMULAS_SOURCE=pkg;\n
<% end %>
suites:
- name: cluster