# Configuring puppet-elasticsearch with hiera yaml

**URL:** <https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808>\
**Category:** Elasticsearch\
**Created:** [September 16, 2014, 7:32am UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808 "2014-09-16T07:32:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![RM1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rm1/32/1285_2.png) [@RM1](https://discuss.elastic.co/u/RM1)\
**Post date:** [September 16, 2014, 7:32am UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/1 "2014-09-16T07:32:37Z")

</div>

Hello,

I've picked up a great little utility called wirbelsturm  
([https://github.com/miguno/wirbelsturm](https://github.com/miguno/wirbelsturm)). With it I've managed to automate  
the creation of Vagrant backed VMs for a large chunk of my infrastructure  
without much pain. Then I got to elasticsearch. I've tried a fe variations  
of the below yaml, and cannot get elasticsearch to start.

I am running es on CentOS 6.5. What am I missing?

* * *

classes:

- elasticsearch

elasticsearch::manage\_repo: true  
elasticsearch::repo\_version: "1.3"  
elasticsearch::java\_install: true  
elasticsearch::ensure: "present"  
elasticsearch::status: "enabled"  
elasticsearch::instance: { 'es-01': }

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/dee408f2-6dda-4a81-914b-32be84c735e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/dee408f2-6dda-4a81-914b-32be84c735e0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![rameshmimit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshmimit/32/7902_2.png) [@rameshmimit](https://discuss.elastic.co/u/rameshmimit)\
**Post date:** [May 12, 2016, 5:01pm UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/2 "2016-05-12T17:01:34Z")

</div>

I am also trying to setup elasticsearch cluster with puppet module using hiera.

Below is my hiera config:

classes:

- elasticsearch
- wget

elasticsearch::manage\_repo: true  
elasticsearch::repo\_version: '2.x'

## Elasticsearch Related Stuff

elasticsearch::version: '2.3.1-1'  
elasticsearch::autoupgrade: false  
elasticsearch::status: 'enabled'  
elasticsearch::serviceprovider: 'init'  
elasticsearch::datadir: '/data'

elasticsearch::config:  
cluster:  
name: 'Westeros'  
bootstrap:  
mlockall: true  
index:  
number\_of\_shards: '1'  
number\_of\_replicas: '3'  
refresh\_interval: '5'  
codec: 'best\_compression'

## Kibana Installation

kibana::version: '4.5.0'  
kibana::plugins:

- 'elasticsearch/marvel/2.3.1'
- 'elasticsearch/shield/2.3.1'

So far I am manage to install elasticsearch successfully, but module seems like written in such a way that you can install multiple instances of elasticsearch on single node. But my requirement is to install on different hosts.

Still struggling to make it work.

---

<div class="post-metadata">

**Author:** ![clement](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clement/32/6895_2.png) [@clement](https://discuss.elastic.co/u/clement)\
**Post date:** [August 26, 2016, 9:37am UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/3 "2016-08-26T09:37:16Z")

</div>

hello

I created a puppet configuration with hiera with the puppet module elasticsearch/elasticsearch from puppet forge on a centos 7 server

this is my profile

class profiles::elasticsearch {

class { 'elasticsearch':  
ensure =\> present,  
manage\_repo =\> true,  
repo\_version =\> '2.x',  
}

}

my hiera datas

elasticsearch::instances:  
es-01:  
config:  
path.data: '/var/elasticsearch/'  
[node.name](http://node.name): 'bu'  
[cluster.name](http://cluster.name): 'namek'  
discovery.zen.ping.unicast.hosts: '[10.0.0.2]'  
index.store.type: 'mmapfs'  
indices.memory.index\_buffer\_size: '30%'  
index.translog.flush\_threshold\_ops: '50000'  
indices.fielddata.cache.size: '40%'  
network.host: '10.0.0.0'  
init\_defaults:  
ES\_HEAP\_SIZE: '2g'

it creat a instance elasticsearch name es-01 the configuration is here  
/etc/elasticsearch/es-01

i can manage my instance by the command  
service elasticsearch-es-01 start|stop|status

the config file is  
/etc/elasticsearch/es-01/elasticsearch.yml

### MANAGED BY PUPPET

* * *

cluster:  
name: namek  
discovery:  
zen:  
ping:  
unicast:  
hosts: [10.0.0.2]  
index:  
store:  
type: mmapfs  
translog:  
flush\_threshold\_ops: 50000  
indices:  
fielddata:  
cache:  
size: 40%  
memory:  
index\_buffer\_size: 30%  
init\_defaults:  
ES\_HEAP\_SIZE: 2g  
network:  
host: 10.0.0.0  
node:  
name: bu  
path:  
data: /usr/share/elasticsearch/data/es-01  
logs: /var/log/elasticsearch/es-01

I do not understand why my path.data is /usr/share/elasticsearch/data/es-01 and not /var/elasticsearch/es-01

---

<div class="post-metadata">

**Author:** ![tylerjl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylerjl/32/44965_2.png) [@tylerjl](https://discuss.elastic.co/u/tylerjl)\
**Post date:** [August 26, 2016, 8:27pm UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/4 "2016-08-26T20:27:06Z")

</div>

Hi @clement! Because the puppet module needs to also manage Elasticsearch data directories, the module assumes that you pass it the directory you want to store data in rather than defining `path.data` manually - if you give it the directory you want, it will handle creating the necessary yaml to give elasticsearch (and ensure the directory has right permissions, and so on).

You can do this either at the module level:

```
class { 'elasticsearch':
    datadir => '/var/elasticsearch',
}

```

Or per-instance in your hiera config:

```
elasticsearch::instances:
    es-01:
        datadir: /var/elasticsearch/es-01
```

---

<div class="post-metadata">

**Author:** ![clement](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/clement/32/6895_2.png) [@clement](https://discuss.elastic.co/u/clement)\
**Post date:** [August 29, 2016, 4:04pm UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/5 "2016-08-29T16:04:07Z")

</div>

Hello tylerj

Many thanks it works very well now

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [September 7, 2016, 3:25pm UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/6 "2016-09-07T15:25:32Z")

</div>

Hello,  
thanks for sharing your config.

What module do you use for installing kibana? There is not official elastic repo for handing Kibana puppet installations. Am I wrong?

---

<div class="post-metadata">

**Author:** ![sandeepkanabar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sandeepkanabar/32/79399_2.png) [@sandeepkanabar](https://discuss.elastic.co/u/sandeepkanabar)\
**Post date:** [September 9, 2016, 9:28am UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/7 "2016-09-09T09:28:18Z")

</div>

Hi @Luca_Belluccini,

You can get the Kibana module from [https://forge.puppet.com/jlambert121/kibana](https://forge.puppet.com/jlambert121/kibana).

Hope that helps.

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [September 12, 2016, 6:32am UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/8 "2016-09-12T06:32:58Z")

</div>

Thank you for the info!

Have a nice day

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:21pm UTC](https://discuss.elastic.co/t/configuring-puppet-elasticsearch-with-hiera-yaml/19808/9 "2017-07-05T22:21:16Z")

</div>


