Step1: 在stack中添加elasticsearch
cd /var/lib/ambari-server/resources/stacks/HDP/2.6/services
mkdir ELASTICSEARCH
cd ELASTICSEARCH
vim metainfo.xml
metainfo.xml内容如下:
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<metainfo>
<schemaVersion>2.0</schemaVersion>
<services>
<service>
<name>ELASTICSEARCH</name>
<version>6.3.0</version>
<extends>common-services/ELASTICSEARCH/6.3.0</extends>
</service>
</services>
</metainfo>
Step2:添加Elasticsearch配置
配置文件详情,请参看 ambari-elasticsearch-service
cd /var/lib/ambari-server/resources/common-services
mkdir -p ELASTICSEARCH/6.3.0
cd ELASTICSEARCH/6.3.0
tree
.
├── configuration
│ ├── elastic-config.xml
│ └── elastic-env.xml
├── LICENSE
├── metainfo.xml // es安装时需要的配置
├── package
│ ├── archive.zip
│ ├── scripts
│ │ ├── elastic_common.py
│ │ ├── master.py
│ │ ├── params.py
│ │ └── status_params.py
│ └── templates
│ └── elasticsearch.yml.j2 // es配置文件模板,根据node角色不同,可添加多种模板。
├── quicklinks
│ └── quicklinks.json // 快速连接配置
└── README.md
网友评论