diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3c3cc19 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +--- +language: python +python: "2.7.13" +sudo: required +language: python +services: + - docker +install: + - pip install ansible==2.3.1.0 + - pip install molecule==1.25.0 + - pip install docker +script: + - molecule test --driver docker + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9f99e..b2f40ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. ## [Unreleased](https://github.com/idealista/solrcloud-role/tree/develop) +## [1.9.0](https://github.com/idealista/solrcloud-role/tree/1.9.0) (2018-02-12) +[Full Changelog](https://github.com/idealista/solrcloud-role/compare/1.8.0...1.9.0) +### Changed +- *[#47](https://github.com/idealista/solrcloud-role/issues/47) Configure zookeeper client timeout* @danieljesus +- *[#14](https://github.com/idealista/solrcloud-role/issues/14) Add Travis CI* @jnogol + ## [1.8.0](https://github.com/idealista/solrcloud-role/tree/1.8.0) (2017-09-26) [Full Changelog](https://github.com/idealista/solrcloud-role/compare/1.7.0...1.8.0) diff --git a/README.md b/README.md index ebd9f81..b4e9f42 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ![Logo](https://raw.githubusercontent.com/idealista/solrcloud-role/master/logo.gif) +[![Build Status](https://travis-ci.org/idealista/solrcloud-role.png)](https://travis-ci.org/idealista/solrcloud-role) + # SolrCloud Ansible role This ansible role installs a SolrCloud server in a debian environment. diff --git a/defaults/main.yml b/defaults/main.yml index eadce5c..6c97796 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -71,6 +71,7 @@ solr_zookeeper_hosts: "{{ zookeeper_hosts }}" solr_zookeeper_hosts_solr_path: "{{ zookeeper_hosts_solr_path }}" solr_zk_host: "{{ solr_zookeeper_hosts }}/{{ solr_zookeeper_hosts_solr_path }}" solr_zookeeper_client_path: "{{ zookeeper_client_path }}" +solr_zookeeper_client_timeout: 15000 # LOG log_root_level: WARN # Deprecated diff --git a/molecule.yml b/molecule.yml index 0383750..ea63214 100644 --- a/molecule.yml +++ b/molecule.yml @@ -31,11 +31,11 @@ ansible: # configuration options for the internal call to vagrant vagrant: - # molecule's --platform option will look for these names raw_config_args: - "landrush.enabled = true" - "landrush.tld = 'vm'" - "landrush.guest_redirect_dns = true" + # molecule's --platform option will look for these names platforms: - name: Debian9 box: debian/stretch64 @@ -62,3 +62,39 @@ vagrant: - network_name: private_network type: dhcp auto_config: true + +docker: + containers: + - name: zookeeper.vm + hostname: zookeeper + image: geerlingguy/docker-debian9-ansible + image_version: latest + # All these parameters are needed for Docker testing with systemd + privileged: True + cap_add: + - SYS_ADMIN + volume_mounts: + - '/sys/fs/cgroup:/sys/fs/cgroup:ro' + command: '/lib/systemd/systemd' + + - name: solrcloud.vm + hostname: solrcloud + ansible_groups: + - group01 + image: geerlingguy/docker-debian9-ansible + image_version: latest + # All these parameters are needed for Docker testing with systemd + privileged: True + cap_add: + - SYS_ADMIN + volume_mounts: + - '/sys/fs/cgroup:/sys/fs/cgroup:ro' + links: + zookeeper.vm: zookeeper.vm + command: '/lib/systemd/systemd' + +verifier: + name: testinfra + options: + connection: ansible + ansible-inventory: .molecule/ansible_inventory diff --git a/templates/solr.in.sh.j2 b/templates/solr.in.sh.j2 index f8e867e..f5639e0 100644 --- a/templates/solr.in.sh.j2 +++ b/templates/solr.in.sh.j2 @@ -38,7 +38,7 @@ GC_TUNE="{{ solr_gc_tune }}" ZK_HOST="{{ solr_zk_host }}" # Set the ZooKeeper client timeout (for SolrCloud mode) -ZK_CLIENT_TIMEOUT="15000" +ZK_CLIENT_TIMEOUT="{{ solr_zookeeper_client_timeout }}" # By default the start script uses "localhost"; override the hostname here # for production SolrCloud environments to control the hostname exposed to cluster state