Added tests script and sample pillars, Kitchen tests and Travis
diff --git a/tests/pillar/client.sls b/tests/pillar/client.sls
new file mode 100644
index 0000000..053d17a
--- /dev/null
+++ b/tests/pillar/client.sls
@@ -0,0 +1,6 @@
+elasticsearch:
+ client:
+ enabled: true
+ server:
+ host: elasticsearch.host
+ port: 9200
\ No newline at end of file
diff --git a/tests/pillar/cluster.sls b/tests/pillar/cluster.sls
new file mode 100644
index 0000000..316438e
--- /dev/null
+++ b/tests/pillar/cluster.sls
@@ -0,0 +1,18 @@
+elasticsearch:
+ server:
+ enabled: true
+ bind:
+ address: 0.0.0.0
+ port: 9200
+ cluster:
+ multicast: false
+ members:
+ - host: elastic01
+ port: 9300
+ - host: elastic02
+ port: 9300
+ - host: elastic03
+ port: 9300
+ index:
+ shards: 5
+ replicas: 1
\ No newline at end of file
diff --git a/tests/pillar/curator.sls b/tests/pillar/curator.sls
new file mode 100644
index 0000000..f4b8158
--- /dev/null
+++ b/tests/pillar/curator.sls
@@ -0,0 +1,72 @@
+elasticsearch:
+ server:
+ enabled: true
+ bind:
+ address: 0.0.0.0
+ port: 9200
+ curator:
+ timeout: 900
+ logfile: /var/log/elasticsearch/curator.log
+ logformat: json
+ master_only: true
+ actions:
+ - action: delete_indices
+ description: >-
+ Delete indices older than 45 days (based on index name).
+ Ignore the error if the filter does not result in an actionable
+ list of indices (ignore_empty_list) and exit cleanly.
+ options:
+ ignore_empty_list: True
+ continue_if_exception: False
+ disable_action: False
+ filters:
+ - filtertype: pattern
+ kind: regex
+ value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
+ - filtertype: age
+ source: name
+ direction: older
+ timestring: '%Y.%m.%d'
+ unit: days
+ unit_count: 90
+ - action: replicas
+ description: >-
+ Reduce the replica count to 0 for indices older than 30 days
+ (based on index creation_date)
+ options:
+ count: 0
+ wait_for_completion: False
+ continue_if_exception: False
+ disable_action: False
+ filters:
+ - filtertype: pattern
+ kind: regex
+ value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
+ - filtertype: age
+ source: creation_date
+ direction: older
+ unit: days
+ unit_count: 30
+ - action: forcemerge
+ description: >-
+ forceMerge indices older than 2 days (based on index
+ creation_date) to 2 segments per shard. Delay 120 seconds
+ between each forceMerge operation to allow the cluster to
+ quiesce.
+ This action will ignore indices already forceMerged to the same
+ or fewer number of segments per shard, so the 'forcemerged'
+ filter is unneeded.
+ options:
+ max_num_segments: 2
+ delay: 120
+ continue_if_exception: False
+ disable_action: True
+ filters:
+ - filtertype: pattern
+ kind: regex
+ value: '.*\-\d\d\d\d\.\d\d\.\d\d$'
+ - filtertype: age
+ source: creation_date
+ direction: older
+ unit: days
+ unit_count: 2
\ No newline at end of file
diff --git a/tests/pillar/repo_elasticsearch.sls b/tests/pillar/repo_elasticsearch.sls
new file mode 100644
index 0000000..06d43aa
--- /dev/null
+++ b/tests/pillar/repo_elasticsearch.sls
@@ -0,0 +1,12 @@
+linux:
+ system:
+ enabled: true
+ repo:
+ elasticsearch_repo:
+ source: "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main"
+ architectures: amd64
+ key_url: "https://packages.elastic.co/GPG-KEY-elasticsearch"
+ mirantis_openstack_repo:
+ source: "deb http://mirror.fuel-infra.org/mcp-repos/1.0/{{ grains.get('oscodename') }} mitaka main"
+ architectures: amd64
+ key_url: "http://mirror.fuel-infra.org/mcp-repos/1.0/{{ grains.get('oscodename') }}/archive-mcp1.0.key"
diff --git a/tests/pillar/single.sls b/tests/pillar/single.sls
new file mode 100644
index 0000000..c4f54e0
--- /dev/null
+++ b/tests/pillar/single.sls
@@ -0,0 +1,11 @@
+elasticsearch:
+ server:
+ enabled: true
+ bind:
+ address: 0.0.0.0
+ port: 9200
+ cluster:
+ multicast: false
+ index:
+ shards: 1
+ replicas: 0