Merge pull request #96 from gingerwizard/master

Build improvements
This commit is contained in:
gingerwizard 2016-04-16 08:06:44 +01:00
commit 6dea60f938
5 changed files with 51 additions and 17 deletions

1
.gitignore vendored
View file

@ -1,5 +1,4 @@
.kitchen/ .kitchen/
*.lock
*.pyc *.pyc
.vendor .vendor
.bundle .bundle

View file

@ -15,7 +15,7 @@ provisioner:
platforms: platforms:
- name: ubuntu-14.04 - name: ubuntu-14.04
driver_config: driver_config:
image: dliappis/ubuntuhetzner:14.04 image: dliappis/ubuntu-devopsci:14.04
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
@ -23,7 +23,7 @@ platforms:
use_sudo: false use_sudo: false
- name: debian-7 - name: debian-7
driver_config: driver_config:
image: debian:7 image: dliappis/debian-devopsci:7
privileged: true privileged: true
provision_command: provision_command:
- apt-get update && apt-get -y install python python-dev python-pip build-essential libyaml-dev python-yaml - apt-get update && apt-get -y install python python-dev python-pip build-essential libyaml-dev python-yaml
@ -32,7 +32,7 @@ platforms:
use_sudo: false use_sudo: false
- name: debian-8 - name: debian-8
driver_config: driver_config:
image: debian:8 image: dliappis/debian-devopsci:8
privileged: true privileged: true
provision_command: provision_command:
- apt-get update && apt-get -y install python python-dev python-pip build-essential libyaml-dev python-yaml curl wget - apt-get update && apt-get -y install python python-dev python-pip build-essential libyaml-dev python-yaml curl wget
@ -45,21 +45,14 @@ platforms:
run_command: "/sbin/init" run_command: "/sbin/init"
- name: centos-6 - name: centos-6
driver_config: driver_config:
image: dliappis/centoshetzner:6 image: dliappis/centos-devopsci:6
privileged: true privileged: true
provision_command: provision_command:
- yum remove -y ansible
- yum -y install gmp-devel python-devel python-pip
- pip install ansible
use_sudo: false use_sudo: false
- name: centos-7 - name: centos-7
driver_config: driver_config:
image: dliappis/centoshetzner:7 image: dliappis/centos-devopsci:7
provision_command: provision_command:
- yum remove -y ansible
- yum -y install gmp-devel python-devel python-pip
- yum -y groupinstall "Development Tools"
- pip install ansible
- 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

42
Gemfile.lock Normal file
View file

@ -0,0 +1,42 @@
GEM
remote: https://rubygems.org/
specs:
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
highline (1.7.8)
kitchen-ansible (0.40.1)
librarian-ansible
test-kitchen (~> 1.4)
kitchen-docker (2.1.0)
test-kitchen (>= 1.0.0)
librarian (0.1.2)
highline
thor (~> 0.15)
librarian-ansible (3.0.0)
faraday
librarian (~> 0.1.0)
mixlib-shellout (2.2.6)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.4)
safe_yaml (1.0.4)
test-kitchen (1.4.2)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (~> 2.7, < 2.10)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
PLATFORMS
ruby
DEPENDENCIES
kitchen-ansible (= 0.40.1)
kitchen-docker (= 2.1.0)
net-ssh (~> 2.0)
test-kitchen (= 1.4.2)
BUNDLED WITH
1.11.2

View file

@ -137,12 +137,11 @@ recommended in any multi node cluster configuration.
``` ```
- hosts: master_nodes - hosts: master_nodes
roles: roles:
- { role: elasticsearch, es_instance_name: "node1", es_heap_size: "1g", es_config: { "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "elastic02:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.mlockall: false, discovery.zen.ping.multicast.enabled: false } } - { role: elasticsearch, es_instance_name: "node1", es_heap_size: "1g", es_config: {cluster.name: "test-cluster", "discovery.zen.ping.multicast.enabled": false, discovery.zen.ping.unicast.hosts: "elastic02:9300", http.port: 9200, transport.tcp.port: 9300, node.data: false, node.master: true, bootstrap.mlockall: false, discovery.zen.ping.multicast.enabled: false } }
vars: vars:
es_scripts: false es_scripts: false
es_templates: false es_templates: false
es_version_lock: false es_version_lock: false
es_cluster_name: test-cluster
ansible_user: ansible ansible_user: ansible
es_plugins: es_plugins:
- plugin: elasticsearch/license - plugin: elasticsearch/license
@ -159,6 +158,7 @@ recommended in any multi node cluster configuration.
node.data: true, node.data: true,
node.master: false, node.master: false,
bootstrap.mlockall: false, bootstrap.mlockall: false,
cluster.name: "test-cluster",
discovery.zen.ping.multicast.enabled: false } discovery.zen.ping.multicast.enabled: false }
} }
- { role: elasticsearch, es_instance_name: "node2", - { role: elasticsearch, es_instance_name: "node2",
@ -170,13 +170,13 @@ recommended in any multi node cluster configuration.
node.data: true, node.data: true,
node.master: false, node.master: false,
bootstrap.mlockall: false, bootstrap.mlockall: false,
cluster.name: "test-cluster",
discovery.zen.ping.multicast.enabled: false } discovery.zen.ping.multicast.enabled: false }
} }
vars: vars:
es_scripts: false es_scripts: false
es_templates: false es_templates: false
es_version_lock: false es_version_lock: false
es_cluster_name: test-cluster
ansible_user: ansible ansible_user: ansible
es_plugins: es_plugins:
- plugin: elasticsearch/license - plugin: elasticsearch/license

View file

@ -1,4 +1,4 @@
- name: restart elasticsearch - name: restart elasticsearch
service: name={{instance_init_script | basename}} state=restarted enabled=yes service: name={{instance_init_script | basename}} state=restarted enabled=yes
when: es_restart_on_change and es_start_service and (not elasticsearch_started.changed or (plugin_installed is defined and plugin_installed.changed) or elasticsearch_install.changed) when: es_restart_on_change and es_start_service and not elasticsearch_started.changed and ((plugin_installed is defined and plugin_installed.changed) or elasticsearch_install.changed)