Commit Graph

22 Commits

Author SHA1 Message Date
Clark Boylan 66cf2dd8ef Retire this project
We've shutdown the elasticsearch service and don't need to manage it
with puppet any more.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/839235
Change-Id: I7b94d0fc8f49b3900ab0012196ff665e3e54266d
2022-04-25 09:46:00 -07:00
Alex Monk d4fcbbff1c Access es_template_config with @
To prevent this on every puppet run:
(warning): Variable access via 'es_template_config' is deprecated. Use
'@es_template_config' instead.
template[/etc/puppet/modules/elasticsearch/templates/elasticsearch.yml.erb]:33

Change-Id: Ie6c685d0748ce26c2bd2d227ce3b4e0578a95018
2016-08-07 00:13:30 +00:00
K Jonathan Harker 0733bdc394 Make total_shards_per_node configurable
Add support for index.routing.allocation.total_shards_per_node in the
elasticsearch.yml.erb template. This value sets the total number of
shards across all indices to store on any single node. A value of -1
specifies unlimited shards.

Change-Id: I8a7472fb8daf97015d47ab33476b78779e762dbe
2016-03-11 12:33:39 -08:00
jesusaurus a3745ab6ee Make network.publish_host configurable
The network publish host value defaults to the ip address of the
first non-loopback interface, but this is not always an appropriate
value.

In some cases this value may need to be set to something other than
the ip address of the local interface, such as when connections should
be made to a floating ip address.

Change-Id: I9ace9bc80607e8d60478e869ef13feea8c49e10a
2016-02-12 12:22:20 -05:00
Clark Boylan f6a724c575 Add indices.breaker.fielddata.limit to config
The indices.breaker.fielddata.limit config option specifies how much of
the heap can be used before breaking out and failing to prevent OOMing.
By default this is set to 60% of heap which may be too conservative if
you have larger datasets.

Change-Id: I46c0cb5157aae40a0029ff1b425ecc663d171768
2015-11-13 12:06:43 -08:00
Clark Boylan bbd742c992 Add config options for cors config
With newer ES we need to set CORS controls properly because it seems to
care about that now. This change allows you to enable the use of CORS
and specify which origins are allowed.

By default ES doesn't allow any cross origin requests so you have to
explicitly enable it with these options if you want to allow it.

Change-Id: I0aa8d5167c770c1024b7596da582d6cc089b1b47
2015-11-12 09:56:08 -08:00
Jenkins 9b03dcd9ef Merge "Fix variable access warnings" 2015-07-14 19:12:14 +00:00
Jenkins 1bc472e79c Merge "Add template support for the path.data" 2015-07-14 18:56:13 +00:00
Paul Belanger 113d29ffeb Fix variable access warnings
Change-Id: I70403b12ba86f6bd8106acd342bfa3f1806a3632
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-07-09 16:49:38 -04:00
K Jonathan Harker 57c667dd6b Add template support for the path.data
Also ensure the directory exists and is owned by elasticsearch if
specified.

Change-Id: I501d5995acc018d8e27a0a216609b4d4ed138864
2015-05-26 10:45:54 -07:00
K Jonathan Harker b40f1165d1 Add a cluster name option
This is useful if you want to run multiple clusters, or if you just want
to change the default value to something custom.

Change-Id: Id1731a209b43057090852a3bc484f61529717bd3
2015-05-20 16:51:09 -07:00
K Jonathan Harker c6ac0c47f3 Make the number of shards and replicas tunable
The shard count and replica count are some of the primary ways to tune
an elasticsearch cluster and should be tunable through this template.

Change-Id: Id6dd65ed3ca75e464f294774282eb36f6c001c67
2015-02-10 16:29:45 -08:00
Clark Boylan 9222b1ffd8 Use local ES balancers on logstash workers
Set up small non master non data elasticsearch daemons on logstash
workers to act as local load balancers for the elasticsearch http
protocol.

Change-Id: Ie3729f851ebef3331a6b69f718e57d663209bfc2
2014-07-07 17:01:57 -07:00
James E. Blair 99663c48ad Revert "Fixing deprecation warnings"
This reverts commit 82b9b59522928863ddadeacfec819e287303ef20.

