Petr Michalec | 3ae395b | 2017-09-07 20:15:15 +0200 | [diff] [blame] | 1 | --- |
| 2 | driver: |
| 3 | name: docker |
| 4 | use_sudo: false |
| 5 | volume: |
| 6 | - <%= ENV['PWD'] %>:/tmp/kitchen |
| 7 | |
| 8 | provisioner: |
| 9 | name: shell |
| 10 | script: verify.sh |
| 11 | |
| 12 | platforms: |
| 13 | <% `find classes/cluster -maxdepth 1 -mindepth 1 -type d | tr '_' '-' |sort -u`.split().each do |cluster| %> |
| 14 | <% cluster=cluster.split('/')[2] %> |
| 15 | - name: <%= cluster %> |
| 16 | driver_config: |
| 17 | #image: ubuntu:16.04 |
| 18 | image: tcpcloud/salt-models-testing # With preinstalled dependencies (faster) |
| 19 | platform: ubuntu |
| 20 | hostname: cfg01.<%= cluster %>.local |
| 21 | provision_command: |
| 22 | - apt-get update |
| 23 | - apt-get install -y git curl python-pip |
Petr Michalec | cb924c1 | 2017-11-15 18:27:37 +0100 | [diff] [blame] | 24 | - pip install --upgrade pip |
Petr Michalec | 3ae395b | 2017-09-07 20:15:15 +0200 | [diff] [blame] | 25 | - git clone https://github.com/salt-formulas/salt-formulas-scripts /srv/salt/scripts |
| 26 | - cd /srv/salt/scripts; git pull -r; cd - |
| 27 | # NOTE: Configure ENV options as needed, example: |
| 28 | - echo " |
| 29 | export BOOTSTRAP=1;\n |
| 30 | export CLUSTER_NAME=<%= cluster %>;\n |
| 31 | export FORMULAS_SOURCE=pkg;\n |
Petr Michalec | b8e83fc | 2017-12-15 15:27:28 +0100 | [diff] [blame] | 32 | export RECLASS_VERSION=master;\n |
Petr Michalec | 3ae395b | 2017-09-07 20:15:15 +0200 | [diff] [blame] | 33 | export RECLASS_IGNORE_CLASS_NOTFOUND=True;\n |
Petr Michalec | cb924c1 | 2017-11-15 18:27:37 +0100 | [diff] [blame] | 34 | export RECLASS_IGNORE_CLASS_REGEXP='service.*';\n |
Petr Michalec | 3ae395b | 2017-09-07 20:15:15 +0200 | [diff] [blame] | 35 | export EXTRA_FORMULAS="";\n |
| 36 | " > /kitchen.env |
| 37 | #export RECLASS_SOURCE_PATH=/usr/lib/python2.7/site-packages/reclass;\n |
| 38 | #export PYTHONPATH=$RECLASS_SOURCE_PATH:$PYTHONPATH;\n |
| 39 | <% end %> |
| 40 | |
| 41 | suites: |
| 42 | - name: cluster |
| 43 | |