Hello Everyone,
I'm working on getting elasticsearch to work using puppet. I've been able to get it installed but not to get it to accept connections.
This is my current puppet elasticsearch manifest:
class essearch{
yumrepo {'elasticsearch':,
descr => "Local Elasticsearch yum repo",
baseurl => "ftp://localrepo/pub/repo/elasticsearch",
enabled => 1,
gpgcheck => 0,
}->
class { 'elasticsearch':
java_install => true,
manage_repo => false,
restart_on_change => true,
repo_version => '5.x',
jvm_options => [
'-Xms24g',
'-Xmx24g',
],
}
elasticsearch::instance { 'searchbpe':
datadir => '/data/elDATA',
config => {
'network' => {
'host' => [$::ipaddress, '127.0.0.1' ],
},
'cluster' => {
'name' => 'searchbpe',
},
'index' => {
'number_of_replicas' => 1,
},
'discovery' => {
'zen' => {
'ping' => {
'unicast' => {
'hosts' => ["host1","host2"]
},
},
},
},
'node' => {
'name' => $hostname
},
}
}
firewall { '400 allow elasticsearch access for any':
port => [9200, 9300],
proto => tcp,
action => accept,
}
file { ["/data"]:
ensure => "directory",
owner => 'root',
group => 'root',
}
}
When I start elasticsearch on host1 and check the ports listing I get this:
tcp6 0 0 127.0.0.1:9200 :::* LISTEN 23567/java
tcp6 0 0 ::1:9200 :::* LISTEN 23567/java
tcp6 0 0 127.0.0.1:9300 :::* LISTEN 23567/java
tcp6 0 0 ::1:9300 :::* LISTEN 23567/java
Does anyone have an idea what i'm doing wrong here? Because if I make the config file /etc/elasticsearch/elasticsearch.yml with this content it works:
#### Managed by Puppet ####
cluster.name: searchbpe
discovery.zen.ping.unicast.hosts:
- host1
- host2
network.host:
- 123.456.789.0
- "127.0.0.1"
node.name: host2
path.data: /data/elDATA
path.logs: /var/log/elasticsearch/searchbpe
Thanks for any feedback.