Fixes for multi + config tests

This commit is contained in:
Dale McDiarmid 2017-03-16 23:59:13 +00:00
parent c8d0173fb8
commit af30f882dd
4 changed files with 13 additions and 6 deletions

View file

@ -20,7 +20,8 @@ platforms:
privileged: true privileged: true
provision_command: provision_command:
- apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ansible/ansible - apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ansible/ansible
- apt-get update && apt-get -y -q install python-apt python-pycurl - apt-get update && apt-get -y -q install python-apt python-pycurl python-pip
- pip install jmespath
use_sudo: false use_sudo: false
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
- name: ubuntu-16.04 - name: ubuntu-16.04
@ -30,7 +31,8 @@ platforms:
provision_command: provision_command:
- apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ansible/ansible - apt-get update && apt-get install -y software-properties-common && add-apt-repository -y ppa:ansible/ansible
- apt-get install -y -q net-tools - apt-get install -y -q net-tools
- apt-get update && apt-get -y -q install python-apt python-pycurl - apt-get update && apt-get -y -q install python-apt python-pycurl python-pip
- pip install jmespath
use_sudo: false use_sudo: false
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
run_command: "/sbin/init" run_command: "/sbin/init"
@ -45,6 +47,7 @@ platforms:
- sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config - sed -ri 's/^#?PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config
- sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config - sed -ri 's/^#?PasswordAuthentication .*/PasswordAuthentication yes/' /etc/ssh/sshd_config
- sed -ri 's/^#?UsePAM .*/UsePAM no/' /etc/ssh/sshd_config - sed -ri 's/^#?UsePAM .*/UsePAM no/' /etc/ssh/sshd_config
- pip install jmespath
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
use_sudo: false use_sudo: false
run_command: "/sbin/init" run_command: "/sbin/init"
@ -58,6 +61,7 @@ platforms:
- rm /etc/yum.repos.d/epel*repo /etc/yum.repos.d/puppetlabs-pc1.repo - rm /etc/yum.repos.d/epel*repo /etc/yum.repos.d/puppetlabs-pc1.repo
- yum -y install initscripts - yum -y install initscripts
- yum clean all - yum clean all
- pip install jmespath
volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json volume: <%=ENV['ES_XPACK_LICENSE_FILE']%>:/tmp/license.json
run_command: "/usr/sbin/init" run_command: "/usr/sbin/init"
privileged: true privileged: true
@ -83,9 +87,6 @@ suites:
- name: multi-5x - name: multi-5x
run_list: run_list:
attributes: attributes:
extra_vars:
es_plugins:
- plugin: ingest-geoip
provisioner: provisioner:
playbook: test/integration/multi.yml playbook: test/integration/multi.yml
idempotency_test: true idempotency_test: true

View file

@ -25,7 +25,7 @@
when: es_plugins_reinstall when: es_plugins_reinstall
#if the plugins listed are different than those requested, we remove those installed but not listed in the config #if the plugins listed are different than those requested, we remove those installed but not listed in the config
- set_fact: plugins_to_remove="{{ installed_plugins.stdout_lines | difference(es_plugins | json_query('es_plugins[*].plugin')) | default([]) }}" - set_fact: plugins_to_remove="{{ installed_plugins.stdout_lines | difference(es_plugins | json_query('[*].plugin')) | default([]) }}"
when: not es_plugins_reinstall when: not es_plugins_reinstall
# This removes any currently installed plugins (to prevent errors when reinstalling) # This removes any currently installed plugins (to prevent errors when reinstalling)

View file

@ -7,6 +7,8 @@
es_templates: true es_templates: true
es_heap_size: "1g" es_heap_size: "1g"
es_api_port: 9200 es_api_port: 9200
es_plugins:
- plugin: ingest-geoip
roles: roles:
- { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true } } - { role: elasticsearch, es_instance_name: "master", es_data_dirs: ["/opt/elasticsearch/master"], es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.memory_lock: true } }
@ -17,6 +19,8 @@
es_templates: true es_templates: true
es_heap_size: "1g" es_heap_size: "1g"
es_api_port: 9201 es_api_port: 9201
es_plugins:
- plugin: ingest-geoip
roles: roles:
- { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false } } - { role: elasticsearch, es_instance_name: "node1", es_data_dirs: "/opt/elasticsearch/data-1,/opt/elasticsearch/data-2", es_config: { discovery.zen.ping.unicast.hosts: "localhost:9300", http.port: 9201, transport.tcp.port: 9301, node.data: true, node.master: false } }
#Plugins installed for this test are specified in .kitchen.yml under suite #Plugins installed for this test are specified in .kitchen.yml under suite

View file

@ -6,5 +6,7 @@
vars: vars:
es_use_repository: "true" es_use_repository: "true"
es_heap_size: "1g" es_heap_size: "1g"
es_plugins:
- plugin: ingest-geoip
#Do not add tests here. This test is run twice and confirms idempotency. #Do not add tests here. This test is run twice and confirms idempotency.