diff --git a/site-modules/profile/manifests/elasticsearch.pp b/site-modules/profile/manifests/elasticsearch.pp index 53bcf0b2..3f8d053b 100644 --- a/site-modules/profile/manifests/elasticsearch.pp +++ b/site-modules/profile/manifests/elasticsearch.pp @@ -1,47 +1,52 @@ # Elasticsearch cluster node profile class profile::elasticsearch { user { 'elasticsearch': ensure => 'present', uid => '114', gid => '119', home => '/home/elasticsearch', shell => '/bin/false', } file { '/srv/elasticsearch': ensure => 'directory', owner => 'elasticsearch', mode => '755', } package { 'openjdk-8-jre-headless': ensure => 'present', } # Elasticsearch official package installation instructions: # https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html $keyid = lookup('elastic::apt_config::keyid') $key = lookup('elastic::apt_config::key') apt::source { 'elastic-6.x': location => 'https://artifacts.elastic.co/packages/6.x/apt', release => 'stable', repos => 'main', key => { id => $keyid, content => $key, }, } package { 'elasticsearch': ensure => '6.3.0', } + systemd::dropin_file { 'elasticsearch.conf': + unit => 'elasticsearch.service', + content => template('profile/swh/elasticsearch.conf.erb'), + } + service { 'elasticsearch': ensure => running, enable => true, } } diff --git a/site-modules/profile/templates/swh/elasticsearch.conf.erb b/site-modules/profile/templates/swh/elasticsearch.conf.erb new file mode 100644 index 00000000..d15826ad --- /dev/null +++ b/site-modules/profile/templates/swh/elasticsearch.conf.erb @@ -0,0 +1,2 @@ +[Service] +LimitNOFILE=131072