--- /dev/null
+---
+driver:
+ name: docker
+ hostname: kibana.ci.local
+ use_sudo: false
+
+provisioner:
+ name: salt_solo
+ salt_install: bootstrap
+ salt_bootstrap_url: https://bootstrap.saltstack.com
+ salt_version: latest
+ require_chef: false
+ log_level: error
+ formula: kibana
+ grains:
+ noservices: True
+ state_top:
+ base:
+ "*":
+ - linux
+ - kibana
+ pillars:
+ top.sls:
+ base:
+ "*":
+ - kibana
+ - kibana_debian_repo
+ pillars-from-files:
+ kibana_debian_repo.sls: tests/pillar/kibana_debian_repo.sls
+ dependencies:
+ - name: linux
+ repo: git
+ source: https://github.com/salt-formulas/salt-formula-linux.git
+
+verifier:
+ name: inspec
+ sudo: true
+
+platforms:
+ - name: <%=ENV['PLATFORM'] || 'ubuntu-xenial'%>
+ driver_config:
+ image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
+ platform: ubuntu
+
+suites:
+
+ - name: kibana_server
+ provisioner:
+ pillars-from-files:
+ kibana.sls: tests/pillar/kibana_server.sls
+# vim: ft=yaml sw=2 ts=2 sts=2 tw=125
--- /dev/null
+sudo: required
+services:
+ - docker
+
+install:
+ - pip install PyYAML
+ - pip install virtualenv
+ - |
+ test -e Gemfile || cat <<EOF > Gemfile
+ source 'https://rubygems.org'
+ gem 'rake'
+ gem 'test-kitchen'
+ gem 'kitchen-docker'
+ gem 'kitchen-inspec'
+ gem 'inspec'
+ gem 'kitchen-salt', :git => 'https://github.com/salt-formulas/kitchen-salt.git'
+ - bundle install
+
+env:
+ - PLATFORM=trevorj/salty-whales:trusty
+ - PLATFORM=trevorj/salty-whales:xenial
+
+
+before_script:
+ - set -o pipefail
+ - make test | tail
+
+script:
+ - test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration
+
+notifications:
+ webhooks:
+ urls:
+ - https://webhooks.gitter.im/e/6123573504759330786b
+ on_success: change # options: [always|never|change] default: always
+ on_failure: never # options: [always|never|change] default: always
+ on_start: never # options: [always|never|change] default: always
+ on_cancel: never # options: [always|never|change] default: always
+ on_error: never # options: [always|never|change] default: always
+ email: false
{%- from "kibana/map.jinja" import server with context %}
+{%- from "linux/map.jinja" import system with context %}
{%- if server.enabled %}
-{%- if server.addrepo is defined and grains['os_family'] == 'Debian' %}
-
-kibana_repo:
- pkgrepo.managed:
- - humanname: Kibana Repository
- - name: deb http://packages.elastic.co/kibana/4.1/debian stable main
- - dist: stable
- - file: /etc/apt/sources.list.d/kibana.list
- - key_url: https://packages.elastic.co/GPG-KEY-elasticsearch
-
-{%- endif %}
-
kibana_package:
pkg.installed:
- - name: {{ server.pkgname }}
+ - name: {{ server.pkgname }}
+
+{%- if not grains.get('noservices', False) %}
kibana_service:
service.running:
- watch:
- file: {{ server.configpath }}
+{%- endif %}
+
{{ server.configpath }}:
file.managed:
- source: salt://kibana/files/kibana.yml
--- /dev/null
+linux:
+ system:
+ enabled: true
+ repo:
+ kibana:
+ source: 'deb http://packages.elastic.co/kibana/4.1/debian stable main'
+ key_id: 46095ACC8548582C1A2699A9D27D666CD88E42B4
+ key_server: hkp://p80.pool.sks-keyservers.net:80
\ No newline at end of file
engine: elasticsearch
host: localhost
port: 9200
-