Change-Id: I746d7ae57802dc76618db9024a0cf94c43774c02
2014-07-02 17:35:02 +00:00
Spencer Krum f039738b9f Fixing deprecation warnings
Non instance variable representation is deprecated
so needs to be changed. This change changes varibles
to their instance variable representation.

See more details see:
http://docs.puppetlabs.com/guides/templating.html

Change-Id: Ib77827e01011ef6c0380c9ec7a9d147eafd8ce2f
2014-06-19 22:41:42 -07:00
Ryan Lane 1f44661218 Configure elasticsearch via a hash
Change-Id: I70067e371d930dcecab6e85399465b4c3bf67ab2
2013-10-21 18:48:29 -07:00
Clark Boylan 367ab62123 Make ES Heap Size configurable.
wiki.o.o is much smaller than our typical elasticsearch nodes. For it to
use elasticsearch it needs to allocate a much smaller heap. Make the
heap size configurable (keep the 16g default) and set the heap size to
1g for wiki.o.o.

Change-Id: I0c5fb4865eb07c0fa5bbe4cf698a9f0e9ea9f2fc
2013-10-18 16:59:47 -07:00
Clark Boylan ee43a33596 Add sixth elasticsearch node.
* manifests/site.pp: Put elasticsearch nodes in a list variable that is
reused.

* modules/logstash/templates/elasticsearch.yml.erb: Update cluster
settings to be more appropriate for the larger cluster size, including
changing the minimum number of master eligible nodes that must be seen
before becoming operational in a cluster. Should help prevent split
brained clusters.

* modules/openstack_project/manifests/cacti.pp: Add new node to cacti
node list.

Change-Id: I9a18422aa56a56b9ad030892a312772d9b6b2a79
2013-08-02 13:22:47 -07:00
Clark Boylan 67194bdd93 Tune ElasticSearch settings.
* modules/logstash/templates/elasticsearch.yml.erb:
Give 33% of memory to indexing instead of 40%.

* modules/logstash/files/es-logstash-template.json:
Flush the translog every 50k operations instead of the default 5k
(we can do 5k ops every second or two so the flushing was happening too
often). Limit the total number of shards per index per node to 3. We
have 5 nodes and 10 shards per index, 5*3 > 10 so we should be fine.
Set the field cache to soft type so that its entries can be garbage
collected in memory constricted situations.

* modules/logstash/manifests/elasticsearch.pp:
Apply es-logstash-template.json to the elasticsearch servers.

Change-Id: I2337fc41998fd00e090b0acfd29f007dfb6ec8df
2013-07-19 16:11:49 -07:00
Clark Boylan e13716360c Add two more elasticsearch nodes.
* manifests/site.pp: List the two new elasticsearch nodes in the
appropriate lists.

* modules/logstash/manifests/elasticsearch.pp: Do not restart
elasticsearch when config files change. Service restarts are costly and
should be manually performed when necessary. Otherwise puppet should
simply update the config files.

* modules/logstash/templates/elasticsearch.yml.erb: Update elasticsearch
config with new cluster topology. Increase memory available for
indexing.

* modules/openstack_project/manifests/cacti.pp: Add new nodes to cacti
monitoring list.

Adding two more elasticsearch nodes to relieve memory pressure (more
nodes means fewer indexes per nodes which requires less memory to
manage). And two more nodes gives us more disk to retain older indexes
in. These new nodes should allow us to retain at least 3 weeks of
indexed logs.

Change-Id: I3a5a02311e939c8147e401110c7b96d085eb8274
Reviewed-on: https://review.openstack.org/36305
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-09 18:40:21 +00:00
Clark Boylan bc1c091f37 Better elasticsearch cluster settings.
Use mutliple discover nodes to determine elasticsearch cluster
membership. Put a timeout on recovery starting instead of the default
to recovery immediately. Describe cluster topology in elasticsearch yaml
config so that it can make smarter decisions. Round robin kibana
requests across each discover node.

Change-Id: I08ef9dd158ddf6a6ce01dfb2050626f543d45b10
Reviewed-on: https://review.openstack.org/34106
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-01 17:49:09 +00:00
Clark Boylan ffe95a7e43 Add support for elasticsearch cluster.
We need to expand our elasticsearch install base. Update puppet to make
this possible.

Change-Id: Id0dae839b12ebf47715cf40a363832e0f661a94f
Reviewed-on: https://review.openstack.org/33910
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-01 17:48:16 +00:00