Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to add ElasticSearch Services to ambari

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how ambari increases ElasticSearch services". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how ambari increases ElasticSearch services".

Ambari supports service expansion, just need to, uh, organize, package, throw our service into its resource directory, and restart the server. Sounds simple. Its service organization structure is divided into three layers: Stack / Service / Component. So let's start with Stack. The directory structure of a custom Stack is shown in the figure (copied from HDP).

Custom Stack [root @ master stacks] # pwd/var/lib/ambari-server/resources/stacks [root@master stacks] # tree NQNQ └── 1.1 ├── configuration │ └── cluster-env.xml ├── metainfo.xml ├── repos │ └── repoinfo.xml # Software Warehouse URL └── services # Service Directory └── ELASTICSEARCH ├ ── configuration │ └── elasticsearch-env.xml ├── metainfo.xml ├── metrics.json └── package ├── archive.zip ├── scripts │ └── master.py └── templates9 directories 8 files

With Stack (of course, you can throw it directly under the HDP service), we can add our own services. You can see that the service is under the services of Stack, each directory.

Custom Service

Directory structure

| | _ services | _ metainfo.xml # Service profile metrics.json # Operation and maintenance metric configuration, mapping ganglia and ambari | _ configuration {configuration files} # configuration file | _ package {files, scripts, templates} # installation scripts, templates and some files |

Metainfo.xml service configuration file, I try to write a bit more comprehensive, in order to explain the various configuration items.

2.0 ELASTICSEARCH ElasticSearch ElasticSearch service 1.4.0 ELASTICSEARCH ElasticSearch MASTER 1 scripts/master.py PYTHON 600 ELASTICSEARCH_NODE ElasticSearchNode SLAVE ALL false Scripts/slave.py PYTHON 600 any Elasticsearch GANGLIA elasticsearch-env false

Service and component names must be capitalized, or you will start all over again later. Don't ask me why I know. I tried again N times.

The name of the package node is important. Yum install [name]

There can be several category node component types, but what about P2P clusters?

MASTER doesn't have to be there. Only SLAVE can.

The cardinality node is the installation base. 1 + at least one, 0-1 at most, all ALL

Master.py is one of the simplest installation scripts. Well, it doesn't actually do anything.

Import sysfrom resource_management import * class Master (Script): def install (self, env): print 'Install the ES Master'; def stop (self, env): print' Stop the ES Master'; def start (self, env): print 'Start the ES Master'; def status (self, env): print' Status of the ES Master'; def configure (self, env): print 'Configure the ES Master' If _ _ name__ = = "_ _ main__": Master () .execute ()

Deploy, restart, install, and then you can see our results. Although it looks super simple, it doesn't matter. Now we will continue to improve the function, configuration, monitoring and alarm management.

Thank you for reading, the above is the content of "how to increase ElasticSearch services in ambari". After the study of this article, I believe you have a deeper understanding of how to increase ElasticSearch services in ambari, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report