Closed Bug 1339636 Opened 9 years ago Closed 9 years ago

Add additional data nodes to the production Socorro elasticsearch cluster

Categories

(Socorro :: Infra, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: miles, Assigned: miles)

References

Details

This bug covers adding additional elasticsearch data nodes to Socorro's production elasticsearch cluster. The first step will be to evaluate adding data nodes to the staging elasticsearch cluster.
Assignee: nobody → miles
Blocks: 1322629
Initial survey upon increasing the size of the 'as-stage-socorroes-data' ASG in stage: - the new node spun up with the same launchconfiguration as the other nodes in the ASG per the ASG configuration - after initialization the node started running elasticsearch - improperly configured invocation of java: /bin/java -Xms256m -Xmx1g -Xss256k - as compared to the other nodes: NB: these values are different than prod because instance types are different - Hostname: i-f94d****, Role: data, ES_HEAP_SIZE from /etc/sysconfig: ES_HEAP_SIZE=14g - Hostname: i-977e****, Role: data, ES_HEAP_SIZE from /etc/sysconfig: ES_HEAP_SIZE=14g - Hostname: i-83b2****, Role: data, ES_HEAP_SIZE from /etc/sysconfig: ES_HEAP_SIZE=14g - Hostname: i-bd67****, Role: master, ES_HEAP_SIZE from /etc/sysconfig: (default, 256m min, 1g max) - Hostname: i-3c4e****, Role: master, ES_HEAP_SIZE from /etc/sysconfig: (default, 256m min, 1g max) - Hostname: i-9b61****, Role: master, ES_HEAP_SIZE from /etc/sysconfig: (default, 256m min, 1g max) - Hostname: i-7d43****, Role: interface, ES_HEAP_SIZE from /etc/sysconfig: (default, 256m min, 1g max) - Hostname: i-827e****, Role: interface, ES_HEAP_SIZE from /etc/sysconfig: (default, 256m min, 1g max) - /etc/elasticsearch/elasticsearch.yml has http api disabled (expected) - node correctly joins the cluster steps taken to bring new node to working state: - disable shard allocation - run “finish_configuring_es_node” ansible playbook (order of steps below a little fuzzy) - replace datadog existing api key with new key - adds datadog elasticsearch configuration - adds datadog tag for ES node type - restarts datadog - enables elasticsearch http api - changes ES_HEAP_SIZE=14g in /etc/sysconfig/elasticsearch (for data nodes) - restart elasticsearch - enable shard allocation - profit?! The cluster returned to green shortly after the shard allocation was re-enabled. This appears to be a working and repeatable procedure on stage that can be adapted easily to prod.
In short, it seems relatively simple to add new data nodes to our elasticsearch cluster. I have put together an ansible playbook that entirely automates the configuration of the new data nodes, and will get it reviewed before running in prod. As I mentioned above, the script takes a previously misconfigured node and properly configures the Datadog Agent, Datadog elasticsearch integration, elasticsearch http api, and ES_HEAP_SIZE, which seem to be the only issues with newly added data nodes.
A new data node was added to the production elasticsearch cluster @ 3pm pacific on 2/15. The process used is documented here: https://github.com/milescrabill/socorro-ansible/blob/master/README.md#adding-a-new-data-node. The specific playbook used is here: https://github.com/milescrabill/socorro-ansible/blob/master/playbooks/finish_configuring_es_node.yml. The cluster stayed green the whole time, and began relocating shards to the new data new upon re-enabling shard allocation, all as expected.
I added another new data node. That brings our total number of data nodes to 15, and has reduced the fielddata size on all prod data nodes to below my warning threshold for the first time since the random spike of two days ago - yay! Marking this fixed for now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Update 2017-04-07: added 4 more data nodes, bringing the total to 19. Reduced below warning levels again.
You need to log in before you can comment on or make changes to this bug.