You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ji...@apache.org on 2026/09/07 02:39:12 UTC

(ambari-website) branch main updated: AMBARI-26649: Enable Chinese website localization and harden ASF publication (#40)

This is an automated email from the ASF dual-hosted git repository.

JiaLiangC pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ambari-website.git


The following commit(s) were added to refs/heads/main by this push:
     new b9218cd  AMBARI-26649: Enable Chinese website localization and harden ASF publication (#40)
b9218cd is described below

commit b9218cd0c6ebbfd9742776baf1d6e221837bb922
Author: jialiang <ji...@gmail.com>
AuthorDate: Mon Sep 7 02:39:05 2026 +0000

    AMBARI-26649: Enable Chinese website localization and harden ASF publication (#40)
    
    * AMBARI-26649: Add multilingual website and guarded ASF publication support
    
    * AMBARI-26649: Translate 3.0.0 user and installation guides into Chinese
    
    * AMBARI-26649: Translate core development and architecture guides into Chinese
    
    * AMBARI-26445: Route website notifications to existing mailing lists
    
    * AMBARI-26649: Document translation scope and publication workflow
    
    * AMBARI-26649: Complete Chinese developer and release documentation
    
    * AMBARI-26649: Translate Views and plugin integration guides
    
    * AMBARI-26649: Translate metrics and service dashboard documentation
    
    * AMBARI-26649: Translate Kerberos and Blueprint documentation
    
    * AMBARI-26649: Translate Stack and service definition documentation
    
    * AMBARI-26649: Enforce complete Chinese content and sidebar coverage
---
 .asf.yaml                                          |    8 +-
 .github/workflows/website.yml                      |  109 +-
 .gitignore                                         |    4 +-
 README.md                                          |  Bin 842 -> 6356 bytes
 docusaurus.config.js                               |   38 +-
 i18n/zh-Hans/code.json                             |  382 +++
 .../docusaurus-plugin-content-blog/options.json    |   14 +
 .../docusaurus-plugin-content-docs/current.json    |   86 +
 .../version-2.7.8.json                             |   46 +
 .../version-2.7.9.json                             |   46 +
 .../version-3.0.0.json                             |   50 +
 .../version-3.0.0/ambari-alerts.md                 |   24 +
 .../version-3.0.0/ambari-design/alerts.md          |  222 ++
 .../ambari-design/ambari-architecture.md           |   25 +
 .../ambari-design/blueprints/blueprint-ha.md       |  570 ++++
 .../ambari-design/blueprints/blueprint-ranger.md   |  441 +++
 .../ambari-design/blueprints/index.md              | 1006 +++++++
 .../ambari-design/enhanced-configs/index.md        |  359 +++
 .../version-3.0.0/ambari-design/index.md           |   25 +
 .../ambari-design/kerberos/enabling_kerberos.md    |  359 +++
 .../version-3.0.0/ambari-design/kerberos/index.md  |   86 +
 .../ambari-design/kerberos/kerberos_descriptor.md  |  746 +++++
 .../ambari-design/kerberos/kerberos_service.md     |  325 ++
 .../metrics/ambari-metrics-whitelisting.md         |   70 +
 .../ambari-design/metrics/ambari-server-metrics.md |  120 +
 .../ambari-design/metrics/configuration.mdx        |  193 ++
 .../version-3.0.0/ambari-design/metrics/index.md   |   34 +
 .../metrics/metrics-api-specification.md           |   70 +
 .../metrics/metrics-collector-api-specification.md |  200 ++
 .../ambari-design/metrics/operations.md            |  170 ++
 .../ambari-design/metrics/stack-defined-metrics.md |   87 +
 .../ambari-design/metrics/troubleshooting.md       |  148 +
 .../metrics/upgrading-ambari-metrics-system.md     |   27 +
 .../version-3.0.0/ambari-design/quick-links.md     |  244 ++
 .../ambari-design/service-dashboard/index.mdx      |  208 ++
 .../stack-and-services/custom-services.md          | 1080 +++++++
 .../defining-a-custom-stack-and-services.md        |  665 +++++
 .../ambari-design/stack-and-services/extensions.md |  228 ++
 .../ambari-design/stack-and-services/faq.md        |   49 +
 .../ambari-design/stack-and-services/hooks.md      |   70 +
 .../how-to-define-stacks-and-services.md           | 1235 ++++++++
 .../ambari-design/stack-and-services/index.md      |   37 +
 .../stack-and-services/management-packs.md         |  347 +++
 .../ambari-design/stack-and-services/overview.mdx  |  575 ++++
 .../stack-and-services/stack-inheritance.md        |   89 +
 .../stack-and-services/stack-properties.md         |  142 +
 ...rsion-functions-conf-select-and-stack-select.md |   88 +
 .../stack-and-services/writing-metainfo.md         |  267 ++
 .../ambari-design/technology-stack.md              |   48 +
 .../ambari-design/views/framework-services.md      |  115 +
 .../version-3.0.0/ambari-design/views/index.md     |   98 +
 .../version-3.0.0/ambari-design/views/view-api.md  |  216 ++
 .../ambari-design/views/view-definition.md         |  231 ++
 .../admin-view-ambari-admin-development.md         |   44 +
 .../version-3.0.0/ambari-dev/ambari-code-layout.md |  108 +
 .../version-3.0.0/ambari-dev/apache-ambari-jira.md |   42 +
 .../version-3.0.0/ambari-dev/bigtop-guide.md       |  171 ++
 .../ambari-dev/building-from-source.md             |  142 +
 .../ambari-dev/code-review-guidelines.md           |   26 +
 .../ambari-dev/coding-guidelines-for-ambari.md     |  206 ++
 .../version-3.0.0/ambari-dev/developer-tools.md    |   85 +
 .../ambari-dev/development-in-docker.md            |  112 +
 .../development-process-for-new-major-features.md  |  154 +
 .../version-3.0.0/ambari-dev/feature-flags.md      |   19 +
 .../version-3.0.0/ambari-dev/how-to-commit.md      |   19 +
 .../version-3.0.0/ambari-dev/how-to-contribute.md  |  148 +
 .../version-3.0.0/ambari-dev/index.md              |  301 ++
 .../version-3.0.0/ambari-dev/releasing-ambari.md   |  406 +++
 .../version-3.0.0/ambari-dev/running-tests.md      |  126 +
 .../version-3.0.0/ambari-dev/unit-test-reports.md  |   12 +
 .../ambari-dev/verifying-release-candidate.md      |  112 +
 .../ambari-plugin-contribution/index.md            |   20 +
 .../ambari-plugin-contribution/scom/index.md       |   78 +
 .../scom/installation.md                           |  293 ++
 .../ambari-plugin-contribution/step-by-step.md     |   63 +
 .../version-3.0.0/faq.md                           |  184 ++
 .../version-3.0.0/introduction.md                  |   98 +
 .../quick-start/docker-environment-setup.md        |  412 +++
 .../version-3.0.0/quick-start/download.md          |  200 ++
 .../environment-setup/bare-metal-kvm-setup.md      |  305 ++
 .../environment-setup/docker-environment-setup.md  |  449 +++
 .../environment-setup/vagrant-environment-setup.md |  525 ++++
 .../quick-start/installation-guide.md              |  270 ++
 .../version-3.0.0/quick-start/mailing-list.md      |   74 +
 .../version-3.0.0/quick-start/quick-start-guide.md |  114 +
 .../version-3.0.0/release-notes.md                 |  310 ++
 i18n/zh-Hans/docusaurus-theme-classic/navbar.json  |   90 +
 package.json                                       |   37 +-
 playwright.config.ts                               |   45 +
 scripts/sync-translation-anchors.mjs               |   83 +
 src/components/HomepageFeatures/index.tsx          |   25 +-
 src/pages/index.module.css                         |   16 +
 src/pages/index.tsx                                |   28 +-
 src/pages/team/index.js                            |   47 +-
 src/plugins/localized-doc-links.js                 |   39 +
 src/theme/DocItem/Layout/index.tsx                 |   48 +
 tests/deployment.test.mjs                          |   88 +
 tests/e2e/i18n.spec.ts                             |  185 ++
 tests/i18n.test.mjs                                |  166 ++
 tsconfig.json                                      |   10 +-
 yarn.lock                                          | 3119 +++++++++++---------
 101 files changed, 20356 insertions(+), 1420 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 1d85ddb..77f3483 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -24,8 +24,10 @@ github:
     rebase: false
 notifications:
   commits: commits@ambari.apache.org
-  issues: notifications@ambari.apache.org
-  pullrequests: notifications@ambari.apache.org
+  issues: issues@ambari.apache.org
+  pullrequests: reviews@ambari.apache.org
 staging:
   profile: ~
-  whoami:  asf-site
+  whoami: asf-site
+publish:
+  whoami: asf-site
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 8b0677a..0be84d3 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -1,7 +1,22 @@
+# 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.
+
 name: Build and Deploy
 
 permissions:
-  contents: write
+  contents: read
 
 on:
   pull_request:
@@ -10,25 +25,83 @@ on:
   push:
     branches:
       - main
+  workflow_dispatch:
+
+concurrency:
+  group: website-${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: false
 
 jobs:
-  build-website-deploy:
+  build:
     runs-on: ubuntu-latest
     steps:
-      # Build main document: Apache Ambari documentation
       - name: Checkout
-        uses: actions/checkout@master
+        uses: actions/checkout@v4
+        with:
+          persist-credentials: false
 
       - name: Use Node.js
-        uses: actions/setup-node@v1
+        uses: actions/setup-node@v4
         with:
-          node-version: 18.12.1
+          node-version: 22
+
+      - name: Enable Yarn
+        run: corepack enable
+
+      - name: Install dependencies
+        run: yarn install --frozen-lockfile
+
+      - name: Check translations, deployment and types
+        run: |
+          yarn test:i18n
+          yarn test:deployment
+          yarn typecheck
+
+      - name: Build all languages
+        run: |
+          yarn update-avatar
+          yarn build
+
+      - name: Test language switching
+        run: |
+          yarn playwright install --with-deps chromium
+          yarn test:e2e
 
-      - name: Build Main Document
-        run: yarn && yarn update-avatar && yarn build && git checkout .
+      - name: Prepare ASF publication metadata
+        run: cp .asf.yaml build/.asf.yaml
+
+      - name: Upload tested website
+        uses: actions/upload-artifact@v4
+        with:
+          name: website
+          path: build/
+          include-hidden-files: true
+          if-no-files-found: error
+          retention-days: 1
+
+  deploy:
+    needs: build
+    if: >-
+      github.repository == 'apache/ambari-website' &&
+      github.ref == 'refs/heads/main' &&
+      (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+    steps:
+      - name: Download tested website
+        uses: actions/download-artifact@v4
+        with:
+          name: website
+          path: build
+
+      - name: Verify publication metadata
+        run: |
+          test -f build/.asf.yaml
+          test -f build/index.html
+          test -f build/zh-Hans/index.html
 
       - name: Deploy
-        if: ${{ github.event_name == 'push' }}
         uses: peaceiris/actions-gh-pages@v4
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -37,21 +110,3 @@ jobs:
           user_name: 'github-actions[bot]'
           user_email: 'github-actions[bot]@users.noreply.github.com'
           commit_message: 'Automated deployment:'
-
-      - name: Update .asf.yaml
-        run: |
-          git config --global user.name "GitHub Actions"
-          git config --global user.email "dev@ambari.apache.org"
-          git fetch --all
-          git checkout asf-site
-          echo 'staging:'           > .asf.yaml
-          echo '  profile: ~'       >> .asf.yaml
-          echo '  whoami: asf-site' >> .asf.yaml
-          echo "" >> .asf.yaml
-          echo 'publish:'           >> .asf.yaml
-          echo '  whoami: asf-site' >> .asf.yaml
-          git add .asf.yaml
-          git commit -m '.asf.yaml'
-          git push origin asf-site
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.gitignore b/.gitignore
index 9fdd47b..070acc7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,8 @@
 
 # Production
 /build
+/playwright-report
+/test-results
 
 # Generated files
 .docusaurus
@@ -25,4 +27,4 @@ package-lock.json
 static/javadoc
 static/old
 static/swagger
-target
\ No newline at end of file
+target
diff --git a/README.md b/README.md
index 201d113..469c18d 100644
Binary files a/README.md and b/README.md differ
diff --git a/docusaurus.config.js b/docusaurus.config.js
index d654517..47ab1a8 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -1,27 +1,33 @@
 // @ts-check
 // Note: type annotations allow type checking and IDEs autocompletion
 
-// For Docusaurus 3.7.0 with prism-react-renderer v2
+// For Docusaurus 3 with prism-react-renderer v2
 import { themes } from 'prism-react-renderer';
 
 /** @type {import('@docusaurus/types').Config} */
 const config = {
   title: 'Apache Ambari',
   tagline: 'The Apache Ambari project is aimed at making Hadoop management simpler by developing software for provisioning, managing, and monitoring Apache Hadoop clusters. Ambari provides an intuitive, easy-to-use Hadoop management web UI backed by its RESTful APIs.',
-  url: 'https://your-docusaurus-test-site.com',
+  url: 'https://ambari.apache.org',
   baseUrl: '/',
   onBrokenLinks: 'warn',
-  onBrokenMarkdownLinks: 'warn',
+  markdown: {
+    hooks: {
+      onBrokenMarkdownLinks: 'warn',
+    },
+  },
   favicon: 'img/favicon.ico',
   organizationName: 'apache', 
-  projectName: 'ambari', 
+  projectName: 'ambari-website',
+  deploymentBranch: 'asf-site',
 
-  // Even if you don't use internalization, you can use this field to set useful
-  // metadata like html lang. For example, if your site is Chinese, you may want
-  // to replace "en" with "zh-Hans".
   i18n: {
     defaultLocale: 'en',
-    locales: ['en'],
+    locales: ['en', 'zh-Hans'],
+    localeConfigs: {
+      en: { label: 'English', htmlLang: 'en' },
+      'zh-Hans': { label: '\u7b80\u4f53\u4e2d\u6587', htmlLang: 'zh-Hans' },
+    },
   },
 
   presets: [
@@ -31,12 +37,12 @@ const config = {
       ({
         docs: {
           sidebarPath: require.resolve('./sidebars.js'),
+          beforeDefaultRemarkPlugins: [require('./src/plugins/localized-doc-links')],
           // Enable breadcrumbs for better navigation
           breadcrumbs: true,
-          // Please change this to your repo.
-          // Remove this to remove the "edit this page" links.
           editUrl:
-            'https://github.com/vivostar/vivostar.github.io/tree/master/',
+            'https://github.com/apache/ambari-website/tree/main/',
+          editLocalizedFiles: true,
           lastVersion: '3.0.0',
           versions: {
             current: {
@@ -59,10 +65,8 @@ const config = {
         },
         blog: {
           showReadingTime: true,
-          // Please change this to your repo.
-          // Remove this to remove the "edit this page" links.
           editUrl:
-            'https://github.com/vivostar/vivostar.github.io/tree/master/',
+            'https://github.com/apache/ambari-website/tree/main/',
         },
         theme: {
           customCss: require.resolve('./src/css/custom.css'),
@@ -163,6 +167,10 @@ const config = {
             type: 'docsVersionDropdown',
             position: 'right',
           },
+          {
+            type: 'localeDropdown',
+            position: 'right',
+          },
           {
             href: 'https://github.com/apache/ambari',
             label: 'GitHub',
@@ -226,4 +234,4 @@ const config = {
     ],
   };
 
-export default config;
\ No newline at end of file
+export default config;
diff --git a/i18n/zh-Hans/code.json b/i18n/zh-Hans/code.json
new file mode 100644
index 0000000..c785570
--- /dev/null
+++ b/i18n/zh-Hans/code.json
@@ -0,0 +1,382 @@
+{
+  "docs.translationFallback": {
+    "message": "本页尚未翻译,以下显示英文原文。",
+    "description": "Notice for documentation without a Chinese translation"
+  },
+  "docs.viewEnglish": {
+    "message": "阅读英文版",
+    "description": "Link to the original English documentation"
+  },
+  "homepage.tagline": {
+    "message": "Apache Ambari 项目旨在通过开发用于部署、管理和监控 Apache Hadoop 集群的软件,让 Hadoop 管理更加简单。Ambari 提供直观、易用的 Hadoop 管理 Web 界面,并由其 RESTful API 提供支持。"
+  },
+  "homepage.getStarted": {
+    "message": "开始使用"
+  },
+  "homepage.description": {
+    "message": "Apache Ambari 提供用于部署、管理和监控 Apache Hadoop 集群的工具。"
+  },
+  "homepage.features.provision.title": {
+    "message": "部署 Hadoop 集群"
+  },
+  "homepage.features.provision.description": {
+    "message": "Ambari 提供分步向导,可在任意数量的主机上安装 Hadoop 服务。"
+  },
+  "homepage.features.manage.title": {
+    "message": "管理 Hadoop 集群"
+  },
+  "homepage.features.manage.description": {
+    "message": "Ambari 提供集中式管理功能,可在整个集群中启动、停止和重新配置 Hadoop 服务。"
+  },
+  "homepage.features.monitor.title": {
+    "message": "监控 Hadoop 集群"
+  },
+  "homepage.features.monitor.description": {
+    "message": "Ambari 提供用于监控 Hadoop 集群运行状况和状态的仪表板。"
+  },
+  "team.title": {
+    "message": "Ambari 团队"
+  },
+  "team.description": {
+    "message": "Apache Ambari 项目团队。"
+  },
+  "team.introduction": {
+    "message": "Ambari 团队"
+  },
+  "team.unordered": {
+    "message": "(无特定顺序)"
+  },
+  "team.pmc": {
+    "message": "PMC"
+  },
+  "team.committers": {
+    "message": "提交者"
+  },
+  "theme.ErrorPageContent.title": {
+    "message": "页面已崩溃。",
+    "description": "The title of the fallback page when the page crashed"
+  },
+  "theme.blog.archive.title": {
+    "message": "历史博文",
+    "description": "The page & hero title of the blog archive page"
+  },
+  "theme.blog.archive.description": {
+    "message": "历史博文",
+    "description": "The page & hero description of the blog archive page"
+  },
+  "theme.BackToTopButton.buttonAriaLabel": {
+    "message": "回到顶部",
+    "description": "The ARIA label for the back to top button"
+  },
+  "theme.blog.paginator.navAriaLabel": {
+    "message": "博文列表分页导航",
+    "description": "The ARIA label for the blog pagination"
+  },
+  "theme.blog.paginator.newerEntries": {
+    "message": "较新的博文",
+    "description": "The label used to navigate to the newer blog posts page (previous page)"
+  },
+  "theme.blog.paginator.olderEntries": {
+    "message": "较旧的博文",
+    "description": "The label used to navigate to the older blog posts page (next page)"
+  },
+  "theme.blog.post.paginator.navAriaLabel": {
+    "message": "博文分页导航",
+    "description": "The ARIA label for the blog posts pagination"
+  },
+  "theme.blog.post.paginator.newerPost": {
+    "message": "较新一篇",
+    "description": "The blog post button label to navigate to the newer/previous post"
+  },
+  "theme.blog.post.paginator.olderPost": {
+    "message": "较旧一篇",
+    "description": "The blog post button label to navigate to the older/next post"
+  },
+  "theme.tags.tagsPageLink": {
+    "message": "查看所有标签",
+    "description": "The label of the link targeting the tag list page"
+  },
+  "theme.colorToggle.ariaLabel.mode.system": {
+    "message": "system mode",
+    "description": "The name for the system color mode"
+  },
+  "theme.colorToggle.ariaLabel.mode.light": {
+    "message": "浅色模式",
+    "description": "The name for the light color mode"
+  },
+  "theme.colorToggle.ariaLabel.mode.dark": {
+    "message": "暗黑模式",
+    "description": "The name for the dark color mode"
+  },
+  "theme.colorToggle.ariaLabel": {
+    "message": "切换浅色/暗黑模式(当前为{mode})",
+    "description": "The ARIA label for the color mode toggle"
+  },
+  "theme.docs.breadcrumbs.navAriaLabel": {
+    "message": "页面路径",
+    "description": "The ARIA label for the breadcrumbs"
+  },
+  "theme.docs.paginator.navAriaLabel": {
+    "message": "文件选项卡",
+    "description": "The ARIA label for the docs pagination"
+  },
+  "theme.docs.paginator.previous": {
+    "message": "上一页",
+    "description": "The label used to navigate to the previous doc"
+  },
+  "theme.docs.paginator.next": {
+    "message": "下一页",
+    "description": "The label used to navigate to the next doc"
+  },
+  "theme.docs.tagDocListPageTitle.nDocsTagged": {
+    "message": "{count} 篇文档带有标签",
+    "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+  },
+  "theme.docs.tagDocListPageTitle": {
+    "message": "{nDocsTagged}「{tagName}」",
+    "description": "The title of the page for a docs tag"
+  },
+  "theme.docs.versionBadge.label": {
+    "message": "版本:{versionLabel}"
+  },
+  "theme.docs.versions.unreleasedVersionLabel": {
+    "message": "此为 {siteTitle} {versionLabel} 版尚未发行的文档。",
+    "description": "The label used to tell the user that he's browsing an unreleased doc version"
+  },
+  "theme.docs.versions.unmaintainedVersionLabel": {
+    "message": "此为 {siteTitle} {versionLabel} 版的文档,现已不再积极维护。",
+    "description": "The label used to tell the user that he's browsing an unmaintained doc version"
+  },
+  "theme.docs.versions.latestVersionSuggestionLabel": {
+    "message": "最新的文档请参阅 {latestVersionLink} ({versionLabel})。",
+    "description": "The label used to tell the user to check the latest version"
+  },
+  "theme.docs.versions.latestVersionLinkLabel": {
+    "message": "最新版本",
+    "description": "The label used for the latest version suggestion link label"
+  },
+  "theme.common.editThisPage": {
+    "message": "编辑此页",
+    "description": "The link label to edit the current page"
+  },
+  "theme.common.headingLinkTitle": {
+    "message": "{heading}的直接链接",
+    "description": "Title for link to heading"
+  },
+  "theme.lastUpdated.atDate": {
+    "message": "于 {date} ",
+    "description": "The words used to describe on which date a page has been last updated"
+  },
+  "theme.lastUpdated.byUser": {
+    "message": "由 {user} ",
+    "description": "The words used to describe by who the page has been last updated"
+  },
+  "theme.lastUpdated.lastUpdatedAtBy": {
+    "message": "最后{byUser}{atDate}更新",
+    "description": "The sentence used to display when a page has been last updated, and by who"
+  },
+  "theme.NotFound.title": {
+    "message": "找不到页面",
+    "description": "The title of the 404 page"
+  },
+  "theme.navbar.mobileVersionsDropdown.label": {
+    "message": "选择版本",
+    "description": "The label for the navbar versions dropdown on mobile view"
+  },
+  "theme.tags.tagsListLabel": {
+    "message": "标签:",
+    "description": "The label alongside a tag list"
+  },
+  "theme.AnnouncementBar.closeButtonAriaLabel": {
+    "message": "关闭",
+    "description": "The ARIA label for close button of announcement bar"
+  },
+  "theme.admonition.caution": {
+    "message": "警告",
+    "description": "The default label used for the Caution admonition (:::caution)"
+  },
+  "theme.admonition.danger": {
+    "message": "危险",
+    "description": "The default label used for the Danger admonition (:::danger)"
+  },
+  "theme.admonition.info": {
+    "message": "信息",
+    "description": "The default label used for the Info admonition (:::info)"
+  },
+  "theme.admonition.note": {
+    "message": "备注",
+    "description": "The default label used for the Note admonition (:::note)"
+  },
+  "theme.admonition.tip": {
+    "message": "提示",
+    "description": "The default label used for the Tip admonition (:::tip)"
+  },
+  "theme.admonition.warning": {
+    "message": "注意",
+    "description": "The default label used for the Warning admonition (:::warning)"
+  },
+  "theme.blog.sidebar.navAriaLabel": {
+    "message": "最近博文导航",
+    "description": "The ARIA label for recent posts in the blog sidebar"
+  },
+  "theme.DocSidebarItem.expandCategoryAriaLabel": {
+    "message": "展开侧边栏分类 '{label}'",
+    "description": "The ARIA label to expand the sidebar category"
+  },
+  "theme.DocSidebarItem.collapseCategoryAriaLabel": {
+    "message": "折叠侧边栏分类 '{label}'",
+    "description": "The ARIA label to collapse the sidebar category"
+  },
+  "theme.IconExternalLink.ariaLabel": {
+    "message": "(opens in new tab)",
+    "description": "The ARIA label for the external link icon"
+  },
+  "theme.NotFound.p1": {
+    "message": "我们找不到您要找的页面。",
+    "description": "The first paragraph of the 404 page"
+  },
+  "theme.NotFound.p2": {
+    "message": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。",
+    "description": "The 2nd paragraph of the 404 page"
+  },
+  "theme.NavBar.navAriaLabel": {
+    "message": "主导航",
+    "description": "The ARIA label for the main navigation"
+  },
+  "theme.navbar.mobileLanguageDropdown.label": {
+    "message": "选择语言",
+    "description": "The label for the mobile language switcher dropdown"
+  },
+  "theme.TOCCollapsible.toggleButtonLabel": {
+    "message": "本页总览",
+    "description": "The label used by the button on the collapsible TOC component"
+  },
+  "theme.blog.post.readMore": {
+    "message": "阅读更多",
+    "description": "The label used in blog post item excerpts to link to full blog posts"
+  },
+  "theme.blog.post.readMoreLabel": {
+    "message": "阅读 {title} 的全文",
+    "description": "The ARIA label for the link to full blog posts from excerpts"
+  },
+  "theme.blog.post.readingTime.plurals": {
+    "message": "阅读需 {readingTime} 分钟",
+    "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+  },
+  "theme.CodeBlock.copy": {
+    "message": "复制",
+    "description": "The copy button label on code blocks"
+  },
+  "theme.CodeBlock.copied": {
+    "message": "复制成功",
+    "description": "The copied button label on code blocks"
+  },
+  "theme.CodeBlock.copyButtonAriaLabel": {
+    "message": "复制代码到剪贴板",
+    "description": "The ARIA label for copy code blocks button"
+  },
+  "theme.docs.breadcrumbs.home": {
+    "message": "主页面",
+    "description": "The ARIA label for the home page in the breadcrumbs"
+  },
+  "theme.CodeBlock.wordWrapToggle": {
+    "message": "切换自动换行",
+    "description": "The title attribute for toggle word wrapping button of code block lines"
+  },
+  "theme.docs.sidebar.collapseButtonTitle": {
+    "message": "收起侧边栏",
+    "description": "The title attribute for collapse button of doc sidebar"
+  },
+  "theme.docs.sidebar.collapseButtonAriaLabel": {
+    "message": "收起侧边栏",
+    "description": "The title attribute for collapse button of doc sidebar"
+  },
+  "theme.docs.sidebar.navAriaLabel": {
+    "message": "文档侧边栏",
+    "description": "The ARIA label for the sidebar navigation"
+  },
+  "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": {
+    "message": "← 回到主菜单",
+    "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"
+  },
+  "theme.docs.sidebar.toggleSidebarButtonAriaLabel": {
+    "message": "切换导航栏",
+    "description": "The ARIA label for hamburger menu button of mobile navigation"
+  },
+  "theme.docs.sidebar.closeSidebarButtonAriaLabel": {
+    "message": "关闭导航栏",
+    "description": "The ARIA label for close button of mobile sidebar"
+  },
+  "theme.navbar.mobileDropdown.collapseButton.expandAriaLabel": {
+    "message": "Expand the dropdown",
+    "description": "The ARIA label of the button to expand the mobile dropdown navbar item"
+  },
+  "theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel": {
+    "message": "Collapse the dropdown",
+    "description": "The ARIA label of the button to collapse the mobile dropdown navbar item"
+  },
+  "theme.docs.sidebar.expandButtonTitle": {
+    "message": "展开侧边栏",
+    "description": "The ARIA label and title attribute for expand button of doc sidebar"
+  },
+  "theme.docs.sidebar.expandButtonAriaLabel": {
+    "message": "展开侧边栏",
+    "description": "The ARIA label and title attribute for expand button of doc sidebar"
+  },
+  "theme.blog.post.plurals": {
+    "message": "{count} 篇博文",
+    "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)"
+  },
+  "theme.blog.tagTitle": {
+    "message": "{nPosts} 含有标签「{tagName}」",
+    "description": "The title of the page for a blog tag"
+  },
+  "theme.blog.author.pageTitle": {
+    "message": "{authorName} - {nPosts}",
+    "description": "The title of the page for a blog author"
+  },
+  "theme.blog.authorsList.pageTitle": {
+    "message": "作者",
+    "description": "The title of the authors page"
+  },
+  "theme.blog.authorsList.viewAll": {
+    "message": "查看所有作者",
+    "description": "The label of the link targeting the blog authors page"
+  },
+  "theme.blog.author.noPosts": {
+    "message": "该作者尚未撰写任何文章。",
+    "description": "The text for authors with 0 blog post"
+  },
+  "theme.contentVisibility.unlistedBanner.title": {
+    "message": "未列出页",
+    "description": "The unlisted content banner title"
+  },
+  "theme.contentVisibility.unlistedBanner.message": {
+    "message": "此页面未列出。搜索引擎不会对其索引,只有拥有直接链接的用户才能访问。",
+    "description": "The unlisted content banner message"
+  },
+  "theme.contentVisibility.draftBanner.title": {
+    "message": "草稿页",
+    "description": "The draft content banner title"
+  },
+  "theme.contentVisibility.draftBanner.message": {
+    "message": "此页面是草稿,仅在开发环境中可见,不会包含在正式版本中。",
+    "description": "The draft content banner message"
+  },
+  "theme.docs.DocCard.categoryDescription.plurals": {
+    "message": "{count} 个项目",
+    "description": "The default description for a category card in the generated index about how many items this category includes"
+  },
+  "theme.ErrorPageContent.tryAgain": {
+    "message": "重试",
+    "description": "The label of the button to try again rendering when the React error boundary captures an error"
+  },
+  "theme.common.skipToMainContent": {
+    "message": "跳到主要内容",
+    "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"
+  },
+  "theme.tags.tagsPageTitle": {
+    "message": "标签",
+    "description": "The title of the tag list page"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-blog/options.json b/i18n/zh-Hans/docusaurus-plugin-content-blog/options.json
new file mode 100644
index 0000000..17db797
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-blog/options.json
@@ -0,0 +1,14 @@
+{
+  "title": {
+    "message": "博客",
+    "description": "The title for the blog used in SEO"
+  },
+  "description": {
+    "message": "博客",
+    "description": "The description for the blog used in SEO"
+  },
+  "sidebar.title": {
+    "message": "最新文章",
+    "description": "The label for the left sidebar"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
new file mode 100644
index 0000000..bc116ab
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/current.json
@@ -0,0 +1,86 @@
+{
+  "version.label": {
+    "message": "下一版本",
+    "description": "The label for version current"
+  },
+  "sidebar.ambariSidebar.category.Quick Start": {
+    "message": "快速入门",
+    "description": "The label for category 'Quick Start' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Environment Setup": {
+    "message": "环境准备",
+    "description": "The label for category 'Environment Setup' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Design": {
+    "message": "Ambari 设计",
+    "description": "The label for category 'Ambari Design' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Automated Kerberizaton": {
+    "message": "自动 Kerberos 配置",
+    "description": "The label for category 'Automated Kerberizaton' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Blueprints": {
+    "message": "蓝图",
+    "description": "The label for category 'Blueprints' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Metrics": {
+    "message": "指标",
+    "description": "The label for category 'Metrics' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Stacks and Services": {
+    "message": "Stack 和服务",
+    "description": "The label for category 'Stacks and Services' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Views": {
+    "message": "视图",
+    "description": "The label for category 'Views' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Development": {
+    "message": "Ambari 开发",
+    "description": "The label for category 'Ambari Development' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Plugin Contributions": {
+    "message": "Ambari 插件贡献",
+    "description": "The label for category 'Ambari Plugin Contributions' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari SCOM Management Pack": {
+    "message": "Ambari SCOM 管理包",
+    "description": "The label for category 'Ambari SCOM Management Pack' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Apache": {
+    "message": "Apache",
+    "description": "The label for category 'Apache' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.link.Foundation": {
+    "message": "基金会",
+    "description": "The label for link 'Foundation' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/'"
+  },
+  "sidebar.ambariSidebar.link.Events": {
+    "message": "活动",
+    "description": "The label for link 'Events' in sidebar 'ambariSidebar', linking to 'https://www.apachecon.com/'"
+  },
+  "sidebar.ambariSidebar.link.License": {
+    "message": "许可证",
+    "description": "The label for link 'License' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/licenses/'"
+  },
+  "sidebar.ambariSidebar.link.Thanks": {
+    "message": "致谢",
+    "description": "The label for link 'Thanks' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/foundation/thanks.html'"
+  },
+  "sidebar.ambariSidebar.link.Security": {
+    "message": "安全",
+    "description": "The label for link 'Security' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/security/'"
+  },
+  "sidebar.ambariSidebar.link.Sponsorship": {
+    "message": "赞助",
+    "description": "The label for link 'Sponsorship' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/foundation/sponsorship.html'"
+  },
+  "sidebar.ambariSidebar.link.Trademarks": {
+    "message": "商标",
+    "description": "The label for link 'Trademarks' in sidebar 'ambariSidebar', linking to 'https://www.apache.org/foundation/marks/'"
+  },
+  "sidebar.ambariSidebar.link.Privacy": {
+    "message": "隐私",
+    "description": "The label for link 'Privacy' in sidebar 'ambariSidebar', linking to 'https://privacy.apache.org/policies/privacy-policy-public.html'"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.8.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.8.json
new file mode 100644
index 0000000..e97241d
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.8.json
@@ -0,0 +1,46 @@
+{
+  "version.label": {
+    "message": "2.7.8",
+    "description": "The label for version 2.7.8"
+  },
+  "sidebar.ambariSidebar.category.Quick Start": {
+    "message": "快速入门",
+    "description": "The label for category 'Quick Start' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Design": {
+    "message": "Ambari 设计",
+    "description": "The label for category 'Ambari Design' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Automated Kerberizaton": {
+    "message": "自动 Kerberos 配置",
+    "description": "The label for category 'Automated Kerberizaton' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Blueprints": {
+    "message": "蓝图",
+    "description": "The label for category 'Blueprints' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Metrics": {
+    "message": "指标",
+    "description": "The label for category 'Metrics' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Stacks and Services": {
+    "message": "Stack 和服务",
+    "description": "The label for category 'Stacks and Services' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Views": {
+    "message": "视图",
+    "description": "The label for category 'Views' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Development": {
+    "message": "Ambari 开发",
+    "description": "The label for category 'Ambari Development' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Plugin Contributions": {
+    "message": "Ambari 插件贡献",
+    "description": "The label for category 'Ambari Plugin Contributions' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari SCOM Management Pack": {
+    "message": "Ambari SCOM 管理包",
+    "description": "The label for category 'Ambari SCOM Management Pack' in sidebar 'ambariSidebar'"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.9.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.9.json
new file mode 100644
index 0000000..3a6f93c
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-2.7.9.json
@@ -0,0 +1,46 @@
+{
+  "version.label": {
+    "message": "2.7.9",
+    "description": "The label for version 2.7.9"
+  },
+  "sidebar.ambariSidebar.category.Quick Start": {
+    "message": "快速入门",
+    "description": "The label for category 'Quick Start' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Design": {
+    "message": "Ambari 设计",
+    "description": "The label for category 'Ambari Design' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Automated Kerberizaton": {
+    "message": "自动 Kerberos 配置",
+    "description": "The label for category 'Automated Kerberizaton' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Blueprints": {
+    "message": "蓝图",
+    "description": "The label for category 'Blueprints' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Metrics": {
+    "message": "指标",
+    "description": "The label for category 'Metrics' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Stacks and Services": {
+    "message": "Stack 和服务",
+    "description": "The label for category 'Stacks and Services' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Views": {
+    "message": "视图",
+    "description": "The label for category 'Views' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Development": {
+    "message": "Ambari 开发",
+    "description": "The label for category 'Ambari Development' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Plugin Contributions": {
+    "message": "Ambari 插件贡献",
+    "description": "The label for category 'Ambari Plugin Contributions' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari SCOM Management Pack": {
+    "message": "Ambari SCOM 管理包",
+    "description": "The label for category 'Ambari SCOM Management Pack' in sidebar 'ambariSidebar'"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0.json b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0.json
new file mode 100644
index 0000000..324cc6f
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0.json
@@ -0,0 +1,50 @@
+{
+  "version.label": {
+    "message": "3.0.0",
+    "description": "The label for version 3.0.0"
+  },
+  "sidebar.ambariSidebar.category.Quick Start": {
+    "message": "快速入门",
+    "description": "The label for category 'Quick Start' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Environment Setup": {
+    "message": "环境准备",
+    "description": "The label for category 'Environment Setup' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Design": {
+    "message": "Ambari 设计",
+    "description": "The label for category 'Ambari Design' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Automated Kerberizaton": {
+    "message": "自动 Kerberos 配置",
+    "description": "The label for category 'Automated Kerberizaton' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Blueprints": {
+    "message": "蓝图",
+    "description": "The label for category 'Blueprints' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Metrics": {
+    "message": "指标",
+    "description": "The label for category 'Metrics' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Stacks and Services": {
+    "message": "Stack 和服务",
+    "description": "The label for category 'Stacks and Services' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Views": {
+    "message": "视图",
+    "description": "The label for category 'Views' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Development": {
+    "message": "Ambari 开发",
+    "description": "The label for category 'Ambari Development' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari Plugin Contributions": {
+    "message": "Ambari 插件贡献",
+    "description": "The label for category 'Ambari Plugin Contributions' in sidebar 'ambariSidebar'"
+  },
+  "sidebar.ambariSidebar.category.Ambari SCOM Management Pack": {
+    "message": "Ambari SCOM 管理包",
+    "description": "The label for category 'Ambari SCOM Management Pack' in sidebar 'ambariSidebar'"
+  }
+}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-alerts.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-alerts.md
new file mode 100644
index 0000000..8679e5e
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-alerts.md
@@ -0,0 +1,24 @@
+---
+title: Ambari 告警
+---
+
+<!---
+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
+--->
+
+# Ambari 告警 {#ambari-alerts}
+
+Ambari 中定义的告警帮助页面。
+
+## Ambari Agent 心跳 {#ambari-agent-heartbeat}
+
+**服务**:Ambari
+**组件**:Ambari Server
+**类型**:SERVER
+**组**:AMBARI Default
+**描述**:如果服务器失去与代理的联系,则会触发此告警。
+
+如果生成此告警,告警文本将包含主机名(例如 c6401.ambari.apache.org is not sending heartbeats.)。请检查代理是否正在运行;如果正在运行,请查看日志末尾,确认它是否正在接收服务器的心跳响应。检查 /etc/ambari-agent/conf/ambari-agent.ini 文件中的服务器主机名是否正确且可访问。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/alerts.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/alerts.md
new file mode 100644
index 0000000..a49ae34
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/alerts.md
@@ -0,0 +1,222 @@
+---
+title: 告警
+---
+
+<!--
+   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.
+-->
+WEB 和 METRIC 告警类型的告警定义中包含 `connection_timeout` 属性(参见下方的 `AlertDefinition : source : uri : connection_timeout`)。此值以秒为单位,默认值为 5.0。如果需要修改连接超时时间,请通过更新 `source` 块使用 Ambari REST API。
+
+```json
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/alert_definitions/42",
+  "AlertDefinition" : {
+    "cluster_name" : "MyCluster",
+    "component_name" : "APP_TIMELINE_SERVER",
+    "description" : "This host-level alert is triggered if the App Timeline Server Web UI is unreachable.",
+    "enabled" : true,
+    "id" : 42,
+    "ignore_host" : false,
+    "interval" : 1,
+    "label" : "App Timeline Web UI",
+    "name" : "yarn_app_timeline_server_webui",
+    "scope" : "ANY",
+    "service_name" : "YARN",
+    "source" : {
+      "reporting" : {
+        "ok" : {
+          "text" : "HTTP {0} response in {2:.3f}s"
+        },
+        "warning" : {
+          "text" : "HTTP {0} response from {1} in {2:.3f}s ({3})"
+        },
+        "critical" : {
+          "text" : "Connection failed to {1} ({3})"
+        }
+      },
+      "type" : "WEB",
+      "uri" : {
+        "http" : "{{yarn-site/yarn.timeline-service.webapp.address}}",
+        "https" : "{{yarn-site/yarn.timeline-service.webapp.https.address}}",
+        "https_property" : "{{yarn-site/yarn.http.policy}}",
+        "https_property_value" : "HTTPS_ONLY",
+        "kerberos_keytab" : "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab}}",
+        "kerberos_principal" : "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.principal}}",
+        "default_port" : 0.0,
+        "connection_timeout" : 5.0
+      }
+    }
+  }
+}
+```
+
+例如,要通过 API 更新 `connection_timeout`,需要在 API 调用中 PUT 整个 `source` 块。例如,执行以下 PUT 可将 `connection_timeout` 更新为 **6.5** 秒。
+
+```
+PUT /api/v1/clusters/MyCluster/alert_definitions/42
+
+{
+"AlertDefinition" : {
+  "source" : {
+      "reporting" : {
+        "ok" : {
+          "text" : "HTTP {0} response in {2:.3f}s"
+        },
+        "warning" : {
+          "text" : "HTTP {0} response from {1} in {2:.3f}s ({3})"
+        },
+        "critical" : {
+          "text" : "Connection failed to {1} ({3})"
+        }
+      },
+      "type" : "WEB",
+      "uri" : {
+        "http" : "{{yarn-site/yarn.timeline-service.webapp.address}}",
+        "https" : "{{yarn-site/yarn.timeline-service.webapp.https.address}}",
+        "https_property" : "{{yarn-site/yarn.http.policy}}",
+        "https_property_value" : "HTTPS_ONLY",
+        "kerberos_keytab" : "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.keytab}}",
+        "kerberos_principal" : "{{yarn-site/yarn.timeline-service.http-authentication.kerberos.principal}}",
+        "default_port" : 0.0,
+        "connection_timeout" : 6.5
+      }
+    }
+  }
+}
+```
+
+## 创建基于脚本的告警分发器 {#creating-a-script-based-alert-dispatcher}
+
+本文介绍如何启用能够响应 Ambari 告警的自定义基于脚本的告警分发器。分发器会将告警参数作为命令行参数调用脚本。
+
+分发器必须知道要执行的脚本位置。通过在 `ambari.properties` 中设置以下任一项进行配置:
+
+* `notification.dispatch.alert.script`
+* a custom property key that points to the script, such as `foo.bar.alert.dispatch.script`
+
+示例:
+
+```
+notification.dispatch.alert.script=/contrib/ambari-alerts/scripts/default_logger.py
+com.mycompany.dispatch.syslog.script=/contrib/ambari-alerts/scripts/legacy_sys_logger.py
+com.mycompany.dispatch.shell.script=/contrib/ambari-alerts/scripts/shell_logger.sh
+```
+
+当告警实例状态发生变化且 Ambari 需要分发该状态变化时,会调用自定义脚本:
+
+```
+# main method which is called when invoked on the command line
+# :param definitionName: the alert definition unique ID
+# :param definitionLabel: the human readable alert definition label
+# :param serviceName: the service that the alert definition belongs to
+# :param alertState: the state of the alert (OK, WARNING, etc)
+# :param alertText: the text of the alert
+
+def main():
+    definitionName = sys.argv[1]
+    definitionLabel = sys.argv[2]
+    serviceName = sys.argv[3]
+    alertState = sys.argv[4]
+    alertText = sys.argv[5]
+```
+
+```
+POST api/v1/alert_targets
+
+    {
+      "AlertTarget": {
+        "name": "syslogger",
+        "description": "Syslog Target",
+        "notification_type": "ALERT_SCRIPT",
+        "global": true
+      }
+    }
+```
+
+上述调用会创建一个全局告警目标,分发所有告警组中的全部告警。如果未将 `ambari.dispatch-property.script` 指定为告警目标的属性,Ambari 会在 `ambari.properties` 中查找默认配置键 `notification.dispatch.alert.script`。
+
+```
+POST api/v1/alert_targets
+
+    {
+      "AlertTarget": {
+        "name": "syslogger",
+        "description": "Syslog Target",
+        "notification_type": "ALERT_SCRIPT",
+        "global": true,
+        "properties": {
+          "ambari.dispatch-property.script": "com.mycompany.dispatch.syslog.script"
+        }
+      }
+    }
+```
+
+上述调用同样会创建全局告警目标,但指定了特定的脚本键。因此,`ambari.properties` 应包含类似以下内容:
+
+```
+com.mycompany.dispatch.syslog.script=/contrib/ambari-alerts/scripts/legacy_sys_logger.py
+```
+
+## 自定义告警模板 {#customizing-the-alert-template}
+Ambari 2.0 使用自身的告警系统传达所管理集群各方面的状态。Ambari 生成的通知模板内容与通知类型紧密关联。Email 和 SNMP 都有可自定义的模板,可用于生成内容。本文介绍更改 Ambari 2.0 创建告警通知时所用模板的必要步骤。
+
+此过程面向能够访问 Ambari Server 文件系统和 `ambari.properties` 文件的 Ambari 管理员。这些管理员可以创建新模板,或更改生成告警通知内容时使用的现有模板。目前还没有通过 API 或 Web 客户端向最终用户提供这种灵活性的机制。
+
+默认情况下,[alert-templates.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/alert-templates.xml) 随 Ambari 2.0 一起打包在 Ambari Server JAR 中。该文件包含所有已知通知类型(例如 EMAIL 和 SNMP)的模板。它被打包在 Ambari Server JAR 中,因此模板不会暴露在磁盘上,但可以将该文件作为参考示例。
+
+自定义告警模板实际上会覆盖默认打包的模板。要覆盖告警模板 XML:
+
+某些告警通知类型(例如 EMAIL)会自动将所有待处理告警合并为一个发出通知(“ **digest**”)。另一些类型(例如 SNMP)从不合并待处理告警,而是始终为系统中的每个告警创建一对一通知(“ **individual**”)。所有告警通知类型都在同一个告警模板文件中指定,但每种通知类型的具体告警模板很可能差异很大。
+
+模板文件结构定义如下。每个 `<alert-template></alert-template>` 元素声明它应使用的告警通知类型。
+
+变量                                     |描述
+---------------------------------------------|-------------------------------------------------
+$alert.getAlertDefinition()	                 |告警所属实例的定义。
+$alert.getAlertName()	                       |告警名称。
+$alert.getAlertState()	                     |告警状态(OK\|WARNING\|CRITICAL\|UNKNOWN)。
+$alert.getAlertText()	                       |具体的告警文本。
+$alert.getComponentName()	                   |告警所针对的组件(如果有)。
+$alert.getHostName()	                       |触发告警的主机名(如果有)。
+$alert.getServiceName()	                     |告警所属服务的名称。
+$alert.hasComponentName()	                   |如果告警针对特定服务组件,则为 True。
+$alert.hasHostName()	                       |如果告警由特定主机触发,则为 True。
+$ambari.getServerHostName()	                 |Ambari Server 主机名。
+$ambari.getServerUrl()	                     |Ambari Server URL。
+$ambari.getServerVersion()	                 |Ambari Server 版本。
+$dispatch.getTargetDescription()	           |通知目标描述。
+$dispatch.getTargetName()	                   |通知目标名称。
+$summary.getAlerts()                         |通知中所有告警的列表。
+$summary.getAlerts(service,alertState)	     |给定服务或告警状态(OK\|WARNING\|CRITICAL\|UNKNOWN)的所有告警列表。
+$summary.getCriticalCount()	                 |CRITICAL 告警数量。
+$summary.getOkCount()	                       |OK 告警数量。
+$summary.getServices()	                     |通知中报告告警的所有服务列表。
+$summary.getServicesByAlertState(alertState) |给定告警状态(OK|WARNING|CRITICAL|UNKNOWN)的所有服务列表。
+$summary.getTotalCount()                     |告警总数。
+$summary.getUnknownCount()	                 |UNKNOWN 告警数量。
+$summary.getWarningCount()	                 |WARNING 告警数量.
+
+模板使用 Apache Velocity 渲染所有令牌化内容。模板中可使用以下变量:
+
+```
+$summary.getTotalCount()
+```
+
+```
+$summary.getAlerts()
+```
+
+以下示例说明如何更改所有发出邮件通知的主题行,使其包含硬编码标识符:
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/ambari-architecture.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/ambari-architecture.md
new file mode 100644
index 0000000..713efbc
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/ambari-architecture.md
@@ -0,0 +1,25 @@
+---
+sidebar_position: 1
+title: Ambari 架构
+---
+
+<!--
+   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.
+-->
+
+# Ambari 架构 {#ambari-architecture}
+
+ <embed src="/pdf/Ambari_Architecture.pdf" type="application/pdf" width="960px" height="700px"></embed>
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ha.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ha.md
new file mode 100644
index 0000000..b30902c
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ha.md
@@ -0,0 +1,570 @@
+---
+title: HA 集群的 Blueprint 支持
+---
+
+<!---
+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.
+--->
+
+# HA 集群的 Blueprint 支持 {#blueprint-support-for-ha-clusters}
+
+## 摘要 {#summary}
+
+从 Ambari 2.0 开始,Blueprint 可以部署以下高可用组件:
+
++    HDFS NameNode HA
+
++   YARN ResourceManager HA
++   HBase RegionServers HA
+
+从 Ambari 2.1 开始,Blueprint 可以部署以下高可用组件:
+
++   Hive Components ([AMBARI-10489](https://issues.apache.org/jira/browse/AMBARI-10489))
++   Storm Nimbus ([AMBARI-11087](https://issues.apache.org/jira/browse/AMBARI-11087))
++   Oozie Server ([AMBARI-6683](https://issues.apache.org/jira/browse/AMBARI-6683))  
+    
+
+  
+此功能目前需要提供细粒度配置。本文档提供相关示例。
+
+### 常见问题 {#faq}
+
+#### 与 Ambari UI 的兼容性 {#compatibility-with-ambari-ui}
+
+虽然此功能运行时不要求 Ambari UI,但 Blueprints HA 功能与 Ambari UI 完全兼容。通过 Blueprint 创建的 HA 集群可以像其他 Blueprint 集群一样,通过 Ambari UI 进行监控和配置。
+
+#### 支持的 Stack 版本 {#supported-stack-versions}
+
+此功能支持 HDP 2.1 及更高版本。尚未针对 HDP 的早期版本测试此功能。
+
+### 示例 {#examples}
+
+#### Blueprint 示例:HDFS NameNode HA 集群 {#blueprint-example-hdfs-namenode-ha-cluster}
+
+HDFS NameNode HA 可以配置集群,使 NameNode 不再成为单点故障。
+
+有关 [HDFS NameNode HA,请参阅 Apache Hadoop 文档](http://hadoop.apache.org/docs/r2.3.0/hadoop-yarn/hadoop-yarn-site/HDFSHighAvailabilityWithQJM.html)。
+
+在 Ambari 部署的 HDFS NameNode HA 集群中:
+
++   部署 2 个 NameNode:一个为 “active”,另一个为 “passive”。
++   如果 active NameNode 停止正常工作,passive 节点的 Zookeeper 客户端会检测到该情况,passive 节点将成为新的 active 节点。
++   HDFS 依靠 Zookeeper 管理这些情况下的故障转移细节。
++   Blueprints HA 功能会自动调用 HDFS NameNode HA 集群所需的全部命令和设置步骤,前提是 Blueprint 中提供了正确配置。每个 NameNode 的共享编辑日志由 Quorum Journal Manager 管理,而不是由 NFS 共享存储管理。Ambari Blueprints 不支持在 HDFS HA 设置中使用 NFS 共享存储,通常也不建议这样做。
+
+#### 操作方式 {#how}
+
+Blueprints HA 功能会自动调用 HDFS NameNode HA 集群所需的全部命令和设置步骤,前提是 Blueprint 中提供了正确配置。每个 NameNode 的共享编辑日志由 Quorum Journal Manager 管理,而不是由 NFS 共享存储管理。Ambari Blueprints 不支持在 HDFS HA 设置中使用 NFS 共享存储,通常也不建议这样做。
+
+支持 HA HDFS NameNode 的 Blueprint 中,任意 host group 都应包含以下 HDFS stack 组件:
+
+1.  NAMENODE
+    
+2.  ZKFC
+    
+3.  ZOOKEEPER_SERVER
+    
+4.  JOURNALNODE
+    
+
+#### 配置 Active 和 Standby NameNode {#configuring-active-and-standby-namenodes}
+
+HDFS 的 “NAMENODE” 组件必须分配给两台服务器,可以通过两个独立的 host group,或通过一个在此集群的 Cluster Creation Template 中映射到两台物理服务器的 host group 来完成。
+
+默认情况下,Blueprint processor 会将 “active” NameNode 分配到一台主机,将 “standby” NameNode 分配到另一台主机。HA Blueprint 的用户无需配置每个 NameNode 的初始状态,因为该状态可以自动分配。
+
+如果需要,用户可以在 “hadoop-env” 命名空间中添加以下配置属性,以配置每个 NameNode 的初始状态:
+
+1.  dfs_ha_initial_namenode_active - 此属性应包含集群中处于“active”状态的 NameNode 的主机名。
+    
+2.  dfs_ha_initial_namenode_standby - 此属性应包含集群中处于“passive”状态的 NameNode 的主机名。
+    
+:::caution
+只有在需要将 active 或 standby NameNode 的初始状态配置到特定节点时,才应使用这些属性。此设置仅保证在集群初始状态时准确。随着集群中发生故障转移事件,每个 NameNode 的 active/standby 状态可能会随时间变化。
+
+使用 Blueprint REST API endpoint 将 HDFS HA 集群导出为 Blueprint 时,不会记录或表达 NameNode 的 active 或 standby 状态。由于集群会随时间变化,此状态仅在集群初始启动时准确。
+
+通常认为大多数用户不需要选择每个 NameNode 的 active 或 standby 状态,因此 Blueprints HA 的默认行为是自动分配每个节点的状态。
+:::
+
+#### Blueprint 示例 {#example-blueprint}
+
+这是一个包含 HDFS HA 的最小 Blueprint:[hdfs_ha_blueprint.json](https://cwiki.apache.org/confluence/download/attachments/55151584/hdfs_ha_blueprint.json?version=4&modificationDate=1434548806000&api=v2)
+
+以下是所需的基础配置。更多详情请参阅上面的 Blueprint:
+```json
+  "configurations": 
+    { "core-site": {
+        "properties" : {
+          "fs.defaultFS" : "hdfs://mycluster",
+          "ha.zookeeper.quorum" : "%HOSTGROUP::master_1%:2181,%HOSTGROUP::master_2%:2181,%HOSTGROUP::master_3%:2181"
+      }}
+    },
+    { "hdfs-site": {
+        "properties" : {
+          "dfs.client.failover.proxy.provider.mycluster" : "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",
+          "dfs.ha.automatic-failover.enabled" : "true",
+          "dfs.ha.fencing.methods" : "shell(/bin/true)",
+          "dfs.ha.namenodes.mycluster" : "nn1,nn2",
+          "dfs.namenode.http-address" : "%HOSTGROUP::master_1%:50070",
+          "dfs.namenode.http-address.mycluster.nn1" : "%HOSTGROUP::master_1%:50070",
+          "dfs.namenode.http-address.mycluster.nn2" : "%HOSTGROUP::master_3%:50070",
+          "dfs.namenode.https-address" : "%HOSTGROUP::master_1%:50470",
+          "dfs.namenode.https-address.mycluster.nn1" : "%HOSTGROUP::master_1%:50470",
+          "dfs.namenode.https-address.mycluster.nn2" : "%HOSTGROUP::master_3%:50470",
+          "dfs.namenode.rpc-address.mycluster.nn1" : "%HOSTGROUP::master_1%:8020",
+          "dfs.namenode.rpc-address.mycluster.nn2" : "%HOSTGROUP::master_3%:8020",
+          "dfs.namenode.shared.edits.dir" : "qjournal://%HOSTGROUP::master_1%:8485;%HOSTGROUP::master_2%:8485;%HOSTGROUP::master_3%:8485/mycluster",
+          "dfs.nameservices" : "mycluster"
+      }}
+    }
+  ]
+  ```
+
+#### 配置属性值中的主机名拓扑替换 {#hostname-topology-substitution-in-configuration-property-values}
+
+主机相关属性应使用 “HOSTGROUP” 语法引用给定 Blueprint 的 host group,从而将每个 NameNode 的实际主机(在 Cluster Creation Template 中定义)映射到 hdfs-site 中需要这些主机映射的属性。
+
+这些属性的语法应为:
+
+“%HOSTGROUP::HOST_GROUP_NAME%:PORT””
+
+例如,上面代码片段中的以下属性:
+
+"dfs.namenode.http-address.mycluster.nn1":
+
+"%HOSTGROUP::master_1%:50070"
+
+Blueprint processor 会将此属性值解释为映射到 “master_1” host group 的主机,该 host group 的组件列表中应包含 “NAMENODE”。上面列出的地址属性应映射到 “master_1” 的主机及端口 “50070”。
+
+由于不使用直接的主机名引用,使用此语法是在 Blueprint 中定义主机特定属性最具可移植性的方式。这样可以将 Blueprint 应用于更多种类的集群部署,而不局限于特定的主机名集合。
+
+#### 向 Ambari Server 注册 Blueprint {#register-blueprint-with-ambari-server-}
+
+将 Blueprint 发布到 Ambari Server 的 "blueprint-hdfs-ha" 资源。
+
+```
+POST /api/v1/blueprints/blueprint-hdfs-ha
+ 
+...
+[ Request Body is the example blueprint defined above ]
+...
+ 
+201 - Created
+```
+
+#### 集群创建模板示例 {#example-cluster-creation-template}
+
+```json
+{
+  "blueprint": "blueprint-hdfs-ha",
+  "default_password": "changethis",
+  "host_groups": [
+    { "hosts": [
+        { "fqdn": "c6401.ambari.apache.org" }
+      ], "name": "gateway"
+    },
+    { "hosts": [
+        { "fqdn": "c6402.ambari.apache.org" }
+      ], "name": "master_1"
+    },
+    { "hosts": [
+        { "fqdn": "c6403.ambari.apache.org" }
+      ], "name": "master_2"
+    },
+    { "hosts": [
+        { "fqdn": "c6404.ambari.apache.org" }
+      ], "name": "master_3"
+    },
+    { "hosts": [
+        { "fqdn": "c6405.ambari.apache.org" }
+      ],
+      "name": "slave_1"     
+    }
+  ]
+}
+```
+
+#### 创建集群实例 {#create-cluster-instance}
+
+将集群发布到 Ambari Server 以配置集群。
+```
+POST /api/v1/clusters/my-hdfs-ha-cluster
+ 
+...
+[ Request Body is above Cluster Creation Template ]
+...
+ 
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-hdfs-ha-cluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "InProgress"
+  }
+}
+ 
+...
+[ Client can then monitor the URL in the 202 response to check the status of the cluster deployment. ]
+...
+```
+
+### Blueprint 示例:Yarn ResourceManager HA 集群 {#blueprint-example-yarn-resourcemanager-ha-cluster}
+
+#### 摘要 {#summary-1}
+
+Yarn ResourceManager 高可用性(HA)支持在给定 Yarn 集群中部署两个 Yarn ResourceManager。此支持消除了使用单个 ResourceManager 时产生的单点故障。
+
+Yarn ResourceManager 的 HA 支持与 HDFS NameNode HA 有些类似:采用 “active/standby” 架构,并使用 Zookeeper 处理两个 ResourceManager 实例之间的故障转移场景。
+
+以下 Apache Hadoop 文档介绍了手动设置 Yarn ResourceManager HA 所需的步骤:
+
+[http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html](http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.html)
+
+:::caution
+Ambari Blueprints 会处理本文档中列出的许多服务器设置细节,但 Ambari 用户需要定义本文列出的各种配置属性(yarn.resourcemanager.ha.enabled、yarn.resourcemanager.hostname.$NAME_OF_RESOURCE_MANAGER 等)。下面的 Blueprint 示例将展示 Blueprint 中必须包含哪些配置属性,才能正确启动 HA 集群。
+:::
+
+支持 HA Yarn ResourceManager 的 Blueprint 中,任意 host group 都应包含以下 stack 组件:
+
+1.  RESOURCEMANAGER
+    
+2.  ZOOKEEPER_SERVER
+    
+
+#### Active 和 Standby ResourceManager 的初始设置 {#initial-setup-of-active-and-standby-resourcemanagers}
+
+Yarn ResourceManager HA 功能依赖 Zookeeper 来管理给定 ResourceManager 的 “active” 或 “standby” 状态细节。两个 ResourceManager 初次启动时,第一个获得 Zookeeper 锁(称为 “znode”)的 ResourceManager 实例将成为集群的 “active” ResourceManager,另一个实例则承担 “standby” ResourceManager 的角色。
+
+:::caution
+Blueprints HA 功能不支持配置 Yarn HA 集群中所部署 ResourceManager 的初始 “active” 或 “standby” 状态。第一个获得 Zookeeper 锁的实例将成为 “active” 节点。这样用户可以指定包含 2 个 ResourceManager 实例的 host group,同时无需选择第一个 “active” 节点。
+
+集群初次启动后, “active” 和 “standby” ResourceManager 的状态可能随时间变化。初始 “active” 服务器不保证在集群整个生命周期中始终是 “active” 节点。发生故障转移时,可能需要由 “standby” 节点承担 “active” 服务器的角色。
+
+使用 Blueprint REST API endpoint 将 Yarn 集群导出为 Blueprint 时,不会记录或表达 ResourceManager 的 active 或 standby 状态。由于集群会随时间变化,此状态仅在集群初始启动时准确。
+:::
+
+#### Blueprint 示例 {#example-blueprint-1}
+
+以下链接包含一个 3 节点 Yarn ResourceManager HA 集群的 Blueprint 示例:
+
+[yarn_ha_blueprint.json](https://cwiki.apache.org/confluence/download/attachments/55151584/yarn_ha_blueprint.json?version=2&modificationDate=1432208770000&api=v2)  
+
+```json
+{
+  "Blueprints": {
+    "stack_name": "HDP",
+    "stack_version": "2.2"
+  },
+  "host_groups": [
+    {
+      "name": "gateway",
+      "cardinality" : "1",
+      "components": [
+        { "name": "HDFS_CLIENT" },
+        { "name": "MAPREDUCE2_CLIENT" },
+        { "name": "METRICS_COLLECTOR" },
+        { "name": "METRICS_MONITOR" },
+        { "name": "TEZ_CLIENT" },
+        { "name": "YARN_CLIENT" },
+        { "name": "ZOOKEEPER_CLIENT" }
+      ]
+    },
+    {
+      "name": "master_1",
+      "cardinality" : "1",
+      "components": [
+        { "name": "HISTORYSERVER" },
+        { "name": "JOURNALNODE" },
+        { "name": "METRICS_MONITOR" },
+        { "name": "NAMENODE" },
+        { "name": "ZOOKEEPER_SERVER" }
+      ]
+    },
+    {
+      "name": "master_2",
+      "cardinality" : "1",
+      "components": [
+        { "name": "APP_TIMELINE_SERVER" },
+        { "name": "JOURNALNODE" },
+        { "name": "METRICS_MONITOR" },
+        { "name": "RESOURCEMANAGER" },
+        { "name": "ZOOKEEPER_SERVER" }
+      ]
+    },
+    {
+      "name": "master_3",
+      "cardinality" : "1",
+      "components": [
+        { "name": "JOURNALNODE" },
+        { "name": "METRICS_MONITOR" },
+        { "name": "RESOURCEMANAGER" },
+        { "name": "SECONDARY_NAMENODE" },
+        { "name": "ZOOKEEPER_SERVER" }
+      ]
+    },
+    {
+      "name": "slave_1",
+      "components": [
+        { "name": "DATANODE" },
+        { "name": "METRICS_MONITOR" },
+        { "name": "NODEMANAGER" }
+      ]
+    }
+  ],
+  "configurations": [
+    {
+      "core-site": {
+        "properties" : {
+          "fs.defaultFS" : "hdfs://%HOSTGROUP::master_1%:8020"
+      }}
+    },{
+      "yarn-site" : {
+        "properties" : {
+          "hadoop.registry.rm.enabled" : "false",
+          "hadoop.registry.zk.quorum" : "%HOSTGROUP::master_3%:2181,%HOSTGROUP::master_2%:2181,%HOSTGROUP::master_1%:2181",
+          "yarn.log.server.url" : "http://%HOSTGROUP::master_2%:19888/jobhistory/logs",
+          "yarn.resourcemanager.address" : "%HOSTGROUP::master_2%:8050",
+          "yarn.resourcemanager.admin.address" : "%HOSTGROUP::master_2%:8141",
+          "yarn.resourcemanager.cluster-id" : "yarn-cluster",
+          "yarn.resourcemanager.ha.automatic-failover.zk-base-path" : "/yarn-leader-election",
+          "yarn.resourcemanager.ha.enabled" : "true",
+          "yarn.resourcemanager.ha.rm-ids" : "rm1,rm2",
+          "yarn.resourcemanager.hostname" : "%HOSTGROUP::master_2%",
+          "yarn.resourcemanager.recovery.enabled" : "true",
+          "yarn.resourcemanager.resource-tracker.address" : "%HOSTGROUP::master_2%:8025",
+          "yarn.resourcemanager.scheduler.address" : "%HOSTGROUP::master_2%:8030",
+          "yarn.resourcemanager.store.class" : "org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore",
+          "yarn.resourcemanager.webapp.address" : "%HOSTGROUP::master_2%:8088",
+          "yarn.resourcemanager.webapp.https.address" : "%HOSTGROUP::master_2%:8090",
+          "yarn.timeline-service.address" : "%HOSTGROUP::master_2%:10200",
+          "yarn.timeline-service.webapp.address" : "%HOSTGROUP::master_2%:8188",
+          "yarn.timeline-service.webapp.https.address" : "%HOSTGROUP::master_2%:8190"
+        }
+      }
+    }
+  ]
+}
+```
+
+#### 向 Ambari Server 注册 Blueprint {#register-blueprint-with-ambari-server}
+
+将 Blueprint 发布到 Ambari Server 的 "blueprint-yarn-ha" 资源。
+
+```
+POST /api/v1/blueprints/blueprint-yarn-ha
+ 
+...
+[ Request Body is the example blueprint defined above ]
+...
+ 
+201 - Created
+
+```
+
+#### 集群创建模板示例 {#example-cluster-creation-template-1}
+
+```json
+{
+  "blueprint": "blueprint-yarn-ha",
+  "default_password": "changethis",
+  "configurations": [
+    { "yarn-site" : {
+        "yarn.resourcemanager.zk-address" : "c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181,c6404.ambari.apache.org:2181”,
+        ”yarn.resourcemanager.hostname.rm1" : "c6403.ambari.apache.org",
+        "yarn.resourcemanager.hostname.rm2" : "c6404.ambari.apache.org"
+     }}
+  ],
+  "host_groups": [
+    { "hosts": [
+        { "fqdn": "c6401.ambari.apache.org" }
+      ], "name": "gateway"
+    },
+    { "hosts": [
+        { "fqdn": "c6402.ambari.apache.org" }
+      ], "name": "master_1"
+    },
+    { "hosts": [
+        { "fqdn": "c6403.ambari.apache.org" }
+      ], "name": "master_2"
+    },
+    { "hosts": [
+        { "fqdn": "c6404.ambari.apache.org" }
+      ], "name": "master_3"
+    },
+    { "hosts": [
+        { "fqdn": "c6405.ambari.apache.org" }
+      ],
+      "name": "slave_1"     
+    }
+  ]
+}
+```
+
+#### 创建集群实例 {#create-cluster-instance-1}
+
+将集群发布到 Ambari Server 以配置集群。
+
+```
+POST /api/v1/clusters/my-yarn-ha-cluster
+ 
+...
+[ Request Body is above Cluster Creation Template ]
+...
+ 
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-yarn-ha-cluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "InProgress"
+  }
+}
+ 
+...
+[ Client can then monitor the URL in the 202 response to check the status of the cluster deployment. ]
+...
+```
+  
+
+### Blueprint 示例:HBase RegionServer HA 集群 {#blueprint-example-hbase-regionserver-ha-cluster}
+
+#### 摘要 {#summary-2}
+
+HBase 为跨 HBase Region Server 的读取提供高可用功能。
+
+以下 Apache HBase 文档链接提供了 HBase HA 支持的更多信息:
+
+[http://hbase.apache.org/book.html#arch.timelineconsistent.reads](http://hbase.apache.org/book.html#arch.timelineconsistent.reads)
+
+:::caution
+此处列出的文档介绍如何通过 Blueprint 部署 HBase RegionServer HA 集群,但还必须执行单独的应用程序特定步骤,才能为 HBase 中的特定表启用此功能。必须在启用复制的情况下创建表,以便多个 Region Server 可以处理该表的键。
+:::
+
+有关如何定义启用复制的 HBase 表(集群创建后)的更多信息,请参阅以下 HBase 文档:
+
+[http://hbase.apache.org/book.html#_creating_a_table_with_region_replication](http://hbase.apache.org/book.html#_creating_a_table_with_region_replication)
+
+支持 HA HBase RegionServer 的 Blueprint 中,任意 host group 都应包含以下 stack 组件:
+
+1.  HBASE_REGIONSERVER
+    
+
+必须至少部署两个 “HBASE_REGIONSERVER” 组件才能启用此功能,从而让表信息可以在多个 Region Server 之间复制。
+
+#### Blueprint 示例 {#example-blueprint-2}
+
+以下链接包含一个 2 节点 HBase RegionServer HA 集群的 Blueprint 示例:
+
+[hbase_rs_ha_blueprint.json](https://cwiki.apache.org/confluence/download/attachments/55151584/hbase_rs_ha_blueprint.json?version=1&modificationDate=1427136904000&api=v2)  
+
+以下 JSON 片段包含使用 HBase RegionServer HA 功能的集群通常所需的 “hbase-site” 配置:
+
+```json
+{
+  "configurations" : [
+    {
+      "hbase-site" : {
+         ... 
+        "hbase.regionserver.global.memstore.lowerLimit" : "0.38",
+        "hbase.regionserver.global.memstore.upperLimit" : "0.4",
+        "hbase.regionserver.handler.count" : "60",
+        "hbase.regionserver.info.port" : "60030",
+        "hbase.regionserver.storefile.refresh.period" : "20",
+        "hbase.rootdir" : "hdfs://%HOSTGROUP::host_group_1%:8020/apps/hbase/data",
+        "hbase.security.authentication" : "simple",
+        "hbase.security.authorization" : "false",
+        "hbase.superuser" : "hbase",
+        "hbase.tmp.dir" : "/hadoop/hbase",
+        "hbase.zookeeper.property.clientPort" : "2181",
+        "hbase.zookeeper.quorum" : "%HOSTGROUP::host_group_1%,%HOSTGROUP::host_group_2%",
+        "hbase.zookeeper.useMulti" : "true",
+        "hfile.block.cache.size" : "0.40",
+        "zookeeper.session.timeout" : "30000",
+        "zookeeper.znode.parent" : "/hbase-unsecure"
+      }
+
+    }
+   ]
+}
+```
+:::caution
+上面的 JSON 示例不是完整的 “hbase-site” 配置集,而是展示与 HBase RegionServer HA 相关的配置设置。特别是,“hbase.regionserver.storefile.refresh.period” 设置与 HBase RegionServer HA 最相关,因为必须将此属性设置为大于零的值,才能启用 HA 功能。
+:::
+
+#### 向 Ambari Server 注册 Blueprint {#register-blueprint-with-ambari-server-1}
+
+将 Blueprint 发布到 Ambari Server 的 "blueprint-hbase-rs-ha" 资源。
+
+POST /api/v1/blueprints/blueprint-hbase-rs-ha
+ 
+...
+[ Request Body is the example blueprint defined above ]
+...
+ 
+201 - Created
+
+#### 集群创建模板示例 {#example-cluster-creation-template-2}
+```json
+{
+  "blueprint" : "blueprint-hbase-rs-ha",
+  "default_password" : "default",
+  "host_groups" :[
+    {
+      "name" : "host_group_1", 
+      "hosts" : [         
+        {
+          "fqdn" : "c6401.ambari.apache.org"
+        }
+      ]
+    },
+    {
+      "name" : "host_group_2", 
+      "hosts" : [         
+        {
+          "fqdn" : "c6402.ambari.apache.org"
+        }
+      ]
+    }
+  ]
+}
+```
+  
+
+#### 创建集群实例 {#create-cluster-instance-2}
+
+将集群发布到 Ambari Server 以配置集群。
+
+```
+POST /api/v1/clusters/my-hbase-rs-ha-cluster
+ 
+...
+[ Request Body is above Cluster Creation Template ]
+...
+ 
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-hbase-rs-ha-cluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "InProgress"
+  }
+}
+ 
+...
+[ Client can then monitor the URL in the 202 response to check the status of the cluster deployment. ]
+...
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ranger.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ranger.md
new file mode 100644
index 0000000..cc2fa79
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/blueprint-ranger.md
@@ -0,0 +1,441 @@
+---
+title: Ranger 的 Blueprint 支持
+---
+
+<!--
+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.
+-->
+
+从 HDP2.3 开始,可以通过两种方式使用 Blueprint 部署 Ranger:使用 stack advisor,或在 Blueprint 中设置所有必需的属性。
+
+## 使用 stack advisor 部署 Ranger {#deploy-ranger-with-the-use-of-stack-advisor}
+
+Stack advisor 会自动设置所需属性,从而简化 Ranger 的部署;用户只需提供最少量的配置。必须在 Blueprint 或集群创建模板中提供的配置属性如下:
+
+* admin-properties:
+  - DB_FLAVOR - 默认值为 MYSQL。如果要使用 MYSQL 作为 Ranger 数据库的数据库服务器,则无需提供此项。有关支持的数据库服务器,请参阅 Ranger 文档。同时确保 ambari-server 已安装所选数据库服务器类型对应的 JDBC 驱动(例如:ambari-server setup --jdbc-driver)。
+  - db_host - Ranger Admin 将使用的数据库服务器 host:port
+  - db_root_user - 部署期间用于创建 Ranger 数据库的、具有 root 访问权限的数据库用户。如果未指定此属性,默认使用 root。
+
+  - db_root_password - root 用户的密码
+  - db_password - 用于访问 Ranger 数据库的密码
+  - audit_db_password - 用于访问 Ranger Audit 数据库的密码
+* ranger-env
+  - ranger_admin_password - 用于在 Ranger Admin 中为每个插件创建存储库和策略的 Ambari 用户密码
+  - ranger-yarn-plugin-enabled - 启用/禁用 YARN Ranger 插件。默认值为 Disable。
+
+  - ranger-hdfs-plugin-enabled - 启用/禁用 HDFS Ranger 插件。默认值为 Disable。
+
+  - ranger-hbase-plugin-enabled - 启用/禁用 HBase Ranger 插件。默认值为 Disable。
+
+  - ... - Ranger 支持的插件列表请参阅 Ranger 文档
+* kms-properties
+  - DB_FLAVOR - 默认值为 MYSQL。如果要使用 MYSQL 作为 Ranger 数据库的数据库服务器,则无需提供此项。有关支持的数据库服务器,请参阅 Ranger KMS 文档。同时确保 ambari-server 已安装所选数据库服务器类型对应的 JDBC 驱动(例如:ambari-server setup --jdbc-driver)。
+  - SQL_CONNECTOR_JAR - 默认值为 /usr/share/java/mysql-connector-java.jar
+  - KMS_MASTER_KEY_PASSWD
+  - db_host - Ranger KMS 将使用的数据库服务器 host:port
+  - db_root_user - 部署期间用于创建 Ranger KMS 数据库的、具有 root 访问权限的数据库用户。如果未指定此属性,默认使用 root。
+
+  - db_root_password - root 用户的数据库密码
+  - db_password - Ranger KMS schema 的数据库密码
+
+* hadoop-env
+  - keyserver_port - Key Management Server 可用的端口号
+  - keyserver_host - 安装 Key Management Server 的主机名
+
+## 不使用 stack advisor 部署 Ranger {#deploy-ranger-without-the-use-of-stack-advisor}
+
+不使用 stack advisor 时,所有与 Ranger、Ranger KMS 以及没有默认值的 Ranger 插件相关的配置,都必须在 Blueprint 或集群创建模板中设置。有关所有属性,请参阅 Ranger 和 Ranger 插件文档。
+
+以下是完全手动设置所有内容的 Blueprint 示例(请注意,这只涵盖当前支持的配置属性和 Ranger 插件的子集):
+
+```json
+{
+  "configurations" : [
+    {
+      "admin-properties" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "DB_FLAVOR" : "MYSQL",
+          "audit_db_name" : "ranger_audit",
+          "db_name" : "ranger",
+          "audit_db_user" : "rangerlogger",
+          "SQL_CONNECTOR_JAR" : "/usr/share/java/mysql-connector-java.jar",
+          "db_user" : "rangeradmin",
+          "policymgr_external_url" : "http://%HOSTGROUP::host_group_1%:6080",
+          "db_host" : "172.17.0.9:3306",
+          "db_root_user" : "root"
+        }
+      }
+    },
+    {
+      "ranger-kms-security" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.plugin.kms.policy.source.impl" : "org.apache.ranger.admin.client.RangerAdminRESTClient",
+          "ranger.plugin.kms.service.name" : "{{repo_name}}",
+          "ranger.plugin.kms.policy.rest.url" : "{{policymgr_mgr_url}}"
+        }
+      }
+    },
+    {
+      "kms-site" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "hadoop.kms.security.authorization.manager" : "org.apache.ranger.authorization.kms.authorizer.RangerKmsAuthorizer",
+          "hadoop.kms.key.provider.uri" : "dbks://http@localhost:9292/kms"
+        }
+      }
+    },
+    {
+      "ranger-hdfs-plugin-properties" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "REPOSITORY_CONFIG_USERNAME" : "hadoop",
+          "ranger-hdfs-plugin-enabled" : "Yes",
+          "common.name.for.certificate" : "",
+          "policy_user" : "ambari-qa",
+          "hadoop.rpc.protection" : ""
+        }
+      }
+    },
+    {
+      "ranger-admin-site" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.ldap.group.searchfilter" : "{{ranger_ug_ldap_group_searchfilter}}",
+          "ranger.ldap.group.searchbase" : "{{ranger_ug_ldap_group_searchbase}}",
+          "ranger.sso.enabled" : "false",
+          "ranger.externalurl" : "{{ranger_external_url}}",
+          "ranger.sso.browser.useragent" : "Mozilla,chrome",
+          "ranger.service.https.attrib.ssl.enabled" : "false",
+          "ranger.ldap.ad.referral" : "ignore",
+          "ranger.jpa.jdbc.url" : "jdbc:mysql://172.17.0.9:3306/ranger",
+          "ranger.https.attrib.keystore.file" : "/etc/ranger/admin/conf/ranger-admin-keystore.jks",
+          "ranger.ldap.user.searchfilter" : "{{ranger_ug_ldap_user_searchfilter}}",
+          "ranger.jpa.jdbc.driver" : "com.mysql.jdbc.Driver",
+          "ranger.authentication.method" : "UNIX",
+          "ranger.service.host" : "{{ranger_host}}",
+          "ranger.jpa.audit.jdbc.user" : "{{ranger_audit_db_user}}",
+          "ranger.ldap.referral" : "ignore",
+          "ranger.jpa.audit.jdbc.credential.alias" : "rangeraudit",
+          "ranger.service.https.attrib.keystore.pass" : "SECRET:ranger-admin-site:2:ranger.service.https.attrib.keystore.pass",
+          "ranger.audit.solr.username" : "ranger_solr",
+          "ranger.sso.query.param.originalurl" : "originalUrl",
+          "ranger.service.http.enabled" : "true",
+          "ranger.audit.source.type" : "solr",
+          "ranger.ldap.url" : "{{ranger_ug_ldap_url}}",
+          "ranger.service.https.attrib.clientAuth" : "want",
+          "ranger.ldap.ad.domain" : "",
+          "ranger.ldap.ad.bind.dn" : "{{ranger_ug_ldap_bind_dn}}",
+          "ranger.credential.provider.path" : "/etc/ranger/admin/rangeradmin.jceks",
+          "ranger.jpa.audit.jdbc.driver" : "{{ranger_jdbc_driver}}",
+          "ranger.audit.solr.urls" : "",
+          "ranger.sso.publicKey" : "",
+          "ranger.ldap.bind.dn" : "{{ranger_ug_ldap_bind_dn}}",
+          "ranger.unixauth.service.port" : "5151",
+          "ranger.ldap.group.roleattribute" : "cn",
+          "ranger.jpa.jdbc.dialect" : "{{jdbc_dialect}}",
+          "ranger.sso.cookiename" : "hadoop-jwt",
+          "ranger.service.https.attrib.keystore.keyalias" : "rangeradmin",
+          "ranger.audit.solr.zookeepers" : "NONE",
+          "ranger.jpa.jdbc.user" : "{{ranger_db_user}}",
+          "ranger.jpa.jdbc.credential.alias" : "rangeradmin",
+          "ranger.ldap.ad.user.searchfilter" : "{{ranger_ug_ldap_user_searchfilter}}",
+          "ranger.ldap.user.dnpattern" : "uid={0},ou=users,dc=xasecure,dc=net",
+          "ranger.ldap.base.dn" : "dc=example,dc=com",
+          "ranger.service.http.port" : "6080",
+          "ranger.jpa.audit.jdbc.url" : "{{audit_jdbc_url}}",
+          "ranger.service.https.port" : "6182",
+          "ranger.sso.providerurl" : "",
+          "ranger.ldap.ad.url" : "{{ranger_ug_ldap_url}}",
+          "ranger.jpa.audit.jdbc.dialect" : "{{jdbc_dialect}}",
+          "ranger.unixauth.remote.login.enabled" : "true",
+          "ranger.ldap.ad.base.dn" : "dc=example,dc=com",
+          "ranger.unixauth.service.hostname" : "{{ugsync_host}}"
+        }
+      }
+    },
+    {
+      "dbks-site" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.ks.jpa.jdbc.url" : "jdbc:mysql://172.17.0.9:3306/rangerkms",
+          "hadoop.kms.blacklist.DECRYPT_EEK" : "hdfs",
+          "ranger.ks.jpa.jdbc.dialect" : "{{jdbc_dialect}}",
+          "ranger.ks.jdbc.sqlconnectorjar" : "{{ews_lib_jar_path}}",
+          "ranger.ks.jpa.jdbc.user" : "{{db_user}}",
+          "ranger.ks.jpa.jdbc.credential.alias" : "ranger.ks.jdbc.password",
+          "ranger.ks.jpa.jdbc.credential.provider.path" : "/etc/ranger/kms/rangerkms.jceks",
+          "ranger.ks.masterkey.credential.alias" : "ranger.ks.masterkey.password",
+          "ranger.ks.jpa.jdbc.driver" : "com.mysql.jdbc.Driver"
+        }
+      }
+    },
+    {
+      "kms-env" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "kms_log_dir" : "/var/log/ranger/kms",
+          "create_db_user" : "true",
+          "kms_group" : "kms",
+          "kms_user" : "kms",
+          "kms_port" : "9292"
+        }
+      }
+    },
+    {
+      "ranger-hdfs-security" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.plugin.hdfs.policy.source.impl" : "org.apache.ranger.admin.client.RangerAdminRESTClient"
+        }
+      }
+    },
+
+    {
+      "ranger-env" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "xml_configurations_supported" : "true",
+          "ranger_user" : "ranger",
+          "xasecure.audit.destination.hdfs.dir" : "hdfs://ambari-agent-1.node.dc1.consul:8020/ranger/audit",
+          "create_db_dbuser" : "true",
+          "ranger-hdfs-plugin-enabled" : "Yes",
+          "ranger_privelege_user_jdbc_url" : "jdbc:mysql://172.17.0.9:3306",
+          "ranger-knox-plugin-enabled" : "No",
+          "is_solrCloud_enabled" : "false",
+          "bind_anonymous" : "false",
+          "ranger-yarn-plugin-enabled" : "Yes",
+          "ranger-kafka-plugin-enabled" : "No",
+          "xasecure.audit.destination.hdfs" : "true",
+          "ranger-hive-plugin-enabled" : "No",
+          "xasecure.audit.destination.solr" : "false",
+          "xasecure.audit.destination.db" : "true",
+          "ranger_group" : "ranger",
+          "ranger_admin_username" : "amb_ranger_admin",
+          "ranger-hbase-plugin-enabled" : "Yes",
+          "admin_username" : "admin"
+        }
+      }
+    },
+
+    {
+      "kms-properties" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "REPOSITORY_CONFIG_USERNAME" : "keyadmin",
+          "KMS_MASTER_KEY_PASSWD" : "SECRET:kms-properties:1:KMS_MASTER_KEY_PASSWD",
+          "DB_FLAVOR" : "MYSQL",
+          "db_name" : "rangerkms",
+          "SQL_CONNECTOR_JAR" : "/usr/share/java/mysql-connector-java.jar",
+          "db_user" : "rangerkms",
+          "db_host" : "172.17.0.9:3306",
+          "db_root_user" : "root"
+        }
+      }
+    },
+
+    {
+      "ranger-yarn-security" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.plugin.yarn.policy.source.impl" : "org.apache.ranger.admin.client.RangerAdminRESTClient"
+        }
+      }
+    },
+
+    {
+      "usersync-properties" : {
+        "properties_attributes" : { },
+        "properties" : { }
+      }
+    },
+
+    {
+      "ranger-hbase-security" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "ranger.plugin.hbase.policy.source.impl" : "org.apache.ranger.admin.client.RangerAdminRESTClient"
+        }
+      }
+    },
+    {
+      "hdfs-site" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "dfs.encryption.key.provider.uri" : "kms://http@%HOSTGROUP::host_group_1%:9292/kms",
+          "dfs.namenode.inode.attributes.provider.class" : "org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer"
+        }
+      }
+    },
+    {
+      "ranger-yarn-plugin-properties" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "REPOSITORY_CONFIG_USERNAME" : "yarn",
+          "common.name.for.certificate" : "",
+          "ranger-yarn-plugin-enabled" : "Yes",
+          "policy_user" : "ambari-qa",
+          "hadoop.rpc.protection" : ""
+        }
+      }
+    },
+    {
+      "ranger-hbase-plugin-properties" : {
+        "properties_attributes" : { },
+        "properties" : {
+          "REPOSITORY_CONFIG_USERNAME" : "hbase",
+          "common.name.for.certificate" : "",
+          "ranger-hbase-plugin-enabled" : "Yes",
+          "policy_user" : "ambari-qa"
+        }
+      }
+    }
+  ],
+  "host_groups" : [
+    {
+      "name" : "host_group_1",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "RANGER_ADMIN"
+        },
+        {
+          "name" : "HBASE_REGIONSERVER"
+        },
+        {
+          "name" : "HBASE_CLIENT"
+        },
+        {
+          "name" : "HBASE_MASTER"
+        },
+        {
+          "name" : "RANGER_USERSYNC"
+        },
+        {
+          "name" : "NAMENODE"
+        },
+        {
+          "name" : "NODEMANAGER"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "YARN_CLIENT"
+        },
+        {
+          "name" : "MAPREDUCE2_CLIENT"
+        },
+        {
+          "name" : "DATANODE"
+        },
+        {
+          "name" : "RANGER_KMS_SERVER"
+        }
+      ],
+      "cardinality" : "1"
+    },
+    {
+      "name" : "host_group_2",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "HISTORYSERVER"
+        },
+        {
+          "name" : "HBASE_REGIONSERVER"
+        },
+        {
+          "name" : "APP_TIMELINE_SERVER"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "NODEMANAGER"
+        },
+        {
+          "name" : "SECONDARY_NAMENODE"
+        },
+        {
+          "name" : "DATANODE"
+        },
+        {
+          "name" : "RESOURCEMANAGER"
+        }
+      ],
+      "cardinality" : "1"
+    },
+    {
+      "name" : "host_group_3",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "HBASE_REGIONSERVER"
+        },
+        {
+          "name" : "HBASE_CLIENT"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "NODEMANAGER"
+        },
+        {
+          "name" : "YARN_CLIENT"
+        },
+        {
+          "name" : "MAPREDUCE2_CLIENT"
+        },
+        {
+          "name" : "DATANODE"
+        }
+      ],
+      "cardinality" : "1"
+    }
+  ],
+  "Blueprints" : {
+    "stack_name" : "HDP",
+    "stack_version" : "2.3"
+  }
+}
+```
+## 以 HA 模式部署 Ranger {#deploy-ranger-in-ha-mode}
+
+与非 HA 模式部署 Ranger 的区别如下:
+
+* 将 RANGER_ADMIN 组件部署到多个主机
+* 设置负载均衡器,并将其配置为置于所有 RANGER_ADMIN 实例之前(Ranger Admin 实例的 URL 为 [http://host:port](http://hostport),默认端口为 6080)
+* admin-properties
+  - policymgr_external_url - 使用负载均衡器的 URL 覆盖此配置属性的值。每个与 Ranger 交互的组件都使用此属性值连接 Ranger,因此它们会通过负载均衡器连接。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/index.md
new file mode 100644
index 0000000..84b37df
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/blueprints/index.md
@@ -0,0 +1,1006 @@
+---
+slug: /blueprints
+title: 蓝图
+---
+
+<!-- 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. -->
+
+# 蓝图 {#blueprints}
+
+## 简介 {#introduction}
+
+Ambari Blueprint 是集群的声明式定义。通过 Blueprint,可以指定 [Stack](../stack-and-services/overview.mdx)、组件布局和配置,以(通过 REST API)实例化 Hadoop 集群,而**无需**使用 Ambari 集群安装向导。
+
+### **重要 JIRA** {#notable-jiras}
+JIRA                                                              | 描述
+------------------------------------------------------------------|---------------------------------------------
+[AMBARI-4467](https://issues.apache.org/jira/browse/AMBARI-4467)  |Blueprints REST resource.
+[AMBARI-5077](https://issues.apache.org/jira/browse/AMBARI-5077)  |Provision cluster with blueprint.
+[AMBARI-4786](https://issues.apache.org/jira/browse/AMBARI-4786)  |Export blueprints from running/existing cluster.
+[AMBARI-5114](https://issues.apache.org/jira/browse/AMBARI-5114)  |Configurations with blueprints.
+[AMBARI-6275](https://issues.apache.org/jira/browse/AMBARI-6275)  |Add hosts using blueprints.
+[AMBARI-10750](https://issues.apache.org/jira/browse/AMBARI-10750)|2.1 blueprint changes.
+
+## API 资源和语法 {#api-resources-and-syntax}
+
+下表列出了基本的 Blueprint API 资源。
+
+本 wiki 页面中的 API 调用包含 HTTP 方法(例如:`GET, PUT, POST`)和示例 URI(例如:`/api/v1/blueprints`)。实际调用 Ambari REST API 时,请确保设置 `X-Requested-By` 标头,并按要求提供身份验证信息。例如,使用 `curl` 调用 API:
+
+```bash 
+curl -H "X-Requested-By: ambari" -X GET -u admin:admin  http://c6401.ambari.apache.org:8080 /api/v1/blueprints
+```
+
+## Blueprint 使用概览 {#blueprint-usage-overview}
+
+#### 步骤 0:准备 Ambari Server 和 Agent {#step-0-prepare-ambari-server-and-agents}
+
+安装 Ambari Server,运行 setup 并启动。在所有主机上安装 Ambari Agent 并手动注册。
+
+#### 步骤 1:创建 Blueprint {#step-1-create-blueprint}
+
+可以手动创建 Blueprint,也可以从现有集群导出 Blueprint。
+
+从现有集群导出:`GET /api/v1/clusters/:clusterName?format=blueprint`
+
+#### 步骤 2:向 Ambari 注册 Blueprint {#step-2-register-blueprint-with-ambari}
+
+`POST /api/v1/blueprints/:blueprintName`
+
+请求正文是**步骤 1**中创建的 Blueprint。
+
+要禁用拓扑验证并注册 Blueprint:
+
+`<span>POST /api/v1/blueprints/:blueprintName?validate_topology=false</span>`
+
+禁用拓扑验证后,用户可以强制注册未通过拓扑验证的 Blueprint。
+
+#### 步骤 3:创建集群创建模板 {#step-3-create-cluster-creation-template}
+
+将物理主机映射到 Blueprint:创建 Blueprint 主机组与物理主机之间的映射。
+
+提供集群专用配置覆盖:可以在集群和主机组范围应用配置,并覆盖 Blueprint 中指定的配置。
+
+#### 步骤 4:设置 Stack 仓库(可选) {#step-4-setup-stack-repositories-optional}
+
+通过 Blueprint 创建集群时,公共 Stack 仓库可能无法访问,或者 Stack 需要使用备用仓库。
+
+要使用本地或备用仓库:
+
+```
+PUT /api/v1/stacks/:stack/versions/:stackVersion/operating_systems/:osType/repositories/:repoId
+
+{
+  "Repositories" : {
+    "base_url" : "",
+    "verify_base_url" : true
+  }
+}
+```
+
+可以多次调用此 API,为多个操作系统类型或 Stack 版本设置 Base URL。如果未执行此步骤,Blueprint 默认使用 Stack 中定义的最新 Base URL。
+
+#### 步骤 5:创建集群 {#step-5-create-cluster}
+
+`POST /api/v1/clusters/:clusterName`
+
+请求正文包含 Blueprint 名称、主机映射以及**步骤 3**中的配置。
+
+请求是异步的,并返回可用于监控进度的 `/requests` URL。
+
+#### 步骤 6:监控集群创建进度 {#step-6-monitor-cluster-creation-progress}
+
+使用**步骤 4**返回的 `/requests` URL,监控与集群创建相关任务的进度。
+
+#### 限制 {#limitations}
+
+Ambari Blueprint 目前不支持创建反映高可用拓扑的集群。
+
+Ambari 2.0 增加了在 Blueprint 中部署高可用集群的支持。有关详细信息,请参阅 [Blueprint 对 HA 集群的支持](./blueprint-ha.md)。
+
+## Blueprint 详细信息 {#blueprint-details}
+
+### 准备 Ambari Server 和 Agent {#prepare-ambari-server-and-agents}
+
+1. Perform your Ambari Server install and setup.
+
+```bash
+yum install ambari-server
+ambari-server setup
+```
+
+2. After setup completes, start your Ambari Server.
+
+```bash
+ambari-server start
+```
+
+3. 在计划纳入集群的所有主机上安装 Ambari Agent。
+
+ ```bash
+ yum install ambari-agent
+ ```
+
+4. Set the Ambari Server on the Ambari Agents.
+
+```bash
+vi /etc/ambari-agent/conf/ambari-agent.ini
+```
+
+5. 将 hostname= 设置为 Ambari Server 的完全限定域名,然后保存并退出。
+
+```bash
+hostname=c6401.ambari.apache.org
+```
+
+6. Start the Agents to initiate registration to Server.
+
+```bash
+ambari-agent start
+```
+
+7. 确认 Agent 主机已在 Server 中注册。
+[http://your.ambari.server:8080/api/v1/hosts](http://your.ambari.server:8080/api/v1/hosts)
+
+
+### Blueprint Structure {#blueprint-structure}
+
+Blueprint 文档采用 JSON 格式,其结构如下:
+
+```json
+{
+  "configurations" : [
+    {
+      "configuration-type" : {
+          "property-name"  : "property-value",
+          "property-name2" : "property-value"
+      }
+    },
+    {
+      "configuration-type2" : {
+          "property-name" : "property-value"
+      }
+    }
+    ...
+
+  ],
+  "host_groups" : [
+    {
+      "name" : "host-group-name",
+      "components" : [
+        {
+          "name" : "component-name"
+        },
+        {
+          "name" : "component-name2",
+          "provision_action" : "(INSTALL_AND_START | INSTALL_ONLY)"
+        }
+        ...
+
+      ],
+      "configurations" : [
+	    {
+          "configuration-type" : {
+            "property-name" : "property-value"
+          }
+        }
+        ...
+
+      ],
+      "cardinality" : "1"
+    }
+  ],
+  "settings" : [
+    "deployment_settings": [
+      {"skip_failure":"true"}
+    ],
+    "repository_settings":[
+      {
+        "override_strategy":"ALWAYS_APPLY",
+        "operating_system":"redhat7",
+        "repo_id":"HDP",
+        "base_url":"http://myserver/hdp"
+      },
+      {
+        "override_strategy":"APPLY_WHEN_MISSING",
+        "operating_system":"redhat7",
+        "repo_id":"HDP-UTIL-1.1",
+        "base_url":"http://myserver/hdp-util"
+      }
+	],
+    "recovery_settings":[
+      {"recovery_enabled":"true"}
+    ],
+    "service_settings":[
+      {
+        "name":"SERVICE_ONE",
+        "recovery_enabled":"true"
+      },
+      {
+        "name":"SERVICE_TWO",
+        "recovery_enabled":"true"
+      }
+    ],
+    "component_settings":[
+      {
+        "name":"COMPONENT_A_OF_SERVICE_ONE"
+        "recover_enabled":"true"
+      },
+      {
+        "name":"COMPONENT_B_OF_SERVICE_TWO",
+        "recover_enabled":"true"
+      }
+    ]
+  ],
+  "Blueprints" : {
+    "stack_name" : "HDP",
+    "stack_version" : "2.1",
+    "security" : {
+         "type" : "(NONE | KERBEROS)",
+         "kerberos_descriptor" : {
+             ...
+
+          }
+     }
+  }
+}
+```
+
+#### **Blueprint 字段说明** {#blueprint-field-descriptions}
+
+* **configurations**:按配置类型作为键的配置映射列表。例如配置类型为 "core-site"。在顶层指定时,配置应用于集群范围并覆盖集群默认值。在 "host_groups" 元素中指定时,配置应用于映射到该主机组的所有主机。主机范围配置会覆盖这些主机的集群范围配置。两个级别的 configurations 元素均为可选。
+
+* **host_groups**:定义拓扑(组件)以及映射到该主机组的所有主机配置的主机组列表。必须指定至少一个主机组。
+
+  - **name**:主机组名称。将物理主机映射到主机组时,集群创建正文会引用此必填字段。
+
+  - **components**:将在映射到该主机组的所有主机上运行的组件列表。每个主机组必须至少指定一个组件。
+
+  - **provision_action**:可以在集群创建模板中指定集群范围的配置操作(见下文),也可以在此处指定不同的 provision_action,在组件级别覆盖它。默认 provision_action 为 INSTALL_AND_START。
+
+  - **cardinality**:此可选字段用于向部署程序提示某个主机组可以实例化多少个实例;它不影响集群部署方式。为现有集群导出 Blueprint 时,此字段表示该集群中对应主机组的主机数。
+
+* **Blueprints**:Blueprint 和 Stack 信息
+  - **stack_name**:Stack 名称。Ambari 当前提供的所有 Stack 名称均为 "HDP"。此字段必填。
+
+  - **stack_version**:Stack 版本,例如:"1.3.2" 或 "2.1"。此字段必填。使用 Blueprint 部署集群时,Blueprint 标识的 Stack 定义必须在新集群的 Ambari 实例中可用。
+
+  - **blueprint_name**:指定 Blueprint 名称的可选字段。通常在 REST 调用 URL 中指定 Blueprint 名称。仅在通过一次 REST 调用创建多个 Blueprint 时才需要在 Blueprint 中指定名称。**请注意,此字段指定的名称会覆盖 URL 中指定的名称。**
+  - **security**:指定 Blueprint 安全设置的可选块。支持的安全类型为 **NONE** 和 **KERBEROS**。使用 KERBEROS 时,可以在 **kerberos_descriptor** 字段中嵌入有效的 Kerberos 描述符以覆盖 HDP Stack 默认值,也可以使用 **kerberos_descriptor_reference** 字段引用之前保存的 Kerberos 描述符。
+
+如果选择 **KERBEROS** 作为 security_type,则必须添加 **kerberos-env** 和 **krb5-conf** 配置类型。(请查看本页**包含 KERBEROS 的 Blueprint 示例**中的配置部分。)
+请注意,运行 Ambari server 的主机必须安装 Kerberos 客户端软件包,并且必须正确配置 krb5.conf 以包含你的 realm(admin_server 和 kdc)。
+
+[自动 Kerberization](../kerberos/index.md) 页面介绍了 kerberos_descriptor 的结构。
+
+* **settings**:用于提供 Blueprint 部署期间及之后集群行为附加配置的可选部分。可以为以下属性提供配置:
+  - recovery_settings:用于指定集群部署后是否为所有服务全局启用自动重启。将 "recover_enabled" 属性设置为 "true" 可启用自动重启,设置为 "false" 则不自动重启。例如:
+  ```json
+  "settings": [
+  "recovery_settings":[
+      {
+        "recovery_enabled":"true"
+      }
+    ]
+  ],
+  ```
+  - service_settings: A section to specify if services should be set with auto restart once the cluster is deployed. To configure it, specify "recover_enabled" property to either "true" (auto restart), or "false" (do not auto restart).
+  For example:
+  ```json
+  "settings": [
+    "service_settings":[
+      {
+        "name":"HDFS",
+        "recovery_enabled":"true"
+      },
+      {
+        "name":"ZOOKEEPER",
+        "recovery_enabled":"true"
+      }
+    ]
+  ],_
+  ```
+  - component_settings: A section to specify if components should be set with auto restart once the cluster is deployed. To configure it, specify "recover_enabled" property to either "true" (auto restart), or "false" (do not auto restart).
+  For example:
+  ```json
+  "settings": [
+    "component_settings":[
+      {
+        "name":"KAFKA_CLIENT"
+        "recover_enabled":"true"
+      },
+      {
+        "name":"METRICS_MONITOR",
+        "recover_enabled":"true"
+      }
+    ]
+  ],
+  ```
+  - deployment_settings:用于指定 Blueprint 部署是否自动跳过安装和启动失败。将 "skip_failure" 属性设置为 "true" 可自动跳过失败,设置为 "false" 则不自动跳过。如果 Blueprint 文件没有 "deployment_settings" 部分,部署会在首次失败时终止。
+
+  For example:
+  
+  ```json
+  "settings": [
+  "recovery_settings":[
+      {
+        "recovery_enabled":"true"
+      }
+    ]
+  ],
+  ```
+
+  - repository_settings: A section to specify custom repository URLs for the blueprint deployment. This section allows you to provide custom URLs to override the default ones. Without this section, you will need to update the repository URLs via REST API before deploying the cluster with the blueprint. "override_strategy" can be "ALWAYS_APPLY" ( always override the default one), or "APPLY_WHEN_MISSING" (only add it if no repository exists with the specific operating system and the reposi [...]
+  For example:
+  ```json
+   settings: [
+   "repository_settings":[
+   {
+   "override_strategy":"ALWAYS_APPLY"
+   "operating_system":"redhat7",
+   "repo_id":"HDP",
+   "base_url":"[http://myserver/hdp](http://  myserver/hdp) "
+   },
+   {
+   "override_strategy":"APPLY_WHEN_MISSING",
+   "operating_system":"redhat7",
+   "repo_id":"HDP-UTIL-1.1",
+   "base_url":"[http://myserver/hdp-util](http://  myserver/hdp-util) "
+  }
+  ]
+  ]
+  ```
+
+### 集群创建模板结构 {#cluster-creation-template-structure}
+
+集群创建模板采用 JSON 格式,结构如下:
+
+```json
+{
+  "blueprint" : "blueprint-name",
+  "default_password" : "super-secret-password",
+  "provision_action" : "(INSTALL_AND_START | INSTALL_ONLY)"
+  "configurations" : [
+    {
+      "configuration-type" : {
+        "property-name" : "property-value"
+      }
+    }
+    ...
+
+  ],
+  "host_groups" :[
+    {
+      "name" : "host-group-name",
+      "configurations" : [
+        {
+          "configuration-type" : {
+            "property-name" : "property-value"
+          }
+        }
+      ],
+      "hosts" : [
+        {
+          "fqdn" : "host.domain.com"
+        },
+        {
+          "fqdn" : "host2.domain.com"
+        }
+        ...
+
+      ]
+    }
+    ...
+
+  ],
+  "credentials" : [
+      {
+        "alias" : "kdc.admin.credential",
+        "principal" : "{PRINCIPAL}",
+        "key" : "{KEY}",
+        "type" : "(TEMPORARY | PERSISTED)"
+      }
+  ],
+  "security" : {
+         "type" : "(NONE | KERBEROS)",
+         "kerberos_descriptor" : {
+             ...
+
+          }
+  }
+}
+```
+
+从 Ambari 2.1.0 开始,可以在集群创建模板的主机组部分指定主机数量和主机谓词来代替主机名。
+
+```json
+{
+  "name" : "group-using-host-count",
+  "host_count" : 5,
+  "host_predicate" : "Hosts/os_type=centos6&Hosts/cpu_count=2"
+}
+```
+
+从 Ambari 2.2.0 开始,可以在集群创建模板中指定配置建议策略。
+
+```json
+{
+  "blueprint" : "blueprint-name",
+  "config_recommendation_strategy" : "ONLY_STACK_DEFAULTS_APPLY",
+  ...
+
+}
+```
+
+从 Ambari 2.2.1 开始,可以在集群创建模板中指定主机机架信息([AMBARI-14600](https://issues.apache.org/jira/browse/AMBARI-14600))。
+
+```json
+"hosts" : [
+        {
+          "fqdn" : "amb2.service.consul",
+          "rack_info": "/dc1/rack1"
+        }
+      ]
+```
+
+**集群创建模板结构:主机映射和配置字段说明**
+
+* **blueprint**:定义待部署集群的 Blueprint 名称。Blueprint 必须已存在。必填字段。
+
+* **default_password**:为 Blueprint 或集群创建模板配置中未指定的所有必需密码设置默认密码的可选字段。
+
+* **provision_action**:默认值为 INSTALL_AND_START,也可以为特定组件指定不同的 provision_action,在组件级别覆盖此值。
+
+* **configurations**:按配置类型作为键的配置映射列表。例如配置类型为 "core-site"。在顶层指定时,配置应用于集群范围并覆盖集群默认值。在 "host_groups" 元素中指定时,配置应用于映射到主机组的所有主机。主机范围配置覆盖这些主机的集群范围配置。此处指定的所有集群范围和主机组范围配置都会覆盖对应 Blueprint 中的配置。两个级别的 configurations 元素均为可选。
+
+* **config_recommendation_strategy:**指定向集群应用配置建议策略的可选字段。建议配置由 Stack advisor 的响应收集,根据所选策略可能部分或完全覆盖用户定义的自定义配置。如果属性值不同于 Stack 默认值,则视为自定义配置。从 Ambari 2.2.0 开始可用。
+
+  - **NEVER_APPLY**:使用此选项时忽略配置建议。(这是默认值)
+  - **ONLY_STACK_DEFAULTS_APPLY**:配置建议仅应用于 HDP Stack 中默认定义的属性。
+
+  - **ALWAYS_APPLY**:应用所有配置建议,这些建议可能覆盖用户在 Blueprint 和/或集群创建模板中提供的自定义配置。
+
+  - **ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES**:应用所有配置建议,但用户在 Blueprint 和/或集群创建模板中定义的自定义配置不会被建议值覆盖。从 Ambari 2.4.0 开始可用。
+
+* **host_groups**:要部署到集群的主机组列表。必须至少指定一个主机组。
+
+  - **name**:必填字段,必须对应关联 Blueprint 中的主机组名称。
+
+  - **hosts**:主机映射信息列表
+    + **fqdn**:映射到主机组的每台主机的完全限定域名。必须至少指定一台主机
+  - **host_count**:应映射到此主机组的主机数。可以用它代替具体主机名。如果未指定 host_predicate,则任何未显式映射到其他主机组的主机都可映射到此主机组。从 Ambari 2.1.0 开始可用。
+
+  - **host_predicate**:与 host_count 一起使用、控制哪些主机映射到主机组的可选字段。这对于支持主机“类型”很有用,因为不同主机组需要不同主机类型。默认谓词匹配所有未显式映射到其他主机组的主机。谓词语法是应用于 "api/v1/hosts" 端点的标准 Ambari API 查询语法。从 Ambari 2.1.0 开始可用。
+
+* **credentials**:用于创建凭据的可选块;设置 KERBEROS 安全时必须提供 kdc.admin.credential。存储类型可以是 **PERSISTED** 或 **TEMPORARY**。临时管理员凭据有效期为 90 分钟或直到服务器重启。
+
+* **security**:覆盖 Blueprint 中安全设置的可选块。支持的安全类型为 **NONE** 和 **KERBEROS**。使用 KERBEROS 时,可以在 **kerberos_descriptor** 字段中嵌入有效 Kerberos 描述符以覆盖 HDP Stack 默认值,也可以使用 **kerberos_descriptor_reference** 字段引用之前保存的描述符。此处定义的安全设置会覆盖 Blueprint 设置,但不能将 Blueprint 使用的安全类型覆盖为较低安全级别(例如,Blueprint 中为 security.type=KERBEROS 时,不能在集群模板中设置 security.type=NONE)。如果选择 **KERBEROS** 作为 security_type,则必须添加 **kerberos-env** 和 **krb5-conf** 配置类型。(请查看本页**包含 KERBEROS 的 Blueprint 示例**中的配置部分。)
+[自动 Kerberization](../kerberos/index.md) 页面介绍 kerberos_descriptor 的结构。
+
+### 配置 {#configurations}
+
+#### 默认值和覆盖 {#default-values-and-overrides}
+
+* **Stack 默认值**:每个 Stack 为包含的所有服务提供配置,作为通过 Blueprint 部署的所有集群的默认值。
+
+* **Blueprint 集群范围**:Blueprint 顶层提供的配置覆盖整个集群的相应默认值。
+
+* **Blueprint 主机组范围**:Blueprint 的 host_group 元素中提供的配置,仅对映射到该主机组的主机覆盖相应默认值和 Blueprint 集群范围值。
+
+* **集群创建模板集群范围**:集群创建模板顶层提供的配置,会为整个集群覆盖相应默认值和 Blueprint 集群范围值。
+
+* **集群创建模板主机组范围**:集群创建模板 host_group 元素中提供的配置,会为映射到该主机组的主机覆盖所有其他值。
+
+#### 必需配置 {#required-configurations}
+
+* 并非所有配置属性都有有效默认值
+* Blueprint 用户必须指定必需属性
+* 分为密码和非密码两类
+* 非密码必需属性在创建 Blueprint 时验证
+* 必需密码属性在创建集群时验证
+* 对于必需密码属性,可以在 Blueprint 或集群创建模板配置中显式设置,也可以在集群创建模板中指定默认密码,将其应用于所有未显式设置的密码
+  - "default_password" : "super-secret-password"
+* 如果必需配置验证失败,将返回 400 响应,指出必须指定哪些属性
+
+## [Blueprint 示例](#) {#blueprint-examples}
+
+## Blueprint 示例:单节点 HDP 2.4 集群 {#blueprint-example-single-node-hdp-24-cluster}
+
+* 单节点集群(c6401.ambari.apache.org)
+* HDP 2.4 Stack
+* 安装核心 Hadoop 服务(HDFS、YARN、MapReduce2、ZooKeeper)
+
+### Blueprint 示例 {#example-blueprint}
+
+```json
+{
+  "host_groups" : [
+    {
+      "name" : "host_group_1",
+      "components" : [
+        {
+          "name" : "NAMENODE"
+        },
+        {
+          "name" : "SECONDARY_NAMENODE"
+        },
+        {
+          "name" : "DATANODE"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "RESOURCEMANAGER"
+        },
+        {
+          "name" : "NODEMANAGER"
+        },
+        {
+          "name" : "YARN_CLIENT"
+        },
+        {
+          "name" : "HISTORYSERVER"
+        },
+        {
+          "name" : "MAPREDUCE2_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        }
+      ],
+      "cardinality" : "1"
+    }
+  ],
+  "Blueprints" : {
+    "blueprint_name" : "single-node-hdfs-yarn",
+    "stack_name" : "HDP",
+    "stack_version" : "2.4"
+  }
+}
+```
+
+### Register blueprint with Ambari Server {#register-blueprint-with-ambari-server}
+
+将 Blueprint 发布到 Ambari Server 的 "single-node-hdfs-yarn" 资源。
+
+```
+POST /api/v1/blueprints/single-node-hdfs-yarn
+
+...
+
+[ Request Body is the example blueprint defined above ]
+...
+
+201 - Created
+```
+
+### Example Cluster Creation Template {#example-cluster-creation-template}
+
+我们正在执行单节点安装,上述 Blueprint 有**一个**主机组。因此,对于集群实例,我们在 **host_group_1** 中定义**一个**主机,并引用 **single-node-hdfs-yarn** Blueprint。
+
+**Explicit Host Name Example**
+
+```json
+{
+  "blueprint" : "single-node-hdfs-yarn",
+  "host_groups" :[
+    {
+      "name" : "host_group_1",
+      "hosts" : [
+        {
+          "fqdn" : "c6401.ambari.apache.org"
+        }
+      ]
+    }
+  ]
+}
+```
+
+Create Cluster Instance
+
+将集群发布到 Ambari Server 以配置集群。
+
+```
+POST /api/v1/clusters/MySingleNodeCluster
+
+...
+
+[ Request Body is above Cluster Creation Template ]
+...
+
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyCluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "InProgress"
+  }
+}
+```
+
+## Blueprint 示例:多节点 HDP 2.4 集群 {#blueprint-example-multi-node-hdp-24-cluster}
+
+* 多节点集群(三台主机)
+* 主机组:"master"、"slaves"(一台 master 主机、两台 slave 主机)
+* 使用 HDP 2.4 Stack
+* 安装核心 Hadoop 服务(HDFS、YARN、MapReduce2、ZooKeeper)
+
+### Example Blueprint {#example-blueprint-1}
+
+下面的 Blueprint("multi-node-hdfs-yarn")定义了**两个**主机组("master" 和 "slaves"),用于承载各种服务组件(master、slave 和 client)。
+
+```json
+{
+  "host_groups" : [
+    {
+      "name" : "master",
+      "components" : [
+        {
+          "name" : "NAMENODE"
+        },
+        {
+          "name" : "SECONDARY_NAMENODE"
+        },
+        {
+          "name" : "RESOURCEMANAGER"
+        },
+        {
+          "name" : "HISTORYSERVER"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        }
+      ],
+      "cardinality" : "1"
+    },
+    {
+      "name" : "slaves",
+      "components" : [
+        {
+          "name" : "DATANODE"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "NODEMANAGER"
+        },
+        {
+          "name" : "YARN_CLIENT"
+        },
+        {
+          "name" : "MAPREDUCE2_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        }
+      ],
+      "cardinality" : "1+"
+    }
+  ],
+  "Blueprints" : {
+    "blueprint_name" : "multi-node-hdfs-yarn",
+    "stack_name" : "HDP",
+    "stack_version" : "2.4"
+  }
+}
+```
+
+### Register blueprint with Ambari Server {#register-blueprint-with-ambari-server-1}
+
+将 Blueprint 发布到 Ambari Server 的 "single-node-hdfs-yarn" 资源。
+
+```
+POST /api/v1/blueprints/multi-node-hdfs-yarn
+...
+
+[ Request Body is the example blueprint defined above ]
+...
+
+201 - Created
+```
+
+### Example Cluster Creation Template {#example-cluster-creation-template-1}
+
+我们正在执行多节点安装,上述 Blueprint 有**两个**主机组。因此,对于集群实例,我们在 **masters** 中定义**一个**主机,在 **slaves** 中定义**两个**主机,并引用 **multi-node-hdfs-yarn** Blueprint。
+
+下面的多节点集群创建模板示例对 "slave" 主机组使用 "host_count" 和 "host_predicate" 语法,该语法从 Ambari 2.1.0 开始可用。对于较旧版本的 Ambari,必须使用 "hosts/fqdn" 语法。
+
+```
+{
+  "blueprint" : "multi-node-hdfs-yarn",
+  "default_password" : "my-super-secret-password",
+  "host_groups" :[
+    {
+      "name" : "master",
+      "hosts" : [
+        {
+          "fqdn" : "c6401.ambari.apache.org"
+        }
+      ]
+    },
+    {
+      "name" : "slaves",
+      "host_count" : 5,
+      "host_predicate" : "Hosts/os_type=centos6&Hosts/cpu_count=2"
+    }
+  ]
+}
+```
+
+### 创建集群实例 {#create-cluster-instance}
+
+将集群发布到 Ambari Server 以配置集群。
+
+```
+POST /api/v1/clusters/MyThreeNodeCluster
+...
+
+[ Request Body is above Cluster Creation Template ]
+...
+
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/MyThreeNodeCluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "InProgress"
+  }
+}
+```
+
+## 向现有集群添加主机 {#adding-hosts-to-an-existing-cluster}
+
+使用 Ambari Blueprint API 创建集群后,可以使用 API 扩展集群。
+
+此 API 有两种形式,一种用于添加单个主机,另一种用于添加多个主机。
+
+从 Ambari 2.0 开始提供 Blueprint 添加主机 API。
+
+目前,只有最初通过 Blueprint API 配置的集群可以使用此 API 扩展。
+
+### 添加主机模板示例 {#example-add-host-template}
+
+#### 单主机示例 {#single-host-example}
+
+主机在 URL 中指定
+
+```
+{
+  "blueprint" : "multi-node-hdfs-yarn",
+  "host_group" : "slaves"
+}
+```
+
+#### 多主机形式 {#multiple-host-form}
+
+主机在请求正文中指定
+
+```
+[
+  {
+    "blueprint" : "multi-node-hdfs-yarn",
+    "host_group" : "slaves",
+    "host_name" : "c6403.ambari.apache.org"
+  },
+  {
+    "blueprint" : "multi-node-hdfs-yarn",
+    "host_group" : "slaves",
+    "host_name" : "c6404.ambari.apache.org"
+  }
+]
+```
+
+#### 使用 host_count 的多主机形式 {#multiple-host-form-using-host_count}
+
+从 Ambari 2.1 开始,添加主机时也可以使用 "host_count" 和 "host_predicate" 字段。
+
+这些字段的行为与在集群创建模板中指定时完全相同。
+
+```
+[
+  {
+    "blueprint" : "multi-node-hdfs-yarn",
+    "host_group" : "slaves",
+    "host_count" : 5,
+    "host_predicate" : "Hosts/os_type=centos6&Hosts/cpu_count=2"
+  }
+]
+```
+
+### 添加主机请求 {#add-host-request}
+
+#### 单主机 {#single-host}
+
+```
+POST /api/v1/clusters/myExistingCluster/hosts/c6403.ambari.apache.org
+...
+
+[ Request Body is above Single Host Add Host Template ]
+...
+
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/myExistingCluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "Pending"
+  }
+}
+```
+
+#### 多主机 {#multiple-hosts}
+
+```
+POST /api/v1/clusters/myExistingCluster/hosts
+...
+
+[ Request Body is above Multiple Host Add Host Template ]
+...
+
+202 - Accepted
+{
+  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/myExistingCluster/requests/1",
+  "Requests" : {
+    "id" : 1,
+    "status" : "Pending"
+  }
+}
+```
+
+## Blueprint 示例:配置使用 KERBEROS 的多节点 HDP 2.3 集群 {#blueprint-example--provisioning-multi-node-hdp-23-cluster-to-use-kerberos}
+
+下面的 Blueprint 可用于设置包含三个主机组并启用 KERBEROS 安全的集群。无需覆盖默认 Kerberos 描述符,但必须在 kerberos-env 和 krb5-conf 中指定一些 Kerberos 专用属性,才能设置服务使用 Kerberos。注意:Ambari 2.4.0 之前请使用 "kdc_host",而不是 "kdc_hosts"。
+
+```json
+{
+  "configurations" : [
+    {
+      "kerberos-env": {
+        "properties_attributes" : { },
+        "properties" : {
+          "realm" : "AMBARI.APACHE.ORG",
+          "kdc_type" : "mit-kdc",
+          "kdc_hosts" : "(kerberos_server_name)",
+          "admin_server_host" : "(kerberos_server_name)"
+        }
+      }
+    },
+    {
+      "krb5-conf": {
+        "properties_attributes" : { },
+        "properties" : {
+          "domains" : "AMBARI.APACHE.ORG",
+          "manage_krb5_conf" : "true"
+        }
+      }
+    }
+  ],
+  "host_groups" : [
+    {
+      "name" : "host_group_1",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "NAMENODE"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "DATANODE"
+        }
+      ],
+      "cardinality" : "1"
+    },
+    {
+      "name" : "host_group_2",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "KERBEROS_CLIENT"
+        },
+        {
+          "name" : "SECONDARY_NAMENODE"
+        },
+        {
+          "name" : "DATANODE"
+        }
+      ],
+      "cardinality" : "1"
+    },
+    {
+      "name" : "host_group_3",
+      "configurations" : [ ],
+      "components" : [
+        {
+          "name" : "ZOOKEEPER_CLIENT"
+        },
+        {
+          "name" : "ZOOKEEPER_SERVER"
+        },
+        {
+          "name" : "KERBEROS_CLIENT"
+        },
+        {
+          "name" : "HDFS_CLIENT"
+        },
+        {
+          "name" : "DATANODE"
+        }
+      ],
+      "cardinality" : "1"
+    }
+  ],
+  "Blueprints" : {
+    "stack_name" : "HDP",
+    "stack_version" : "2.3",
+    "security" : {
+         "type" : "KERBEROS"
+    }
+  }
+}
+```
+
+下面的**集群创建模板**可使用上述 Blueprint 设置包含主机并启用 KERBEROS 安全的集群。无需覆盖默认 Kerberos 描述符,但必须指定 kdc.admin 凭据。
+
+```json
+{
+    "blueprint": "kerberosBlueprint",
+    "default_password": "admin",
+    "host_groups": [
+        {
+          "hosts": [
+              { "fqdn": "ambari-agent-1" }
+          ],
+          "name": "host_group_1",
+          "configurations" : [ ]
+        },
+        {
+          "hosts": [
+              { "fqdn": "ambari-agent-2" }
+          ],
+          "name": "host_group_2",
+          "configurations" : [ ]
+        },
+        {
+          "hosts": [
+              { "fqdn": "ambari-agent-3" }
+          ],
+          "name": "host_group_3",
+          "configurations" : [ ]
+        }
+    ],
+    "credentials" : [
+     {
+       "alias" : "kdc.admin.credential",
+       "principal" : "admin/admin",
+       "key" : "admin",
+       "type" : "TEMPORARY"
+     }
+    ],
+    "security" : {
+        "type" : "KERBEROS"
+   },
+   "Clusters" : {"cluster_name":"kerberosCluster"}
+}
+```
+
+## Blueprint 对高可用集群的支持 {#blueprint-support-for-high-availability-clusters}
+
+Ambari 2.0 增加了部署 HDFS、Yarn 和 HBase HA 集群的支持。有关详细信息,请参阅以下链接:
+
+[Blueprint Support for HA Clusters](./blueprint-ha.md)
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/enhanced-configs/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/enhanced-configs/index.md
new file mode 100644
index 0000000..bccad65
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/enhanced-configs/index.md
@@ -0,0 +1,359 @@
+---
+title: 增强配置
+---
+
+<!--
+   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.
+-->
+
+Ambari-2.1.0 引入的增强配置功能让服务提供者能够大幅自定义服务配置,并确定向用户突出显示哪些配置,而无需更改任何 UI 代码。自定义内容包括提供友好的服务布局、更好的控件(滑块、组合框、列表、切换开关、微调器等)、更好的验证(最小值、最大值、枚举)、自动单位转换(MB、GB、秒、毫秒等)、配置依赖关系,以及改进的默认值动态建议。
+
+服务提供者只需更改 _stacks_/ 文件夹中的服务定义即可完成上述所有操作。
+
+Example: HBase Enhanced Configs
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/enhanced-configs/imgs/enhanced_hbase_configs.png "Hbase Enhanced Config")
+
+## 功能 {#features}
+
+* 使用配置的自定义布局定义主题
+  - Tabs
+  - Sections
+  - Sub-sections
+* 将选定配置放置在上述布局中
+* 为配置关联要使用的 UI 小部件
+  - Radio Buttons
+  - Slider
+  - Combo
+  - Time Interval Spinner
+  - Toggle
+  - Directory
+  - Directories
+  - List
+  - Password
+  - Text Field
+  - Checkbox
+  - Text Area
+* 自动转换配置的单位,使显示单位可以不同于保存单位。
+
+  - Memory - B, KB, MB, GB, TB, PB
+  - Time - milliseconds, seconds, minutes, hours, days, months, years
+  - Percentage - float, percentage
+* 能够定义跨服务配置之间的依赖关系(depends-on、depended-by)。
+
+* 配置更改时动态更新其他 depended-by 配置的值。
+
+## 启用增强配置 - 步骤 {#enable-enhanced-configs---steps}
+
+### 步骤 1 - 创建主题(UI 元数据) {#step-1---create-theme-ui-metadata}
+
+第一步是在 Stack 定义文件夹中为服务创建主题。主题提供构建增强配置所需的 UI 信息,包括布局(标签页、部分、子部分)、配置在子部分中的位置,以及每项配置使用的小部件和单位。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/enhanced-configs/imgs/create_theme.png "Apache Ambari > Enhanced Configs > Screen Shot 2015-07-13 at 3.32.59 PM.png")
+
+1. 通过包含 themes 块,修改 metainfo.xml 以定义主题。
+
+```
+themes-dir      theme.json    true
+```
+2. 如果不希望使用默认主题文件夹 ' _themes_',或者同一 _metainfo.xml_ 中的另一个服务已占用该文件夹,可以使用此可选元素。
+
+3. 可以定义多个主题,但服务只会使用第一个 _default_theme。
+
+4. 每个主题都通过 _fileName_ 元素指向 _themes-dir_ 文件夹中的主题 JSON 文件。
+
+5. _theme.json_ 文件包含一个 _configuration_ 块,其中有三个主要键
+  1. _layouts_ - 指定标签页、部分和子部分布局
+  2. _placement_ - 指定要放入子部分的配置
+  3. _widgets_ - 指定每项配置使用的 UI 小部件
+
+```json
+{  
+  "configuration": {   
+  "layouts": [      ...    ],  
+  "placement": {      ...    },    
+  "widgets": [      ...    ]  
+  }
+}
+```
+6. 布局 - 一个主题可以定义多个布局。目前渲染时只使用第一个布局。_layout_ 包含以下内容:
+  1. 选项卡:一个布局中可以定义多个选项卡。每个选项卡都可以通过 _tab-columns_ 和 _tab-rows_ 键,使用简单的网格布局组织内容。
+
+下面示例中的 _Settings_ 标签页有一个 3 行 2 列的网格,可在其中放置部分。
+
+```json
+"layouts": [  
+  {    
+    "name": "default",   
+     "tabs": [     
+       {        
+        "name": "settings",        
+        "display-name": "Settings",       
+         "layout": {         
+           "tab-columns": "2",          
+           "tab-rows": "3",          
+           "sections": [ ... ]        
+           }      
+      }
+     ] 
+    }
+]
+```
+  2. 部分:每个部分定义在标签页内,并使用 _row-index_、_column-index_、_row-span_ 和 _column-span_ 键指定其在标签页网格布局中的位置和大小。作为容器,它还可以使用 _section-rows_ 和 _section-columns_ 键为包含的子部分定义网格布局。
+
+下面示例中的 _MapReduce_ 部分占据 _Settings_ 标签页网格的第一个单元格,其自身有一个 1 行 3 列的网格布局。
+
+```
+"sections": [  {    "name": "section-mr-scheduler",    "display-name": "MapReduce",    "row-index": "0",    "column-index": "0",    "row-span": "1",    "column-span": "1",    "section-columns": "3",    "section-rows": "1",    "subsections": [ ... ]  },  ...]
+```
+  3. 子部分:每个子部分定义在部分内,并使用 _row-index_、_column-index_、_row-span_ 和 _column-span_ 键指定其在部分网格布局中的位置和大小。每个部分还有可选的 _border_ 布尔键,用于指示是否用边框包围其内容。
+
+```
+"subsections": [  {    "name": "subsection-mr-scheduler-row1-col1",    "display-name": "MapReduce Framework",    "row-index": "0",    "column-index": "0",    "row-span": "1",    "column-span": "1"  },  ...]
+```
+7. 放置:指定要放入每个子部分的配置顺序。每个放置项标识一项配置及其应出现的子部分。放置项使用 _configuration-layout_ 键指定适用的布局。
+
+```
+"placement": {  "configuration-layout": "default",  "configs": [    {      "config": "mapred-site/mapreduce.map.memory.mb",      "subsection-name": "subsection-mr-scheduler-row1-col1"    },    {      "config": "mapred-site/mapreduce.reduce.memory.mb",      "subsection-name": "subsection-mr-scheduler-row1-col2"    },    ...  ]}
+```
+8. 小部件:widgets 数组指定显示特定配置时使用的 UI 小部件,还包含显示小部件所需的其他 UI 专用元数据。
+
+下面的示例中两项配置都使用滑块小部件,但单位不同,因此一项以字节显示,另一项以百分比显示。此单位仅用于显示配置,与配置在 Ambari 中实际持久化时使用的单位不同。例如,下面的百分比单位可能以 _float_ 持久化,而下面的 MB 配置可能以 B(字节)持久化。
+
+```
+"widgets": [  {    "config": "yarn-site/yarn.nodemanager.resource.memory-mb",    "widget": {      "type": "slider",      "units": [        {          "unit-name": "MB"        }      ]    }  },  {    "config": "yarn-site/yarn.nodemanager.resource.percentage-physical-cpu-limit",    "widget": {      "type": "slider",      "units": [        {          "unit-name": "percent"        }      ]   } }, {   "config": "yarn-site/yarn.node-labels.enabled",   "widget": {     "type": "toggle"   } }, ...]
+```
+
+有关可用 UI 小部件及每个小部件可指定元数据的完整参考,请参阅_附录 A_。
+
+### 步骤 2 - 注释 Stack 配置(非 UI 元数据) {#step-2---annotate-stack-configs-non-ui-metadata}
+
+服务主题使用的每项配置都必须提供额外的配置元数据。可用元数据包括:
+
+* display-name
+* value-attributes
+  - type
+    + string
+    + value-list
+    + float
+    + int
+    + boolean
+  - minimum
+  - maximum
+  - unit
+  - increment-step
+  - entries
+    + entry
+      * value
+      * description
+* depends-on
+  - property
+    + type
+    + name
+
+value-attributes 提供有关值的元信息,适当的小部件可以将其用作提示。例如,滑块小部件可以使用最小值和最大值工作。
+
+Examples:
+
+```xml
+<property>
+  <name>namenode_heapsize</name>
+  <value>1024</value>
+  <description>NameNode Java heap size</description>
+  <display-name>NameNode Java heap size</display-name>
+  <value-attributes>
+    <type>int</type>
+    <minimum>0</minimum>
+    <maximum>268435456</maximum>
+    <unit>MB</unit>
+    <increment-step>256</increment-step>
+  </value-attributes>
+  <depends-on>
+    <property>
+      <type>hdfs-site</type>
+      <name>dfs.datanode.data.dir</name>
+    </property>
+  </depends-on>
+</property>
+
+```
+
+```xml
+<property>
+  <name>hive.default.fileformat</name>
+  <value>TextFile</value>
+  <description>Default file format for CREATE TABLE statement.</description>
+  <display-name>Default File Format</display-name>
+  <value-attributes>
+    <type>value-list</type>
+    <entries>
+      <entry>
+        <value>ORC</value>
+        <description>The Optimized Row Columnar (ORC) file format provides a highly efficient way to store Hive data. It was designed to overcome limitations of the other Hive file formats. Using ORC files improves performance when Hive is reading, writing, and processi
+      </entry>
+      <entry>
+        <value>TextFile</value>
+        <description>Text file format saves Hive data as normal text.</description>
+      </entry>
+    </entries>
+  </value-attributes>
+</property>
+```
+
+depends-on 有助于构建 Ambari 中不同配置之间的依赖关系图。Ambari 使用这些双向关系(depends-on 和 depended-by),通过 Ambari 的 Stack advisor 功能自动更新依赖配置。
+
+配置之间的依赖关系是有向无环图(DAG)。更新配置时,UI 必须确定它对图中其他配置的影响。为此,应在 changed_configurations 字段中向 /recommendations_ 端点提供刚刚更改的配置数组。根据提供的 changed-configs,响应中只会更新其依赖项。
+
+Example:
+
+下图显示了一些配置依赖关系:A 影响 B 和 C,B、C 分别影响 DE 和 FG。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/enhanced-configs/imgs/enhanced_configs_dependencies.png "Enhanced Configs Dependencies")
+
+现在假设用户将 B 更改为 B':调用 _/_ _recommendations_ 只会分别将 D 和 E 更改为 D' 和 E'(AB'CD'E'FG),不会更改其他配置。假设 C 更改为 C':/recommendations 只会将 F 和 G 更改为 F' 和 G',同时保留 B'、D'、E' 的值(AB'C'D'E'F'G')。现在如果将 A 更改为 A',它会影响所有子项(A'B''C''D''E''F''G'')。用户可以选择要应用的更改。
+
+每当具有依赖关系的配置发生更改时,都会调用 _/recommendations_。POST 调用的 action 为 configuration-dependencies,只会更改 changed_configurations 字段标识的配置及其依赖项。
+
+### 步骤 3 - 重启 Ambari server {#step-3---restart-ambari-server}
+
+必须重启 ambari-server,才能加载主题或 Stack 定义中的任何更改。
+
+## 参考 {#reference}
+
+* HDFS HDP-2.2 [theme.json](https://github.com/apache/ambari/blob/branch-2.1.2/ambari-server/src/main/resources/stacks/HDP/2.2/services/HDFS/themes/theme.json)
+* YARN HDP-2.2 [theme.json](https://github.com/apache/ambari/blob/branch-2.1.2/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/themes/theme.json)
+* HIVE HDP-2.2 [theme.json](https://github.com/apache/ambari/blob/branch-2.1.2/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/themes/theme.json)
+* RANGER HDP-2.3 [theme_version_2.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/themes/theme_version_2.json)
+
+## Appendix {#appendix}
+
+### 附录 A - 小部件非 UI 元数据 {#appendix-a---widget-non-ui-metadata}
+
+<table>
+  <tr>
+    <th>小部件</th>
+    <th>使用的元数据</th>
+  </tr>
+  <tr>
+    <td>Slider</td>
+    <td>
+    &lt;value-attributes&gt;<br></br>
+      &lt;type&gt;int&lt;/type&gt;<br></br>
+      &lt;minimum&gt;1073741824&lt;/minimum&gt;<br></br>
+      &lt;maximum&gt;17179869184&lt;/maximum&gt;<br></br>
+      &lt;unit&gt;B&lt;/unit&gt;<br></br>
+      &lt;increment-step&gt;1073741824&lt;/increment-step&gt;<br></br>
+    &lt;/value-attributes&gt;
+    </td>
+  </tr>
+  <tr>
+    <td>Combo</td>
+    <td>
+    &lt;value-attributes&gt; <br></br>
+      &lt;type&gt;value-list&lt;/type&gt;<br></br>
+      &lt;entries&gt;<br></br>
+        &lt;entry&gt;<br></br>
+          &lt;value&gt;2&lt;/value&gt;<br></br>
+        &lt;/entry&gt;<br></br>
+        &lt;entry&gt;<br></br>
+          &lt;value&gt;4&lt;/value&gt;<br></br>
+        &lt;/entry&gt;<br></br>
+        &lt;entry&gt;<br></br>
+          &lt;value&gt;8&lt;/value&gt;<br></br>
+        &lt;/entry&gt;<br></br>
+      &lt;/entries&gt;<br></br>
+      &lt;selection-cardinality&gt;1&lt;/selection-cardinality&gt;<br></br>
+    &lt;/value-attributes&gt;
+    </td>
+  </tr>
+  <tr>
+    <td>目录、目录列表、密码、文本字段、文本区域</td>
+    <td>不需要 value-attributes</td>
+  </tr>
+  <tr>
+    <td>List</td>
+    <td>
+    &lt;value-attributes&gt;                                          <br></br>
+  &lt;type&gt;value-list&lt;/type&gt;<br></br>
+  &lt;entries&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;2&lt;/value&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;4&lt;/value&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;8&lt;/value&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+  &lt;/entries&gt;<br></br>
+  &lt;selection-cardinality&gt;2+&lt;/selection-cardinality&gt;<br></br>
+&lt;/value-attributes&gt;<br></br>
+    </td>
+  </tr>
+  <tr>
+    <td>Radio-Buttons</td>
+    <td>
+   &lt;value-attributes&gt;                                    <br></br>
+  &lt;type&gt;value-list&lt;/type&gt;<br></br>
+  &lt;entries&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;1&lt;/value&gt;<br></br>
+      &lt;label&gt;Radio Option 1&lt;/label&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;2&lt;/value&gt;<br></br>
+      &lt;label&gt;Radio Option 2&lt;/label&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;3&lt;/value&gt;<br></br>
+      &lt;label&gt;Radio Option 3&lt;/label&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+  &lt;/entries&gt;<br></br>
+  &lt;selection-cardinality&gt;1&lt;/selection-cardinality&gt;<br></br>
+&lt;/value-attributes&gt;   
+    </td>
+  </tr>
+  <tr>
+    <td>Time Interval Spinner</td>
+    <td>
+&lt;value-attributes&gt;                   <br></br>
+  &lt;type&gt;int&lt;/type&gt;<br></br>
+  &lt;minimum&gt;0&lt;/minimum&gt;<br></br>
+  &lt;maximum&gt;2592000000&lt;/maximum&gt;<br></br>
+  &lt;unit&gt;milliseconds&lt;/unit&gt;<br></br>
+&lt;/value-attributes&gt;
+    </td>
+  </tr>
+  <tr>
+    <td>Toggle, Checkbox</td>
+    <td>
+ &lt;value-attributes&gt;                                       
+  &lt;type&gt;value-list&lt;/type&gt;<br></br>
+  &lt;entries&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;true&lt;/value&gt;<br></br>
+      &lt;label&gt;Native&lt;/label&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+    &lt;entry&gt;<br></br>
+      &lt;value&gt;false&lt;/value&gt;<br></br>
+      &lt;label&gt;Off&lt;/label&gt;<br></br>
+    &lt;/entry&gt;<br></br>
+  &lt;/entries&gt;<br></br>
+  &lt;selection-cardinality&gt;1&lt;/selection-cardinality&gt;<br></br>
+&lt;/value-attributes&gt;   
+    </td>
+  </tr>
+</table>
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/index.md
new file mode 100644
index 0000000..3195197
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/index.md
@@ -0,0 +1,25 @@
+---
+title: Ambari 设计
+---
+
+<!-- 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 t [...]
+
+# Ambari 设计 {#ambari-design}
+
+Ambari 架构:https://issues.apache.org/jira/secure/attachment/12559939/Ambari_Architecture.pdf
+
+Ambari Server-Agent 注册流程:http://www.slideshare.net/hortonworks/ambari-agentregistrationflow-17041261
+
+Ambari 本地仓库设置:http://www.slideshare.net/hortonworks/ambari-using-a-local-repository
+
+API 文档:https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md
+
+技术栈:[技术栈](./technology-stack.md)
+
+集成:http://developer.teradata.com/viewpoint/articles/viewpoint-integration-with-apache-ambari-for-hadoop-monitoring
+
+```mdx-code-block
+import DocCardList from '@theme/DocCardList';
+
+<DocCardList />
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/enabling_kerberos.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/enabling_kerberos.md
new file mode 100644
index 0000000..c593425
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/enabling_kerberos.md
@@ -0,0 +1,359 @@
+---
+title: 启用 Kerberos
+---
+
+<!---
+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.
+-->
+
+- [简介](index.md)
+- [Kerberos 描述符](kerberos_descriptor.md)
+- [Kerberos 服务](kerberos_service.md)
+- [启用 Kerberos](#enabling-kerberos)
+  - [启用 Kerberos 向导](#the-enable-kerberos-wizard)
+  - [REST API](#the-rest-api)
+  - [其他技术信息](#miscellaneous-technical-information)
+    - [密码生成](#password-generation)
+
+<a name="enabling-kerberos"></a>
+
+## 启用 Kerberos {#enabling-kerberos}
+
+可以使用 Ambari UI 中的 _启用 Kerberos 向导_ 或 REST API 为集群启用 Kerberos。
+
+<a name="the-enable-kerberos-wizard"></a>
+
+### 启用 Kerberos 向导 {#the-enable-kerberos-wizard}
+
+Ambari UI 中的 _启用 Kerberos 向导_ 提供易于使用的向导界面,引导用户完成启用 Kerberos 的过程。
+
+<a name="the-rest-api"></a>
+
+### REST API {#the-rest-api}
+
+可以使用 Ambari REST API 通过以下 API 调用启用 Kerberos:
+
+**_注意:_**
+
+- 根据需要修改身份验证凭据
+  - `curl ... -u username:password ...`
+  - 以下示例使用
+    - username: admin
+    - password: admin
+- 根据需要修改 Ambari Server 主机名和端口
+  - `curl ... http://HOST:PORT/api/v1/...`
+  - 以下示例使用
+    - HOST:  AMBARI_SERVER
+    - PORT: 8080
+- 根据需要修改集群名称
+  - `curl ... http://.../CLUSTER/...`
+  - 以下示例使用
+    - CLUSTER:  CLUSTER_NAME
+- @./payload 表示 payload 数据存储在文件中,而不是内联声明
+  - `curl ... -d @./payload ...`
+  - 以下示例使用 `./payload`,应将其替换为实际文件路径
+  - payload 文件的内容列在 curl 语句下方
+
+#### 将 KERBEROS 服务添加到集群 {#add-the-kerberos-service-to-cluster}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X POST http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services/KERBEROS
+```
+
+#### 将 KERBEROS_CLIENT 组件添加到 KERBEROS 服务 {#add-the-kerberos_client-component-to-the-kerberos-service}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X POST http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services/KERBEROS/components/KERBEROS_CLIENT
+```
+
+#### 创建并设置 KERBEROS 服务配置 {#create-and-set-kerberos-service-configurations}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d @./payload http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME
+```
+
+使用 MIT KDC 时的 payload 示例:
+
+```
+[
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "krb5-conf",
+        "tag": "version1",
+        "properties": {
+          "domains":"",
+          "manage_krb5_conf": "true",
+          "conf_dir":"/etc",
+          "content" : "[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FI [...]
+        }
+      }
+    }
+  },
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "kerberos-env",
+        "tag": "version1",
+        "properties": {
+          "kdc_type": "mit-kdc",
+          "manage_identities": "true",
+          "create_ambari_principal": "true",
+          "manage_auth_to_local": "true",
+          "install_packages": "true",
+          "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+          "realm" : "EXAMPLE.COM",
+          "kdc_hosts" : "FQDN.KDC.SERVER",
+          "master_kdc" : "FQDN.MASTER.KDC.SERVER",
+          "admin_server_host" : "FQDN.ADMIN.KDC.SERVER",
+          "executable_search_paths" : "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+          "service_check_principal_name" : "${cluster_name}-${short_date}",
+          "case_insensitive_username_rules" : "false"
+        }
+      }
+    }
+  }
+]
+```
+
+使用 Active Directory 时的 payload 示例:
+
+```
+[
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "krb5-conf",
+        "tag": "version1",
+        "properties": {
+          "domains":"",
+          "manage_krb5_conf": "true",
+          "conf_dir":"/etc",
+          "content" : "[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FI [...]
+        }
+      }
+    }
+  },
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "kerberos-env",
+        "tag": "version1",
+        "properties": {
+          "kdc_type": "active-directory",
+          "manage_identities": "true",
+          "create_ambari_principal": "true",
+          "manage_auth_to_local": "true",
+          "install_packages": "true",
+          "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+          "realm" : "EXAMPLE.COM",
+          "kdc_hosts" : "FQDN.AD.SERVER",
+          "master_kdc" : "FQDN.MASTER.AD.SERVER",
+          "admin_server_host" : "FQDN.AD.SERVER",
+          "ldap_url" : "LDAPS://AD_HOST:PORT",
+          "container_dn" : "OU=....,....",
+          "executable_search_paths" : "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+          "password_length": "20",
+          "password_min_lowercase_letters": "1",
+          "password_min_uppercase_letters": "1",
+          "password_min_digits": "1",
+          "password_min_punctuation": "1",
+          "password_min_whitespace": "0",
+          "service_check_principal_name" : "${cluster_name}-${short_date}",
+          "case_insensitive_username_rules" : "false",
+          "create_attributes_template" :  "{\n \"objectClass\": [\"top\", \"person\", \"organizationalPerson\", \"user\"],\n \"cn\": \"$principal_name\",\n #if( $is_service )\n \"servicePrincipalName\": \"$principal_name\",\n #end\n \"userPrincipalName\": \"$normalized_principal\",\n \"unicodePwd\": \"$password\",\n \"accountExpires\": \"0\",\n \"userAccountControl\": \"66048\"}"
+        }
+      }
+    }
+  }
+]
+```
+使用 IPA 时的 payload 示例:
+
+```
+[
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "krb5-conf",
+        "tag": "version1",
+        "properties": {
+          "domains":"",
+          "manage_krb5_conf": "true",
+          "conf_dir":"/etc",
+          "content" : "[libdefaults]\n  renew_lifetime = 7d\n  forwardable = true\n  default_realm = {{realm}}\n  ticket_lifetime = 24h\n  dns_lookup_realm = false\n  dns_lookup_kdc = false\n  default_ccache_name = /tmp/krb5cc_%{uid}\n  #default_tgs_enctypes = {{encryption_types}}\n  #default_tkt_enctypes = {{encryption_types}}\n{% if domains %}\n[domain_realm]\n{%- for domain in domains.split(',') %}\n  {{domain|trim()}} = {{realm}}\n{%- endfor %}\n{% endif %}\n[logging]\n  default = FI [...]
+        }
+      }
+    }
+  },
+  {
+    "Clusters": {
+      "desired_config": {
+        "type": "kerberos-env",
+        "tag": "version1",
+        "properties": {
+          "kdc_type": "ipa",
+          "manage_identities": "true",
+          "create_ambari_principal": "true",
+          "manage_auth_to_local": "true",
+          "install_packages": "true",
+          "encryption_types": "aes des3-cbc-sha1 rc4 des-cbc-md5",
+          "realm" : "EXAMPLE.COM",
+          "kdc_hosts" : "FQDN.KDC.SERVER",
+          "master_kdc" : "FQDN.MASTER.KDC.SERVER",
+          "admin_server_host" : "FQDN.ADMIN.KDC.SERVER",
+          "executable_search_paths" : "/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin",
+          "service_check_principal_name" : "${cluster_name}-${short_date}",
+          "case_insensitive_username_rules" : "false"
+        }
+      }
+    }
+  }
+]
+```
+
+#### 创建 KERBEROS_CLIENT 主机组件 {#create-the-kerberos_client-host-components}
+_对每台主机执行一次,将 HOST_NAME 替换为实际值_
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X POST -d '{"host_components" : [{"HostRoles" : {"component_name":"KERBEROS_CLIENT"}}]}' http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/hosts?Hosts/host_name=HOST_NAME
+```
+
+#### 安装 KERBEROS 服务和组件 {#install-the-kerberos-service-and-components}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}' http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services/KERBEROS
+```
+
+#### 停止所有服务 {#stop-all-services}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d  '{"RequestInfo":{"context":"Stop Service"},"Body":{"ServiceInfo":{"state":"INSTALLED"}}}' http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services
+```
+
+#### 获取默认 Kerberos 描述符 {#get-the-default-kerberos-descriptor}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X GET http://AMBARI_SERVER:8080/api/v1/stacks/STACK_NAME/versions/STACK_VERSION/artifacts/kerberos_descriptor
+```
+
+#### 获取自定义 Kerberos 描述符(如果之前已设置) {#get-the-customized-kerberos-descriptor-if-previously-set}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X GET http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/artifacts/kerberos_descriptor
+```
+
+#### 设置 Kerberos 描述符 {#set-the-kerberos-descriptor}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X POST -d @./payload http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/artifacts/kerberos_descriptor
+```
+
+Payload:
+
+```
+{
+  "artifact_data" : {
+    ... 
+  } 
+}
+```
+
+**_注意:_** Kerberos 描述符 payload 可以是完整的 Kerberos 描述符,也可以只是叠加到默认 Kerberos 描述符上的更新内容。
+
+#### 设置 KDC 管理员凭据 {#set-the-kdc-administrator-credentials}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X POST -d @./payload http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/credentials/kdc.admin.credential
+```
+
+Payload:
+
+```
+{
+  "Credential" : {
+    "principal" : "admin/admin@EXAMPLE.COM",
+    "key" : "h4d00p&!",
+    "type" : "temporary"
+  }
+}
+```
+
+**_注意:_** 应更新 _principal_ 和 _key_(密码)值,使其与 KDC 管理员账号的正确凭据匹配。
+
+**_注意:_** `type` 值可以是 `temporary` 或 `persisted`;但是,只有在之前已设置 Ambari 凭据存储时,该值才能为 `persisted`。
+
+#### 启用 Kerberos {#enable-kerberos}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d @./payload http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME
+```
+
+Payload
+
+```
+{
+  "Clusters": {
+    "security_type" : "KERBEROS"
+  }
+}
+```
+
+#### 启动所有服务 {#start-all-services}
+
+```
+curl -H "X-Requested-By:ambari" -u admin:admin -i -X PUT -d '{"ServiceInfo": {"state" : "STARTED"}}' http://AMBARI_SERVER:8080/api/v1/clusters/CLUSTER_NAME/services
+```
+
+<a name="miscellaneous-technical-information"></a>
+
+### 其他技术信息 {#miscellaneous-technical-information}
+
+<a name="password-generation"></a>
+
+#### 密码生成 {#password-generation}
+
+使用 Active Directory 启用 Kerberos 时,Ambari 必须使用内部机制构建 keytab 文件。这是因为无法从 Active Directory 远程请求 keytab 文件。为了创建 keytab 文件,Ambari 需要知道每个相关 Kerberos 身份的密码。因此,Ambari 会根据需要设置或更新身份密码。
+
+Active Directory 中每个由 Ambari 管理的账号的密码都是随机生成的,并且仅在内存中保存到设置账号密码和生成 keytab 文件所需的时间。密码使用以下可由用户设置的参数生成:
+
+- Password length (`kerberos-env/password_length`)
+  - 默认值:20
+- Minimum number of lower-cased letters (`kerberos-env/password_min_lowercase_letters`)
+  - 默认值:1
+  - 字符集:`abcdefghijklmnopqrstuvwxyz`
+- Minimum number of upper-cased letters (`kerberos-env/password_min_uppercase_letters`)
+  - 默认值:1
+  - 字符集:`ABCDEFGHIJKLMNOPQRSTUVWXYZ`
+- Minimum number of digits (`kerberos-env/password_min_digits`)
+  - 默认值:1
+  - 字符集:`1234567890`
+- Minimum number of punctuation characters (`kerberos-env/password_min_punctuation`)
+  - 默认值:1
+  - 字符集:`?.!$%^*()-_+=~`
+- Minimum number of whitespace characters (`kerberos-env/password_min_whitespace`)
+  - 默认值:0
+  - 字符集:`(space character)`
+
+执行以下算法:
+
+1. 创建一个用于存储密码字符的数组
+2. 对每个字符类别(大写字母、小写字母、数字……),从相应字符集中随机选择所需的最少数量,并存入数组
+3. 对于预期密码长度与已收集字符数之差,从随机选择的字符类别中随机选择字符,并存入数组,直到达到该数量
+4. 按预期密码长度从数组中随机取出字符,并追加到密码结果
+5. 返回生成的密码
+
+使用 `java.security.SecureRandom` 类的静态实例([http://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html](http://docs.oracle.com/javase/7/docs/api/java/security/SecureRandom.html))生成用于标识字符集内索引的随机整数。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/index.md
new file mode 100644
index 0000000..73c517b
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/index.md
@@ -0,0 +1,86 @@
+---
+slug: /kerberos
+title: Ambari Kerberos 自动化
+---
+
+<!-- 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 t [...]
+
+# Ambari Kerberos 自动化 {#ambari-kerberos-automation}
+
+- [简介](#introduction)
+  - [工作原理](#how-it-works)
+  - [启用 Kerberos](#enabling-kerberos)
+  - [添加组件](#adding-components)
+  - [添加主机](#adding-hosts)
+  - [重新生成 Keytab](#regenerating-keytabs)
+  - [禁用 Kerberos](#disabling-kerberos)
+- [Kerberos 描述符](kerberos_descriptor.md)
+- [Kerberos 服务](kerberos_service.md)
+- [启用 Kerberos](enabling_kerberos.md)
+
+<a name="introduction"></a>
+
+## 简介 {#introduction}
+
+在 Ambari 2.0.0 之前,要配置 Ambari 集群使用 Kerberos,需要在每台主机上设置 Kerberos 客户端基础设施、创建所需身份、生成并分发所需的 keytab 文件,以及更新必要的配置属性。对于小型集群,这项工作似乎并不繁重;但是,随着集群规模扩大,所需工作量也会增加。
+
+Ambari 的 Kerberos 自动化功能正可以解决这个问题。它会执行所有这些步骤,并帮助在添加新服务和主机时维护集群。
+
+Kerberos 自动化既可以通过 Ambari REST API 调用,也可以通过 Ambari UI 中的 _启用 Kerberos 向导_ 调用。
+
+<a name="how-it-works"></a>
+
+### 工作原理 {#how-it-works}
+
+能够使用 Kerberos 凭据进行身份验证的 Stack 和服务必须提供 Kerberos 描述符,声明所需的 Kerberos 身份以及更新配置的方式。Ambari 基础设施利用这些数据和管理员应用的任何更新,执行初始启用 Kerberos、为主机和新增组件启用 Kerberos、重新生成凭据以及禁用 Kerberos 等相关操作。
+
+需要注意的是,在执行任何自动化任务之前,必须先在集群的所有主机上安装 Kerberos 服务。如果使用 Ambari UI,这应作为启用 Kerberos 向导流程的一部分完成。
+
+<a name="enabling-kerberos"></a>
+
+### 启用 Kerberos {#enabling-kerberos}
+
+启用 Kerberos 时,集群中的所有服务都应处于停止状态。主要原因是避免服务停止后、集群切换为使用 Kerberos 并重新启动服务时出现状态问题。
+
+批量为集群启用 Kerberos 时会执行以下步骤:
+
+1. 在配置的 KDC(或 Active Directory)中创建或更新账号
+2. 生成 keytab 文件并将其分发到适当的主机
+3. 更新相关配置
+
+<a name="adding-components"></a>
+
+### 添加组件 {#adding-components}
+
+如果 Ambari 集群已启用 Kerberos,每当添加新组件时,都会自动为新组件配置 Kerberos,并根据需要创建和分发所需的 principal 和 keytab 文件。
+
+每个新组件安装并启动前会执行以下步骤:
+
+1. 更新相关配置
+2. 在配置的 KDC(或 Active Directory)中创建或更新账号
+3. 生成 keytab 文件并将其分发到适当的主机
+
+<a name="adding-hosts"></a>
+
+### 添加主机 {#adding-hosts}
+
+添加新主机时,必须在该主机上安装 Kerberos 客户端。这不会自动发生;但是,如果 Ambari 集群已启用 Kerberos,Ambari UI 中的 _添加主机向导_ 会执行此步骤。添加主机后,通常会在其上安装一个或多个组件,请参阅[添加组件](#adding-components)。
+
+<a name="regenerating-keytabs"></a>
+
+### 重新生成 Keytab {#regenerating-keytabs}
+
+集群启用 Kerberos 后,可能需要重新生成 keytab。可以采用以下两种模式之一:
+
+- `all`:创建缺失的 principal,并无条件更新现有 principal 的密码,然后创建并分发所有相关 keytab 文件
+- `missing`:创建缺失的 principal,然后为新创建的 principal 创建并分发 keytab 文件
+
+无论采用哪种模式,重新生成过程完成后都应重启受影响的服务。
+
+通过 Ambari UI 执行时,系统会询问用户要使用哪种 keytab 重新生成模式,以及是否重启服务。
+
+<a name="disabling-kerberos"></a>
+
+### 禁用 Kerberos {#disabling-kerberos}
+
+如果需要从 Ambari 集群中移除 Kerberos,Ambari 会删除受其管理的 Kerberos 身份、keytab 文件和 Kerberos 专用配置。Ambari UI 会执行停止和启动服务以及删除 Kerberos 服务的步骤;但是,如果使用 Ambari REST API,则需要手动完成这些操作。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_descriptor.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_descriptor.md
new file mode 100644
index 0000000..43a8c58
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_descriptor.md
@@ -0,0 +1,746 @@
+---
+title: Kerberos 描述符
+---
+
+<!---
+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.
+-->
+
+- [简介](index.md)
+- [Kerberos 描述符](#the-kerberos-descriptor)
+  - [Components of a Kerberos Descriptor](#components-of-a-kerberos-descriptor)
+    - [Stack-level Properties](#stack-level-properties)
+    - [Stack-level Identities](#stack-level-identities)
+    - [Stack-level Auth-to-local-properties](#stack-level-auth-to-local-properties)
+    - [Stack-level Configurations](#stack-level-configurations)
+    - [Services](#services)
+    - [Service-level Identities](#service-level-identities)
+    - [Service-level Auth-to-local-properties](#service-level-auth-to-local-properties)
+    - [Service-level Configurations](#service-level-configurations)
+    - [Components](#components)
+    - [Component-level Identities](#component-level-identities)
+    - [Component-level Auth-to-local-properties](#component-level-auth-to-local-properties)
+    - [Component-level Configurations](#component-level-configurations)
+  - [Kerberos Descriptor specifications](#kerberos-descriptor-specifications)
+    - [properties](#properties)
+    - [auth-to-local-properties](#auth-to-local-properties)
+    - [configurations](#configurations)
+    - [identities](#identities)
+    - [principal](#principal)
+    - [keytab](#keytab)
+    - [services](#services)
+    - [components](#components)
+  - [Examples](#examples)
+- [Kerberos 服务](kerberos_service.md)
+- [启用 Kerberos](enabling_kerberos.md)
+
+<a name="the-kerberos-descriptor"></a>
+
+## Kerberos 描述符 {#the-kerberos-descriptor}
+
+Kerberos 描述符是 JSON 格式的文本文件,包含 Ambari 为 Stack 及其服务启用或禁用 Kerberos 所需的信息。该文件必须命名为 **_kerberos.json_**,并应位于相关 Stack 或服务定义的根目录中。Kerberos 描述符采用层次结构,服务级描述符中的详细信息可以覆盖(或更新)Stack 级描述符中的详细信息。
+
+要为 Stack 中的服务启用 Kerberos,必须存在 Stack 级 Kerberos 描述符。即使通用服务拥有 Kerberos 描述符,只有相关 Stack 通过 Stack 级 Kerberos 描述符表明支持 Kerberos 时,才能为其启用 Kerberos。
+
+要为服务的组件启用 Kerberos,该组件必须在所属服务的服务级描述符中有条目。这允许自动化 Kerberos 功能管理服务的部分组件,同时忽略该服务的其他组件。
+
+Kerberos 描述符继承自基础 Stack 或服务,但只能作为完整描述符覆盖,不允许使用部分描述符。
+
+完整描述符(由 Stack 级描述符、服务级描述符以及用户输入的更新构建)具有以下结构:
+
+- Stack-level Properties
+- Stack-level Identities
+- Stack-level Configurations
+- Stack-level Auth-to-local-properties
+- Services
+  - Service-level Identities
+  - Service-level Auth-to-local-properties
+  - Service-level Configurations
+  - Components
+    - Component-level Identities
+    - Component-level Auth-to-local-properties
+    - Component-level Configurations
+
+描述符的每一层都继承父级数据,但必要时可以覆盖这些数据。例如,组件会继承其所属服务的配置和身份,而该服务又继承 Stack 的配置和身份。
+
+<a name="components-of-a-kerberos-descriptor"></a>
+
+### Kerberos 描述符的组成部分 {#components-of-a-kerberos-descriptor}
+
+<a name="stack-level-properties"></a>
+
+#### Stack 级属性 {#stack-level-properties}
+
+Stack 级属性是一组可选的名称/值对,可用于变量替换。例如,如果存在名为 `**_property1_**` 且值为 `**_value1_**` 的属性,则配置属性名称或值中的任何 `**_${property1}_**` 都会替换为 `**_value1_**`。
+
+此属性仅适用于 Stack 级 Kerberos 描述符,不能被较低级别的描述符覆盖。
+
+请参阅 [properties](#properties)。
+
+<a name="stack-level-identities"></a>
+
+#### Stack 级身份 {#stack-level-identities}
+
+Stack 级身份是一个可选的身份块,其中包含零个或多个身份描述符列表,这些身份在 Stack 的所有服务之间通用。此类身份的示例是 Ambari smoke test 用户,所有服务都使用它执行服务检查操作。服务级和组件级身份可以通过在身份名称前加正斜杠(/)来引用并专门化 Stack 级身份。例如,如果存在名为 "smokeuser" 的 Stack 级身份,服务或组件可以声明 "**_reference_**" 属性并将其设置为 "/smokeuser",从而创建引用并专门化该身份的身份块。在此身份块中,可以按需覆盖身份的详细信息。这不会修改 Stack 级身份,而是创建其副本并更新副本的属性。
+
+请参阅 [identities](#identities)。
+
+<a name="stack-level-auth-to-local-properties"></a>
+
+#### Stack 级 Auth-to-local 属性 {#stack-level-auth-to-local-properties}
+
+Stack 级 auth-to-local-properties 是一个可选列表,其中包含零个或多个配置属性规范 `(config-type/property_name[|concatenation_scheme])`,用于指示哪些属性应使用动态生成的 auth-to-local 规则集进行更新。
+
+请参阅 [auth-to-local-properties](#auth-to-local-properties)。
+
+<a name="stack-level-configurations"></a>
+
+#### Stack 级配置 {#stack-level-configurations}
+
+Stack 级 configurations 是一个可选配置块,其中包含零个或多个配置描述符列表,这些描述符在 Stack 的所有服务之间通用。由于数据结构的特性,配置描述符可以被覆盖。但是,覆盖配置属性可能造成非预期行为,因为在 Kerberization 过程完成之前无法确定属性的值。
+
+请参阅 [configurations](#configurations)。
+
+<a name="services"></a>
+
+#### 服务 {#services}
+
+Services 是零个或多个服务描述符的列表。Stack 级 Kerberos Descriptor 不应列出任何服务;但是,服务级 Kerberos Descriptor 至少应包含一个服务。
+
+请参阅 [services](#services)。
+
+<a name="service-level-identities"></a>
+
+#### 服务级身份 {#service-level-identities}
+
+服务级 identities 是一个可选身份块,其中包含零个或多个身份描述符列表,这些身份在服务的所有组件之间通用。组件级身份可以通过指定相对或绝对路径来引用并专门化服务级身份。
+
+例如,如果存在名为 "service_identity" 的服务级身份,子组件可以将其 "reference" 属性设置为 "../service_identity" 或 "/service_name/service_identity",并按需覆盖值,以创建引用并专门化该身份的身份块。这不会覆盖服务级身份,而是创建其副本并更新副本的属性。
+
+##### Examples {#examples}
+
+```
+{
+  "name" : "relative_path_example",
+  "reference" : "../service_identity",
+  ...
+}
+```
+
+```
+{
+  "name" : "absolute_path_example",
+  "reference" : "/SERVICE/service_identity",
+  ...
+}
+```
+
+**注意**:使用身份的绝对路径后,任何其他服务或组件都可以引用任意服务级身份。
+
+请参阅 [identities](#identities)。
+
+<a name="service-level-auth-to-local-properties"></a>
+
+#### 服务级 Auth-to-local 属性 {#service-level-auth-to-local-properties}
+
+服务级 auth-to-local-properties 是一个可选列表,其中包含零个或多个配置属性规范 `(config-type/property_name[|concatenation_scheme])`,用于指示哪些属性应使用动态生成的 auth-to-local 规则集进行更新。
+
+请参阅 [auth-to-local-properties](#auth-to-local-properties)。
+
+<a name="service-level-configurations"></a>
+
+#### 服务级配置 {#service-level-configurations}
+
+服务级 configurations 是一个可选配置块,其中列出零个或多个配置描述符,这些描述符在服务内的所有组件之间通用。由于数据结构的特性,配置描述符可以被覆盖。但是,覆盖配置属性可能造成非预期行为,因为在 Kerberization 过程完成之前无法确定属性的值。
+
+请参阅 [configurations](#configurations)。
+
+<a name="service-components"></a>
+
+#### 组件 {#components}
+
+Components 是零个或多个组件描述符块的列表。
+
+请参阅 [components](#components)。
+
+<a name="component-level-identities"></a>
+
+#### 组件级身份 {#component-level-identities}
+
+组件级 identities 是一个可选身份块,其中包含零个或多个专属于该组件的身份描述符列表。组件级身份可以使用其绝对路径(`/service_name/component_name/identity_name`)进行引用(和专门化)。这不会覆盖组件级身份,而是创建其副本并更新副本的属性。
+
+请参阅 [identities](#identities)。
+
+<a name="component-level-auth-to-local-properties"></a>
+
+#### 组件级 Auth-to-local 属性 {#component-level-auth-to-local-properties}
+
+组件级 auth-to-local-properties 是一个可选列表,其中包含零个或多个配置属性规范 `(config-type/property_name[|concatenation_scheme])`,用于指示哪些属性应使用动态生成的 auth-to-local 规则集进行更新。
+
+请参阅 [auth-to-local-properties](#auth-to-local-properties)。
+
+<a name="component-level-configurations"></a>
+
+#### 组件级配置 {#component-level-configurations}
+
+组件级 configurations 是一个可选配置块,其中列出零个或多个专属于该组件的配置描述符。
+
+请参阅 [configurations](#configurations)。
+
+### Kerberos 描述符规范 {#kerberos-descriptor-specifications}
+
+<a name="properties"></a>
+
+#### properties {#properties}
+
+`properties` 块仅在服务级 Kerberos Descriptor 文件中有效。该块由以下名称/值对组成:
+
+```
+"properties" : {
+  "property_1" : "value_1",
+  "property_2" : "value_2",
+  ...
+}
+```
+
+<a name="auth-to-local-properties"></a>
+
+#### auth-to-local-properties {#auth-to-local-properties}
+
+`auth-to-local-properties` 块可用于 Stack 级、服务级和组件级描述符。该块是配置规范列表(`config-type/property_name[|concatenation_scheme]`),用于指示哪些属性包含应根据 Kerberized 集群中所用身份动态更新的 auth-to-local 规则。
+
+该规范可以选择声明将规则追加到规则集值时使用的连接方案。指定时可设置以下方案之一:
+
+- **`new_lines`** - 规则集中的规则以换行符(`\n`)分隔
+- **`new_lines_escaped`** - 规则集中的规则以 `\` 和换行符(`\n`)分隔
+- **`spaces`** - 规则集中的规则以空白字符分隔(实际上将所有规则放在同一行)
+
+如果未指定,默认连接方案为 `new_lines`。
+
+```
+"auth-to-local-properties" : [
+  "core-site/hadoop.security.auth_to_local",
+  "service.properties/http.authentication.kerberos.name.rules|new_lines_escaped",
+  ...
+]
+```
+
+<a name="configurations"></a>
+
+#### configurations {#configurations}
+
+Stack 级、服务级和组件级描述符中可以存在 `configurations` 块。该块是一个或多个配置块的列表,每个配置块包含一个以配置类型命名的结构,其中包含各相关属性的值。
+
+每个属性名称和值可以是具体值,也可以包含使用 Stack 级 `properties` 块或任何可用配置中的值替换的变量。`properties` 块中的属性按名称(`${property_name}`)引用,配置属性按配置规范(`${config-type/property_name}`)引用,Kerberos principal 按 principal 路径(`principals/SERVICE/COMPONENT/principal_name`)引用。
+
+```
+"configurations" : [
+  {
+    "config-type-1" : {
+      "${cluster-env/smokeuser}_property" : "value1",
+      "some_realm_property" : "${realm}",
+       ...
+    }
+  },
+  {
+    "config-type-2" : {
+      "property-2" : "${cluster-env/smokeuser}",
+      ...
+    }
+  },
+  ...
+]
+```
+
+If `cluster-env/smokuser` was `"ambari-qa"` and realm was `"EXAMPLE.COM"`, the above block would effectively be translated to
+
+```
+"configurations" : [
+  {
+    "config-type-1" : {
+      "ambari-qa_property" : "value1",
+      "some_realm_property" : "EXAMPLE.COM",
+      ...
+    }
+  },
+  {
+    "config-type-2" : {
+      "property-2" : "ambari-qa",
+      ...
+    }
+  },
+  ...
+]
+```
+
+<a name="identities"></a>
+
+#### identities {#identities}
+
+Stack 级、服务级和组件级描述符中可以存在 `identities` 描述符。该块是零个或多个身份描述符的列表。每个身份描述符都是一个块,包含 `name`、可选的 `reference` 标识符、可选的 `principal` 描述符和可选的 `keytab` 描述符。
+
+`name` 属性应是 `identity` 描述符在其 `local` 作用域(Stack、服务或组件)内唯一的具体名称。但是,为保持与旧版 Ambari 的向后兼容,它也可以是 Kerberos Descriptor 中其他身份的引用标识符。此功能已弃用,未来版本的 Ambari 可能不再提供。
+
+`reference` 属性是 `identitiy` 描述符的可选属性。如果存在,则表示使用被引用身份的属性作为当前身份的基础,当前身份块中指定的属性会覆盖基础数据。在这种情况下,基础数据会复制到本地身份,因此更改只在本地生效,而不是全局生效。被引用身份可以是分层的,一个被引用身份还可以引用另一个身份,依此类推。因此必须注意避免创建循环引用。引用值必须是被引用身份描述符的相对或绝对 _path_。相对 _path_ 以 `../` 开头,可在组件级身份描述符中用于引用父服务中的身份描述符。绝对 _path_ 以 `/` 开头,可在任意级别按以下方式使用:
+
+- **Stack-level** identity reference: `/identitiy_name`
+- **Service-level** identity reference: `/SERVICE_NAME/identitiy_name`
+- **Component-level** identity reference: `/SERVICE_NAME/COMPONENT_NAME/identitiy_name`
+
+```
+"identities" : [
+  {
+    "name" : "local_identity",
+    "principal" : {
+      ...
+    },
+    "keytab" : {
+      ...
+    }
+  },
+  {
+    "name" : "/smokeuser",
+    "principal" : {
+      "configuration" : "service-site/principal_property_name"
+    },
+    "keytab" : {
+      "configuration" : "service-site/keytab_property_name"
+    }
+  },
+  ...
+]
+```
+
+<a name="principal"></a>
+
+#### principal {#principal}
+
+`principal` 块是 `identity` 描述符块中的可选块。它声明身份 principal 的详细信息,包括 principal 的 `value`、`type`(user 或 service)、相关 `configuration` 属性和本地用户名映射。所有属性都是可选的;但是,如果所有属性都没有可用的基础值或默认值(通过父身份的 `reference` 值提供),则可以忽略该 principal。
+
+principal 的 `value` 属性应为规范化的 principal 名称,其中包含 principal 的组件和 realm。大多数情况下,应使用 realm 变量(`${realm}` 或 `${kerberos-env/realm}`)指定 realm。此外,对于 service principal,应使用 "`_HOST`" 表示相关主机名。通常,代理端脚本或服务本身会将此值替换为当前主机的主机名。但是,如果该服务在代理端无法进行 "`_HOST`" 替换,则可以使用内置主机名变量(`${hostname}`)。示例:`smokeuser@${realm}`、`service/_HOST@${realm}`。
+
+principal 的 `type` 属性可以是 `user` 或 `service`。如果未指定,则默认为 `user`。此值决定如何在 KDC 或 Active Directory 中创建身份。在 Active Directory 场景中,由于帐户创建方式不同,这一点尤其重要。它还会告知 Ambari 如何处理 principal 和相关 keytab 文件,包括用户界面行为和数据缓存。
+
+`configuration` 属性是可选的配置规范(`config-type/property_name`),其值将设置为该 principal 的 `value`(替换变量后)。
+
+如果提供 `local_username` 属性,它会指示为此身份生成 auth-to-local 规则时使用哪个本地用户帐户。如果未指定,则不会生成显式的 auth-to-local 规则。
+
+```
+"principal" : {
+  "value": "${cluster-env/smokeuser}@${realm}",
+  "type" : "user" ,
+  "configuration": "cluster-env/smokeuser_principal_name",
+  "local_username" : "${cluster-env/smokeuser}"
+}
+```
+
+```
+"principal" : {
+  "value": "component1/_HOST@${realm}",
+  "type" : "service" ,
+  "configuration": "service-site/component1.principal"
+}
+```
+
+<a name="keytab"></a>
+
+#### keytab {#keytab}
+
+`keytab` 块是 `identity` 描述符块中的可选块。它描述如何创建和存储相关 keytab 文件。该块声明 keytab 文件在目标主机本地文件系统中的路径、为该文件分配的权限以及相关配置属性。
+
+`file` 属性声明将 keytab 文件分发到相关主机时用于存储它的绝对路径。如果未提供此属性,则不会创建 keytab 文件。
+
+`owner` 属性是可选块,指定作为文件所有者的本地用户帐户,以及授予该用户的访问权限(`"rw"` - 读/写;`"r"` - 只读)。默认情况下,所有者获得只读权限。
+
+`group` 属性是可选块,指定作为文件组所有者的本地组,以及授予该组中本地用户帐户的访问权限(`"rw"` - 读/写;`"r"` - 只读;`“”` - 无访问权限)。默认情况下,该组没有访问权限。
+
+`configuration` 属性是可选的配置规范(`config-type/property_name`),其值将设置为此 keytab 文件的路径(替换变量后)。
+
+```
+"keytab" : {
+  "file": "${keytab_dir}/smokeuser.headless.keytab",
+  "owner": {
+    "name": "${cluster-env/smokeuser}",
+    "access": "r"
+  },
+  "group": {
+    "name": "${cluster-env/user_group}",
+    "access": "r"
+  },
+  "configuration": "${cluster-env/smokeuser_keytab}"
+}
+```
+
+<a name="services"></a>
+
+#### services {#services-1}
+
+Stack 级和服务级 Kerberos Descriptor 文件中可以存在 `services` 块。该块是要添加到 Kerberos Descriptor 的零个或多个服务描述符列表。
+
+每个服务块包含服务 `name`,以及可选的 `identities`、`auth_to_local_properties`、`configurations` 和 `components` 块。
+
+```
+"services": [
+  {
+    "name": "SERVICE1_NAME",
+    "identities": [
+      ...
+    ],
+    "auth_to_local_properties" : [
+      ...
+    ],
+    "configurations": [
+      ...
+    ],
+    "components": [
+      ...
+    ]
+  },
+  {
+    "name": "SERVICE2_NAME",
+    "identities": [
+      ...
+    ],
+    "auth_to_local_properties" : [
+      ...
+    ],
+    "configurations": [
+      ...
+    ],
+    "components": [
+      ...
+    ]
+  },
+  …
+]
+```
+
+<a name="components"></a>
+
+#### components {#components-1}
+
+`service` 描述符块中可以存在 `components` 块。该块是属于所含服务描述符的零个或多个组件描述符列表。每个组件描述符都是一个块,包含组件 `name` 以及可选的 `identities`、`auth_to_local_properties` 和 `configurations` 块。
+
+```
+"components": [
+  {
+    "name": "COMPONENT_NAME",
+    "identities": [
+      ...
+    ],
+    "auth_to_local_properties" : [
+      ...
+    ],
+    "configurations": [
+      ...
+    ]
+  },
+  ...
+]
+```
+
+<a name="examples"></a>
+
+### 示例 {#examples-1}
+
+#### Example Stack-level Kerberos Descriptor {#example-stack-level-kerberos-descriptor}
+
+以下示例附有用于说明的注释。这些注释在实际的 JSON 格式文件中无效。
+
+```
+{
+  // Properties that can be used in variable replacement operations.
+  // For example, ${keytab_dir} will resolve to "/etc/security/keytabs".
+  // Since variable replacement is recursive, ${realm} will resolve
+  // to ${kerberos-env/realm}, which in-turn will resolve to the
+  // declared default realm for the cluster
+  "properties": {
+    "realm": "${kerberos-env/realm}",
+    "keytab_dir": "/etc/security/keytabs"
+  },
+  // A list of global Kerberos identities. These may be referenced
+  // using /identity_name. For example the “spnego” identity may be
+  // referenced using “/spnego”
+  "identities": [
+    {
+      "name": "spnego",
+      // Details about this identity's principal. This instance does not
+      // declare any value for configuration or local username. That is
+      // left up to the services and components use wish to reference
+      // this principal and set overrides for those values.
+      "principal": {
+        "value": "HTTP/_HOST@${realm}",
+        "type" : "service"
+      },
+      // Details about this identity’s keytab file. This keytab file
+      // will be created in the configured keytab file directory with
+      // read-only access granted to root and users in the cluster’s
+      // default user group (typically, hadoop). To ensure that only
+      // a single copy exists on the file system, references to this
+      // identity should not override the keytab file details;
+      // however if it is desired that multiple keytab files are
+      // created, these values may be overridden in a reference
+      // within a service or component. Since no configuration
+      // specification is set, the the keytab file location will not
+      // be set in any configuration file by default. Services and
+      // components need to reference this identity to update this
+      // value as needed.
+      "keytab": {
+        "file": "${keytab_dir}/spnego.service.keytab",
+        "owner": {
+          "name": "root",
+          "access": "r"
+        },
+        "group": {
+          "name": "${cluster-env/user_group}",
+          "access": "r"
+        }
+      }
+    },
+    {
+      "name": "smokeuser",
+      // Details about this identity's principal. This instance declares
+      // a configuration and local username mapping. Services and
+      // components can override this to set additional configurations
+      // that should be set to this principal value.  Overriding the
+      // local username may create undesired behavior since there may be
+      // conflicting entries in relevant auth-to-local rule sets.
+      "principal": {
+        "value": "${cluster-env/smokeuser}@${realm}",
+        "type" : "user",
+        "configuration": "cluster-env/smokeuser_principal_name",
+        "local_username" : "${cluster-env/smokeuser}"
+      },
+      // Details about this identity’s keytab file. This keytab file
+      // will be created in the configured keytab file directory with
+      // read-only access granted to the configured smoke user
+      // (typically ambari-qa) and users in the cluster’s default
+      // user group (typically hadoop). To ensure that only a single
+      // copy exists on the file system, references to this identity
+      // should not override the keytab file details; however if it
+      // is desired that multiple keytab files are created, these
+      // values may be overridden in a reference within a service or
+      // component.
+      "keytab": {
+        "file": "${keytab_dir}/smokeuser.headless.keytab",
+        "owner": {
+          "name": "${cluster-env/smokeuser}",
+          "access": "r"
+        },
+        "group": {
+          "name": "${cluster-env/user_group}",
+          "access": "r"
+        },
+        "configuration": "cluster-env/smokeuser_keytab"
+      }
+    }
+  ]
+}
+```
+
+#### 服务级 Kerberos Descriptor 示例 {#example-service-level-kerberos-descriptor}
+
+以下示例附有用于说明的注释。这些注释在实际的 JSON 格式文件中无效。
+
+```
+{
+  // One or more services may be listed in a service-level Kerberos
+  // Descriptor file
+  "services": [
+    {
+      "name": "SERVICE_1",
+      // Service-level identities to be created if this service is installed.
+      // Any relevant keytab files will be distributed to hosts with at least
+      // one of the components on it.
+      "identities": [
+        // Service-specific identity declaration, declaring all properties
+        // needed initiate the creation of the principal and keytab files,
+        // as well as setting the service-specific  configurations.  This may
+        // be referenced by contained components using ../service1_identity.
+        {
+          "name": "service1_identity",
+          "principal": {
+            "value": "service1/_HOST@${realm}",
+            "type" : "service",
+            "configuration": "service1-site/service1.principal"
+          },
+          "keytab": {
+            "file": "${keytab_dir}/service1.service.keytab",
+            "owner": {
+              "name": "${service1-env/service_user}",
+              "access": "r"
+            },
+            "group": {
+              "name": "${cluster-env/user_group}",
+              "access": "r"
+            },
+            "configuration": "service1-site/service1.keytab.file"
+          }
+        },
+        // Service-level identity referencing the stack-level spnego
+        // identity and overriding the principal and keytab configuration
+        // specifications.
+        {
+          "name": "service1_spnego",
+          "reference": "/spnego",
+          "principal": {
+            "configuration": "service1-site/service1.web.principal"
+          },
+          "keytab": {
+            "configuration": "service1-site/service1.web.keytab.file"
+          }
+        },
+        // Service-level identity referencing the stack-level smokeuser
+        // identity. No properties are being overridden and overriding
+        // the principal and keytab configuration specifications.
+        // This ensures that the smokeuser principal is created and its
+        // keytab file is distributed to all hosts where components of this
+        // this service are installed.
+        {
+          "name": "service1_smokeuser",
+          "reference": "/smokeuser"
+        }
+      ],
+      // Properties related to this service that require the auth-to-local
+      // rules to be dynamically generated based on identities create for
+      // the cluster.
+      "auth_to_local_properties" : [
+        "service1-site/security.auth_to_local"
+      ],
+      // Configuration properties to be set when this service is installed,
+      // no matter which components are installed
+      "configurations": [
+        {
+          "service-site": {
+            "service1.security.authentication": "kerberos",
+            "service1.security.auth_to_local": ""
+          }
+        }
+      ],
+      // A list of components related to this service
+      "components": [
+        {
+          "name": "COMPONENT_1",
+          // Component-specific identities to be created when this component
+          // is installed.  Any keytab files specified will be distributed
+          // only to the hosts where this component is installed.
+          "identities": [
+            // An identity "local" to this component
+            {
+              "name": "component1_service_identity",
+              "principal": {
+                "value": "component1/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "service1-site/comp1.principal",
+                "local_username" : "${service1-env/service_user}"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/s1c1.service.keytab",
+                "owner": {
+                  "name": "${service1-env/service_user}",
+                  "access": "r"
+                },
+                "group": {
+                  "name": "${cluster-env/user_group}",
+                  "access": ""
+                },
+                "configuration": "service1-site/comp1.keytab.file"
+              }
+            },
+            // The stack-level spnego identity overridden to set component-specific
+            // configurations
+            {
+              "name": "component1_spnego_1",
+              "reference": "/spnego",
+              "principal": {
+                "configuration": "service1-site/comp1.spnego.principal"
+              },
+              "keytab": {
+                "configuration": "service1-site/comp1.spnego.keytab.file"
+              }
+            },
+            // The stack-level spnego identity overridden to set a different set of component-specific
+            // configurations
+            {
+              "name": "component1_spnego_2",
+              "reference": "/spnego",
+              "principal": {
+                "configuration": "service1-site/comp1.someother.principal"
+              },
+              "keytab": {
+                "configuration": "service1-site/comp1.someother.keytab.file"
+              }
+            }
+          ],
+          // Component-specific configurations to set if this component is installed
+          "configurations": [
+            {
+              "service-site": {
+                "comp1.security.type": "kerberos"
+              }
+            }
+          ]
+        },
+        {
+          "name": "COMPONENT_2",
+          "identities": [
+            {
+              "name": "component2_service_identity",
+              "principal": {
+                "value": "component2/_HOST@${realm}",
+                "type" : "service",
+                "configuration": "service1-site/comp2.principal",
+                "local_username" : "${service1-env/service_user}"
+              },
+              "keytab": {
+                "file": "${keytab_dir}/s1c2.service.keytab",
+                "owner": {
+                  "name": "${service1-env/service_user}",
+                  "access": "r"
+                },
+                "group": {
+                  "name": "${cluster-env/user_group}",
+                  "access": ""
+                },
+                "configuration": "service1-site/comp2.keytab.file"
+              }
+            },
+            // The service-level service1_identity identity overridden to
+            // set component-specific configurations
+            {
+              "name": "component2_service1_identity",
+              "reference": "../service1_identity",
+              "principal": {
+                "configuration": "service1-site/comp2.service.principal"
+              },
+              "keytab": {
+                "configuration": "service1-site/comp2.service.keytab.file"
+              }
+            }
+          ],
+          "configurations" : [
+            {
+              "service-site" : {
+                "comp2.security.type": "kerberos"
+              }
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_service.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_service.md
new file mode 100644
index 0000000..86d1a1a
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/kerberos/kerberos_service.md
@@ -0,0 +1,325 @@
+---
+title: Kerberos 服务
+---
+
+<!---
+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.
+-->
+
+- [简介](index.md)
+- [Kerberos 描述符](kerberos_descriptor.md)
+- [Kerberos 服务](#the-kerberos-service)
+  - [配置](#configurations)
+    - [kerberos-env](#kerberos-env)
+    - [krb5-conf](#krb5-conf)
+- [启用 Kerberos](enabling_kerberos.md)
+
+<a name="the-kerberos-service"></a>
+
+## Kerberos 服务 {#the-kerberos-service}
+
+<a name="configurations"></a>
+
+### 配置 {#configurations}
+
+<a name="kerberos-env"></a>
+
+#### kerberos-env {#kerberos-env}
+
+##### kdc_type {#kdc_type}
+
+正在使用的 KDC 类型。
+
+_可能的值:_
+- `none`
+  - Ambari 不与 KDC 集成。在这种情况下,应手动创建 Kerberos 身份并分发 keytab 文件
+- `mit-kdc`
+  - Ambari 与 MIT KDC 集成
+- `active-directory`
+  - Ambari 与 Active Directory 集成
+- `ipa` 
+  - Ambari 与 FreeIPA 服务器集成
+
+##### manage_identities {#manage_identities}
+
+表示 Ambari 指定的用户和服务 Kerberos 身份(principal 和 keytab 文件)是否应由 Ambari(`true`)管理(创建、删除、更新等),还是由用户(`false`)手动管理。
+
+_可能的值:_ `true`、`false`
+
+##### create_ambari_principal {#create_ambari_principal}
+
+表示 Ambari Kerberos 身份(Ambari 本身及其视图使用的 principal 和 keytab 文件)是否应由 Ambari(`true`)管理(创建、删除、更新等),还是由用户(`false`)手动管理。
+
+_可选值:_ `true`, `false`
+
+此属性取决于 `manage_identities` 的值;如果 `manage_identities` 为 false,则 `create_ambari_principal` 也将被假定为 `false`。
+
+##### manage_auth_to_local {#manage_auth_to_local}
+
+表示 Hadoop auth-to-local 规则是否应由 Ambari(`true`)管理,还是由用户(`false`)手动管理。
+
+_可选值:_ `true`, `false`
+
+##### install_packages {#install_packages}
+
+表示 Ambari 是否应安装 Kerberos 客户端软件包(`true`)或不安装(`false`)。如果不安装,则用户安装的 Kerberos 工具程序(如 kadmin、kinit、klist 和 kdestroy)应在命令行选项和行为上与 MIT Kerberos 5 版本 1.10.3 兼容。
+
+_可能的值:_ `true`、`false`
+
+##### ldap_url {#ldap_url}
+
+Active Directory LDAP 接口的 URL。此值**必须**表示使用 LDAPS 的安全通道,因为创建和更新 Active Directory 账号密码需要该通道。
+ 
+_示例:_ `ldaps://ad.example.com:636`
+
+如果 `kdc_type` 为 `active-directory`,则此属性为必填项。
+
+##### container_dn {#container_dn}
+
+配置的 Active Directory 中用于存储 Ambari 管理的用户和服务 principal 的容器可分辨名称(DN)。
+
+_示例:_ `OU=hadoop,DC=example,DC=com`
+
+如果 `kdc_type` 为 `active-directory`,此属性为必填项。
+
+##### encryption_types {#encryption_types}
+
+KDC 应返回的受支持会话密钥加密类型列表(以空格分隔)。
+
+_默认值:_ aes des3-cbc-sha1 rc4 des-cbc-md5
+
+##### realm {#realm}
+
+创建服务 principal 时使用的默认 realm。
+
+_示例:_ `EXAMPLE.COM`
+
+此值应全部使用大写字符。
+
+##### kdc_hosts {#kdc_hosts}
+
+相关 KDC 主机的 IP 地址或 FQDN 列表,以逗号分隔。每个条目也可以包含端口号。
+
+_示例:_ `kdc.example.com, kdc1.example.com`
+
+_示例:_ `kdc.example.com:88, kdc1.example.com:88`
+
+##### admin_server_host {#admin_server_host}
+
+Kerberos 管理主机的 IP 地址或 FQDN。可以选择包含端口号。
+
+_示例:_ `kadmin.example.com`
+
+_示例:_ `kadmin.example.com:88`
+
+如果 `kdc_type` 为 `mit-kdc` 或 `ipa`,该值必须是 Kerberos 管理主机的 FQDN。
+
+##### master_kdc {#master_kdc}
+
+主从 KDC 部署中主 KDC 主机的 IP 地址或 FQDN。可以选择包含端口号。
+
+_示例:_ `kadmin.example.com`
+
+_示例:_ `kadmin.example.com:88`
+
+##### executable_search_paths {#executable_search_paths}
+
+用于查找 kadmin、kinit 等 Kerberos 工具的搜索路径列表,以逗号分隔。
+
+_默认值:_ `/usr/bin, /usr/kerberos/bin, /usr/sbin, /usr/lib/mit/bin, /usr/lib/mit/sbin`
+
+##### password_length {#password_length}
+
+生成的密码所需长度。
+
+_默认值:_ `20`
+
+##### password_min_lowercase_letters {#password_min_lowercase_letters}
+
+生成的密码中要求的小写字母(a-z)最少数量
+
+_默认值:_ `1`
+
+##### password_min_uppercase_letters {#password_min_uppercase_letters}
+
+生成的密码中要求的大写字母(A-Z)最少数量
+
+_默认值:_ `1`
+
+##### password_min_digits {#password_min_digits}
+
+生成的密码中要求的数字(0-9)最少数量
+
+_默认值:_ `1`
+
+##### password_min_punctuation {#password_min_punctuation}
+
+生成的密码中要求的标点字符(?.!$%^*()-_+=~)最少数量
+
+_默认值:_ `1`
+
+##### password_min_whitespace {#password_min_whitespace}
+
+生成的密码中要求的空白字符最少数量
+
+_默认值:_ `0`
+
+##### service_check_principal_name {#service_check_principal_name}
+
+执行 Kerberos 服务检查时使用的 principal 名称
+
+_示例:_ `${cluster_name}-${short_date}`
+
+##### case_insensitive_username_rules {#case_insensitive_username_rules}
+
+强制 principal 名称在 auth-to-local 规则中解析为小写本地用户名
+
+_可选值:_ `true`, `false`
+
+_默认值:_ `false`
+
+##### ad_create_attributes_template {#ad_create_attributes_template}
+
+用于生成 JSON 格式文档的 Velocity 模板,其中包含在对应 Active Directory 中创建新 Kerberos 身份所需的属性名称和值。
+
+变量包括:
+
+- `principal_name` - principal 的组件(主组件和实例)部分
+- `principal_primary` - principal 名称的_主组件_
+- `principal_instance` - principal 名称的_实例组件_
+- `realm` - principal 的 `realm` 部分
+- `realm_lowercase` - principal 的 `realm` 小写形式
+- `normalized_principal` - 完整 principal 值,包括组件和 realm 部分
+- `principal_digest` - 规范化 principal 的 binhex 编码 SHA1 摘要
+- `principal_digest_256` - 规范化 principal 的 binhex 编码 SHA256 摘要
+- `principal_digest_512` - 规范化 principal 的 binhex 编码 SHA512 摘要
+- `password` - 生成的密码
+- `is_service` - principal 为_服务_ principal 时为 `true`,为_用户_ principal 时为 `false`
+- `container_dn` - `kerberos-env/container_dn` 属性值
+
+_注意_:principal 由以下部分组成:主组件、实例组件(可选)和 realm:
+
+* 用户 principal:**_`primary_component`_**@**_`realm`_**
+* 服务 principal:**_`primary_component`_**/**_`instance_component`_**@**_`realm`_**
+
+_默认值:_
+
+```
+{
+"objectClass": ["top", "person", "organizationalPerson", "user"],
+"cn": "$principal_name",
+#if( $is_service )
+"servicePrincipalName": "$principal_name",
+#end
+"userPrincipalName": "$normalized_principal",
+"unicodePwd": "$password",
+"accountExpires": "0",
+"userAccountControl": "66048"
+}
+```
+
+此属性为必填项,仅在 `kdc_type` 为 `active-directory` 时使用。
+
+##### kdc_create_attributes {#kdc_create_attributes}
+
+在相关(MIT)KDC 中创建新 Kerberos 身份时使用的属性集合。
+
+_示例:_ `-requires_preauth max_renew_life=7d`
+
+此属性可选,仅在 `kdc_type` 为 `mit-kdc` 时使用。
+
+##### ipa_user_group {#ipa_user_group}
+
+用户 principal 应加入的 IPA 组。
+
+此属性可选,仅在 `kdc_type` 为 `ipa` 时使用。
+
+<a name="krb5-conf"></a>
+
+#### krb5-conf {#krb5-conf}
+
+##### manage_krb5_conf {#manage_krb5_conf}
+
+表示 krb5.conf 文件是由 Ambari(`true`)管理(创建、更新等),还是由用户手动管理(`false`)。
+
+_可选值:_ `true`, `false`
+
+_默认值:_ `false`
+
+##### domains {#domains}
+
+用于将服务器主机名映射到 realm 名称的域名列表,以逗号分隔。
+
+_示例:_ host.example.com, example.com, .example.com
+
+此属性可选。
+
+##### conf_dir {#conf_dir}
+
+krb5.conf 配置目录
+默认值:/etc
+
+##### content {#content}
+
+可自定义的 krb5.conf 模板(Jinja 模板引擎)
+
+_默认值:_
+
+```
+[libdefaults]
+  renew_lifetime = 7d
+  forwardable = true
+  default_realm = {{realm}}
+  ticket_lifetime = 24h
+  dns_lookup_realm = false
+  dns_lookup_kdc = false
+  default_ccache_name = /tmp/krb5cc_%{uid}
+  #default_tgs_enctypes = {{encryption_types}}
+  #default_tkt_enctypes = {{encryption_types}}
+{% if domains %}
+[domain_realm]
+{%- for domain in domains.split(',') %}
+  {{domain|trim()}} = {{realm}}
+{%- endfor %}
+{% endif %}
+[logging]
+  default = FILE:/var/log/krb5kdc.log
+  admin_server = FILE:/var/log/kadmind.log
+  kdc = FILE:/var/log/krb5kdc.log
+
+[realms]
+  {{realm}} = {
+{%- if master_kdc %}
+    master_kdc = {{master_kdc|trim()}}
+{%- endif -%}
+{%- if kdc_hosts > 0 -%}
+{%- set kdc_host_list = kdc_hosts.split(',')  -%}
+{%- if kdc_host_list and kdc_host_list|length > 0 %}
+    admin_server = {{admin_server_host|default(kdc_host_list[0]|trim(), True)}}
+{%- if kdc_host_list -%}
+{%- if master_kdc and (master_kdc not in kdc_host_list) %}
+    kdc = {{master_kdc|trim()}}
+{%- endif -%}
+{% for kdc_host in kdc_host_list %}
+    kdc = {{kdc_host|trim()}}
+{%- endfor -%}
+{% endif %}
+{%- endif %}
+{%- endif %}
+  }
+
+{# Append additional realm declarations below #}
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-metrics-whitelisting.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-metrics-whitelisting.md
new file mode 100644
index 0000000..f5145b7
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-metrics-whitelisting.md
@@ -0,0 +1,70 @@
+---
+title: Ambari Metrics - 白名单
+---
+
+<!---
+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
+--->
+
+# Ambari Metrics - 白名单 {#ambari-metrics---whitelisting}
+
+在大型集群(500 个以上节点)中,AMS 聚合有时会出现性能问题。在 ambari-metrics-collector 日志中,可能会看到类似以下的日志行:
+
+```
+20:51:30,952 INFO 2080712366@qtp-974606690-381 AsyncProcess:1597 - #1, waiting for 13948 actions to finish
+20:51:31,601 INFO 1279097595@qtp-974606690-359 AsyncProcess:1597 - #1, waiting for 19376 actions to finish
+```
+
+在 Ambari 3.0.0 中,我们通过全面改造架构和聚合逻辑来解决这些性能问题。在此之前,可以使用 AMS 白名单减少 AMS 跟踪的指标数量,从而解决这一规模问题。
+
+## 如何在 AMS 中启用白名单 {#how-do-we-enable-whitelisting-in-ams}
+
+**Ambari 2.4.3 之前**
+可以使用指标白名单文件跟踪 AMS 中的指标集合,所有其他指标都会被丢弃。
+
+**步骤**
+
+* 指标白名单文件位于 /etc/ambari-metrics-collector/conf。如果旧版 Ambari 中不存在,可从 https://github.com/apache/ambari/blob/trunk/ambari-metrics/ambari-metrics-timelineservice/conf/unix/metrics_whitelist 下载到 Collector 主机。
+* 添加配置 ams-site : timeline.metrics.whitelist.file = `/path/to/whitelist_file`
+* 重启 AMS Collector。
+* 验证白名单配置已生效。在 ambari-metrics-collector 日志中确认出现 'Whitelisting # metrics' 行。
+
+**Ambari 2.5.0 及更高版本**
+从 Ambari 2.5.0 开始,白名单功能进行了进一步完善。
+
+* **应用黑名单** - 将一个或多个服务的指标列入黑名单。其他服务的指标将全部允许,或由白名单文件控制。
+
+   ```
+   ams-site : timeline.metrics.apps.blacklist = hbase,namenode
+   ```
+
+* **应用白名单** - 将一个或多个服务的指标列入白名单。
+
+    ```
+    ams-site:timeline.metrics.apps.whitelist = nimbus,datanode   
+    ```
+
+   注意:可以从元数据 URL 找到应用名称:
+   
+   ```
+   http://<metrics_collector_host>:6188/ws/v1/timeline/metrics/metadata
+   ```
+
+* **指标白名单** - 与 Ambari 2.4.3 中的白名单方法相同(通过白名单文件)。除了在白名单文件中提供指标名称外,还可以使用 ._p_ 前缀提供模式。例如,可以指定以下模式:
+
+._p_dfs.FSNamesystem.*
+
+._p_jvm.JvmMetrics*
+
+包含指标和模式的指标白名单文件示例:[https://github.com/apache/ambari/blob/trunk/ambari-metrics/ambari-metrics-timelineservice/src/test/resources/test_data/metric_whitelist.dat](https://github.com/apache/ambari/blob/trunk/ambari-metrics/ambari-metrics-timelineservice/src/test/resources/test_data/metric_whitelist.dat)。
+
+这些白名单和黑名单技术可以结合使用。
+
+* 如果只有 timeline.metrics.whitelist.file = `/path/to/whitelist_file`,则只允许该文件中的指标(无论哪些应用可能正在发送指标)。
+* 如果只有 timeline.metrics.apps.blacklist = datanode,则不允许任何 datanode 指标,其他所有服务的指标都会被允许。
+* 如果只有 timeline.metrics.apps.whitelist = namenode,则没有任何黑名单,因此该设置没有作用。
+* 如果启用了指标白名单(通过文件),并且设置了 timeline.metrics.apps.blacklist = datanode,则不允许任何 datanode 指标,其他服务中的白名单指标会被允许。
+* 如果设置了 timeline.metrics.apps.blacklist = datanode、timeline.metrics.apps.whitelist = namenode 并启用了指标白名单(通过文件),则 datanode 指标会被列入黑名单,所有 namenode 指标都会被允许,其他服务中的白名单指标也会被允许。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-server-metrics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-server-metrics.md
new file mode 100644
index 0000000..b4be6b5
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/ambari-server-metrics.md
@@ -0,0 +1,120 @@
+---
+title: Ambari Server 指标
+---
+
+<!---
+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
+--->
+
+# Ambari Server 指标 {#ambari-server-metrics}
+
+## 概要 {#outline}
+Ambari Server 可用于管理几十个节点到 1000 多个节点。在大型集群或基础设施不理想的集群中,采集 Ambari Server 性能有助于调整服务器,并指导未来的性能优化。借助此功能,AmbariServer 中实现了 Metrics Source-Sink 框架,可对各种指标源进行细粒度控制,也便于添加未来的指标源。
+
+具体而言,Ambari Server JVM 和数据库(EclipseLink)指标源已连接到 AMS 以发送指标,并通过 Grafana 仪表板进行可视化。
+
+## 指标系统术语 {#metrics-system-terminology}
+
+## 配置/启用 {#configuration--enabling}
+* 要启用 Ambari Server 指标,请确保 Ambari Server 启动或重启期间存在以下配置文件:/etc/ambari-server/conf/metrics.properties。
+* 当前只实现了两个指标源:JVM Metric Source 和 Database Metric Source。
+* 如需添加或移除要跟踪的指标源,需要修改 metrics.properties 文件中的以下配置。
+    ```
+        metric.sources=jvm,database
+    ```
+* 源特定配置将在指标源部分讨论。
+
+## 指标源 {#metric-sources}
+
+名称|功能|接口|实现
+----|----|----|----
+Metrics Service | 作为 Metrics 系统的起点。<br></br>加载指标配置。<br></br>初始化 Sink。如果 Sink 未正确初始化(AMS 尚未部署),则每 5 分钟异步尝试重新初始化。<br></br>初始化并启动已配置的源。 | org.apache.ambari.server.metrics.system.MetricsService | org.apache.ambari.server.metrics.system.impl.MetricsServiceImpl
+Metric Source | Ambari Server 中具有相关指标的任意子组件。<br></br>需要初始化与该源对应的部分指标配置以及 Sink。<br></br>定期向 Sink 发布指标。<br></br>示例:JVM、数据库等。 | org.apache.ambari.server.metrics.system.MetricsSource |org.apache.ambari.server.metrics.system.impl.JvmMetricsSource<br></br>org.apache.ambari.server.metrics.system.impl.DatabaseMetricsSource
+Metric Sink | 将指标刷新到外部指标收集系统(Metrics Collector)。 | org.apache.ambari.server.metrics.system.MetricsSink | org.apache.ambari.server.metrics.system.impl.AmbariMetricSinkImp
+
+### JVM 指标 {#jvm-metrics}
+
+**工作方式**
+
+* 使用 Codahale 库收集并发布 Ambari Server JVM 相关指标。
+* 收集 GC、缓冲区、线程、内存和文件描述符指标。
+* 要启用此源,请将 jvm 添加到 metrics.properties 的 metric.sources 配置中,然后重启 Ambari Server。
+
+**配置**
+
+配置名称|默认值|说明
+-----------|-------------|-----
+source.jvm.class | org.apache.ambari.server.metrics.system.impl.JvmMetricsSource | 用于收集 JVM 指标的类。
+source.jvm.interval | 10 | 指标收集频率间隔,单位为秒。
+
+**Grafana 仪表板**
+
+* “Ambari Server - JVM”仪表板展示从 JvmMetricsSource 捕获的指标。
+* 包含可能有助于分析性能不佳系统的内存、GC 和线程相关图表。
+
+### 数据库指标 {#database-metrics}
+
+**工作方式**
+
+EclipseLink PeformanceMonitor 已扩展为支持自定义 Ambari Database Metrics 源。它提供按实体和实体操作划分的监控数据。
+
+Performance Monitor 提供两类指标:
+
+* Counter:操作/查询的发生次数。此类指标的名称以 Counter 开头。
+* Timer:操作/查询耗费的累计总时间。此类指标的名称以 Timer 开头。
+例如,Database Metrics Source 收集的一些指标如下:
+
+* Counter.ReadObjectQuery.HostRoleCommandEntity.readHostRoleCommandEntity
+
+* Timer.ReadAllQuery.StackEntity.StackEntity.findByNameAndVersion.ObjectBuilding
+
+除了从 EclipseLink 收集的 Counter 和 Timer 指标外,还会发送 Timer/Counter(相除)的计算指标。该指标提供一段时间内某项操作所耗费的平均时间。
+
+例如:
+
+```
+ Counter Metric : Counter.ReadAllQuery.HostRoleCommandEntity = 10000
+ Timer Metric : Timer.ReadAllQuery.HostRoleCommandEntity = 50
+ Computed Metric (Avg time for the operation) : ReadAllQuery.HostRoleCommandEntity = 200 (10000 div by 50)
+```
+
+如上所示,计算指标名称与 Timer 和 Counter 指标相同,但不包含 Timer./Counter. 前缀。
+
+要启用此源,请将“**database**”添加到 metrics.properties 的 **metric.sources** 配置中,然后重启 Ambari Server。
+
+**配置**
+
+配置名称|默认值|说明
+-----------|-------------|-----
+source.database.class | org.apache.ambari.server.metrics.system.impl.DatabaseMetricsSource | 用于从扩展的 Performance Monitor 类 org.apache.ambari.server.metrics.system.impl.AmbariPerformanceMonitor 收集数据库指标的类。
+source.database.performance.monitor.query.weight | HEAVY | EclipseLink Performance monitor 粒度:NONE / NORMAL / HEAVY / ALL
+source.database.monitor.dumptime | 60000 | 收集间隔,单位为毫秒
+source.database.monitor.entities | Cluster(.*)Entity,Host(.*)Entity,ExecutionCommandEntity, ServiceComponentDesiredStateEntity,Alert(.*)Entity,StackEntity,StageEntity | 仅收集和跟踪这些实体的指标(org.apache.ambari.server.orm.entities)。
+source.database.monitor.query.keywords.include | CacheMisses | 即使不属于请求实体,也包含带有该关键字的部分指标。
+
+**Grafana 仪表板**
+
+Ambari 数据库指标已在两个 Grafana 仪表板中展示。
+
+* “Ambari Server - Database”仪表板
+    * 聚合展示所有实体的 Total ReadAllQuery、Cache Hits、Cache Misses、Query Stages 和 Query Types。
+    * 还展示如何为特定实体 HostRoleCommandEntity 可视化 Timer、Counter 和 Avg Timing 数据的示例。
+* “Ambari Server - Top N Entities”仪表板
+    * 展示 ReadAllQuery 操作次数最多的前 N 个实体。
+    * 展示数据库在 ReadAllQuery 操作上耗时最多的前 N 个实体。
+    * 展示 Cache Misses 数量最多的前 N 个实体。
+
+这些仪表板图表旨在示范如何以临时方式创建图表来查询特定实体或操作。
+
+## 全局禁用 Ambari Server 指标 {#disabling-ambari-server-metrics-globally}
+
+* 将以下配置添加到 /etc/ambari-server/conf/ambari.properties:
+  * ambariserver.metrics.disable=true
+* 重启 Ambari Server。
+
+## 相关 JIRA {#related-jira}
+
+[AMBARI-17589](https://issues.apache.org/jira/browse/AMBARI-17589)
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/configuration.mdx b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/configuration.mdx
new file mode 100644
index 0000000..1470f8c
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/configuration.mdx
@@ -0,0 +1,193 @@
+---
+title: 配置
+---
+
+{/*
+   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.
+*/}
+
+# 配置 {#configuration}
+
+## 指标收集器 {#metrics-collector}
+
+配置类型|文件路径|注释
+---------------|-------------------------------------------------|----------------------------------------
+ams-site|/etc/ambari-metrics-collector/conf/ams-site.xml|控制 API 守护进程和聚合器线程的设置。
+ams-env|/etc/ambari-metrics-collector/conf/ams-env.sh|API 守护进程的内存 / PATH 设置
+ams-hbase-site|/etc/ams-hbase/conf/hbase-site.xml<br></br>/etc/ambari-metrics-collector/conf/hbase-site.xml|用于指标数据的 HBase 存储设置。
+ams-hbase-env|/etc/ams-hbase/conf/hbase-env.sh|HBase 存储的内存 / PATH 设置。<br></br>**注意**:在嵌入式模式下,master 和 regionserver 的堆内存设置会汇总为单个 HBase 守护进程的总内存。
+
+## 指标监控器 {#metrics-monitor}
+
+配置类型|文件路径|注释
+---------------|-------------------------------------------------|----------------------------------------
+ams-env|/etc/ambari-metrics-monitor/conf/ams-env.sh|用于修改日志和 pid 目录,与上述配置相同,两个组件共用。
+metric_groups|/etc/ambari-metrics-monitor/conf/metric_groups.conf|UI 中不可用。用于控制上报哪些 **HOST/SYSTEM** 指标。
+metric_monitor|/etc/ambari-metrics-monitor/conf/metric_monitor.ini|UI 中不可用。监控器守护进程的设置。
+
+## 指标收集器 - ams-site - 配置详情 {#metric-collector---ams-site---configuration-details}
+
+* 修改时间聚合数据的保留间隔。有关聚合的更多信息,请参阅聚合部分:API 规范
+(注意:在 Ambari 2.0 和 2.1 中,Phoenix 版本不支持 Alter TTL 查询。因此只能在安装时从 UI 修改。解决方法请参阅已知问题部分。)
+
+配置类型|文件路径|注释
+---------------|-------------------------------------------------|----------------------------------------
+timeline.metrics.host.aggregator.ttl|86400|1 分钟分辨率数据清理间隔。默认 1 天。
+timeline.metrics.host.aggregator.minute.ttl|604800|基于主机的 X 分钟分辨率数据清理间隔。默认 7 天。<br></br>(X = 可配置间隔,默认间隔为 2 分钟)
+timeline.metrics.host.aggregator.hourly.ttl|2592000|基于主机的小时分辨率数据清理间隔。默认 30 天。
+timeline.metrics.host.aggregator.daily.ttl|31536000|基于主机的天分辨率数据清理间隔。默认 1 年。
+timeline.metrics.cluster.aggregator.minute.ttl|2592000|集群范围的分钟分辨率数据清理间隔。默认 30 天。
+timeline.metrics.cluster.aggregator.hourly.ttl|31536000|集群范围的小时分辨率数据清理间隔。默认 1 年。
+timeline.metrics.cluster.aggregator.daily.ttl|63072000|集群范围的天分辨率数据清理间隔。默认 2 年。
+**注意**:1 分钟分辨率表存储 1 天的原始精度数据;当用户查询过去 1 小时的数据时,AMS API 返回原始精度数据。
+
+* 修改 HOST 和 CLUSTER 聚合器的聚合间隔。
+唤醒时,只要上次运行时间不是太旧,聚合器线程就会从(上次运行时间 + 间隔)继续运行。
+
+属性|默认值|描述
+---------------|-------------------------------------------------|----------------------------------------
+timeline.metrics.host.aggregator.minute.interval|120|分钟分辨率主机聚合器的休眠秒数。默认分辨率为 2 分钟。
+timeline.metrics.host.aggregator.hourly.interval|3600|小时分辨率主机聚合器的休眠秒数。默认分辨率为 1 小时。
+timeline.metrics.host.aggregator.daily.interval|86400|天分辨率主机聚合器的休眠秒数。默认分辨率为 24 小时。
+timeline.metrics.cluster.aggregator.minute.interval|120|分钟分辨率集群聚合器的休眠秒数。默认分辨率为 2 分钟。
+timeline.metrics.cluster.aggregator.hourly.interval|3600|小时分辨率集群聚合器的休眠秒数。默认 1 小时。
+timeline.metrics.cluster.aggregator.daily.interval|86400|天分辨率集群聚合器的休眠秒数。默认 24 小时。
+
+* 修改检查点信息。聚合器在本地文件系统中存储时间戳或上次运行时间。
+读取上次运行时间后,只要(currentTime - lastRunTime)< multipler * aggregation_interval,聚合器线程就决定进行聚合。每个聚合器的乘数均可配置。
+
+属性|默认值|描述
+---------------|-------------------------------------------------|----------------------------------------
+timeline.metrics.host.aggregator.minute.checkpointCutOffMultiplier|2|乘数值 * 间隔 = 允许的最大检查点延迟。如果聚合器检查点大于最大允许延迟,聚合器将丢弃该检查点。
+timeline.metrics.host.aggregator.hourly.checkpointCutOffMultiplier|2|同上
+timeline.metrics.host.aggregator.daily.checkpointCutOffMultiplier|1|同上
+timeline.metrics.cluster.aggregator.minute.checkpointCutOffMultiplier|2|同上
+timeline.metrics.cluster.aggregator.hourly.checkpointCutOffMultiplier|2|同上
+timeline.metrics.cluster.aggregator.daily.checkpointCutOffMultiplier|1|同上
+timeline.metrics.aggregator.checkpoint.dir|/var/lib/ambari-metrics-collector/checkpoint|存储聚合器检查点的目录。请改为永久位置,以免检查点丢失。
+
+* 其他重要配置属性
+
+属性|默认值|描述
+---------------|-------------------------------------------------|----------------------------------------
+timeline.metrics.host.aggregator.*.disabled|false|禁用基于主机的 * 聚合。(* => minute/hourly/daily)
+timeline.metrics.cluster.aggregator.*.disabled|false|禁用基于集群的 * 聚合。(* => minute/hourly/daily)
+timeline.metrics.cluster.aggregator.minute.timeslice.interval|30|集群级分钟聚合所需数据的最低分辨率。
+timeline.metrics.hbase.data.block.encoding|FAST_DIFF|通过设置 DATA_BLOCK_ENCODING 属性在表上启用编解码器。默认编码为 FAST_DIFF,只能在创建表之前更改。
+timeline.metrics.hbase.compression.scheme|SNAPPY|设置方案前必须安装并提供压缩代码。默认压缩为 SNAPPY。设置为 None 可禁用。只能在创建表之前更改。
+timeline.metrics.service.default.result.limit|5760|返回行数的最大结果限制。计算方式:4 个聚合指标/分钟 * 60 * 24,即检索 1 天的聚合数据。
+timeline.metrics.service.checkpointDelay|60|首次运行或检查点过旧时的休眠秒数。
+timeline.metrics.service.resultset.fetchSize|2000|聚合器查询的 JDBC resultset 预取大小。
+timeline.metrics.service.cluster.aggregator.appIds|datanode,nodemanager,hbase|用于聚合应用程序主机级指标的应用程序 ID 列表。例如:跨 Yarn Nodemanagers 的 bytes_read。
+
+## 在分布式模式下配置 Ambari Metrics 服务 {#configuring-ambari-metrics-service-in-distributed-mode}
+
+在分布式模式下,指标收集器写入集群的 HDFS。目前分布式模式不支持多模式指标收集器,但计划允许指标收集器水平扩展,以支持多节点 HBase 存储层。
+
+**注意**:确保收集器所在主机有本地 Datanode,这使 AMS HBase 可以跨 DN 可用的数据卷分片读写,从而获得明显优势。
+
+以下步骤可在安装时或部署后执行,以在分布式模式下配置指标收集器。注意:如果在安装后配置,数据不会自动复制到 HDFS。
+
+1. 编辑 ams-site,设置 timeline.metrics.service.operation.mode = distributed
+2. 编辑 ams-hbase-site:
+      - 设置 hbase.rootdir = hdfs://namenode-host;:8020/user/ams/hbase [启用 NN HA 时为 hdfs://nameservice-id/user/ams/hbase]
+      (注意:此处的 /user/ams/hbase 是存储指标数据的 HDFS 目录)
+      - 设置 hbase.cluster.distributed = true
+      - 添加 dfs.client.read.shortcircuit = true(存在本地 DN 时的优化)
+3. 重启指标收集器
+
+**注意**:在 Ambari 2.0.x 中,如果启用了 Namenode HA,以分布式模式部署 AMS 存在错误。请按照此 JIRA 中列出的说明执行解决方法步骤:([AMBARI-10707](https://issues.apache.org/jira/browse/AMBARI-10707))
+
+**注意**:在 Ambari 2.2.1 中,Stack advisor 会通过建议自动更改分布式模式的依赖配置。理想情况下唯一需要更改的配置是 timeline.metrics.service.operation.mode = distributed,其他配置(hbase.rootdir、hbase.cluster.distributed 和 dfs.client.read.shortcircuit)会自动更改。
+
+## 将数据从嵌入式模式迁移到分布式模式 {#migrating-data-from-embedded-to-distributed-mode}
+
+将现有指标数据迁移到 HDFS 并以分布式模式启动 AMS 的步骤:
+
+* 停止 AMS 指标收集器
+* 为 ams 用户创建 hdfs 目录,例如:
+
+    ```bash
+    su - hdfs -c 'hdfs dfs -mkdir /user/ams'
+    su - hdfs -c 'hdfs dfs -chown ams:hadoop /user/ams'
+    ```
+* 将 AMS 本地目录(ams-hbase-site 中 hbase.rootdir 的现有值)中的指标数据复制到 HDFS 目录。例如:
+
+    ```bash
+    cd /var/lib/ambari-metrics-collector/
+    su - hdfs -c 'hdfs dfs -copyFromLocal hbase hdfs://    <namnode-http-address>:8020/user/ams/'
+    su - hdfs -c 'hdfs dfs -chown -R ams:hadoop /user/ams/hbase'
+    ```
+
+* 完成分布式模式所需更改后,启动指标收集器。
+
+## 启用 HBase 区域、用户和表指标 {#enabling-hbase-region-user-and-table-metrics}
+
+Ambari 默认禁用 HBase 指标(按区域、按用户和按表)。HBase 指标可能很多并导致性能问题。HBase RegionServer 指标默认可用。
+
+如果希望 Ambari 收集 HBase(按区域、按用户和按表)指标,可以执行以下操作。**强烈建议**测试启用此选项,并确认 AMS 性能可接受。
+
+### 分步指南 {#step-by-step-guide}
+1. 在 Ambari Server 上浏览到:
+
+     ```bash
+     var/lib/ambari-server/resources/stacks/HDP/3.0/services/HBASE/     package/templates
+     ```
+2. 当 Ambari 早于 2.7.0 时,在 Ambari Server 上浏览到:
+
+     ```bash
+     var/lib/ambari-server/resources/common-services/HBASE/     $VERSION/package/templates
+     ```
+3. 编辑以下模板文件:
+
+     ```bash
+     hadoop-metrics2-hbase.properties-GANGLIA-MASTER.j2
+     hadoop-metrics2-hbase.properties-GANGLIA-RS.j2 
+     ```
+4. 注释掉(或删除)以下行:
+
+     ```bash
+     *.source.filter.class=org.apache.hadoop.metrics2.filter.     RegexFilter
+     hbase.*.source.filter.exclude=.*(Regions|Users|Tables).*
+     ```
+5. 保存模板文件,然后重启 Ambari Server,再重启 HBase,使更改生效。
+
+:::tip
+如果将 Ambari 升级到较新版本,需要在模板文件中重新应用此更改。
+:::
+
+## 启用 HDFS 按用户指标 {#enabling-hdfs-per-user-metrics}
+
+HDFS 按用户指标默认不会发出。启用前请谨慎操作,并务必参考客户端和服务端口号的详细信息。
+
+若要在 Grafana 实例中使用 HDFS - Users 仪表盘以及查看 HDFS 按用户指标,需要将这些自定义属性添加到配置中。
+
+### 分步指南 {#step-by-step-guide-1}
+在 Ambari 中,HDFS > Configs > Advanced > Custom hdfs-site,添加以下属性。
+
+```
+dfs.namenode.servicerpc-address=<namenodehost>:8021
+
+ipc.8020.callqueue.impl=org.apache.hadoop.ipc.FairCallQueue
+
+ipc.8020.backoff.enable=true
+
+ipc.8020.scheduler.impl=org.apache.hadoop.ipc.DecayRpcScheduler
+
+ipc.8020.scheduler.priority.levels=3
+
+ipc.8020.decay-scheduler.backoff.responsetime.enable=true
+
+ipc.8020.decay-scheduler.backoff.responsetime.thresholds=10,20,30
+```
+
+**注意事项**
+客户端端口:8020(如果不同,请在所有键中替换为相应端口)注意事项:
+
+* 服务端口:8021(如果不同,请在第一个值中替换为相应端口)
+* namenodehost:必须是 FQDN。
+添加这些属性后,应如下所示。
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/enabling-hdfs-user-metrics.png "Enabling Hdfs User Metrics")
+
+**重启 HDFS 后应能看到指标发出。现在还应能在 Grafana 中使用 HDFS - Users 仪表盘。**
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/index.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/index.md
new file mode 100644
index 0000000..5cd8af4
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/index.md
@@ -0,0 +1,34 @@
+---
+title: 指标
+---
+
+<!---
+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
+--->
+---
+
+# 指标 {#metrics}
+
+**Ambari Metrics System**(“AMS”)是用于在 Ambari 管理的集群中收集、聚合和提供 Hadoop 及系统指标的系统。
+
+## 术语 {#terminology}
+
+术语 | 定义
+----|----
+Ambari Metrics System(“AMS”) | Ambari 内置的指标收集系统。
+Metrics Collector | 独立服务器,负责收集和聚合指标,并从 Hadoop 服务 Sink 与 Metrics Monitor 提供指标。
+Metrics Monitor | 安装在集群每台主机上,负责收集系统级指标并转发给 Metrics Collector。
+Metrics Hadoop Sinks | 接入各 Hadoop 组件的 Sink,将 Hadoop 指标发送给 Metrics Collector。
+
+## 架构 {#architecture}
+下图展示了新版 Ambari Metrics System 的高层概念架构:
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/ams-arch.jpg "AMS 架构")
+
+**Metrics Collector** 是接收注册发布者(Monitor 和 Sink)数据的守护进程。Collector 本身使用 HBase、Phoenix 和 ATS 等 Hadoop 技术构建。Collector 可以将数据存储在本地文件系统(称为“嵌入式模式”),也可以使用外部 HDFS(称为“分布式模式”)。
+
+## 了解更多 {#learn-more}
+浏览以下内容,了解 [Ambari Metrics REST API](./metrics-api-specification.md) 规范以及 AMS 的高级[配置](./configuration.mdx)。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-api-specification.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-api-specification.md
new file mode 100644
index 0000000..2ac8ea6
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-api-specification.md
@@ -0,0 +1,70 @@
+---
+title: Ambari Metrics API 规范
+---
+
+<!---
+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
+--->
+
+Ambari REST API 支持 CLUSTER、HOST、COMPONENT 和 HOST COMPONENT 层级的指标查询。
+
+总体而言,支持的指标查询类型包括:**时间范围**或**时间点**。
+
+下面展示了使用 Ambari API 从 Metrics 后端服务获取指标的调用示例。
+
+## CLUSTER {#cluster}
+
+例如:仪表板指标:获取集群所有节点的平均负载
+```
+http://<ambari-server>:8080/api/v1/clusters/<cluster-name>?fields=metrics/load[1430844925,1430848525,15]&_=1430848532904
+```
+上述 API 调用获取集群所有主机聚合后的平均负载。
+
+API 调用的请求部分选择集群实例,谓词包含带时间范围查询的指标,后面跟当前的毫秒时间。
+
+时间范围查询:
+
+字段 | 值 | 说明
+------|----|----
+开始时间 | 1430844925 | 时间范围的开始时间(Epoch)。
+结束时间 | 1430848525 | 时间范围的结束时间(Epoch)。
+步长 | 15 | 默认步长;仅用于补零,或无法从获取的数据确定填充间隔时进行空值填充。
+
+## HOST {#host}
+
+例如:主机指标:获取集群中特定主机的 CPU 使用率
+
+```
+http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>?fields=metrics/cpu/cpu_user[1430844610,1430848210,15],metrics/cpu/cpu_wio[1430844610,1430848210,15],metrics/cpu/cpu_nice[1430844610,1430848210,15],metrics/cpu/cpu_aidle[1430844610,1430848210,15],metrics/cpu/cpu_system[1430844610,1430848210,15],metrics/cpu/cpu_idle[1430844610,1430848210,15]&_=1430848217591
+```
+
+上述 API 调用获取主机页面绘制 CPU 使用率所需的全部 CPU 相关指标。
+
+上述 API 调用的请求部分选择要查询的主机,谓词部分包含带时间范围查询的指标名称。
+
+## COMPONENT {#component}
+
+例如:服务指标:获取所有 DataNode 聚合后的容量使用率指标,但只获取最新值(时间点)
+
+```
+ http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/services/HDFS/components/DATANODE?fields=metrics/dfs/datanode/DfsUsed,metrics/dfs/datanode/Capacity&_=1430849798630
+```
+
+上述 API 调用获取两个指标值,它们表示从 Metrics Service 后端获取的请求指标的时间点值(非 JMX)。
+
+如需直接从 Hadoop 守护进程获取 JMX 指标,请使用对应 JMX MBean 指标的指标名称,例如:metrics/dfs/FSNamesystem/CapacityUsedGB(更多信息请参阅 Stack Defined Metrics)。
+
+上述 API 调用的请求部分选择集群中的服务,谓词部分包含指标名称。
+
+## HOST COMPONENT {#host-component}
+例如:守护进程指标:获取活动 NameNode 的堆内存使用量
+
+```
+http://<ambari-server>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>/host_components/NAMENODE?fields=metrics/jvm/memHeapCommittedM[1430847303,1430850903,15],metrics/jvm/memHeapUsedM[1430847303,1430850903,15]&_=1430850903846
+The above API call retrieves JVM heap metrics for the Active Namenode in the cluster.
+```
+
+API 的请求部分选择 NameNode 主机组件,谓词部分包含带时间范围的指标。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-collector-api-specification.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-collector-api-specification.md
new file mode 100644
index 0000000..0e37cf2
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/metrics-collector-api-specification.md
@@ -0,0 +1,200 @@
+---
+title: 指标收集器 API 规范
+---
+
+<!-- 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. -->
+
+# 指标收集器 API 规范 {#metrics-collector-api-specification}
+
+## 向 AMS 发送指标(POST) {#sending-metrics-to-ams-post}
+
+可以通过以下 API 调用向 Ambari Metrics 服务发送指标。
+
+负责向 AMS 发送指标的 Sink 实现会在发送前缓冲 1 分钟的数据。TimelineMetricCache 提供了实现此行为的简单缓存。
+
+Hadoop 守护进程使用的示例 Sink 实现:https://github.com/apache/ambari/tree/trunk/ambari-metrics/ambari-metrics-hadoop-sink
+
+```uri
+POST http://<ambari-metrics-collector>:6188/ws/v1/timeline/metrics
+```
+
+```json
+{
+  "metrics": [
+    {
+      "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric",
+      "appid": "amssmoketestfake",
+      "hostname": "ambari20-5.c.pramod-thangali.internal",
+      "timestamp": 1432075898000,
+      "starttime": 1432075898000,
+      "metrics": {
+        "1432075898000": 0.963781711428,
+        "1432075899000": 1432075898000
+      }
+    }
+  ]
+}
+```
+
+```
+Connecting (POST) to <ambari-metrics-collector>:6188/ws/v1/timeline/metrics/
+Http response: 200 OK
+```
+
+## 从 AMS 获取指标(GET) {#fetching-metrics-from-ams-get}
+
+**示例调用**
+```
+GET http://<ambari-metrics-collector>:6188/ws/v1/timeline/metrics?metricNames=AMBARI_METRICS.SmokeTest.FakeMetric&appId=amssmoketestfake&hostname=<hostname>&precision=seconds&startTime=1432075838000&endTime=1432075959000
+Http response: 200 OK
+Http data:
+{
+   "metrics": [
+      {
+         "timestamp": 1432075898089,
+         "metricname": "AMBARI_METRICS.SmokeTest.FakeMetric",
+         "appid": "amssmoketestfake",
+         "hostname": "ambari20-5.c.pramod-thangali.internal",
+         "starttime": 1432075898000,
+         "metrics": {
+            "1432075898000": 0.963781711428,
+            "1432075899000": 1432075898000
+         }
+      }
+   ]
+}
+```
+
+**通用 GET 调用格式**
+```uri
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=<>&hostname=<>&appId=<>&startTime=<>&endTime=<>&precision=<>
+```
+
+**查询参数说明**
+
+参数|可选/必填|说明|可用值
+---------|------------------|-----------|-------------------
+metricNames|必填,逗号|所需指标的分隔列表。|disk_free,mem_free... 等
+appId|必填|与请求的 metricNames 对应的 AppId。目前只需要且只允许 1 个 AppId。|HOST/namenode/datanode/nimbus/hbase/kafka_broker/FLUME_HANDLER 等
+hostname|可选|以逗号分隔的主机名列表。未指定时返回集群聚合数据。|h1,h2..等
+startTime, endTime|可选|开始和结束时间值。未指定时返回指标的最后一个数据点。|以秒或毫秒表示的 epoch 时间
+precision|可选|返回数据所需的精度。未指定时根据请求的时间范围计算精度(见下表)。|SECONDS/MINUTES/DAYS/HOURS
+
+**precision 查询参数(默认分辨率)**
+
+查询时间范围|返回指标的分辨率|注释
+---|---|---
+不超过 2 小时|SECONDS|主机指标为 10 秒数据;聚合查询(未指定主机)为 30 秒数据
+2 小时 - 1 天|MINUTES|5 分钟数据
+1 天 - 30 天|HOURS|1 小时数据
+> 30 天|DAYS|1 天数据
+
+**指定聚合函数**
+
+metricName 可以在指标名称后添加特定的聚合函数限定符(如下所示)来请求特定聚合。有效值为 ._avg、._max、._min、._sum。当聚合查询的 metricName 未指定聚合函数时,默认值为 AVG。
+示例
+```
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.totalRequestCount._avg,regionserver.Server.writeRequestCount._max&appId=hbase&startTime=14000000&endTime=14200000
+
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.readRequestCount,regionserver.Server.writeRequestCount._max&appId=hbase&startTime=14000000&endTime=14200000
+```
+
+**指定后处理函数**
+
+与聚合函数类似,也可以指定后处理函数。目前有 2 个后处理函数:rate(每秒速率)和 diff(连续值之间的差)。后处理函数也可以应用于聚合函数之后。
+示例
+```
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.totalRequestCount._rate,regionserver.Server.writeRequestCount._diff&appId=hbase&startTime=14000000&endTime=14200000
+
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.readRequestCount._max._diff&appId=hbase&startTime=14000000&endTime=14200000
+```
+
+**指定通配符**
+
+metricNames 和 hostname 都接受通配符(%)值,以匹配一组指标(或主机)。查询也可以组合完整指标名称和带通配符的名称。
+
+示例
+```
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.%&appId=hbase&startTime=14000000&endTime=14200000
+
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.%&hostname=abc.testdomain124.devlocal&appId=hbase&startTime=14000000&endTime=14200000
+
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=master.AssignmentManger.ritCount,regionserver.Server.%&hostname=abc.testdomain124.devlocal&appId=hbase&startTime=14000000&endTime=14200000
+
+http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.%&hostname=abc.testdomain12%.devlocal&appId=hbase&startTime=14000000&endTime=14200000
+```
+
+**降采样**
+
+如前所述,请求更大的时间范围时 AMS 会对数据进行降采样。返回的默认“跨时间降采样”数据为 AVG。可以像请求跨集群聚合一样,在指标名称中添加聚合函数限定符(._avg、._max、._min、._sum)来请求特定降采样。
+示例
+```
+ http://<AMS_HOST>:6188/ws/v1/timeline/metrics?metricNames=regionserver.Server.totalRequestCount._max&hostname=abc.testdomain124.devlocal&appId=hbase&startTime=14000000&endTime=14200000&precision=MINUTES
+```
+上述查询返回该指标的 5 分钟数据,其中每个 5 分钟范围内的数据点值是所有值的 MAX。
+
+## AMS 元数据 API {#ams-metadata-api}
+
+AMS 有 2 个元数据端点,可用于查找它接收的指标集合以及集群拓扑。
+
+**指标元数据**
+
+端点:
+```
+ http://<AMS_HOST>:6188/ws/v1/timeline/metrics/metadata
+```
+返回数据:APP_ID 集合到其接收指标列表的映射。
+
+返回数据示例
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/metrics-metadata.png)
+
+**主机元数据**
+
+端点:
+```
+ http://<AMS_HOST>:6188/ws/v1/timeline/metrics/hosts
+```
+返回数据:集群主机到主机上 APP_ID 集合的映射。
+
+返回数据示例
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/hosts-metadata.png)
+
+## 编写自己的 Sink 指南 {#guide-to-writing-your-own-sink}
+* 将 ambari-metrics-common 构件(从源代码或 maven-central,若可用)引入项目
+* 下面提供了 ambari-metrics-common 模块中可使用的常见数据结构信息
+* 扩展 org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink 类并实现所需方法
+* 使用 org.apache.hadoop.metrics2.sink.timeline.cache.TimelineMetricsCache 存储发送前的中间数据(例如:收集间隔 = 10 秒,发送间隔 = 1 分钟)。缓存实现提供缓冲和本地聚合所需的逻辑。
+* 使用 org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink#emitMetrics 向 AMS 后端发送指标。
+
+**指标数据结构**
+
+常见数据结构模块的源位置:https://github.com/apache/ambari/tree/trunk/ambari-metrics/ambari-metrics-common/
+
+示例 Sink 实现:https://github.com/apache/ambari/blob/trunk/ambari-metrics/ambari-metrics-hadoop-sink/
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/metrics-datastructure.png)
+
+**内部 Phoenix 键结构**
+
+指标记录键数据结构如下:
+
+属性|类型|注释|可选
+--------|----|--------|---------------
+指标名称|String|第一个键部分,从 HFile 存储查询时需要重点考虑|N
+主机名|String|第二个键部分|N
+服务器时间|Long|服务器收到第一个指标写入请求时的时间戳|N
+应用程序 ID|String|唯一标识服务|N
+实例 ID|String|用于标识实例/组件的第二个键部分|Y
+开始时间|Long|时间序列数据的开始时间|
+
+**聚合工作方式**
+
+* 可以通过设置每个聚合器线程的唤醒间隔来控制聚合数据的粒度。
+* 目前支持 2 类聚合器:HOST 和 APPLICATION,具有 3 个时间维度,即每分钟、每小时和每天。
+  * HOST 聚合只是跨受支持时间维度对精度数据进行聚合。
+  * APP 聚合跨 appId 进行。注意:APP 级聚合会忽略 instanceId。APP 级聚合使用相同的时间维度。
+  * 还支持 APP 的 HOST 级指标,这意味着系统指标示例 "cpu_user" 可以跨 datanode 聚合,从而计算托管应用的系统指标。
+* 每个聚合器通过在文件中存储上次成功完成的时间来执行检查点。如果检查点过旧,聚合器会丢弃检查点,并按配置的间隔聚合数据,即 now - interval 之间的数据。
+* 有关表和记录的详细信息,请参阅 [Phoenix 表架构](./operations.md)。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/operations.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/operations.md
new file mode 100644
index 0000000..e9d87d1
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/operations.md
@@ -0,0 +1,170 @@
+---
+title: 操作
+---
+
+<!--
+   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.
+-->
+
+# 操作 {#operations}
+
+## 指标收集器 {#metrics-collector}
+
+**Pid 文件位置**
+
+守护进程 | 默认用户 | Pid 文件路径
+---------------|-------------------------------------------------|----------------------------------------
+Metrics Collector API   |ams   |/var/run/ambari-metrics-collector/ambari-metrics-collector.pid
+Metrics Collector Hbase |ams |/var/run/ambari-metrics-collector/hbase-ams-master.pid
+
+**日志文件位置**
+
+守护进程 | 日志文件路径
+---------------|------------------------------------------------
+Metrics Collector API    |/var/log/ambari-metrics-collector/ambari-metrics-collector.log<br></br>/var/log/ambari-metrics-collector/ambari-metrics-collector.out
+Metrics Collector HBase  |/var/log/ambari-metrics-collector/hbase-ams-master-&lt;hostname&gt;.log<br></br>/var/log/ambari-metrics-collector/hbase-ams-master-&lt;hostname&gt;.out
+
+**手动重启指标收集器**
+
+停止命令
+
+```bash
+su - ams -c '/usr/sbin/ambari-metrics-collector --config /etc/ambari-metrics-collector/conf/ stop'
+```
+
+启动命令
+
+```bash
+su - ams -c '/usr/sbin/ambari-metrics-collector --config /etc/ambari-metrics-collector/conf/ start'
+```
+
+## 指标监控器 {#metrics-monitor}
+
+**Pid 文件位置**
+
+```
+/var/run/ambari-metrics-monitor/ambari-metrics-monitor.pid
+```
+
+**日志文件位置**
+
+```
+/var/log/ambari-metrics-monitor/ambari-metrics-monitor.out
+```
+
+**手动重启指标监控器**
+停止命令
+
+```bash
+su - ams -c '/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf stop'
+```
+
+启动命令
+
+```bash
+su - ams -c '/usr/sbin/ambari-metrics-monitor --config /etc/ambari-metrics-monitor/conf start'
+```
+
+## 构建说明 {#build-instructions}
+
+ambari-metrics-assembly 软件包为各种平台构建程序集(rpm/deb/msi)。
+
+构建成功后,可以在 ambari-metrics-assembly/target 文件夹中找到以下二进制文件。
+
+```
+ambari-metrics-collecor-<ambari-version>.<arch>
+ambari-metrics-monitor-<ambari-version>.<arch>
+ambari-hadoop-sink-<ambari-version>.<arch>
+```
+
+**注意**:必须先构建 Ambari Metrics,再构建 Ambari Server。
+
+### RPM 软件包 {#rpm-packages}
+
+```bash
+cd ambari-metrics
+mvn clean package -Dbuild-rpm
+```
+
+### Debian 软件包 {#debian-packages}
+与上述说明相同,将 Maven 目标改为 build-deb。
+
+### Windows msi {#windows-msi}
+待补充
+
+### 命令行参数 {#command-line-parameters}
+
+参数 | 默认值 | 注释
+---------------|------------------|------------------------------
+hbase.tar | http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/tars/hbase-1.1.1.2.3.0.0-2557.tar.gz | HBase tar 包。这是 Ambari 2.1.2 的默认版本
+hbase.folder | hbase-1.1.1.2.3.0.0-2557 |-
+hadoop.tar | http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.3.0.0/tars/hadoop-2.7.1.2.3.0.0-2557.tar.gz | Hadoop tar 包,用于本地库。这是 Ambari 2.1.2 的默认版本
+hadoop.folder | hadoop-2.7.1.2.3.0.0-2557 |-
+
+**注意**
+
+在 [AMBARI-18915](https://issues.apache.org/jira/browse/AMBARI-18915) 的更改之后,AMS pom 更新为使用 Apache hbase、hadoop、phoenix tar 包;AMS 默认使用从 Apache 下载的 hadoop tar 包。由于该版本的 libhadoop 未使用 libsnappy 构建,需要在 ams-site 中进行以下配置更改,才能正确启动 AMS。
+
+**timeline.metrics.hbase.compression.scheme = None**
+
+## 磁盘空间使用指导 {#disk-space-utilization-guidance}
+
+节点数 | METRIC_RECORD (MB) | METRIC_RECORD_MINUTE (MB) | METRIC_RECORD_HOURLY (MB) | METRIC_RECORD_DAILY (MB) | METRIC_AGGREGATE (MB) | METRIC_AGGREGATE_MINUTE (MB) | METRIC_AGGREGATE_HOURLY (MB) | METRIC_AGGREGATE_DAILY (MB) | TOTAL (GB)
+-------|----------|-----------|----------|----------|---------|--------|----------|-----------------|-------------
+50  | 5120  | 2700  | 245   | 10  | 1500  |305 |28  |1 |10
+100 | 10240 | 5400  | 490   | 20  | 1500  |305 |28  |1 |18
+300 | 30720 | 16200 | 1470  | 60  | 1500  |305 |28  |1 |49
+500 | 51200 | 27000 | 2450  | 100 | 1500  |305 |28  |1 |81
+800 | 81920 | 43200 | 3920  | 160 | 1500  |305 |28  |1 |128
+
+**注意**:
+
+以上指导源自对实际集群中 AMS 磁盘使用情况的观察。实际数值来自一个安装了基本服务(HDFS、YARN、HBase)以及 Storm、Kafka 和 Flume 的集群。Kafka 和 Flume 仅在作业运行时生成指标。如果大量使用这些服务,建议增加磁盘空间。推导这些数值时,我们运行了 STORM 和 KAFKA 示例作业,以确保其有所贡献。
+
+**实际磁盘使用数据**
+
+节点数 | METRIC_RECORD (MB) | METRIC_RECORD_MINUTE (MB) | METRIC_RECORD_HOURLY (MB) | METRIC_RECORD_DAILY (MB) | METRIC_AGGREGATE (MB) | METRIC_AGGREGATE_MINUTE (MB) | METRIC_AGGREGATE_HOURLY (MB) | METRIC_AGGREGATE_DAILY (MB) | TOTAL (GB)
+-------|----------|-----------|----------|----------|---------|--------|----------|-----------------|-------------
+2   | 120   | 175 | 17  | 1 | 545     | 136 | 16  | 1 | 1
+3   | 294   | 51  | 3.4 | 1 | 104     | 26  | 1.8 | 1 | 0.5
+10  | 1024  | 540 | 49  | 2 | 1433.6  | 305 | 28  | 1 | 3.3
+
+## Phoenix 架构 {#phoenix-schema}
+
+### Phoenix 表 {#phoenix-tables}
+
+表名 | 描述 | 清理间隔(默认)
+------------------------|---------------------------------------------------------------------------|-------------------------
+METRIC_RECORD           | 每个主机每项指标以 10 秒精度保存的数据,并包含 1 分钟聚合。| 1 天
+METRIC_RECORD_MINUTE    | 每个主机每项指标以 5 分钟精度保存的数据                            | 1 周
+METRIC_RECORD_HOURLY    | 每个主机每项指标以 1 小时精度保存的数据                              | 30 天
+METRIC_RECORD_DAILY     | 每个主机每项指标以 1 天精度保存的数据                               | 1 年
+METRIC_AGGREGATE        | 每项指标以 30 秒精度保存的集群范围聚合数据                | 1 周
+METRIC_AGGREGATE_MINUTE | 每项指标以 5 分钟精度保存的集群范围聚合数据                  | 30 天
+METRIC_AGGREGATE_HOURLY | 每项指标以 1 小时精度保存的集群范围聚合数据                    | 1 年
+METRIC_AGGREGATE_DAILY  | 每项指标以 1 天精度保存的集群范围聚合数据                     | 2 年
+
+### 连接 Phoenix {#connecting-to-phoenix}
+* 将 Phoenix(4.2.0+)tar 包解压到指标收集器主机
+* 将目录切换到 phonenix-4.*/bin
+* 编辑 sqlline.py,搜索 "java",将 java 替换为 java 可执行文件的完整路径,例如:"/usr/jdk64/jdk1.8.0_40/bin/java"
+* 连接命令:
+Ambari 2.2.0 及更低版本:./sqlline.py localhost:61181:/hbase
+Ambari 2.2.0 以上版本:
+```bash
+./sqlline.py localhost:61181:/ams-hbase-unsecure (embedded mode) and <cluster-zookeeper-quorum-host>:<cluster_zookeeper_port>:/ams-hbase-unsecure (distributed mode)
+```
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/connect-phoenix.png "Connect Phoenix")
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/stack-defined-metrics.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/stack-defined-metrics.md
new file mode 100644
index 0000000..2cc84d9
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/stack-defined-metrics.md
@@ -0,0 +1,87 @@
+---
+title: Stack 定义的指标
+---
+
+<!-- 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. -->
+
+# Stack 定义的指标 {#stack-defined-metrics}
+
+Ambari Stack 定义代表集群中各项服务的完整声明式描述。
+
+Stack 定义还包含一个定义文件,其中列出了服务支持的所有指标。
+
+目前,metrics.json 描述 REST API 请求的指标名称与调用指标服务时使用的指标名称之间的映射。
+
+Stack 中 **metrics.json** 的位置:
+
+级别|位置|注释
+-----|--------|-------
+集群和主机 | ganglia_properties.json | 目前,此文件也为主机组件和服务组件定义指标,但这些定义仅用于 Stack < 2.0 的旧版本和单元测试。<br></br>此 JSON 文件中的集群和主机部分驱动仪表盘图表。
+组件和主机组件 | common-services.&lt;SERVICE_NAME&gt; | 此文件包含 Ambari Metrics(type = ganglia)和 JMX 的指标映射定义。
+
+**注意**:覆盖公共服务行为的各个 Stack 可以重新定义 metrics.json 文件;继承是全有或全无的,也就是说,如果子 Stack 中存在 metrics.json 文件,它将覆盖 common-services 中的 metrics.json。
+
+**metrics.json 文件结构**
+
+键|允许的值|注释
+-----|--------|-------------
+类型  |"ganglia" / "jmx" | type = ganglia 表示指标服务请求由 Ganglia(最高到 2.0 版本)或 Ambari Metrics(2.0 及以上版本)后端服务处理,该决定由 Ambari server 在运行时作出。
+类别 | "default" / "performance" ... | 用于将指标分组为子集,以便浏览
+指标 | metricKey : `{ "metricName": "", "pointInTime": "", "temporal": "" }` | metricKey = REST API 使用的键。它对于一个服务是唯一的,并标识请求的指标以及提供数据时使用的端点(AMS 或 JMX)
+  * metricName = 指标服务后端使用的名称
+  * pointInTime = 获取最新值,不允许查询时间范围
+  * temporal = 支持时间范围查询
+
+示例:
+
+```json
+{
+
+  "NAMENODE": {
+
+    "Component": [
+
+      {
+
+        "type": "ganglia",
+
+        "metrics": {
+
+          "default": {
+
+            "metrics/dfs/FSNamesystem/TotalLoad": {
+
+              "metric": "dfs.FSNamesystem.TotalLoad",
+
+              "pointInTime": false,
+
+              "temporal": true
+
+            }
+
+        } ]
+
+    },
+
+    "HostComponent" : [
+
+         { "type" : "ganglia", ... }
+
+         {  "type" : "jmx", .... }
+
+   ]
+
+}
+```
+
+**用于检索指标定义的 API 调用示例**:
+
+服务指标:
+```
+Template => http://<ambari-server>:<port>/api/v1/stacks/<stackName>/versions/<stackVersion>/services/<serviceName>/artifacts/metrics_descriptor
+Example => http://localhost:8080/api/v1/stacks/HDP/versions/2.3/services/HDFS/artifacts/metrics_descriptor
+```
+集群和主机指标:
+```
+Template => http://<ambari-server>:<port>/api/v1/stacks/<stackName>/versions/<stackVersion>/artifacts/metrics_descriptor
+Example => http://localhost:8080/api/v1/stacks/HDP/versions/2.3/artifacts/metrics_descriptor
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/troubleshooting.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/troubleshooting.md
new file mode 100644
index 0000000..44ded02
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/troubleshooting.md
@@ -0,0 +1,148 @@
+---
+title: 故障排除
+---
+
+<!-- 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. -->
+
+# 故障排除 {#troubleshooting}
+
+## 清理 Ambari Metrics 系统数据 {#cleaning-up-ambari-metrics-system-data}
+
+以下步骤有助于清理指定集群中的 Ambari Metrics 系统数据。
+
+重要说明:
+
+1. 清理 AMS 数据会删除所有可用的历史 AMS 数据
+2. 上述 hbase 参数专用于 AMS,与集群 Hbase 参数不同
+
+### 分步指南 {#step-by-step-guide}
+
+1. 使用 Ambari
+   * 将 AMS 设置为维护模式
+   * 在 Ambari 中停止 AMS。在 AMS 配置屏幕中确定以下内容
+      * 'Metrics Service operation mode'(嵌入式或分布式)
+      * hbase.rootdir
+      * hbase.zookeeper.property.dataDir
+2. AMS 数据存储在上面确定的 'hbase.rootdir' 中。备份并删除 AMS 数据。
+     * 如果指标服务操作模式
+         * 为 'embedded',数据存储在操作系统文件中。使用常规操作系统命令备份并删除 hbase.rootdir 中的文件
+         * 为 'distributed',数据存储在 HDFS 中。使用 'hdfs dfs' 命令备份并删除 hbase.rootdir 中的文件
+3. 备份并删除 'hbase.tmp.dir'/zookeeper 的内容,以删除 AMS ZooKeeper 数据
+4. 从 'hbase.tmp.dir'/phoenix-spool 文件夹中删除所有 Phoenix spool 文件
+5. 使用 Ambari 重启 AMS
+
+## 将指标收集器移动到新主机 {#moving-metrics-collector-to-a-new-host}
+
+1. 停止 AMS 服务
+
+2. 执行以下 API 调用以删除指标收集器。(将 server-host、cluster-name 和 host-name 替换为指标收集器主机)
+
+```
+curl -u admin:admin  -H "X-Requested-By:ambari" -i -X DELETE http://<server-host>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>/host_components/METRICS_COLLECTOR
+```
+
+3. 执行以下 API 调用,将指标收集器添加到新主机。(替换 server-host、cluster-name、host-name)
+
+```
+curl -u admin:admin  -H "X-Requested-By:ambari" -i -X POST http://<server-host>:8080/api/v1/clusters/<cluster-name>/hosts/<host-name>/host_components/METRICS_COLLECTOR
+```
+
+4. 从新主机的主机页面安装指标收集器组件。
+
+5. 如果 AMS 处于嵌入式模式,请将 AMS 数据从旧节点复制到新节点。
+
+     * 对于嵌入式模式(ams-site: timeline.metrics.service.operation.mode),将 hbase.rootdir 和 tmpdir 从旧收集器主机复制到新主机。
+     * 对于分布式模式,由于 AMS HBase 正在写入 HDFS,因此无需更改。
+     * 确保新 AMS 节点中的 ams:hbase-site:hbase.rootdir 和 hbase.tmp.dir 指向正确位置
+6. 启动指标服务。
+
+7. 服务守护进程仍将指向旧指标收集器主机。对从属组件执行滚动重启,对主组件执行普通重启,使其获取新的收集器主机。
+
+注意:Ambari-2.5.0 之后不需要重启服务,因为实时收集器信息保存在集群 ZooKeeper 中。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/metrics/imgs/restart-datanode.png)
+
+## 故障排除指南 {#troubleshooting-guide}
+
+以下页面记录了 Ambari Metrics 服务中发现的常见问题,并提供需要关注的问题和已解决问题的指南。
+
+**需要从系统收集的重要信息**:
+
+指标收集器主机的问题
+* 收集器主机上 "rpm -qa | grep ambari" 的输出。
+* 系统可用内存总量,输出:"free -g"
+* 可用磁盘空间和可用分区总量,输出:"df -h "
+* 集群中的主机总数
+* 配置:/etc/ams-hbase/conf/hbase-env.sh、/etc/ams-hbase/conf/hbase-site.xml、/etc/ambari-metrics-collector/conf/ams-env.sh、/etc/ambari-metrics-collector/conf/ams-site.xml
+* 收集器日志:
+
+```
+/var/log/ambari-metrics-collector/ambari-metrics-collector.log, /var/log/ambari-metrics-collector/hbase-ams-master-<host>.log, /var/log/ambari-metrics-collector/hbase-ams-master-<host>.out
+Note: Additionally, If distributed mode is enabled, /var/log/ambari-metrics-collector/hbase-ams-zookeeper-<host>.log, /var/log/ambari-metrics-collector/hbase-ams-regionserver-<host>.log
+```
+
+* 以下 URL 的响应:
+
+```
+http://<ams-host>:6188/ws/v1/timeline/metrics/metadata
+http://<ams-host>:6188/ws/v1/timeline/metrics/hosts 
+```
+
+* 响应为 JSON,可作为文件附加。
+* 从 AMS HBase Master UI 查看 - http://&lt;METRICS_COLLECTOR_HOST&gt;:61310
+    * Region Count
+    * StoreFile Count
+    * JMX Snapshot - http://&lt;METRICS_COLLECTOR_HOST&gt;:61310/jmx
+
+**指标监控器主机的问题**
+
+```
+Monitor log file: /etc/ambari-metrics-monitor/ambari-metrics-monitor.out
+```
+
+**查看[配置 - 调优](https://cwiki.apache.org/confluence/display/AMBARI/Configurations+-+Tuning),了解扩展性问题的故障排除方法。**
+
+**问题 1:AMS HBase 进程磁盘写入速度慢**
+
+以下症状和解决方案仅针对 AMS 的**嵌入式**模式。
+
+_症状_:
+
+行为|检测方法
+--------|--------------
+CPU 使用率高 | 收集器主机上的 HBase 进程占用每个核心接近 100%
+HBase 日志:压缩时间 | grep hbase-ams-master-&lt;host&gt;.log | grep "Finished memstore flush"<br></br>这会显示 X 毫秒内写入的 MB 数,除非磁盘存在竞争,通常平均速度为 128 MBps 及以上。<br></br>此搜索还会显示每分钟执行压缩的次数。大于 6 或 8 表示写入量远超 HBase 内存可容纳量,是一个警告
+HBase 日志:ZK 超时 | HBase 崩溃并提示 zookeeper 会话超时。这是因为嵌入式模式下 zk 会话超时最多限制为 30 秒(HBase 问题:计划在 2.1.3 中修复)。<br></br>原因同样是磁盘读取缓慢。
+收集器日志:“waiting for some tasks to finish” | ambari-metric-collector 日志显示 AsyncProcess 写入已排队
+
+_解决方案_:
+
+配置更改|描述
+--------|-----------------------
+ams-hbase-site :: hbase.rootdir | 将此路径更改为不繁忙的磁盘挂载点。
+ams-hbase-ste :: hbase.tmp.dir  | 将此路径更改为不同于 hbase.rootdir 的位置
+ams-hbase-env :: hbase_master_heapsize<br></br>ams-hbase-site :: hbase.hregion.memstore.flush.size | 增大此值,使更多数据保留在内存中,以应对 I/O 速度。<br></br>如果增大堆大小后常驻内存使用量没有增加,可以更改此参数以调整每个 Region 的 memstore 可存储数据量。默认设置为 128 MB,大小单位为字节。<br></br>请谨慎修改此值,通常限制在 64 MB(堆较小且磁盘写入快)到 512 MB(堆较大、超过 8 GB 且平均写入速度)之间,因为内存中保留更多数据意味着 Flush 操作写入磁盘所需时间更长。
+
+**问题 2:Ambari Metrics 加载时间过长**
+
+_症状_:
+
+行为|检测方法
+--------|--------------
+图表:加载时间过长<br></br>图表:无可用数据 | 查看服务页面/主机页面的指标图表
+Socket 读取超时 | ambari-server.log 显示指标 socket 超时错误消息
+Ambari UI 变慢  | 主机页面加载时间很长,热力图不显示数据<br></br>仪表盘加载时间过长<br></br>多个会话导致速度变慢
+
+_解决方案_:
+
+强烈建议升级到 2.1.2 或更高版本。
+
+以下是 2.1.2 版本中的修复列表,应能大幅缓解加载缓慢和超时问题:
+
+https://issues.apache.org/jira/browse/AMBARI-12654
+
+https://issues.apache.org/jira/browse/AMBARI-12983
+
+https://issues.apache.org/jira/browse/AMBARI-13108
+
+## [已知问题](https://cwiki.apache.org/confluence/display/AMBARI/Known+Issues) {#known-issues}
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/upgrading-ambari-metrics-system.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/upgrading-ambari-metrics-system.md
new file mode 100644
index 0000000..f67ea16
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/metrics/upgrading-ambari-metrics-system.md
@@ -0,0 +1,27 @@
+---
+title: 升级 Ambari Metrics 系统
+---
+
+<!-- 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. -->
+
+# 升级 Ambari Metrics 系统 {#upgrading-ambari-metrics-system}
+
+**从 Ambari 2.0 或 2.0.1 升级到 2.1**
+
+1. 升级 ambari server 并执行所需的升级后检查。(确保所有服务都已启动并正在运行)
+2. 停止 Ambari Metrics 服务
+3. 在所有主机上执行以下命令。
+
+  ```bash
+   yum upgrade -y ambari-metrics-monitor  ambari-metrics-hadoop-sink
+  ```
+  (在 ubuntu 和 windows 上使用适当的软件包管理器)
+
+4. 在运行指标收集器的主机上执行以下命令
+
+     ```bash
+     yum upgrade -y ambari-metrics-collector
+     ```
+
+5. 启动 Ambari Metrics 服务
+6. Sink jar 将部署到每台主机,守护进程重启后会加载 Sink 实现的更改。(例如:HDFS Namenode / Datanode)
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/quick-links.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/quick-links.md
new file mode 100644
index 0000000..d845174
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/quick-links.md
@@ -0,0 +1,244 @@
+---
+title: 快速链接
+---
+
+<!---
+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.
+--->
+
+# 快速链接 {#quick-links}
+
+## 简介 {#introduction}
+
+服务可以通过向遵循预定义 JSON 格式的文件添加元信息,为 Ambari Web UI 添加快速链接列表。Ambari Server 会解析快速链接 JSON 文件并将其内容提供给 UI,因此 Ambari Web UI 可以根据这些信息计算快速链接 URL,并相应填充快速链接下拉列表。
+
+## 设计 {#design}
+
+默认情况下,JSON 文件名为 quicklinks.json,位于服务根目录下的 quicklinks 目录中。例如,Oozie 的文件位于 OOZIE/quicklinks/quicklinks.json。您也可以使用其他文件名,或将文件放在服务根目录下的自定义目录中。
+
+以 YARN 为例,带有快速链接配置的 metainfo.xml 如下所示。
+
+```xml
+<services>
+    <service>
+    <name>YARN</name>
+    <version>2.7.1.2.3</version>
+    <quickLinksConfigurations>
+        <quickLinksConfiguration>
+            <fileName>quicklinks.json</fileName>
+            <default>true</default>
+        </quickLinksConfiguration>
+    </quickLinksConfigurations>
+```
+
+如下面的 MapReduce2 示例所示,metainfo.xml 可以包含不同的快速链接配置。
+
+_quickLinksConfigurations-dir_ 是可选字段,用于告知 Ambari Server 从何处加载 quicklinks.json 文件。如果希望服务使用默认的 _quicklinks_directory_,则可以省略该字段。
+
+```xml
+<service>
+    <name>MAPREDUCE2</name>
+    <version>2.7.1.2.3</version>
+    <quickLinksConfigurations-dir>quicklinks-mapred</quickLinksConfigurations-dir>
+    <quickLinksConfigurations>
+        <quickLinksConfiguration>
+            <fileName>quicklinks.json</fileName>
+            <default>true</default>
+        </quickLinksConfiguration>
+    </quickLinksConfigurations>
+```
+
+快速链接 JSON 文件包含两个主要部分:“configuration”部分用于确定协议(HTTP 或 HTTPS),“links”部分包含要在 Ambari Web UI 中显示的每个快速链接的元信息。JSON 文件顶部还包含“name”部分,用于定义服务器识别该快速链接 JSON 文件时使用的名称。
+
+Ambari Web UI 使用“configuration”部分提供的信息确定服务使用 HTTP 还是 HTTPS。该结果用于构造“links”部分中定义的所有快速链接 URL。
+
+以 YARN 为例,quicklinks.json 如下所示:
+```json
+{
+	"name": "default",
+	"description": "default quick links configuration",
+	"configuration": {
+		"protocol": {
+			# type tells the UI which protocol to use if all checks meet.
+
+            # Use https_only or http_only with empty checks section to explicitly specify the type
+			"type":"https",
+			"checks":[ # There can be more than one check needed.
+				{
+					"property":"yarn.http.policy",
+					# Desired section here either is a specific value for the property specified
+                    # Or whether the property value should exit or not_exist, blank or not_blank
+					"desired":"HTTPS_ONLY",
+					"site":"yarn-site"
+				}
+			]
+		},
+		#configuration for individual links
+		"links": [
+			{
+				"name": "resourcemanager_ui",
+				"label": "ResourceManager UI",
+				"requires_user_name": "false", #set this to true if UI should attach log in user name to the end of the quick link url
+				"url": "%@://%@:%@",
+
+				#section calculate the port numbe.
+				"port":{
+					#use a property for the whole url if the service does not have a property for the port.
+					#Specify the regex so the url can be parsed for the port value.
+					"http_property": "yarn.timeline-service.webapp.address",
+                    "http_default_port": "8080",
+					"https_property": "yarn.timeline-service.webapp.https.address",
+					"https_default_port": "8090",
+					"regex": "\\w*:(\\d+)",
+					"site": "yarn-site"
+				}
+			},
+			{
+				"name": "resourcemanager_logs",
+				"label": "ResourceManager logs",
+				"requires_user_name": "false",
+				"url": "%@://%@:%@/logs",
+				"port":{
+					"http_property": "yarn.timeline-service.webapp.address",
+					"http_default_port": "8088",
+					"https_property": "yarn.timeline-service.webapp.https.address",
+					"https_default_port": "8090",
+					"regex": "\\w*:(\\d+)",
+					"site": "yarn-site"
+				}
+			}
+		]
+	}
+}
+```
+
+# REST API {#rest-api}
+
+您可以通过以下 REST API 以 HTTP GET 请求方式查看提供给 Ambari Web UI 的快速链接信息。
+
+REST API
+
+```
+/api/v1/stacks/[stack_name]versions/[stack_version]/services/[service_name]/quicklinks?QuickLinkInfo/default=true&fields=*
+```
+
+发送给 Ambari Web UI 的响应。
+
+```json
+{
+  "href" : "http://localhost:8080/api/v1/stacks/HDP/versions/2.3/services/YARN/quicklinks?QuickLinkInfo/default=true&fields=*",
+  "items" : [
+    {
+      "href" : "http://localhost:8080/api/v1/stacks/HDP/versions/2.3/services/YARN/quicklinks/quicklinks.json",
+      "QuickLinkInfo" : {
+        "default" : true,
+        "file_name" : "quicklinks.json",
+        "service_name" : "YARN",
+        "stack_name" : "HDP",
+        "stack_version" : "2.3",
+        "quicklink_data" : {
+          "QuickLinksConfiguration" : {
+            "description" : "default quick links configuration",
+            "name" : "default",
+            "configuration" : {
+              "protocol" : {
+                "type" : "https",
+                "checks" : [
+                  {
+                    "property" : "yarn.http.policy",
+                    "desired" : "HTTPS_ONLY",
+                    "site" : "yarn-site"
+                  }
+                ]
+              },
+              "links" : [
+                {
+                  "name" : "resourcemanager_jmx",
+                  "label" : "ResourceManager JMX",
+                  "url" : "%@://%@:%@/jmx",
+                  "port" : {
+                    "regex" : "\\w*:(\\d+)",
+                    "site" : "yarn-site",
+                    "http_property" : "yarn.timeline-service.webapp.address",
+                    "http_default_port" : "8088",
+                    "https_property" : "yarn.timeline-service.webapp.https.address",
+                    "https_default_port" : "8090"
+                  },
+                  "removed" : false,
+                  "component_name" : "RESOURCEMANAGER",
+                  "requires_user_name" : "false"
+                },
+                {
+                  "name" : "resourcemanager_logs",
+                  "label" : "ResourceManager logs",
+                  "url" : "%@://%@:%@/logs",
+                  "port" : {
+                    "regex" : "\\w*:(\\d+)",
+                    "site" : "yarn-site",
+                    "http_property" : "yarn.timeline-service.webapp.address",
+                    "http_default_port" : "8088",
+                    "https_property" : "yarn.timeline-service.webapp.https.address",
+                    "https_default_port" : "8090"
+                  },
+                  "removed" : false,
+                  "component_name" : "RESOURCEMANAGER",
+                  "requires_user_name" : "false"
+                },
+                {
+                  "name" : "resourcemanager_ui",
+                  "label" : "ResourceManager UI",
+                  "url" : "%@://%@:%@",
+                  "port" : {
+                    "regex" : "\\w*:(\\d+)",
+                    "site" : "yarn-site",
+                    "http_property" : "yarn.resourcemanager.webapp.address",
+                    "http_default_port" : "8088",
+                    "https_property" : "yarn.resourcemanager.webapp.https.address",
+                    "https_default_port" : "8090"
+                  },
+                  "removed" : false,
+                  "component_name" : "RESOURCEMANAGER",
+                  "requires_user_name" : "false"
+                },
+                {
+                  "name" : "thread_stacks",
+                  "label" : "Thread Stacks",
+                  "url" : "%@://%@:%@/stacks",
+                  "port" : {
+                    "regex" : "\\w*:(\\d+)",
+                    "site" : "yarn-site",
+                    "http_property" : "yarn.timeline-service.webapp.address",
+                    "http_default_port" : "8088",
+                    "https_property" : "yarn.timeline-service.webapp.https.address",
+                    "https_default_port" : "8090"
+                  },
+                  "removed" : false,
+                  "component_name" : "RESOURCEMANAGER",
+                  "requires_user_name" : "false"
+                }
+              ]
+            }
+          }
+        }
+      }
+    }
+  ]
+}
+```
+
+## Ambari Web UI {#ambari-web-ui}
+
+Stack 驱动快速链接的更改不会显示在 UI 中。快速链接下拉列表的行为保持不变。
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/service-dashboard/index.mdx b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/service-dashboard/index.mdx
new file mode 100644
index 0000000..e5403c5
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/service-dashboard/index.mdx
@@ -0,0 +1,208 @@
+---
+title: Enhanced 服务仪表板
+---
+
+<!--
+   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.
+-->
+# Enhanced 服务仪表板 {#enhanced-service-dashboard}
+
+此功能首次在 Ambari 2.1.0 版本中引入。2.1.0 之前的任何 Ambari 版本都不支持此功能。集群必须升级到 Ambari 2.1.0 或更高版本才能使用此功能。
+
+:::caution
+本文假设服务指标通过 Ambari 暴露。如果不是这种情况,请参阅 [Metrics ](https://cwiki.apache.org/confluence/display/AMBARI/Metrics) 文档了解更多相关信息。
+:::
+
+## 简介 {#introduction}
+
+Enhanced Service Dashboard 一词表示可以无缝地向服务摘要页和热力图页添加新 widget。此功能支持将 widget 定义以 JSON 格式随 stack service 一起打包。安装服务时,这些 widget 定义会作为默认 widget 显示在服务摘要页和热力图页上。此外,还可以随时在已部署的集群中为服务创建新的 widget。
+
+在安装服务时显示默认服务仪表板 widget 包括 3 个步骤:
+
+1. 将服务指标推送到 Ambari Metric Collector。
+
+2. 在 Ambari 的服务 metrics.json 文件中声明服务指标。此步骤是通过 Ambari RESTful API 暴露指标所必需的。
+
+3. 在 widgets.json 文件中定义服务 widget。
+
+:::tip
+Widget 从服务指标获取要绘制的数据。定义 widget 前,务必确认所需服务指标已从 Ambari 指标 endpoint 暴露。
+:::
+
+## 服务仪表板 Widgets {#service-dashboard-widgets}
+
+Ambari 支持 4 种 widget 类型:
+
+1. Graph
+2. Gauge
+3. Number
+4. Template
+
+### Graph {#graph}
+
+用于显示一段时间内根据一个或多个服务指标值生成的折线图或面积图的 widget。
+![](@site/versioned_docs/version-3.0.0/ambari-design/service-dashboard/imgs/graphs.png "Graphs")
+
+### Graph Widget 定义 {#graph-widget-definition}
+
+```json
+{
+ "widget_name": "Memory Utilization",
+ "description": "Percentage of total memory allocated to containers running in the cluster.",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+   {
+     "name": "yarn.QueueMetrics.Queue=root.AllocatedMB",
+     "metric_path": "metrics/yarn/Queue/root/AllocatedMB",
+     "service_name": "YARN",
+     "component_name": "RESOURCEMANAGER",
+     "host_component_criteria": "host_components/HostRoles/ha_state=ACTIVE"
+   },
+   {
+     "name": "yarn.QueueMetrics.Queue=root.AvailableMB",
+     "metric_path": "metrics/yarn/Queue/root/AvailableMB",
+     "service_name": "YARN",
+     "component_name": "RESOURCEMANAGER",
+     "host_component_criteria": "host_components/HostRoles/ha_state=ACTIVE"
+   }
+ ],
+ "values": [
+   {
+     "name": "Memory Utilization",
+     "value": "${(yarn.QueueMetrics.Queue=root.AllocatedMB / (yarn.QueueMetrics.Queue=root.AllocatedMB + yarn.QueueMetrics.Queue=root.AvailableMB)) * 100}"
+   }
+ ],
+ "properties": {
+   "display_unit": "%",
+   "graph_type": "LINE",
+   "time_range": "1"
+ }
+}
+```
+
+1. **widget_name:** 这是 UI 中显示的 widget 名称。
+
+2. **description:** UI 中显示的 widget 描述。
+
+3. **widget_type:** widget 使用此信息根据指标数据创建 widget。
+
+4. **is_visible:** 此布尔值决定 widget 是否默认显示在服务摘要页上。
+
+5. **metrics:** 包含组成该 widget 的所有指标定义的数组。
+
+6. **metrics/name:** 服务推送到 sink 或作为 JMX 属性发出的指标实际名称。
+
+7. **metrics/metric_path** **:** 上述 metrics/name 在服务 metrics.json 文件中映射到的路径。指标值会通过 Ambari API 的服务组件或主机组件 endpoint,在相同路径的 metrics 属性中暴露。
+
+8. **metrics/service_name:** 发出指标的组件所属服务名称。
+
+9. **metrics/component_name:** 发出指标的组件名称。
+
+10. **metrics/host_component_criteria:** 这是可选字段。存在此字段表示该指标是主机组件指标,而不是服务组件指标。如果要在主机组件 endpoint 上查询指标,需要在此指定选择主机组件的条件。如果将其留为空格字符串,则会为该指标查询找到的第一个主机组件。
+
+11. **values:** Graph widget 的数据集数组。对于其他 widget 类型,此数组始终只有一个元素。
+
+12. **values/name:** 此字段仅用于 Graph widget 类型,在 Graph widget 中显示的数据集图例中作为标签名称出现。
+
+13. **values/value:** 用于计算数据集值的表达式。表达式包含对已声明指标名称的引用和作为有效操作数的常量数字,也包含可与有效操作数一起使用的运算符集合(`+`、`-`、`*`、`/`)。表达式中也允许使用括号。
+
+14. **properties:** 包含特定于 widget 类型的一组属性。对于 Graph widget 类型,它包含 display_unit、graph_type 和 time_range。UI 当前不会处理 time_range 字段。
+
+### Gauge {#gauge}
+
+用于显示根据一个指标当前值或多个指标当前值计算出的百分比的 widget。
+![](@site/versioned_docs/version-3.0.0/ambari-design/service-dashboard/imgs/gauge.png "Gauge")
+
+### Number {#number}
+
+用于显示数字的 widget,可选择显示单位;该数字可以根据一个指标当前值或多个指标当前值计算得出。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/service-dashboard/imgs/number.png "Number")
+
+### Template {#template}
+
+用于显示一个或多个数字以及嵌入字符串的 widget,这些数字根据一个指标当前值或多个指标当前值计算得出。
+
+指标的聚合函数
+
+聚合函数仅适用于服务组件级指标,不支持主机组件级指标。
+
+Ambari Metrics System 支持 4 种聚合类型:
+
+1. **max**:所有主机组件中的指标最大值
+2. **min**:所有主机组件中的指标最小值
+3. **avg**:所有主机组件中的指标平均值
+4. **sum**:每个主机组件记录的指标值之和
+
+默认情况下,Ambari Metrics System 在计算服务组件指标值时使用平均聚合函数,但可以通过在指标名称后添加聚合函数名称(._max、._min、._avg 和 ._sum)覆盖此行为。
+
+```json
+{
+ "widget_name": "Blocked Updates",
+ "description": "Number of milliseconds updates have been blocked so the memstore can be flushed.",
+ "default_section_name": "HBASE_SUMMARY",
+ "widget_type": "GRAPH",
+ "is_visible": true,
+ "metrics": [
+   {
+     "name": "regionserver.Server.updatesBlockedTime._sum",
+     "metric_path": "metrics/hbase/regionserver/Server/updatesBlockedTime._sum",
+     "service_name": "HBASE",
+     "component_name": "HBASE_REGIONSERVER"
+   }
+ ],
+ "values": [
+   {
+     "name": "Updates Blocked Time",
+     "value": "${regionserver.Server.updatesBlockedTime._sum}"
+   }
+ ],
+ "properties": {
+   "display_unit": "ms",
+   "graph_type": "LINE",
+   "time_range": "1"
+ }
+}
+```
+
+## Widget 操作: {#widget-operations}
+
+包含 widgets.json 和 metrics.json 文件的服务还具备以下功能:
+
+1. **Widget Browser**,用于执行 widget 相关操作。
+
+2. **Create widget wizard**,用于在集群中创建所需的新服务 widget。
+
+3. **Edit widget wizard**,用于创建后编辑服务 widget。
+
+## 小组件浏览器 {#widget-browser}
+
+Widget Browser 是执行 widget 操作的地方,例如从仪表板添加或删除 widget、与其他用户共享 widget 以及删除 widget。创建新 widget 时,用户可以选择是否与其他用户共享。用户创建的 widget、与用户共享的 widget,以及 stack 中定义的默认服务 widget,都会在该用户的 widget browser 中提供。
+![](@site/versioned_docs/version-3.0.0/ambari-design/service-dashboard/imgs/widget-browser.png "Widget Browser")
+
+### 创建小组件向导 {#create-widget-wizard}
+
+可以使用包含 3 个步骤的创建小组件向导,根据已暴露的服务指标创建所需的自定义小组件。
+![](@site/versioned_docs/version-3.0.0/ambari-design/service-dashboard/imgs/create-widget.png "Create Widget")
+
+## 使用增强服务仪表板功能 {#using-enhanced-service-dashboard-feature}
+
+如果 Ambari 中的现有服务正在将指标推送到 Ambari metrics collector,则只需进行少量工作。这包括为服务添加 metrics.json 和 widgets.json 文件,可能还包括修改 metainfo.xml 文件。
+
+:::tip
+[AMBARI-9910](https://issues.apache.org/jira/browse/AMBARI-9910) 为 Accumulo 服务页面添加了小组件,可作为使用增强服务仪表板功能的参考示例。
+:::
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/custom-services.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/custom-services.md
new file mode 100644
index 0000000..f603b56
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/custom-services.md
@@ -0,0 +1,1080 @@
+---
+title: 自定义服务
+---
+
+<!---
+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.
+--->
+
+# 自定义服务 {#custom-services}
+
+There 是 many aspects to creating custom services.  At its most basic a service 必须 include its metainfo.xml 和 command script.  It also 必须 be packaged to allow adding it to a cluster.  Some of the further sub-sections define optional elements of the service definition which 可以 be included.
+
+## 定义自定义服务 {#defining-a-custom-service}
+
+
+
+### 服务元信息和组件类别 {#service-metainfo-and-component-category}
+
+#### metainfo.xml {#metainfoxml}
+
+The `metainfo.xml` file in a Service describes the service, the components of the service 和 the management scripts to use for executing commands. A component of a service 必须 be either a **MASTER**, **SLAVE** 或 **CLIENT** category. The
+
+For each Component you 必须 specify the &lt;commandScript&gt; to use when executing commands. There 是 a defined set of default commands the component 必须 support depending on the components category.
+
+组件类别 | 默认生命周期命令
+-------------------|--------------------------
+MASTER  | install, start, stop, configure, status
+SLAVE   | install, start, stop, configure, status
+CLIENT  | install, configure, status
+
+Ambari supports different commands scripts written in **PYTHON**. The type 是 used to know how to execute the command scripts. 您可以 also create **custom commands** if there 是 other commands beyond the default lifecycle commands your component needs to support.
+
+例如, in the YARN Service describes the ResourceManager component as follows in [`metainfo.xml`](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml):
+
+```xml
+<component>
+  <name>RESOURCEMANAGER</name>
+  <category>MASTER</category>
+  <commandScript>
+    <script>scripts/resourcemanager.py</script>
+    <scriptType>PYTHON</scriptType>
+    <timeout>600</timeout>
+  </commandScript>
+  <customCommands>
+    <customCommand>
+      <name>DECOMMISSION</name>
+      <commandScript>
+        <script>scripts/resourcemanager.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>600</timeout>
+      </commandScript>
+    </customCommand>
+  </customCommands>
+</component>
+```
+
+The ResourceManager 是 a MASTER component, 和 the command script 是 `<a href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py">scripts/resourcemanager.py</a>`, which 可以 be found in the `services/YARN/package` directory. That command script 是 **PYTHON** 和 that script implements the default lifecycle commands as python methods. This 是 the **install** method for the default **INSTALL** command:
+
+```python
+class Resourcemanager(Script):
+  def install(self, env):
+    self.install_packages(env)
+    self.configure(env)
+```
+
+您可以 also see a custom command 是 defined **DECOMMISSION**, which means there 是 also a **decommission** method in that python command script:
+
+```python
+def decommission(self, env):
+    import params
+
+    ...
+
+    Execute(yarn_refresh_cmd,
+            user=yarn_user
+    )
+    pass
+```
+
+### 实现自定义服务 {#implementing-a-custom-service}
+
+在本示例中, we will create a custom service called "SAMPLESRV". This service includes MASTER, SLAVE 和 CLIENT components.
+
+#### 创建自定义服务 {#create-a-custom-service}
+
+1. Create a directory named `<strong>SAMPLESRV</strong>` that will contain the service definition for **SAMPLESRV**.
+
+```bash
+mkdir SAMPLESRV
+cd SAMPLESRV
+```
+2. Within the `SAMPLESRV` directory, create a `metainfo.xml` file that describes the new service. 例如:
+
+```xml
+<?xml version="1.0"?>
+<metainfo>
+    <schemaVersion>2.0</schemaVersion>
+    <services>
+        <service>
+            <name>SAMPLESRV</name>
+            <displayName>New Sample Service</displayName>
+            <comment>A New Sample Service</comment>
+            <version>1.0.0</version>
+            <components>
+                <component>
+                    <name>SAMPLESRV_MASTER</name>
+                    <displayName>Sample Srv Master</displayName>
+                    <category>MASTER</category>
+                    <cardinality>1</cardinality>
+                    <commandScript>
+                        <script>scripts/master.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+                <component>
+                    <name>SAMPLESRV_SLAVE</name>
+                    <displayName>Sample Srv Slave</displayName>
+                    <category>SLAVE</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/slave.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+                <component>
+                    <name>SAMPLESRV_CLIENT</name>
+                    <displayName>Sample Srv Client</displayName>
+                    <category>CLIENT</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/sample_client.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+            </components>
+            <osSpecifics>
+                <osSpecific>
+                    <osFamily>any</osFamily>
+                </osSpecific>
+            </osSpecifics>
+        </service>
+    </services>
+</metainfo>
+```
+3. In the above, the service name 是 " **SAMPLESRV**", 和 it contains:
+
+  - one **MASTER** component " **SAMPLESRV_MASTER**"
+  - one **SLAVE** component " **SAMPLESRV_SLAVE**"
+  - one **CLIENT** component " **SAMPLESRV_CLIENT**"
+4. 接下来创建命令脚本。创建服务元信息中指定的命令脚本目录 `SAMPLESRV` `/` ** `package/scripts`**。
+
+```bash
+mkdir -p package/scripts
+cd package/scripts
+```
+5. Within the scripts directory, create the `.py` command script files mentioned in the metainfo. 例如 `master.py` file:
+
+```python
+import sys
+from resource_management import *
+class Master(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Master';
+  def configure(self, env):
+    print 'Configure the Sample Srv Master';
+  def stop(self, env):
+    print 'Stop the Sample Srv Master';
+  def start(self, env):
+    print 'Start the Sample Srv Master';
+  def status(self, env):
+    print 'Status of the Sample Srv Master';
+if __name__ == "__main__":
+  Master().execute()
+```
+
+例如 `slave` `.py` file:
+
+```python
+import sys
+from resource_management import *
+class Slave(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Slave';
+  def configure(self, env):
+    print 'Configure the Sample Srv Slave';
+  def stop(self, env):
+    print 'Stop the Sample Srv Slave';
+  def start(self, env):
+    print 'Start the Sample Srv Slave';
+  def status(self, env):
+    print 'Status of the Sample Srv Slave';
+if __name__ == "__main__":
+  Slave().execute()
+```
+
+例如 `sample_client` `.py` file:
+
+```python
+import sys
+from resource_management import *
+class SampleClient(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Client';
+  def configure(self, env):
+    print 'Configure the Sample Srv Client';
+if __name__ == "__main__":
+  SampleClient().execute()
+```
+
+#### 实现自定义命令 {#implementing-a-custom-command}
+
+1. Browse to the `SAMPLESRV` directory, 和 edit the `metainfo.xml` file that describes the service. 例如, adding a custom command to the SAMPLESRV_CLIENT:
+
+```xml
+
+                <component>
+                    <name>SAMPLESRV_CLIENT</name>
+                    <displayName>Sample Srv Client</displayName>
+                    <category>CLIENT</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/sample_client.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                    <customCommands>
+                      <customCommand>
+                        <name>SOMETHINGCUSTOM</name>
+                        <commandScript>
+                          <script>scripts/sample_client.py</script>
+                          <scriptType>PYTHON</scriptType>
+                          <timeout>600</timeout>
+                        </commandScript>
+                      </customCommand>
+                    </customCommands>
+                </component>
+```
+2. 接下来通过编辑服务元信息中指定的 package/scripts/sample_client.py 文件来创建命令脚本。
+
+
+```python
+import sys
+from resource_management import *
+
+class SampleClient(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Client';
+  def configure(self, env):
+    print 'Configure the Sample Srv Client';
+  def somethingcustom(self, env):
+    print 'Something custom';
+
+if __name__ == "__main__":
+  SampleClient().execute()
+```
+
+#### 向自定义服务添加配置 {#adding-configs-to-the-custom-service}
+
+在本示例中, we will add a configuration type "test-config" to our SAMPLESRV.
+
+1. Modify the metainfo.xml Add the configuration files to the CLIENT component will make it available in the client tar ball downloaded 从 Ambari.
+
+```xml
+<component>
+    <name>SAMPLESRV_CLIENT</name>
+    <displayName>Sample Srv Client</displayName>
+    <category>CLIENT</category>
+    <cardinality>1+</cardinality>
+    <commandScript>
+        <script>scripts/sample_client.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>600</timeout>
+    </commandScript>
+    <configFiles>
+      <configFile>
+        <type>xml</type>
+        <fileName>test-config.xml</fileName>
+        <dictionaryName>test-config</dictionaryName>
+      </configFile>
+    </configFiles>
+</component>
+```
+2. Create a directory for the configuration dictionary file `SAMPLESRV` `/` **`configuration`**.
+
+```bash
+mkdir -p configuration
+cd configuration
+```
+3. Create the `test-config.xml` file. 例如:
+
+```xml
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+ 
+<configuration>
+  <property>
+    <name>some.test.property</name>
+    <value>this.is.the.default.value</value>
+    <description>This is a test description.</description>
+  </property>
+  <property>
+    <name>another.test.property</name>
+    <value>5</value>
+    <description>This is a second test description.</description>
+  </property>
+</configuration>
+
+```
+4. There 是 an optional setting "configuration-dir". Custom services 应 either not include the setting 或 应 leave it as the default value "configuration".
+
+```xml
+<configuration-dir>configuration</configuration-dir>
+```
+5. Configuration dependencies 可以 be included in the metainfo.xml in the a " `configuration-dependencies`" section. 本节 可以 be added to the service as a whole 或 a particular component. One of the implications of this dependency 是 that whenever the config-type 是 updated, Ambari automatically marks the component 或 service as requiring restart.
+
+例如, HIVE defines a component level configuration dependencies for the HIVE_METASTORE component
+
+```xml
+      <component>
+          <name>HIVE_METASTORE</name>
+          <displayName>Hive Metastore</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <reassignAllowed>true</reassignAllowed>
+          <clientsToUpdateConfigs></clientsToUpdateConfigs>
+... ...
+          <configuration-dependencies>
+            <config-type>hive-site</config-type>
+          </configuration-dependencies>
+        </component>
+```
+
+HIVE also defines service level configuration dependencies.
+
+```xml
+<configuration-dependencies>
+   <config-type>core-site</config-type>
+   <config-type>hive-log4j</config-type>
+   <config-type>hive-exec-log4j</config-type>
+   <config-type>hive-env</config-type>
+   <config-type>hivemetastore-site.xml</config-type>
+   <config-type>webhcat-site</config-type>
+   <config-type>webhcat-env</config-type>
+   <config-type>parquet-logging</config-type>
+   <config-type>ranger-hive-plugin-properties</config-type>
+   <config-type>ranger-hive-audit</config-type>
+   <config-type>ranger-hive-policymgr-ssl</config-type>
+   <config-type>ranger-hive-security</config-type>
+   <config-type>mapred-site</config-type>
+   <config-type>application.properties</config-type>
+   <config-type>druid-common</config-type>
+ </configuration-dependencies>
+```
+
+## 打包和安装自定义服务 {#packaging-and-installing-custom-services}
+
+### 简介 {#introduction}
+
+Custom services in Apache Ambari 可以 be packaged 和 installed in many ways. Ideally, they 应 all be packaged 和 installed in the same manner. This document describes how to package 和 install custom services 使用 Extensions 和 Management Packs. Using this approach, the custom service definitions do not get inserted under the stack versions services directory. This keeps the stack clean 和 allows users to easily see which services were installed by which package (stack 或 extension).
+
+### 管理包 {#management-packs}
+
+A [management pack](./management-packs.md) 是 a mechanism for installing stacks, extensions 和 custom services. A management pack 是 packaged as a tar.gz file which expands as a directory that includes an mpack.json file 和 the stack, extension 和 custom service definitions that it defines.
+
+#### 示例结构 {#example-structure}
+
+myext-mpack1.0.0.0
+
+├── mpack.json
+
+└──
+
+#### mpack.json 格式 {#mpackjson-format}
+
+The mpacks.json file allows you to specify the name, version 和 description of the management pack along with the prerequisites for installing the management pack. For extension management packs, the only important prerequisite 是 the min_ambari_version. The most important part 是 the artifacts section. For the purpose here, the artifact type will always be "extension-definitions". 您可以 provide any name for the artifact 和 you 可以 potentially change the source_dir if you wish to package your e [...]
+
+```json
+{
+
+"type" : "full-release",
+
+"name" : "myextension-mpack",
+
+"version": "1.0.0.0",
+
+"description" : "MyExtension Management Pack",
+
+"prerequisites": {
+
+"min_ambari_version" : "2.4.0.0"
+
+},
+
+"artifacts": [
+
+{
+
+"name" : "myextension-extension-definitions",
+
+"type" : "extension-definitions",
+
+"source_dir": "extensions"
+
+}
+
+]
+
+}
+```
+
+### 扩展 {#extensions}
+
+An [extension](./extensions.md)is a collection of one 或 more custom services which 是 packaged together. Much like stacks, each extension has a name which needs to be unique in the cluster. It also has a version folder to distinguish different releases of the extension which go in the resources/extensions folder with
+
+An extension version 是 similar to a stack version but it only includes the metainfo.xml 和 the services directory. This means that the alerts, kerberos, metrics, role command order 和 widgets files 是 not supported 和 应 be included at the service level. In addition, the repositories, hooks, configurations, 和 upgrades directories 是 not supported although upgrade support 可以 be added at the service level.
+
+#### 扩展结构 {#extension-structure}
+
+```
+MY_EXT
+
+└── 1.0
+
+        ├── metainfo.xml
+
+        └── services
+
+                ├── SERVICEA
+
+                ├── ...
+```
+
+#### 扩展 metainfo.xml 格式: {#extension-metainfoxml-format}
+
+The extension metainfo.xml 是 very simple, it just specifies the minimum stack versions which 是 supported.
+
+```xml
+<metainfo>
+
+  <prerequisites>
+
+    <min-stack-versions>
+
+      <stack>
+
+        <name>BIGTOP</name>
+
+        <version>1.0.*</version>
+
+      </stack>
+
+    </min-stack-versions>
+
+  </prerequisites>
+
+</metainfo>
+```
+
+#### 扩展继承 {#extension-inheritance}
+
+Extension versions 可以 _extend_ other Extension versions in order to share command scripts 和 configurations. This reduces duplication of code across Extensions with the following:
+
+ * 在子扩展版本中添加新服务(不在父扩展版本中)
+* override command scripts of the parent Services
+* override configurations of the parent Services
+
+例如, **MyExtension 2.0**could extend **MyExtension 1.0** so only the changes applicable to **the MyExtension 2.0** extension 是 present in that Extension definition. This extension 是 defined in the metainfo.xml for **MyExtension 2.0**:
+
+```xml
+<metainfo>
+  <extends>1.0</extends>
+
+```
+
+### 扩展管理包结构 {#extension-management-packs-structure}
+
+```
+myext-mpack1.0.0.0
+
+├── mpack.json
+
+└── extensions
+
+        └── MY_EXT
+
+                └── 1.0
+
+                        ├── metainfo.xml
+
+                        └── services
+
+                                └── SERVICEA
+
+                └── 2.0
+
+                         ├── metainfo.xml
+
+                         └── services
+
+                                 ├── SERVICEA
+
+                                 └── …
+
+
+```
+
+### 安装管理包 {#installing-management-packs}
+
+In order to install an extension management pack, you run the following command with 或 without the "-v" option:
+
+ambari-server install-mpack --mpack=/dir/to/myext-mpack-1.0.0.0.tar.gz -v
+
+This will check to see if the management pack's prerequisites 是 met (min_ambari_version). In addition it will check to see if there 是 any errors in the management pack format. Assuming everything 是 correct, the management pack will be extracted in:
+
+/var/lib/ambariserver/resources/mpacks.
+
+It will then create symlinks 从 /var/lib/ambari-server/resources/extensions for each extension version in /var/lib/ambari-server/resources/mpacks/
+
+扩展目录 | 目标管理包符号链接
+--------------------|------------------------------------------------------------------
+resources/extensions/MY_EXT/1.0 | resources/mpacks/myext-mpack1.0.0.0/extensions/MY_EXT/1.0
+resources/extensions/MY_EXT/2.0 | resources/mpacks/myext-mpack1.0.0.0/extensions/MY_EXT/2.0
+
+### 验证扩展安装 {#verifying-the-extension-installation}
+
+Once you have installed the extension management pack, you 可以 restart ambari-server.
+
+```bash
+ambari-server restart
+```
+
+重启 ambari-server 后,您将在 Ambari 数据库的扩展表中看到列出的扩展:
+
+```
+ambari=> select * from extension;
+
+extension_id | extension_name | extension_version
+
+--------------+----------------+-------------------
+
+1 | EXT | 1.0
+
+(1 row)
+```
+
+您可以 also query for extensions by calling REST APIs.
+
+```
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://
+
+{
+
+"href" : "http://
+
+"items" : [{
+
+"href" : "http://
+
+"Extensions" : {
+
+"extension_name" : "EXT"
+
+}
+
+}]
+
+}
+
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://
+
+{
+
+"href" : "http://
+
+"Extensions" : {
+
+"extension_name" : "EXT"
+
+},
+
+"versions" : [{
+
+"href" : "http://
+
+"Versions" : {
+
+"extension_name" : "EXT",
+
+"extension_version" : "1.0"
+
+}
+
+}]
+
+}
+
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://
+
+{
+
+"href" : "http://
+
+"Versions" : {
+
+"extension-errors" : [ ],
+
+"extension_name" : "EXT",
+
+"extension_version" : "1.0",
+
+"parent_extension_version" : null,
+
+"valid" : true
+
+}
+
+}
+```
+
+### 将扩展链接到 Stack {#linking-extensions-to-the-stack}
+
+Once you have verified that Ambari knows about your extension, the next step 是 linking the extension version to the current stack version. Linking adds the extension version's services to the list of stack version services. This allows you to install the extension services on the cluster. Linking an extension version to a stack version, will first verify whether the extension supports the given stack version. This 是 determined by the stack versions listed in the extension version's metai [...]
+
+以下 REST API call, will link an extension version to a stack version. 在本示例中 it 是 linking EXT/1.0 with the BIGTOP/1.0 stack version.
+
+```bash
+curl -u admin:admin -H 'X-Requested-By: ambari' -X POST -d '{"ExtensionLink": {"stack_name": "BIGTOP", "stack_version": "1.0", "extension_name": "EXT", "extension_version": "1.0"}}' http://
+```
+
+您可以 examine links (or extension links) either in the Ambari DB 或 with REST API calls.
+
+```
+ambari=> select * from extensionlink;
+
+link_id | stack_id | extension_id
+
+---------+----------+--------------
+
+1 | 2 | 1
+
+(1 row)
+
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://
+
+{
+
+"href" : "http://
+
+"items" : [{
+
+"href" : "http://
+
+"ExtensionLink" : {
+
+"extension_name" : "EXT",
+
+"extension_version" : "1.0",
+
+"link_id" : 1,
+
+"stack_name" : "BIGTOP",
+
+"stack_version" : "1.0"
+
+}
+
+}]
+
+}
+```
+
+## 角色命令顺序 {#role-command-order}
+
+Each service 可以 define its own role command order by including a role_command_order.json file in its service folder. The service 应 only specify the relationship of its components to other components. In other words, if a service only includes COMP_X, it 应 only list dependencies related to COMP_X. If when COMP_X starts it 是 dependent on the NameNode start 和 when the NameNode stops it 应 wait for COMP_X to stop, the following would be included in the role command order:
+
+```json
+{
+  "_comment" : "Record format:",
+  "_comment" : "blockedRole-blockedCommand: [blockerRole1-blockerCommand1, blockerRole2-blockerCommand2, ...]",
+  "general_deps" : {
+    "_comment" : "dependencies for all cases"
+  },
+  "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster",
+  "optional_no_glusterfs": {
+    "COMP_X-START": ["NAMENODE-START"],
+    "NAMENODE-STOP": ["COMP_X-STOP"]
+  }
+}
+```
+
+The entries in the service's role command order will be merged with the role command order defined in the stack. 例如, since the stack already has a dependency for NAMENODE-STOP, in the example above COMP_X-STOP would be added to the rest of the NAMENODE-STOP dependencies 和 the COMP_X-START dependency on NAMENODE-START would be added as a new dependency.
+
+**Sections**
+Ambari uses the below sections only:
+
+Section Name | When Used
+-------------|------------
+general_deps | Command orders 是 applied in all situations
+optional_glusterfs | Command orders 是 applied when cluster has instance of GLUSTERFS service
+optional_no_glusterfs | Command orders 是 applied when cluster does not have instance of GLUSTERFS service
+namenode_optional_ha | Command orders 是 applied when HDFS service 是 installed 和 JOURNALNODE component exists (HDFS HA 是 enabled)
+resourcemanager_optional_ha | Command orders 是 applied when YARN service 是 installed 和 multiple RESOURCEMANAGER host-components exist (YARN HA 是 enabled)
+
+**Commands**
+Commands currently supported by Ambari are
+
+* INSTALL
+* UNINSTALL
+* START
+* RESTART
+* STOP
+* EXECUTE
+* ABORT
+* UPGRADE
+* SERVICE_CHECK
+* CUSTOM_COMMAND
+* ACTIONEXECUTE
+
+## 服务顾问 {#service-advisor}
+
+Each custom service 可以 provide a service advisor as a Python script named service-advisor.py in their service folder. A Service Advisor allows custom services to integrate 到 the stack advisor behavior which only applies to the services within the stack.
+
+### 服务顾问 Inheritance {#service-advisor-inheritance}
+
+Unlike the Stack-advisor scripts, the service-advisor scripts do not automatically extend the parent service's service-advisor scripts. The service-advisor script needs to explicitly extend their parent's service service-advisor script.  以下 code sample shows how you would refer to a parent's service_advisor.py.  In this case it 是 extending the root service-advisor.py file in the resources/stacks directory.
+
+**Sample service-advisor.py file inheritance**
+
+```python
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+ 
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+ 
+class HAWQ200ServiceAdvisor(service_advisor.ServiceAdvisor):
+```
+
+### 服务顾问 Behavior {#service-advisor-behavior}
+
+与 Stack 顾问一样,服务顾问会为服务的 4 个重要方面提供信息:
+
+1. Recommend layout of the service on cluster
+2. Recommend service configurations
+3. Validate layout of the service on cluster
+4. Validate service configurations
+
+By providing the service-advisor.py file, one 可以 control dynamically each of the above for the service. 
+
+The [main interface for the service-advisor](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/service_advisor.py#L51) scripts contains documentation on how each of the above 是 called, 和 what data 是 provided.
+
+**Base service_advisor.py 从 resources/stacks**
+
+```python
+
+class ServiceAdvisor(DefaultStackAdvisor):
+ 
+  def colocateService(self, hostsComponentsMap, serviceComponents):
+    pass
+ 
+  def getServiceConfigurationRecommendations(self, configurations, clusterSummary, services, hosts):
+    pass
+ 
+  def getServiceComponentLayoutValidations(self, services, hosts):
+    return []
+ 
+  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+    return []
+```
+
+**Examples**
+[Service Advisor interface](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/service_advisor.py#L51)
+[HAWQ 2.0.0 Service Advisor implementation](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py)
+[PXF 3.0.0 Service Advisor implementation](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/PXF/3.0.0/service_advisor.py)
+
+## 服务继承 {#service-inheritance}
+
+A service 可以 inherit through the stack but may also inherit directly 从 common-services. This 是 declared in the metainfo.xml:
+
+```xml
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>HDFS</name>
+      <extends>common-services/HDFS/2.1.0.2.0</extends>
+```
+
+When a service inherits 从 another service version, how its defining files 和 directories 是 inherited follows a number of different patterns.
+
+以下 files if defined in the current service version replace the definitions 从 the parent service version:
+
+* alerts.json
+* kerberos.json
+* metrics.json
+* role_command_order.json
+* service_advisor.py
+* widgets.json
+
+注意:所有服务的角色命令顺序都会与 Stack 的角色命令顺序合并,以提供主列表。
+
+以下 files if defined in the current service version 是 merged with the parent service version (supports removing/deleting parent entries):
+
+* quicklinks/quicklinks.json
+* themes/theme.json
+
+以下 directories if defined in the current service version replace those 从 the parent service version:
+
+* packages
+* upgrades
+
+This means the files included in those directories at the parent level will not be inherited. You will need to copy all the files you wish to keep 从 that directory structure.
+
+The configurations directory in the current service version merges the configuration files with those 从 the parent service version. Configuration files defined at any level 可以 be omitted 从 the services configurations by specifying the config-type in the excluded-config-types list:
+
+```xml
+      <excluded-config-types>
+        <config-type>storm-site</config-type>
+      </excluded-config-types>
+```
+
+For an individual configuration file (or configuration type) like core-site.xml, it will by default merge with the configuration type 从 the parent. If the `supports_do_not_extend` attribute 是 specified as `true`, the configuration type will **not** be merged.
+
+```xml
+<configuration supports_do_not_extend="true">
+```
+
+### 继承与服务元信息 {#inheritance-and-the-service-metainfo}
+
+By default all attributes of the service 和 components if defined in the metainfo.xml of the current service version will replace those of the parent service version unless specified in the sections that follow.
+
+```xml
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>HDFS</name>
+      <displayName>HDFS</displayName>
+      <comment>Apache Hadoop Distributed File System</comment>
+      <version>2.1.0.2.0</version>
+      <components>
+        <component>
+          <name>NAMENODE</name>
+          <displayName>NameNode</displayName>
+          <category>MASTER</category>
+          <cardinality>1-2</cardinality>
+          <versionAdvertised>true</versionAdvertised>
+          <reassignAllowed>true</reassignAllowed>
+          <commandScript>
+            <script>scripts/namenode.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>1800</timeout>
+          </commandScript>
+          ...
+```
+
+The custom commands defined in the metainfo.xml of the current service version 是 merged with those of the parent service version.
+
+```xml
+          <customCommands>
+            <customCommand>
+              <name>DECOMMISSION</name>
+              <commandScript>
+                <script>scripts/namenode.py</script>
+                <scriptType>PYTHON</scriptType>
+                <timeout>600</timeout>
+              </commandScript>
+            </customCommand>
+```
+
+The configuration dependencies defined in the metainfo.xml of the current service version 是 merged with those of the parent service version.
+
+```xml
+      <configuration-dependencies>
+        <config-type>core-site</config-type>
+        <config-type>hdfs-site</config-type>
+        ...
+      </configuration-dependencies>
+
+```
+
+The components defined in the metainfo.xml of the current service 是 merged with those of the parent (supports delete).
+
+```xml
+        <component>
+          <name>ZKFC</name>
+          <displayName>ZKFailoverController</displayName>
+          <category>SLAVE</category>
+```
+
+## 服务升级 {#service-upgrade}
+
+Each custom service 可以 define its upgrade within its service definition. This allows the custom service to be integrated within the [stack's upgrade](https://cwiki.apache.org/confluence/display/AMBARI/How-To+Define+Stacks+and+Services#How-ToDefineStacksandServices-StackUpgrades).
+
+### 服务升级 Packs {#service-upgrade-packs}
+
+Each service 可以 define _upgrade-packs_, which 是 XML files describing the upgrade process of that particular service 和 how the upgrade pack relates to the overall stack upgrade-packs. These _upgrade-pack_ XML files 是 placed in the service's _upgrades/_ folder in separate sub-folders specific to the stack-version they 是 meant to extend. Some examples of this 可以 be seen in the testing code.
+
+**Examples**
+
+- [Upgrades folder](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/)
+- [Upgrade-pack XML](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml)
+
+### 匹配升级包 {#matching-upgrade-packs}
+
+服务定义的每个升级包都应与特定 Stack 版本定义的服务文件名匹配。例如,在测试代码中,HDP 2.2.0 有一个 [upgrade_test_15388.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml) 升级包。HDFS 服务定义了该升级包的扩展 [HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml)。本例中,升级包定义在 HDP/2.0.5 Stack 中。由于升级包定义在 up [...]
+
+**Upgrade XML Format**
+
+The file format for the service 是 much the same as that of the stack. The target, target-stack 和 type attributes 应 all be the same as the stack's upgrade-pack.
+
+**Prerequisite Checks**
+
+The service 是 able to add its own prerequisite checks.
+
+**General Attributes 和 Prerequisite Checks**
+```xml
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <target>2.4.*</target>
+  <target-stack>HDP-2.4.0</target-stack>
+  <type>ROLLING</type>
+  <prerequisite-checks>
+    <check>org.apache.ambari.server.checks.FooCheck</check>
+  </prerequisite-checks>
+```
+
+**Order Section**
+
+The order section of the upgrade-pack, consists of group elements just like the stack's upgrade-pack. The key difference 是 defining how these groups relate to groups in the stack's upgrade pack 或 other service upgrade-packs. In the first example we 是 referencing the PRE_CLUSTER group 和 adding a new execute-stage for the service FOO. The entry 是 supposed to be added after the execute-stage for HDFS based on the
+
+**Order Section - Add After Group Entry**
+```xml
+
+<order>
+  <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre {{direction.text.proper}}">
+    <add-after-group-entry>HDFS</add-after-group-entry>
+    <execute-stage service="FOO" component="BAR" title="Backup FOO">
+      <task xsi:type="manual">
+        <message>Back FOO up.</message>
+      </task>
+    </execute-stage>
+  </group>
+
+```
+
+The same syntax 可以 be used to order other sections like service check priorities 和 group services.
+
+**Order Section - Further Add After Group Entry Examples**
+```xml
+<group name="SERVICE_CHECK1" title="All Service Checks" xsi:type="service-check">
+  <add-after-group-entry>ZOOKEEPER</add-after-group-entry>
+  <priority>
+    <service>HBASE</service>
+  </priority>
+</group>
+ 
+<group name="CORE_MASTER" title="Core Masters">
+  <add-after-group-entry>YARN</add-after-group-entry>
+  <service name="HBASE">
+    <component>HBASE_MASTER</component>
+  </service>
+</group>
+```
+
+It 是 also possible to add new groups 和 order them after other groups in the stack's upgrade-packs. In the following example, we 是 adding the FOO group after the HIVE group 使用 the add-after-group tag.
+
+**Order Section - Add After Group**
+```xml
+<group name="FOO" title="Foo">
+  <add-after-group>HIVE</add-after-group>
+  <skippable>true</skippable>
+  <allow-retry>false</allow-retry>
+  <service name="FOO">
+    <component>BAR</component>
+  </service>
+</group>
+```
+
+您也可以在同一组中同时包含 add-after-group 和 add-after-group-entry 标签。如果该组尚不存在,这将创建一个新组,并将其排列在 add-after-group 的组名之后。add-after-group-entry 将决定该组服务、优先级或执行阶段的内部顺序。
+
+**Order Section - Add After Group**
+```xml
+<group name="FOO" title="Foo">
+  <add-after-group>HIVE</add-after-group>
+  <add-after-group-entry>FOO</add-after-group-entry>
+  <skippable>true</skippable>
+  <allow-retry>false</allow-retry>
+  <service name="FOO2">
+    <component>BAR2</component>
+  </service>
+</group>
+```
+
+**Processing Section**
+
+升级包的 processing 部分与 Stack 升级包中的内容保持一致。
+
+**Processing Section**
+```xml
+   <processing>
+    <service name="FOO">
+      <component name="BAR">
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
+      </component>
+      <component name="BAR2">
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
+      </component>
+    </service>
+  </processing>
+```
+## 自定义服务仓库 {#custom-service-repo}
+
+Each service 可以 define its own repo info by adding repos/repoinfo.xml in its service folder.  The service specific repo will be included in the list of repos defined for the stack. 
+
+**示例**:https://github.com/apache/ambari/blob/trunk/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R_SERVER/8.0.5/repos/repoinfo.xml
+
+```xml
+
+<reposinfo>
+  <os family="redhat6">
+    <repo>
+      <baseurl>http://cust.service.lab.com/Services/centos6/1.1/myservices</baseurl>
+      <repoid>CUSTOM-1.1</repoid>
+      <reponame>CUSTOM</reponame>
+    </repo>
+  </os>
+</reposinfo>
+```
+
+## 自定义服务 - Additional Configuration {#custom-services---additional-configuration}
+
+### Alerts {#alerts}
+
+Each service 是 capable of defining which alerts Ambari 应 track by providing an [alerts.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json) file.
+
+### Kerberos {#kerberos}
+
+Ambari 是 capable of enabling 和 disabling Kerberos for a cluster. 要 inform Ambari of the identities 和 configurations to be used for the service 和 its components, each service 可以 provide a _kerberos.json_ file.
+
+### Metrics {#metrics}
+
+Ambari provides the [Ambari Metrics System ("AMS")](../metrics/index.md)service for collecting, aggregating 和 serving Hadoop 和 system metrics in Ambari-managed clusters.
+
+Each service 可以 define which metrics AMS 应 collect 和 provide by defining a [metrics.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json) file.
+
+Read more about the metrics.json file format in the [Stack Defined Metrics](../metrics/stack-defined-metrics.md) page.
+
+### Quick Links {#quick-links}
+
+A service 可以 add a list of quick links to the Ambari web UI by adding a quick links JSON file. Ambari server parses the quick links JSON file 和 provides its content to the Ambari web UI. The UI 可以 calculate quick link URLs based on that information 和 populate the quick links drop-down list accordingly.
+
+### Widgets {#widgets}
+
+Each service 可以 define which widgets 和 heat maps show up by default on the service summary page by defining a [widgets.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json) file.
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/defining-a-custom-stack-and-services.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/defining-a-custom-stack-and-services.md
new file mode 100644
index 0000000..0c2ca56
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/defining-a-custom-stack-and-services.md
@@ -0,0 +1,665 @@
+---
+title: 定义自定义 Stack 和服务
+---
+
+<!---
+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.
+--->
+
+# 定义自定义 Stack 和服务 {#defining-a-custom-stack-and-services}
+
+## 背景 {#background}
+
+Stack 定义位于源代码树中的 [/ambari-server/src/main/resources/stacks](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks)。安装 Ambari Server 后,Stack 定义位于 `/var/lib/ambari-server/resources/stacks`
+
+## Stack 属性 {#stack-properties}
+
+Stack 必须包含或继承一个属性目录,其中包含两个文件:[stack_features.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json) 和 [stack_tools.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json)。属性目录必须位于 Stack 版本根级别,不能包含在其他 Stack 版本中。此[目录](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties)是 Ambari 2.4 中新增的。
+
+stack_features.json 包含 Ambari 中所含功能的列表,并允许 Stack 指定哪些 Stack 版本包含这些功能。功能列表由特定的 Ambari 版本决定。特定 Ambari 版本的参考列表应位于该 Ambari 版本分支中的 [HDP/2.0.6/properties/stack_features.json](https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json)。每项功能都有名称和描述,Stack 可以提供支持该功能的最低和最高版本。
+
+```json
+{
+
+"stack_features": [
+
+{
+
+"name": "snappy",
+
+"description": "Snappy compressor/decompressor support",
+
+"min_version": "2.0.0.0",
+
+"max_version": "2.2.0.0"
+
+},
+
+...
+
+}
+```
+
+stack_tools.json 包含 stack_selector 和 conf_selector 工具的名称及安装位置。
+
+```json
+{
+
+"stack_selector": ["hdp-select", "/usr/bin/hdp-select", "hdp-select"],
+
+"conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"]
+
+}
+```
+
+有关更多信息,请参阅 [Stack 属性](./stack-properties.md) Wiki 页面。
+
+## 结构 {#structure}
+
+Stack 定义的结构如下:
+
+```
+|_ stacks
+   |_
+      |_
+         metainfo.xml
+         |_ hooks
+         |_ repos
+            repoinfo.xml
+         |_ services
+            |_
+               metainfo.xml
+               metrics.json
+               |_ configuration
+                  {configuration files}
+               |_ package
+                  {files, scripts, templates}
+```
+
+## 定义服务和组件 {#defining-a-service-and-components}
+
+**metainfo.xml**
+
+服务中的 `metainfo.xml` 文件描述服务、服务组件以及用于执行命令的管理脚本。服务组件可以属于 **MASTER**、**SLAVE** 或 **CLIENT** 类别。
+
+对于每个组件,都要指定`<commandScript>`来执行命令。组件必须支持一组定义好的默认命令。
+
+组件类别 | 默认生命周期命令
+-------------------|--------------------------
+MASTER  | install, start, stop, configure, status
+SLAVE   | install, start, stop, configure, status
+CLIENT  | install, configure, status
+
+Ambari 支持使用 **PYTHON** 编写的命令脚本。该类型用于确定如何执行命令脚本。如果组件需要支持默认生命周期命令之外的命令,也可以创建**自定义命令**。
+
+例如,YARN 服务在[`metainfo.xml`](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/metainfo.xml):
+
+```xml
+
+<component>
+  <name>RESOURCEMANAGER</name>
+  <category>MASTER</category>
+  <commandScript>
+    <script>scripts/resourcemanager.py</script>
+    <scriptType>PYTHON</scriptType>
+    <timeout>600</timeout>
+  </commandScript>
+  <customCommands>
+    <customCommand>
+      <name>DECOMMISSION</name>
+      <commandScript>
+        <script>scripts/resourcemanager.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>600</timeout>
+      </commandScript>
+    </customCommand>
+  </customCommands>
+</component>
+```
+
+ResourceManager 是 MASTER 组件,其命令脚本为 `<a href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/YARN/package/scripts/resourcemanager.py">scripts/resourcemanager.py</a>`, ,它位于 `services/YARN/package` 目录中。该命令脚本是 **PYTHON**,并以 Python 方法实现默认生命周期命令。以下是默认 **INSTALL** 命令的 **install** 方法:
+
+```python
+class Resourcemanager(Script):
+  def install(self, env):
+    self.install_packages(env)
+    self.configure(env)
+```
+
+还可以看到定义了 **DECOMMISSION** 自定义命令,这意味着该 Python 命令脚本中也有 **decommission** 方法:
+
+```python
+def decommission(self, env):
+    import params
+
+    ...
+
+    Execute(yarn_refresh_cmd,
+            user=yarn_user
+    )
+    pass
+```
+
+## 使用 Stack 继承 {#using-stack-inheritance}
+
+Stack 可以 _扩展_ 其他 Stack,以共享命令脚本和配置。这可以通过以下方式减少不同 Stack 之间的代码重复:
+
+* 为子 Stack 定义仓库
+* 在子 Stack 中添加新服务(不在父 Stack 中)
+* 覆盖父服务的命令脚本
+* 覆盖父服务的配置
+
+例如,**HDP 2.1 Stack _扩展_ HDP 2.0.6 Stack**,因此该定义中仅包含适用于 **HDP 2.1 Stack** 的更改。此扩展在 HDP 2.1 Stack 的 [metainfo.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.1/metainfo.xml) 中定义:
+
+```xml
+<metainfo>
+  <versions>
+    <active>true</active>
+  </versions>
+  <extends>2.0.6</extends>
+</metainfo>
+```
+
+## 示例:实现自定义服务 {#example-implementing-a-custom-service}
+
+在本示例中,我们将创建名为 “SAMPLESRV” 的自定义服务,并将其添加到现有 Stack 定义中。该服务包含 MASTER、SLAVE 和 CLIENT 组件。
+
+### 创建并添加服务 {#create-and-add-the-service}
+
+1. 在 Ambari Server 上,转到 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services` 目录。本例中,我们将转到 HDP 2.0 Stack 定义。
+
+```bash
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services
+```
+2. 创建目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/<strong>SAMPLESRV</strong>`,用于存放 **SAMPLESRV** 的服务定义。
+
+```bash
+mkdir /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/SAMPLESRV
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/SAMPLESRV
+```
+3. 转到新创建的 `SAMPLESRV` 目录,创建描述新服务的 `metainfo.xml` 文件。例如:
+
+```xml
+<?xml version="1.0"?>
+<metainfo>
+    <schemaVersion>2.0</schemaVersion>
+    <services>
+        <service>
+            <name>SAMPLESRV</name>
+            <displayName>New Sample Service</displayName>
+            <comment>A New Sample Service</comment>
+            <version>1.0.0</version>
+            <components>
+                <component>
+                    <name>SAMPLESRV_MASTER</name>
+                    <displayName>Sample Srv Master</displayName>
+                    <category>MASTER</category>
+                    <cardinality>1</cardinality>
+                    <commandScript>
+                        <script>scripts/master.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+                <component>
+                    <name>SAMPLESRV_SLAVE</name>
+                    <displayName>Sample Srv Slave</displayName>
+                    <category>SLAVE</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/slave.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+                <component>
+                    <name>SAMPLESRV_CLIENT</name>
+                    <displayName>Sample Srv Client</displayName>
+                    <category>CLIENT</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/sample_client.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+            </components>
+            <osSpecifics>
+                <osSpecific>
+                    <osFamily>any</osFamily>  <!-- note: use osType rather than osFamily for Ambari 1.5.0 and 1.5.1 -->
+                </osSpecific>
+            </osSpecifics>
+        </service>
+    </services>
+</metainfo>
+```
+4. 在上面的配置中,服务名称为“**SAMPLESRV**”,其中包含:
+
+  - 一个 **MASTER** 组件“**SAMPLESRV_MASTER**”
+  - 一个 **SLAVE** 组件“**SAMPLESRV_SLAVE**”
+  - 一个 **CLIENT** 组件“**SAMPLESRV_CLIENT**”
+5. 接下来创建命令脚本。创建服务元信息中指定的命令脚本目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/SAMPLESRV/package/scripts`。
+
+```bash
+mkdir -p /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/SAMPLESRV/package/scripts
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/SAMPLESRV/package/scripts
+```
+6. 转到脚本目录并创建 `.py` 命令脚本文件。例如 `master.py` 文件:
+
+```python
+import sys
+from resource_management import *
+class Master(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Master';
+  def stop(self, env):
+    print 'Stop the Sample Srv Master';
+  def start(self, env):
+    print 'Start the Sample Srv Master';
+
+  def status(self, env):
+    print 'Status of the Sample Srv Master';
+  def configure(self, env):
+    print 'Configure the Sample Srv Master';
+if __name__ == "__main__":
+  Master().execute()
+```
+
+例如 `slave` `.py` 文件:
+
+```python
+import sys
+from resource_management import *
+class Slave(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Slave';
+  def stop(self, env):
+    print 'Stop the Sample Srv Slave';
+  def start(self, env):
+    print 'Start the Sample Srv Slave';
+  def status(self, env):
+    print 'Status of the Sample Srv Slave';
+  def configure(self, env):
+    print 'Configure the Sample Srv Slave';
+if __name__ == "__main__":
+  Slave().execute()
+```
+
+例如 `sample_client` `.py` 文件:
+
+```python
+import sys
+from resource_management import *
+class SampleClient(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Client';
+  def configure(self, env):
+    print 'Configure the Sample Srv Client';
+if __name__ == "__main__":
+  SampleClient().execute()
+```
+7. 现在,重启 Ambari Server,使新的服务定义分发到集群中的所有代理。
+
+```bash
+ambari-server restart
+```
+
+### 安装服务(通过 Ambari Web“添加服务”) {#install-the-service-via-ambari-web-add-services}
+
+通过 Ambari Web 添加自定义服务是 Ambari 1.7.0 的新功能。
+
+1. 在 Ambari Web 中转到“服务”,然后点击**Actions**按钮。它位于左侧的服务导航区域。
+
+2. “添加服务”向导启动。您将看到包含“My Sample Service”的选项(这是服务 `metainfo.xml` 文件中定义的 `<displayname></displayname>`)。
+
+3. 选择“My Sample Service”,然后点击“下一步”。
+
+4. 分配“Sample Srv Master”,然后点击“下一步”。
+
+5. 选择要安装“Sample Srv Client”的主机,然后点击“下一步”。
+
+6. 完成后,“My Sample Service”将显示在服务导航区域中。
+
+7. 如果要将“Sample Srv Client”添加到主机,可转到“主机”,导航到特定主机,然后点击“+ 添加”。
+
+## 示例:实现自定义客户端服务 {#example-implementing-a-custom-client-only-service}
+
+在本示例中,我们将创建名为“TESTSRV”的自定义服务,将其添加到现有 Stack 定义,并使用 Ambari API 安装/配置该服务。此服务是 CLIENT,因此包含两个命令:install 和 configure。
+
+### 创建并添加服务 {#create-and-add-the-service-1}
+
+1. 在 Ambari Server 上,转到 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services` 目录。本例中,我们将转到 HDP 2.0 Stack 定义。
+
+```bash
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services
+```
+2. 创建目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/<strong>TESTSRV</strong>`,用于存放 **TESTSRV** 的服务定义。
+
+```bash
+mkdir /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTSRV
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTSRV
+```
+3. 转到新创建的 `TESTSRV` 目录,创建描述新服务的 `metainfo.xml` 文件。例如:
+
+```xml
+<?xml version="1.0"?>
+<metainfo>
+    <schemaVersion>2.0</schemaVersion>
+    <services>
+        <service>
+            <name>TESTSRV</name>
+            <displayName>New Test Service</displayName>
+            <comment>A New Test Service</comment>
+            <version>0.1.0</version>
+            <components>
+                <component>
+                    <name>TEST_CLIENT</name>
+                    <displayName>New Test Client</displayName>
+                    <category>CLIENT</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/test_client.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                    <customCommands>
+                      <customCommand>
+                        <name>SOMETHINGCUSTOM</name>
+                        <commandScript>
+                          <script>scripts/test_client.py</script>
+                          <scriptType>PYTHON</scriptType>
+                          <timeout>600</timeout>
+                        </commandScript>
+                      </customCommand>
+                    </customCommands>
+                </component>
+            </components>
+            <osSpecifics>
+                <osSpecific>
+                    <osFamily>any</osFamily>  <!-- note: use osType rather than osFamily for Ambari 1.5.0 and 1.5.1 -->
+                </osSpecific>
+            </osSpecifics>
+        </service>
+    </services>
+</metainfo>
+```
+4. 在上面的配置中,服务名称为“**TESTSRV**”,包含一个组件“**TEST_CLIENT**”,其组件类别为“**CLIENT**”。该客户端通过命令脚本 `scripts/test_client.py` 管理。接下来创建该命令脚本。
+
+5. 创建服务元信息中指定的命令脚本目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTSRV/package/scripts`。
+
+```bash
+mkdir -p /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTSRV/package/scripts
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTSRV/package/scripts
+```
+6. 转到脚本目录并创建 `test_client.py` 文件。例如:
+
+```python
+import sys
+from resource_management import *
+
+class TestClient(Script):
+  def install(self, env):
+    print 'Install the client';
+  def configure(self, env):
+    print 'Configure the client';
+  def somethingcustom(self, env):
+    print 'Something custom';
+
+if __name__ == "__main__":
+  TestClient().execute()
+```
+7. 现在,重启 Ambari Server,使新的服务定义分发到集群中的所有代理。
+
+```
+ambari-server restart
+```
+
+### 在 repoinfo.xml 中添加仓库详情 {#adding-repository-details-in-repoinfoxml}
+
+添加自定义服务时,可能需要为 Stack 添加其他仓库详情,尤其是服务二进制文件位于独立仓库中时。其他
+
+```xml
+<reposinfo>
+  <os family="redhat6">
+    <repo>
+      <baseurl>http://cust.service.lab.com/Services/centos6/1.1/myservices</baseurl>
+      <repoid>CUSTOM-1.1</repoid>
+      <reponame>CUSTOM</reponame>
+    </repo>
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.1</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.17/repos/centos6</baseurl>
+      <repoid>HDP-UTILS-1.1.0.17</repoid>
+      <reponame>HDP-UTILS</reponame>
+    </repo>
+  </os>
+</reposinfo>
+```
+
+### 安装服务(通过 Ambari REST API) {#install-the-service-via-the-ambari-rest-api}
+
+1. 将服务添加到集群。
+
+
+```
+POST
+/api/v1/clusters/MyCluster/services
+
+{
+"ServiceInfo": {
+  "service_name":"TESTSRV"
+  }
+}
+```
+2. 将组件添加到服务。本例中,将 TEST_CLIENT 添加到 TESTSRV。
+
+```
+POST
+/api/v1/clusters/MyCluster/services/TESTSRV/components/TEST_CLIENT
+```
+3. 在所有目标主机上安装组件。例如,要在 `<a href="http://c6402.ambari.apache.org">c6402.ambari.apache.org</a>` 和 `<a href="http://c6403.ambari.apache.org">c6403.ambari.apache.org</a>` 上安装,首先使用 POST 在主机上创建 host_component 资源。
+
+```
+POST
+/api/v1/clusters/MyCluster/hosts/c6402.ambari.apache.org/host_components/TEST_CLIENT
+
+POST
+/api/v1/clusters/MyCluster/hosts/c6403.ambari.apache.org/host_components/TEST_CLIENT
+```
+4. 现在让 Ambari 在所有主机上安装组件。此单个命令会指示 Ambari 安装与服务相关的所有组件,并在每台主机上调用命令脚本中的 `install()` 方法。
+
+
+```
+PUT
+/api/v1/clusters/MyCluster/services/TESTSRV
+
+{
+  "RequestInfo": {
+    "context": "Install Test Srv Client"
+  },
+  "Body": {
+    "ServiceInfo": {
+      "state": "INSTALLED"
+    }
+  }
+}
+```
+5. 或者,可以不同时安装所有组件,而是显式安装每个主机组件。本例中,我们将显式在 `<a href="http://c6402.ambari.apache.org">c6402.ambari.apache.org</a>` 上安装 TEST_CLIENT:
+
+```
+PUT
+/api/v1/clusters/MyCluster/hosts/c6402.ambari.apache.org/host_components/TEST_CLIENT
+
+{
+  "RequestInfo": {
+    "context":"Install Test Srv Client"
+  },
+  "Body": {
+    "HostRoles": {
+      "state":"INSTALLED"
+    }
+  }
+}
+```
+6. 使用以下方式在主机上配置客户端。这最终会调用命令脚本中的 `configure()` 方法。
+
+```
+POST
+/api/v1/clusters/MyCluster/requests
+
+{
+  "RequestInfo" : {
+    "command" : "CONFIGURE",
+    "context" : "Config Test Srv Client"
+  },
+  "Requests/resource_filters": [{
+    "service_name" : "TESTSRV",
+    "component_name" : "TEST_CLIENT",
+    "hosts" : "c6403.ambari.apache.org"
+  }]
+}
+```
+7. 如需查看组件安装在哪些主机上。
+
+```
+GET
+/api/v1/clusters/MyCluster/components/TEST_CLIENT
+```
+
+### 安装服务(通过 Ambari Web“添加服务”) {#install-the-service-via-ambari-web-add-services-1}
+
+:::caution
+通过 Ambari Web 添加自定义服务是 Ambari 1.7.0 的新功能。
+:::
+
+1. 在 Ambari Web 中转到“服务”,然后点击**Actions**按钮。它位于左侧的服务导航区域。
+
+2. “添加服务”向导启动。您将看到包含“My Test Service”的选项(这是服务 `metainfo.xml` 文件中定义的 `<displayname></displayname>`)。
+
+3. 选择“My Test Service”,然后点击“下一步”。
+
+4. 选择要安装“New Test Client”的主机,然后点击“下一步”。
+
+5. 完成后,“My Test Service”将显示在服务导航区域中。
+
+6. 如果要将“New Test Client”添加到主机,可转到“主机”,导航到特定主机,然后点击“+ 添加”。
+
+
+## 示例:实现自定义客户端服务(带配置) {#example-implementing-a-custom-client-only-service-with-configs}
+
+在本示例中,我们将创建名为“TESTCONFIGSRV”的自定义服务,并将其添加到现有 Stack 定义。此服务是 CLIENT,因此包含两个命令:install 和 configure。该服务还包含配置类型“test-config”。
+
+### 创建服务并将其添加到 Stack {#create-and-add-the-service-to-the-stack}
+
+1. 在 Ambari Server 上,转到 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services` 目录。本例中,我们将转到 HDP 2.0 Stack 定义。
+
+```bash
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services
+```
+2. 创建目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/<strong>TESTCONFIGSRV</strong>`,用于存放 TESTCONFIGSRV 的服务定义。
+
+```bash
+mkdir /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV
+```
+3. 转到新创建的 `TESTCONFIGSRV` 目录,创建描述新服务的 `metainfo.xml` 文件。例如:
+
+```xml
+<?xml version="1.0"?>
+<metainfo>
+    <schemaVersion>2.0</schemaVersion>
+    <services>
+        <service>
+            <name>TESTCONFIGSRV</name>
+            <displayName>New Test Config Service</displayName>
+            <comment>A New Test Config Service</comment>
+            <version>0.1.0</version>
+            <components>
+                <component>
+                    <name>TESTCONFIG_CLIENT</name>
+                    <displayName>New Test Config Client</displayName>
+                    <category>CLIENT</category>
+                    <cardinality>1+</cardinality>
+                    <commandScript>
+                        <script>scripts/test_client.py</script>
+                        <scriptType>PYTHON</scriptType>
+                        <timeout>600</timeout>
+                    </commandScript>
+                </component>
+            </components>
+            <osSpecifics>
+                <osSpecific>
+                    <osFamily>any</osFamily>  <!-- note: use osType rather than osFamily for Ambari 1.5.0 and 1.5.1 -->
+                </osSpecific>
+            </osSpecifics>
+        </service>
+    </services>
+</metainfo>
+```
+4. 在上面的配置中,服务名称为“**TESTCONFIGSRV**”,包含一个组件“**TESTCONFIG_CLIENT**”,其组件类别为“**CLIENT**”。该客户端通过命令脚本 `scripts/test_client.py` 管理。接下来创建该命令脚本。
+
+5. 创建服务元信息 `<commandscript></commandscript>` 中指定的命令脚本目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV/package/scripts`。
+
+```bash
+mkdir -p /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV/package/scripts
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV/package/scripts
+```
+6. 转到脚本目录并创建 `test_client.py` 文件。例如:
+
+```python
+import sys
+from resource_management import *
+
+class TestClient(Script):
+  def install(self, env):
+    print 'Install the config client';
+  def configure(self, env):
+    print 'Configure the config client';
+
+if __name__ == "__main__":
+  TestClient().execute()
+```
+7. 现在为此服务定义配置类型。为配置字典文件创建目录 `/var/lib/ambari-server/resources/stacks/HDP/2.0.6/servicesTESTCONFIGSRV/configuration`。
+
+```bash
+mkdir -p /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV/configuration
+cd /var/lib/ambari-server/resources/stacks/HDP/2.0.6/services/TESTCONFIGSRV/configuration
+```
+8. 转到配置目录并创建 `test-config.xml` 文件。例如:
+
+```xml
+
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+ 
+<configuration>
+  <property>
+    <name>some.test.property</name>
+    <value>this.is.the.default.value</value>
+    <description>This is a kool description.</description>
+ </property>
+</configuration>
+
+```
+9. 现在,重启 Ambari Server,使新的服务定义分发到集群中的所有代理。
+
+```
+ambari-server restart
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/extensions.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/extensions.md
new file mode 100644
index 0000000..f4b1252
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/extensions.md
@@ -0,0 +1,228 @@
+---
+title: 扩展
+---
+
+<!--
+   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.
+-->
+# 扩展 {#extensions}
+
+## Background {#background}
+在 Ambari 2.4 中添加。
+
+扩展是一个或多个打包在一起的自定义服务的集合。与堆栈类似,每个扩展都有一个在集群中必须唯一的名称。扩展还具有用于区分不同发布版本的版本目录。堆栈版本位于 `/var/lib/ambari-server/resources/stacks with <stack_name>/<stack_version>` 子目录中,扩展版本则位于 `/var/lib/ambari-server/resources/extensions with <extension_name>/<extension_version>` 子目录中。
+
+扩展可以链接到受支持的堆栈版本。扩展版本链接到当前安装的堆栈版本后,其中包含的自定义服务就可以添加到集群中,方式与这些服务实际包含在堆栈版本中时相同。
+
+第三方开发者可以发布可添加到集群的扩展。
+
+## Structure {#structure}
+
+扩展定义的结构如下:
+
+```
+|_ extensions
+   |_ <extension_name>
+      |_ <extension_version>
+         |_ metainfo.xml
+         |_ services
+            |_ <service_name>
+               |_ metainfo.xml
+               |_ metrics.json
+               |_ configuration
+                  |_ {configuration files}
+               |_ package
+                  |_ {files, scripts, templates}
+```
+
+扩展版本类似于堆栈版本,但只包含 metainfo.xml 和 services 目录。这意味着不支持 alerts、kerberos、metrics、role command order 和 widgets 文件,应在服务级别包含这些内容。此外,repositories、hooks、configurations 和 upgrades 目录也不受支持,不过可以在服务级别添加升级支持。
+
+## Extension Inheritance {#extension-inheritance}
+
+扩展版本可以扩展其他扩展版本,以共享命令脚本和配置,从而减少不同扩展之间的代码重复,具体包括:
+
+- 在子扩展版本中添加新服务(不添加到父扩展版本中)
+- 覆盖父服务的命令脚本
+- 覆盖父服务的配置
+
+例如,**MyExtension 2.0** 可以扩展 **MyExtension 1.0**,这样扩展定义中只需包含适用于 **MyExtension 2.0** 的变更。在 **MyExtension 2.0** 的 metainfo.xml 中按如下方式定义该扩展:
+
+```xml
+<metainfo>
+  <extends>1.0</extends>
+```
+
+## Supported Stack Versions {#supported-stack-versions}
+
+**每个扩展版本都必须支持一个或多个堆栈版本。**扩展版本指定其支持的最低堆栈版本,并在扩展 metainfo.xml 的 prerequisites 部分中按如下方式包含:
+
+```xml
+<metainfo>
+  <prerequisites>
+    <min-stack-versions>
+      <stack>
+        <name>HDP</name>
+        <version>2.4</version>
+      </stack>
+      <stack>
+        <name>OTHER</name>
+        <version>1.0</version>
+      </stack>
+    </min-stack-versions>
+  </prerequisites>
+</metainfo>
+
+```
+
+## Installing 扩展 {#installing-extensions}
+
+建议使用[管理包](./management-packs.md)安装扩展。有关详情,请参阅[使用扩展和管理包打包自定义服务的说明](custom-services.md)。
+
+在 resource/extensions 目录下创建包含所需 metainfo.xml 文件的扩展版本目录后,即可重启 ambari-server。
+
+## Extension REST APIs {#extension-rest-apis}
+
+可以通过调用 REST API 查询扩展。
+
+### Get all extensions {#get-all-extensions}
+
+```bash
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://<server>:<port>/api/v1/extensions'
+{
+  "href" : "http://<server>:<port>/api/v1/extensions/",
+  "items" : [
+    {
+      "href" : "http://<server>:<port>/api/v1/extensions/EXT",
+      "Extensions" : {
+        "extension_name" : "EXT"
+      }
+    }
+  ]
+}
+```
+
+### Get extension {#get-extension}
+
+```bash
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://<server>:<port>/api/v1/extensions/EXT'
+
+{
+  "href" : "http://<server>:<port>/api/v1/extensions/EXT",
+  "Extensions" : {
+    "extension_name" : "EXT"
+  },
+  "versions" : [
+    {
+      "href" : "http://<server>:<port>/api/v1/extensions/EXT/versions/1.0",
+      "Versions" : {
+        "extension_name" : "EXT",
+        "extension_version" : "1.0"
+      }
+    }
+  ]
+}
+```
+
+### Get extension version {#get-extension-version}
+
+```bash
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://<server>:<port>/api/v1/extensions/EXT/versions/1.0'
+
+{
+  "href" : "http://<server>:<port>/api/v1/extensions/EXT/versions/1.0/",
+  "Versions" : {
+    "extension-errors" : [],
+    "extension_name" : "EXT",
+    "extension_version" : "1.0",
+    "parent_extension_version" : null,
+    "valid" : true
+  }
+}
+```
+
+## Extension Links {#extension-links}
+
+扩展链接是堆栈版本与扩展版本之间的链接。扩展版本链接到当前安装的堆栈版本后,其中包含的自定义服务就可以添加到集群中,方式与这些服务实际包含在堆栈版本中时相同。
+
+只有当堆栈版本受扩展版本支持时,才能将扩展版本链接到该堆栈版本。必须在扩展 metainfo.xml 的 prerequisites 部分指定堆栈名称,并且堆栈版本必须大于或等于指定的最低版本号。
+
+## Extension Link REST APIs {#extension-link-rest-apis}
+
+可以通过调用 REST API 获取、创建、更新和删除扩展链接。
+
+### Create Extension Link {#create-extension-link}
+
+```
+The following curl command will link an extension EXT/1.0 to the stack HDP/2.4
+
+curl -u admin:admin -H 'X-Requested-By: ambari' -X POST -d '{"ExtensionLink": {"stack_name": "HDP", "stack_version":
+
+"2.4", "extension_name": "EXT", "extension_version": "1.0"}}' http://<server>:<port>/api/v1/links/
+```
+
+### Get All Extension Links {#get-all-extension-links}
+
+```bash
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://<server>:<port>/api/v1/links'
+
+{
+  "href" : "http://<server>:<port>/api/v1/links/",
+  "items" : [
+    {
+      "href" : "http://<server>:<port>:8080/api/v1/links/1",
+      "ExtensionLink" : {
+        "extension_name" : "EXT",
+        "extension_version" : "1.0",
+        "link_id" : 1,
+        "stack_name" : "HDP",
+        "stack_version" : "2.4"
+      }
+    }
+  ]
+}
+```
+
+### Get Extension Link {#get-extension-link}
+
+```bash
+curl -u admin:admin -H 'X-Requested-By:ambari' -X GET 'http://<server>:<port>/api/v1/link/1'
+{
+  "href" : "http://<server>:<port>/api/v1/links/1",
+  "ExtensionLink" : {
+    "extension_name" : "EXT",
+    "extension_version" : "1.0",
+    "link_id" : 1,
+    "stack_name" : "HDP",
+    "stack_version" : "2.4"
+  }
+}
+```
+
+### Delete Extension Link {#delete-extension-link}
+
+```
+You must specify the ID of the Extension Link to be deleted.
+
+curl -u admin:admin -H 'X-Requested-By: ambari' -X DELETE http://<server>:<port>/api/v1/links/<link_id>
+```
+
+### Update All Extension Links {#update-all-extension-links}
+
+```
+This will reread the stacks, extensions and services in order to make sure the state of the stack is up to date in memory.
+
+curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT http://<server>:<port>/api/v1/links/
+```
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/faq.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/faq.md
new file mode 100644
index 0000000..7125035
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/faq.md
@@ -0,0 +1,49 @@
+---
+title: 常见问题
+---
+
+<!--
+   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.
+-->
+# 常见问题 {#faq}
+
+## **[STACK]/[SERVICE]/metainfo.xml** {#stackservicemetainfoxml}
+
+**如果父堆栈中存在某个组件,而子堆栈仅使用少量属性再次定义该组件,这些值只是用于覆盖父堆栈的值,还是会替换整个组件定义?对于 metainfo.xml 中的其他元素,适用哪些规则?**
+
+Ambari 会逐个属性地将父堆栈与子堆栈进行合并。因此,例如从子堆栈中移除某个类别后,它仍会从父堆栈继承;这基本适用于所有属性。
+
+因此,问题在于如何处理父堆栈和子堆栈中同时存在的属性。这里大多数决策仍遵循同一范式:使用子堆栈的值替代父堆栈的值,而父堆栈中的每个属性只要未通过类似标记显式地从子堆栈中删除,就会
+
+- 对于 config-dependencies,我们采用全有或全无的方式:如果子堆栈中存在此属性,则使用它及其所有子项;否则从父堆栈中获取。
+
+- 自定义命令按名称合并,合并后的定义是所有命令的并集;子堆栈中同名的命令会覆盖父堆栈中的命令。
+
+- Cardinality 会由子堆栈中的值覆盖;如果子堆栈未提供该值,则使用父堆栈中的值。
+
+有关详情,请参阅此方法:`org.apache.ambari.server.api.util.StackExtensionHelper#mergeServices`
+
+有关更多信息,请参阅 [Service Inheritance](./custom-services.md#service-inheritance) wiki 页面。
+
+**如果新定义中缺少某个组件,但父堆栈中存在该组件,它会被继承吗?**
+
+通常会。
+
+**服务的配置依赖是被覆盖还是合并?**
+
+覆盖。
+
+
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/hooks.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/hooks.md
new file mode 100644
index 0000000..6724d0a
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/hooks.md
@@ -0,0 +1,70 @@
+---
+title: 钩子
+---
+
+<!--
+   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.
+-->
+# 钩子 {#hooks}
+
+堆栈可以在 Ambari 操作的以下时间点添加钩子:
+
+* before ANY
+* before and after INSTALL
+* before RESTART
+* before START
+
+如 [Stack Inheritance](./stack-inheritance.md) 中所述,如果当前堆栈版本定义了 hooks 目录,它会替换父堆栈版本中的 hooks 目录。这意味着父级目录中包含的文件不会被继承。需要从该目录结构中复制所有希望保留的文件。
+
+hooks 目录应包含 5 个子目录:
+
+* after-INSTALL
+* before-ANY
+* before-INSTALL
+* before-RESTART
+* before-START
+
+每个 hook 目录可以包含 3 个子目录:
+
+* files
+* scripts
+* templates
+
+scripts 目录是主要目录,必须提供。该目录必须包含 hook.py 文件,也可以包含用于初始化变量的其他 Python 脚本(例如 params.py),或包含 hook.py 所使用函数的其他工具文件。
+
+files 目录可以包含任意非 Python 文件,例如脚本、jar 文件或 properties 文件。
+
+templates 文件夹可以包含用于设置 properties 文件的所需 j2 文件。
+
+hook.py 文件应扩展 resource_management/libraries/script/hook.py 中定义的 Hook 类。命名约定是使用 hook 文件夹命名钩子类,例如类位于 after-INSTALL 文件夹中时命名为 AfterInstallHook。hook.py 文件必须定义 hook(self, env) 函数。下面是一个钩子示例:
+
+>
+
+```py
+from resource_management.libraries.script.hook import Hook
+ 
+class AfterInstallHook(Hook):
+ 
+  def hook(self, env):
+    import params
+    env.set_params(params)
+    # Call any functions to set up the stack after install
+ 
+if __name__ == "__main__":
+  AfterInstallHook().execute()
+```
+
+
diff --git a/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/how-to-define-stacks-and-services.md b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/how-to-define-stacks-and-services.md
new file mode 100644
index 0000000..a6888b3
--- /dev/null
+++ b/i18n/zh-Hans/docusaurus-plugin-content-docs/version-3.0.0/ambari-design/stack-and-services/how-to-define-stacks-and-services.md
@@ -0,0 +1,1235 @@
+---
+title: How-To Define Stacks and 服务
+---
+
+<!--
+   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.
+-->
+# How-To Define Stacks and 服务 {#how-to-define-stacks-and-services}
+
+Ambari 管理的服务定义在其 _stacks_ 文件夹中。
+
+要定义由 Ambari 管理的服务和堆栈,请按以下步骤操作。
+
+还可以参考[创建自定义堆栈和服务](./defining-a-custom-stack-and-services.md)的示例。
+
+堆栈是服务的集合。可以定义一个堆栈的多个版本,每个版本都有自己的一组服务。Ambari 中的堆栈定义在 [ambari-server/src/main/resources/stacks ;](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks) 文件夹中,安装后可在 **/var/lib/ambari-server/resources/stacks** 文件夹中找到。
+
+由堆栈管理的服务可以定义在 [ambari-server/src/main/resources/common-services](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services) 或 [ambari-server/src/main/resources/stacks](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks) 文件夹中。安装后,这些文件夹分别位于 _/var/lib/ambari-server/resources/common-services_ 和 _/var/lib/ambari-server/resources/stacks_。
+
+> **问题:何时应在 _common-services_ 文件夹而不是 _stacks_ 文件夹中定义服务?**
+如果服务可能被多个堆栈使用,应在 [common-services](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services) 文件夹中定义。例如,几乎所有堆栈都需要 HDFS 服务,因此无需在每个堆栈中重新定义 HDFS,而是引用 common-services 中的定义。同样,如果服务不会被共享,则可以在 [stacks](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks) 文件夹中定义。基本上,stacks 文件夹中定义的服务通过包含使用,而 common-services 中定义的服务通过引用使用。
+
+## Define 服务 {#define-service}
+
+下面展示如何在 _common-services_ 文件夹中定义服务。在 _stacks_ 文件夹中定义服务时也可以采用相同方法,相关内容将在 _Define Stack_ 部分讨论。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/stack-and-services/imgs/define-service.png)
+
+服务**必须**提供主 _metainfo.xml_ 文件,其中包含服务的重要元数据。
+
+除此之外,还可以提供其他文件来补充服务信息。下面将详细介绍这些文件。
+
+服务还可以从先前的堆栈版本或通用服务继承。有关更多信息,请参阅 [Service Inheritance](./stack-inheritance.md) 页面。
+
+### _metainfo.xml_ {#metainfoxml}
+
+在 _metainfo.xml_ 服务描述符中,首先可以定义服务及其组件。
+
+完整参考请参阅 [Writing metainfo.xml](./writing-metainfo.md) 页面。
+
+[HDFS metainfo.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml#L27) 是一个很好的参考实现。
+
+> **问题:是否可以在同一个 metainfo.xml 中定义多个服务?**
+可以。虽然这是可行的,但不建议在同一个服务文件夹中定义多个服务。
+
+YARN 和 MapReduce2 是在 [YARN 文件夹](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0)中一起定义的服务。其 [metainfo.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml) 定义了这两个服务。
+
+#### Scripts {#scripts}
+
+定义组件后,需要提供能够处理服务和组件生命周期各个阶段的脚本。
+
+管理服务和组件所需的脚本在 _metainfo.xml_ 中指定([HDFS](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml#L35))。每个脚本都应扩展提供实用方法的 [Script](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-common/src/main/python/resource_management/libraries/script/script.py) 类。例如:[NameNode 脚本](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L68)
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/stack-and-services/imgs/scripts.png)
+
+这些脚本应放在 __ 文件夹中。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/stack-and-services/imgs/scripts-folder.png)
+
+**package/scripts**
+文件夹 | 用途
+-------|--------
+**package/scripts** | 包含 Ambari 调用的脚本。这些脚本会以正确的环境加载到执行路径中。<br></br>示例:[HDFS](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts)
+**package/files** | 包含上述脚本使用的文件。通常是作为独立进程调用的其他脚本(bash、python 等)。<br></br>示例:[checkWebUI.py](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/files/checkWebUI.py) 在 HDFS service-check 中运行,用于确定 Journal Nodes 是否可用
+**package/templates** | 上述脚本用于在受管主机上生成文件的模板文件。通常是服务运行所需的配置文件。<br></br>示例:[exclude_hosts_list.j2](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/templates/exclude_hosts_list.j2),脚本使用它生成 _/etc/hadoop/conf/dfs.exclude_
+
+#### Python {#python}
+
+Ambari 默认支持使用 Python 脚本管理服务和组件。
+
+组件脚本应扩展 `resource_management.Script` 类,并提供该组件生命周期所需的方法。
+
+根据[如何创建自定义堆栈](./defining-a-custom-stack-and-services.md)页面,MASTER、SLAVE 和 CLIENT 组件需要以下方法来完成其生命周期。
+
+```python
+import sys
+from resource_management import Script
+class Master(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Master';
+  def stop(self, env):
+    print 'Stop the Sample Srv Master';
+  def start(self, env):
+    print 'Start the Sample Srv Master';
+  def status(self, env):
+    print 'Status of the Sample Srv Master';
+  def configure(self, env):
+    print 'Configure the Sample Srv Master';
+if __name__ == "__main__":
+  Master().execute()
+```
+
+```python
+import sys
+from resource_management import Script
+class Slave(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Slave';
+  def stop(self, env):
+    print 'Stop the Sample Srv Slave';
+  def start(self, env):
+    print 'Start the Sample Srv Slave';
+  def status(self, env):
+    print 'Status of the Sample Srv Slave';
+  def configure(self, env):
+    print 'Configure the Sample Srv Slave';
+if __name__ == "__main__":
+  Slave().execute()
+```
+
+```python
+import sys
+from resource_management import Script
+class SampleClient(Script):
+  def install(self, env):
+    print 'Install the Sample Srv Client';
+  def configure(self, env):
+    print 'Configure the Sample Srv Client';
+if __name__ == "__main__":
+  SampleClient().execute()
+```
+
+Ambari 提供以下有助于编写服务脚本的 Python 库。有关这些库的完整参考,请访问 [Ambari Python Libraries](https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Python+Libraries) 页面。
+
+* resource_management
+* ambari_commons
+* ambari_simplejson
+
+##### OS Variant Scripts {#os-variant-scripts}
+
+如果服务支持多个操作系统且需要单独的脚本,可以使用不同的 _@OsFamilyImpl()_ 注解扩展基础 _resource_management.Script_ 类。
+
+这样可以仅分离组件中与操作系统相关的方法。
+
+示例:[NameNode 默认脚本](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L126)、[NameNode Windows 脚本](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L346)。
+
+> **Examples**
+NameNode [启动](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py#L93)、[停止](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py#L208)。
+
+DataNode [启动和停止](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_datanode.py#L68)。
+
+HDFS [配置持久化](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs.py#L31)
+
+#### Custom Actions {#custom-actions}
+
+有时服务需要执行该服务特有的操作,这些操作超出了 Ambari 提供的默认操作(如 _install_、_start、stop、configure 等)。
+
+服务可以定义此类操作并在 UI 中向用户公开,以便轻松调用。
+
+下面以 HDFS 实现的 _Rebalance HDFS_ 自定义操作为例。
+
+##### Stack Changes {#stack-changes}
+
+1. [Define custom command inside the _customCommands_ section](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml#L49) of the component in _metainfo.xml_.
+
+2. [Implement method with same name as custom command](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L273) in script referenced from _metainfo.xml_.
+
+  1. 如果自定义命令没有操作系统变体,可以在扩展 _resource_management.Script_ 的同一个类中实现。
+  2. 如果存在操作系统变体,可以在使用 _@OsFamilyImpl(os_family=...)_ 注解的各个类中实现不同方法。[默认 rebalancehdfs](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L273)、[Windows rebalancehdfs](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/namenode.py#L354)。
+
+这样后端就可以在安装了该服务的所有受管主机上运行脚本。
+
+##### UI Changes {#ui-changes}
+
+无需修改 UI 即可在主机页面看到自定义操作。
+
+该操作应显示在主机组件的操作列表中。任何主组件操作都会自动显示在服务操作菜单中。
+
+在 UI 中单击该操作时,会自动发起 POST 调用以触发上述脚本。
+
+> **问题:如何为 UI 中的自定义操作提供自己的标签和图标?**
+在 Ambari UI 中,将组件操作及自定义图标和名称添加到 _App.HostComponentActionMap_ 对象中。例如:[REBALANCEHDFS](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-web/app/models/host_component.js#L351)。
+
+### 配置 {#configuration}
+
+服务的配置文件默认应放置在 _ [configuration](https://github.com/apache/ambari/tree/branch-2.2.1/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration)_ 文件夹中。
+
+如果必须使用其他名称的文件夹,可以在 _metainfo.xml_ 中使用 [< _configuration-dir>_](https://github.com/apache/ambari/blob/branch-2.2.1/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/metainfo.xml#L249) 元素指向该文件夹。
+
+metainfo.xml 中与配置相关的重要部分如下:
+
+```xml
+<?xml version="1.0"?>
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>HDFS</name>
+      <displayName>HDFS</displayName>
+      <comment>Apache Hadoop Distributed File System</comment>
+      <version>2.1.0.2.0</version>
+      <components>
+        ...
+        <component>
+          <name>HDFS_CLIENT</name>
+          ...
+          <configFiles>
+            <configFile>
+              <type>xml</type>
+              <fileName>hdfs-site.xml</fileName>
+              <dictionaryName>hdfs-site</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>xml</type>
+              <fileName>core-site.xml</fileName>
+              <dictionaryName>core-site</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>log4j.properties</fileName>
+              <dictionaryName>hdfs-log4j,yarn-log4j</dictionaryName>
+            </configFile>                         
+            <configFile>
+              <type>env</type>
+              <fileName>hadoop-env.sh</fileName>
+              <dictionaryName>hadoop-env</dictionaryName>
+            </configFile>
+          </configFiles>
+          ...
+          <configuration-dependencies>
+             <config-type>core-site</config-type>
+             <config-type>hdfs-site</config-type>
+          </configuration-dependencies>
+        </component>
+          ...
+      </components>
+  
+      <configuration-dir>configuration</configuration-dir>
+      <configuration-dependencies>
+        <config-type>core-site</config-type>
+        <config-type>hdfs-site</config-type>
+        <config-type>hadoop-env</config-type>
+        <config-type>hadoop-policy</config-type>
+        <config-type>hdfs-log4j</config-type>
+        <config-type>ranger-hdfs-plugin-properties</config-type>
+        <config-type>ssl-client</config-type>
+        <config-type>ssl-server</config-type>
+        <config-type>ranger-hdfs-audit</config-type>
+        <config-type>ranger-hdfs-policymgr-ssl</config-type>
+        <config-type>ranger-hdfs-security</config-type>
+        <config-type>ams-ssl-client</config-type>
+      </configuration-dependencies>
+    </service>
+  </services>
+</metainfo>
+```
+
+* **config-type** - 表示一组配置的字符串。例如:_core-site、hdfs-site、yarn-site_ 等。在 Ambari 中保存配置时,配置会持久化在不可变的 config-type 版本中。如果修改并保存 HDFS core-site 配置 4 次,就会有 4 个 core-site config-type 版本。此外,保存服务配置时,只会更新发生变化的 config-type。
+
+* **configFiles** - 列出封装组件处理的配置文件
+* **configFile** - 表示某一类型的一个配置文件
+
+  - **type** - 文件类型,不同类型会以不同方式生成内容
+
+    + **xml** - 以 Hadoop 友好格式生成的 XML 文件。示例:[hdfs-site.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hdfs-site.xml)
+    + **env** - 通常用于脚本,内容值作为模板使用。模板包含 config-tags,其值在生成文件时于运行时填充。示例:[hadoop-env.sh](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/configuration/hadoop-env.xml)
+    + **properties** - 生成条目为 key=value 格式的属性文件。示例:[falcon-runtime.properties](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-runtime.properties.xml)
+  - **dictionaryName** - 用于存储此配置文件键值的 config-type 名称
+* **configuration-dependencies** - 列出此组件或服务所依赖的 config-type。此依赖的影响之一是:每当 config-type 更新时,Ambari 会自动将组件或服务标记为需要重启。根据上面的代码,每当 _core-site_ 更新时,HDFS 服务和 HDFS_CLIENT 组件都会被标记为需要重启。
+
+* **configuration-dir** - 放置 _configFiles_ 中所列文件的目录。可选,默认值为 _configuration_。
+
+#### 在 config-type 中添加新配置 {#adding-new-configs-in-a-config-type}
+
+向 config-type 添加配置项时可以指定许多不同参数,详见[此处](https://cwiki.apache.org/confluence/display/AMBARI/Configuration+support+in+Ambari)。
+
+#### UI - Categories {#ui---categories}
+
+上面定义的配置会显示在服务的 _Configs_ 页面中。
+
+要在 UI 中自定义配置类别和顺序,必须更新以下文件。
+
+**创建类别** - 更新 _ [ambari-web/app/models/stack_service.js](https://github.com/apache/ambari/blob/trunk/ambari-web/app/models/stack_service.js#L226)_ 文件,添加自己的服务及新类别。
+
+**使用类别** - 要将配置放入指定类别并指定配置顺序,请将配置添加到 [ambari-web/app/data/HDP2/site_properties.js](https://github.com/apache/ambari/blob/trunk/ambari-web/app/data/HDP2/site_properties.js) 文件。在此文件中可以指定要使用的类别以及配置应放置的索引。[ambari-web/app/data](https://github.com/apache/ambari/tree/trunk/ambari-web/app/data) 中的堆栈文件夹具有层级结构,并继承先前版本。此处定义配置到各部分的映射。示例:[Hive 类别](https://github.com/apache/ambari/blob/trunk/ambari-web/app/data/HDP2.2/hive_properties.js)、[Tez 类别](https://github.com/apache/ambari/blob/trunk/ambari-web/ [...]
+
+#### UI - 增强配置 {#ui---enhanced-configs}
+
+_Enhanced Configs_ 功能使服务提供商无需修改任何 UI 代码即可大幅自定义服务配置,并决定向用户突出显示哪些配置。自定义内容包括提供易用的服务布局、更好的控件(滑块、组合框、列表、切换开关、微调器等)、更好的验证(最小值、最大值、枚举)、自动单位转换(MB、GB、秒、毫秒等)、配置依赖以及改进的默认值动态推荐。
+
+服务提供商只需更改 _stacks_/ 文件夹中的服务定义,即可完成上述所有操作。
+
+更多信息请参阅 _ [Enhanced Configs](https://cwiki.apache.org/confluence/display/AMBARI/Enhanced+Configs)_ 页面。
+
+### 告警 {#alerts}
+
+每个服务都可以通过提供 [alerts.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/alerts.json) 文件定义 Ambari 应跟踪的警报。
+
+有关 Ambari Alerts 框架的更多信息,请参阅 [Alerts wiki 页面](https://cwiki.apache.org/confluence/display/AMBARI/Alerts),有关 alerts.json 格式的信息请参阅 [Alerts 定义文档](https://github.com/apache/ambari/blob/branch-2.1/ambari-server/docs/api/v1/alert-definitions.md)。
+
+### Kerberos {#kerberos}
+
+Ambari 能够为集群启用和禁用 Kerberos。为告知 Ambari 服务及其组件要使用的身份和配置,每个服务都可以提供 _kerberos.json_ 文件。
+
+有关 Kerberos 支持的更多信息,请参阅 _ [Automated Kerberization](https://cwiki.apache.org/confluence/display/AMBARI/Automated+Kerberizaton)_ wiki 页面,有关 Kerberos 描述符的信息请参阅 [Kerberos Descriptor 文档](https://github.com/apache/ambari/blob/trunk/ambari-server/docs/security/kerberos/kerberos_descriptor.md)。
+
+### Metrics {#metrics}
+
+Ambari 提供 [Ambari Metrics System(“AMS”)](https://cwiki.apache.org/confluence/display/AMBARI/Metrics) 服务,用于在 Ambari 管理的集群中收集、聚合和提供 Hadoop 及系统指标。
+
+每个服务都可以通过定义 [metrics.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metrics.json) 文件指定 AMS 应收集和提供的指标。
+
+有关 metrics.json 文件格式的信息,请参阅 [Stack Defined Metrics](https://cwiki.apache.org/confluence/display/AMBARI/Stack+Defined+Metrics) 页面。
+
+### Quick Links {#quick-links}
+
+服务可以按照预定义的 JSON 格式向文本文件添加元信息,从而将快速链接列表添加到 Ambari Web UI。Ambari Server 会解析快速链接 JSON 文件并将其内容提供给 UI,使 Ambari Web UI 可以根据这些信息计算快速链接 URL,并相应填充快速链接下拉列表。
+
+有关快速链接 JSON 文件设计的更多信息,请参阅 [Quick Links](../quick-links.md) 页面。
+
+### Widgets {#widgets}
+
+每个服务都可以通过定义 [widgets.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/widgets.json) 文件,指定服务摘要页面默认显示的部件和热力图。
+
+有关部件描述符的更多信息,请参阅 [Enhanced Service Dashboard](https://cwiki.apache.org/confluence/display/AMBARI/Enhanced+Service+Dashboard) 页面。
+
+### Role Command Order {#role-command-order}
+
+从 Ambari 2.2 开始,每个服务都可以通过在服务文件夹中包含 [role_command_order.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json) 文件来定义自己的角色命令顺序。服务只应指定其组件与其他组件之间的关系。换言之,如果服务只包含 COMP_X,则只应列出与 COMP_X 相关的依赖关系。如果 COMP_X 启动时依赖 NameNode 启动,并且 NameNode 停止时应等待 COMP_X 停止,则角色命令顺序应包含以下内容:
+
+**Example service role_command_order.json**
+```json
+"COMP_X-START": ["NAMENODE-START"],
+    "NAMENODE-STOP": ["COMP_X-STOP"]
+```
+
+服务角色命令顺序中的条目会与堆栈中定义的角色命令顺序合并。例如,由于堆栈已经具有 NAMENODE-STOP 依赖关系,上例中的 COMP_X-STOP 会添加到其余 NAMENODE-STOP 依赖关系中,而 COMP_X-START 对 NAMENODE-START 的依赖则会作为新依赖添加。
+
+有关角色命令顺序的更多详情,请参阅下面的 [Role Command Order](https://cwiki.apache.org/confluence/display/AMBARI/How-To+Define+Stacks+and+Services#How-ToDefineStacksandServices-RoleCommandOrder) 部分。
+
+### 服务 Advisor {#service-advisor}
+
+从 Ambari 2.4 开始,每个服务都可以选择定义自己的服务顾问,而不是在堆栈顾问中定义配置和布局详情。这对未在堆栈中定义的自定义服务尤其有用。Ambari 提供 _Service Advisor_ 功能,服务可以在其服务文件夹中编写名为 _service-advisor.py_ 的 Python 脚本。该文件夹可以位于定义服务的堆栈 services 目录中,也可以从 common-services 或其他位置的服务定义继承。示例:[common-services/HAWQ/2.0.0](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0)。
+
+与 Stack-advisor 脚本不同,service-advisor 脚本不会自动扩展父服务的 service-advisor 脚本。service-advisor 脚本需要显式扩展父服务的 service-advisor 脚本。以下代码示例展示如何引用父级的 service_advisor.py;此处扩展的是 resources/stacks 目录中的根 service-advisor.py 文件。
+
+**Sample service-advisor.py file inheritance**
+```python
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+class HAWQ200ServiceAdvisor(service_advisor.ServiceAdvisor):
+```
+
+与堆栈顾问类似,服务顾问会提供以下 4 个重要方面的信息:
+
+1. Recommend layout of the service on cluster
+2. Recommend service configurations
+3. Validate layout of the service on cluster
+4. Validate service configurations
+
+通过提供 service-advisor.py 文件,可以动态控制服务的上述各个方面。
+
+service-advisor 脚本的主接口包含上述各项的调用方式及所提供数据的文档。
+
+```python
+class ServiceAdvisor(DefaultStackAdvisor):
+"""
+  Abstract class implemented by all service advisors.
+
+"""
+
+"""
+  If any components of the service should be colocated with other services,
+  this is where you should set up that layout.  Example:
+
+    # colocate HAWQSEGMENT with DATANODE, if no hosts have been allocated for HAWQSEGMENT
+    hawqSegment = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"] == "HAWQSEGMENT"][0]
+    if not self.isComponentHostsPopulated(hawqSegment):
+      for hostName in hostsComponentsMap.keys():
+        hostComponents = hostsComponentsMap[hostName]
+        if {"name": "DATANODE"} in hostComponents and {"name": "HAWQSEGMENT"} not in hostComponents:
+          hostsComponentsMap[hostName].append( { "name": "HAWQSEGMENT" } )
+        if {"name": "DATANODE"} not in hostComponents and {"name": "HAWQSEGMENT"} in hostComponents:
+          hostComponents.remove({"name": "HAWQSEGMENT"})
+"""
+  def colocateService(self, hostsComponentsMap, serviceComponents):
+    pass
+
+"""
+  Any configuration recommendations for the service should be defined in this function.
+
+  This should be similar to any of the recommendXXXXConfigurations functions in the stack_advisor.py
+  such as recommendYARNConfigurations().
+
+"""
+  def getServiceConfigurationRecommendations(self, configurations, clusterSummary, services, hosts):
+    pass
+
+"""
+  Returns an array of Validation objects about issues with the hostnames to which components are assigned.
+
+  This should detect validation issues which are different than those the stack_advisor.py detects.
+
+  The default validations are in stack_advisor.py getComponentLayoutValidations function.
+
+"""
+  def getServiceComponentLayoutValidations(self, services, hosts):
+    return []
+
+"""
+  Any configuration validations for the service should be defined in this function.
+
+  This should be similar to any of the validateXXXXConfigurations functions in the stack_advisor.py
+  such as validateHDFSConfigurations.
+
+"""
+  def getServiceConfigurationsValidationItems(self, configurations, recommendedDefaults, services, hosts):
+    return []
+```
+
+#### **示例** {#examples}
+
+* [Service Advisor interface](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/service_advisor.py#L51)
+* [HAWQ 2.0.0 Service Advisor implementation](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/service_advisor.py)
+* [PXF 3.0.0 Service Advisor implementation](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/PXF/3.0.0/service_advisor.py)
+
+### 服务 Upgrade {#service-upgrade}
+
+从 Ambari 2.4 开始,每个服务都可以在其服务定义中定义升级流程。这对自定义服务尤其有用,因为它们不再需要修改堆栈的 upgrade-pack 即可集成到[集群升级](https://cwiki.apache.org/confluence/display/AMBARI/How-To+Define+Stacks+and+Services#How-ToDefineStacksandServices-StackUpgrades)中。
+
+
+每个服务都可以定义 _upgrade-packs_,这些 XML 文件描述该服务的升级流程,以及升级包与整个堆栈 upgrade-pack 的关系。这些 _upgrade-pack_ XML 文件放置在服务的 _upgrades/_ 文件夹中,并按其要扩展的堆栈版本放入不同子文件夹。测试代码中提供了一些示例。
+
+#### 示例 {#examples-1}
+
+* [Upgrades folder](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/)
+* [Upgrade-pack XML](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml)
+
+服务定义的每个 upgrade-pack 都应与特定堆栈版本定义的服务文件名匹配。例如在测试代码中,HDP 2.2.0 包含 [upgrade_test_15388.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.2.0/upgrades/upgrade_test_15388.xml) upgrade-pack。HDFS 服务在 [HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/upgrades/HDP/2.2.0/upgrade_test_15388.xml) 中定义了该升级包的扩展。此例中 upgrade-pack 定义在 HDP [...]
+
+服务文件格式与堆栈的格式基本相同。target、target-stack 和 type 属性应与堆栈 upgrade-pack 中的值相同。服务可以添加自己的前置条件检查。
+
+**General Attributes and Prerequisite Checks**
+```
+<upgrade xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <target>2.4.*</target>
+  <target-stack>HDP-2.4.0</target-stack>
+  <type>ROLLING</type>
+  <prerequisite-checks>
+    <check>org.apache.ambari.server.checks.FooCheck</check>
+  </prerequisite-checks>
+```
+
+upgrade-pack 的 order 部分由 group 元素组成,与堆栈 upgrade-pack 类似。主要区别在于需要定义这些组与堆栈升级包或其他服务 upgrade-pack 中组的关系。第一个示例引用 PRE_CLUSTER 组,并为服务 FOO 添加新的 execute-stage。根据 `<add-after-group-entry>` 标签,该条目应添加到 HDFS 的 execute-stage 之后。
+
+```xml
+<order>
+  <group xsi:type="cluster" name="PRE_CLUSTER" title="Pre {{direction.text.proper}}">
+    <add-after-group-entry>HDFS</add-after-group-entry>
+    <execute-stage service="FOO" component="BAR" title="Backup FOO">
+      <task xsi:type="manual">
+        <message>Back FOO up.</message>
+      </task>
+    </execute-stage>
+  </group>
+
+```
+
+同样的语法也可用于排列其他部分,例如服务检查优先级和服务组。
+
+```xml
+<group name="SERVICE_CHECK1" title="All Service Checks" xsi:type="service-check">
+  <add-after-group-entry>ZOOKEEPER</add-after-group-entry>
+  <priority>
+    <service>HBASE</service>
+  </priority>
+</group>
+ 
+<group name="CORE_MASTER" title="Core Masters">
+  <add-after-group-entry>YARN</add-after-group-entry>
+  <service name="HBASE">
+    <component>HBASE_MASTER</component>
+  </service>
+</group>
+```
+
+也可以添加新组,并将其排列在堆栈 upgrade-pack 中其他组之后。以下示例使用 add-after-group 标签将 FOO 组添加到 HIVE 组之后。
+
+```xml
+<group name="FOO" title="Foo">
+  <add-after-group>HIVE</add-after-group>
+  <skippable>true</skippable>
+  <allow-retry>false</allow-retry>
+  <service name="FOO">
+    <component>BAR</component>
+  </service>
+</group>
+```
+
+还可以在同一组中同时包含 add-after-group 和 add-after-group-entry 标签。如果组尚不存在,这会创建新组,并将其排列在 add-after-group 指定的组名之后。add-after-group-entry 将决定该组内服务、优先级或 execute-stage 的顺序。
+
+```xml
+<group name="FOO" title="Foo">
+  <add-after-group>HIVE</add-after-group>
+  <add-after-group-entry>FOO</add-after-group-entry>
+  <skippable>true</skippable>
+  <allow-retry>false</allow-retry>
+  <service name="FOO2">
+    <component>BAR2</component>
+  </service>
+</group>
+```
+
+upgrade-pack 的 processing 部分与堆栈 upgrade-pack 中的内容保持一致。
+
+```xml
+   <processing>
+    <service name="FOO">
+      <component name="BAR">
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
+      </component>
+      <component name="BAR2">
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
+      </component>
+    </service>
+  </processing>
+```
+
+## 定义 Stack {#define-stack}
+
+Stack 是按版本管理的服务集合。每个 Stack 都是在源代码 [ambari-server/src/main/resources/stacks](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks) 中定义的目录。安装后,这些 Stack 定义可在 ambari-server 计算机的 _/var/lib/ambari-server/resources/stacks_ 中使用。
+
+每个 Stack 目录针对每个 Stack 版本包含一个子目录。其中一些 Stack 版本处于活动状态,另一些则不是。每个 Stack 版本都包含服务,这些服务要么引用自 _common-services_,要么定义在该 Stack 版本的 _services_ 目录中。
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/stack-and-services/imgs/define-stack.png)
+
+示例:[HDP Stack](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP)。[HDP-2.4 Stack 版本](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.4)。
+
+### Stack 版本描述符 {#stack-version-descriptor}
+
+每个 Stack 版本都应提供一个 _metainfo.xml_ 描述符文件(示例:[HDP-2.3](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/metainfo.xml)、[HDP-2.4](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.4/metainfo.xml)),用于描述该 Stack 版本的以下信息:
+
+```xml
+<metainfo>
+    <versions>
+      <active>true</active>
+    </versions>
+    <extends>2.3</extends>
+    <minJdk>1.7</minJdk>
+    <maxJdk>1.8</maxJdk>
+</metainfo>
+```
+
+* **versions/active** - 此 Stack 版本是否仍可安装。如果不可用,安装期间此版本不会显示在 UI 中。
+
+* **extends** - 此 Stack 中正在扩展的 Stack 版本。扩展的 Stack 版本会继承服务以及父 Stack 版本的几乎所有方面。
+
+* **minJdk** - 此 Stack 版本支持的最低 JDK。如果 Ambari 使用的 JDK 低于此版本,安装向导会向用户发出警告。
+
+* **maxJdk** - 此 Stack 版本支持的最高 JDK。如果 Ambari 使用的 JDK 高于此版本,安装向导会向用户发出警告。
+
+### Stack 属性 {#stack-properties}
+
+堆栈必须包含或继承 properties 目录,其中包含两个文件:[stack_features.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json) 和 [stack_tools.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_tools.json)。此[目录](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties)是在 Ambari 2.4 中新增的。
+
+stack_features.json 包含 Ambari 中提供的功能列表,并允许堆栈指定哪些堆栈版本包含这些功能。功能列表由特定 Ambari 发布版本决定。特定 Ambari 版本的参考列表应在该版本分支的 [HDP/2.0.6/properties/stack_features.json](https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/stacks/HDP/2.0.6/properties/stack_features.json) 中找到。每个功能都有名称和描述,堆栈可以提供该功能受支持的最低和最高版本。
+
+```json
+{
+
+"stack_features": [
+
+{
+
+"name": "snappy",
+
+"description": "Snappy compressor/decompressor support",
+
+"min_version": "2.0.0.0",
+
+"max_version": "2.2.0.0"
+
+},
+
+...
+
+}
+```
+
+stack_tools.json 包含 stack_selector 和 conf_selector 工具的名称及安装位置。
+
+```json
+{
+
+"stack_selector": ["hdp-select", "/usr/bin/hdp-select", "hdp-select"],
+
+"conf_selector": ["conf-select", "/usr/bin/conf-select", "conf-select"]
+
+}
+```
+
+
+任何自定义堆栈都必须包含这两个 JSON 文件。更多信息请参阅 [Stack Properties](./stack-properties.md) wiki 页面。
+
+### 服务 {#services}
+
+每个堆栈版本都包含服务,这些服务要么从 _common-services_ 引用,要么定义在堆栈版本的 _services_ 文件夹中。
+
+如果服务会在多个堆栈之间共享,则定义在 _common-services_ 中;如果不会共享,则可以定义在堆栈版本内部。
+
+#### 参考 _common-services_ {#reference-common-services}
+
+要引用 common-services 中的服务,服务描述符文件应使用 < _extends>_ 元素。(示例:[HDP-2.0.6 中的 HDFS](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml))
+
+```xml
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>HDFS</name>
+      <extends>common-services/HDFS/2.1.0.2.0</extends>
+    </service>
+  </services>
+</metainfo>
+```
+
+#### Define 服务 {#define-service-1}
+
+可以完全按照 _common-services_ 中服务的格式,在 _services_ 文件夹中定义新服务。
+
+Examples:
+
+* [HDFS in BIGTOP-0.8](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/HDFS)
+* [GlusterFS in HDP-2.3.GlusterFS](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.3.GlusterFS/services/GLUSTERFS)
+
+#### Extend 服务 {#extend-service}
+
+当一个堆栈版本扩展另一个堆栈版本时,会继承父服务的所有详细信息,也可以覆盖和删除继承服务定义的任意部分。
+
+Examples:
+
+* HDP-2.3 / HDFS -[添加 NFS_GATEWAY 组件、更新服务版本和操作系统专用软件包](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/services/HDFS/metainfo.xml)
+* HDP-2.2 / Storm -[删除 STORM_REST_API 组件、更新服务版本和操作系统专用软件包](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/metainfo.xml)
+* HDP-2.3 / YARN -[从 capacity-scheduler.xml 删除 YARN 节点标签配置](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/capacity-scheduler.xml)
+* HDP-2.3 / Kafka -[添加 Kafka Broker Process 警报](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/alerts.json)
+
+### Role Command Order {#role-command-order-1}
+
+_**Role**_ is another name for **Component** (Ex: NAMENODE, DATANODE, RESOURCEMANAGER, HBASE_MASTER, etc.)
+
+顾名思义,可以告知 Ambari 堆栈中定义的组件应按何种顺序运行命令。
+
+例如:“应在启动 _NameNode_ 之前启动 _ZooKeeper Server_”,或“只有在 _NameNode_ 和 _DataNodes_ 启动后才能启动 _HBase Master_”。
+
+可以通过在堆栈版本文件夹中包含 [role_command_order.json](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json) 文件来指定。
+
+#### Format {#format}
+
+该文件采用 JSON 格式,包含一个 JSON 对象,顶级键可以是部分名称或注释。例如:[HDP-2.0.6](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/role_command_order.json)。
+
+在每个部分对象中,键描述依赖的组件操作,值列出应在该操作之前执行的组件操作。
+
+```json
+{
+  "_comment": "Section 1 comment",
+  "section_name_1": {
+    "_comment": "Section containing role command orders",
+    "-": ["-", "-"],
+    "-": ["-"],
+    ...
+
+  },
+  "_comment": "Next section comment",
+  ...
+
+}
+```
+
+#### Sections {#sections}
+
+Ambari 仅使用以下部分:
+
+Section Name | When Used
+-------------|---------------
+general_deps | 命令顺序适用于所有情况
+optional_glusterfs | 集群存在 GLUSTERFS 服务实例时应用命令顺序
+optional_no_glusterfs | 集群不存在 GLUSTERFS 服务实例时应用命令顺序
+namenode_optional_ha | 安装 HDFS 服务且存在 JOURNALNODE 组件时应用命令顺序(启用 HDFS HA)
+resourcemanager_optional_ha | 安装 YARN 服务且存在多个 RESOURCEMANAGER 主机组件时应用命令顺序(启用 YARN HA)
+
+#### Commands {#commands}
+
+Ambari 当前支持的命令包括:
+
+* INSTALL
+* UNINSTALL
+* START
+* RESTART
+* STOP
+* EXECUTE
+* ABORT
+* UPGRADE
+* SERVICE_CHECK
+* CUSTOM_COMMAND
+* ACTIONEXECUTE
+
+#### 示例 {#examples-2}
+
+角色命令顺序 | 说明
+-------------------|---------------------
+"HIVE_METASTORE-START": ["MYSQL_SERVER-START", "NAMENODE-START"] | 启动 Hive Metastore 前先启动 MySQL 和 NameNode 组件
+"MAPREDUCE_SERVICE_CHECK-SERVICE_CHECK": ["NODEMANAGER-START", "RESOURCEMANAGER-START"], | MapReduce 服务检查需要先启动 ResourceManager 和 NodeManager
+"ZOOKEEPER_SERVER-STOP" : ["HBASE_MASTER-STOP", "HBASE_REGIONSERVER-STOP", "METRICS_COLLECTOR-STOP"], | 停止 ZooKeeper 服务器前,确保 HBase Master、HBase RegionServer 和 AMS Metrics Collector 已停止。
+
+### Repositories {#repositories}
+
+每个堆栈版本都可以通过提供 _repos/repoinfo.xml_ 指定要使用的软件包仓库位置(示例:[HDP-2.0.6](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/repos/repoinfo.xml))。
+_repoinfo.xml_ 文件包含按操作系统分组的仓库。每个操作系统指定一个仓库列表,选择堆栈版本进行安装时会向用户显示该列表。
+
+这些仓库与[服务 metainfo.xml 中定义的 _packages_](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/metainfo.xml#L161) 配合使用,以在系统上安装适当的软件。
+
+```xml
+<reposinfo>
+  <os family="redhat6">
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.0.6.1</baseurl>
+      <repoid>HDP-2.0.6</repoid>
+      <reponame>HDP</reponame>
+    </repo>
+    <repo>
+      <baseurl>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.17/repos/centos6</baseurl>
+      <repoid>HDP-UTILS-1.1.0.17</repoid>
+      <reponame>HDP-UTILS</reponame>
+    </repo>
+  </os>
+<reposinfo>
+```
+
+baseurl- URL of the RPM repository where provided _repoid_ can be found
+**repoid** - Repo ID to use that are hosted at _baseurl
+**reponame** - Display name for the repo being used.
+
+#### Latest Builds {#latest-builds}
+
+虽然仓库基础 URL 可以为特定仓库提供更新,但必须在构建时定义。当仓库更改位置或更新构建托管在其他站点时,之后可能会产生问题。
+
+对于这类场景,堆栈版本可以提供 JSON 文件的位置,该文件可提供其他要使用的仓库 URL 详情。
+
+例如:[HDP-2.3 repoinfo.xml](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.3/repos/repoinfo.xml) 会指向可找到最新构建的备用仓库 URL:
+
+```json
+{
+    ...
+
+    "HDP-2.3":{
+        "latest":{
+            "centos6":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.3.6.0-3586/",
+            "centos7":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos7/2.x/BUILDS/2.3.6.0-3586/",
+            "debian6":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/debian6/2.x/BUILDS/2.3.6.0-3586/",
+            "debian7":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/debian7/2.x/BUILDS/2.3.6.0-3586/",
+            "suse11":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/suse11sp3/2.x/BUILDS/2.3.6.0-3586/",
+            "ubuntu12":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu12/2.x/BUILDS/2.3.6.0-3586/",
+            "ubuntu14":"http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu14/2.x/BUILDS/2.3.6.0-3586/"
+        }
+    },
+    ...
+
+}
+```
+
+### 钩子 {#hooks}
+
+堆栈版本可以包含适用于所有服务的基本通用指令,这些指令需要在某些 Ambari 命令之前或之后运行。
+
+Ambari 提供 _Hooks_ 功能,将通用的前置和后置代码集中到 _hooks_ 文件夹中,避免在所有服务脚本中重复代码并让用户操心。(示例:[HDP-2.0.6](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks))
+
+![](@site/versioned_docs/version-3.0.0/ambari-design/stack-and-services/imgs/hooks.png)
+
+#### Command Sub-Folders {#command-sub-folders}
+
+钩子子文件夹的一般命名模式为 `"<before|after>-<ANY|<CommandName>>"`。
+这意味着子文件夹下的 scripts/hook.py 文件会在命令之前或之后运行。
+
+**Examples:**
+
+子文件夹 | 用途 | 示例
+-----------|---------|------------
+before-START | 在堆栈版本任意组件运行 START 命令前调用钩子脚本。 | [HDP-2.0.6](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py#L30)<br></br>设置 Hadoop 日志和 pid 目录<br></br>创建 Java Home 符号链接<br></br>创建 /etc/hadoop/conf/topology_script.py<br></br>等。
+before-INSTALL | 安装堆栈版本任意组件前调用钩子脚本 | [HDP-2.0.6](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/hook.py#L33)<br></br>在 /etc/yum.repos.d 中创建仓库文件<br></br>安装 curl、unzip 等基本软件包。
+
+根据 Ambari 当前支持的命令,可以按需创建以下子文件夹:
+
+Prefix | - |Command
+-------|--|---------------------
+before | - |INSTALL UNINSTALL START RESTART STOP   
+after  | - |EXECUTE ABORT UPGRADE  SERVICE_CHECK  `<custom_command>`-用户指定的自定义命令,例如 HDFS 指定的 DECOMMISSION 或 REBALANCEHDFS 命令
+
+_scripts/hook.py_ 脚本应导入 [resource_management.libraries.script.hook](https://github.com/apache/ambari/blob/trunk/ambari-common/src/main/python/resource_management/libraries/script/hook.py) 模块并扩展 Hook 类。
+
+```python
+from resource_management.libraries.script.hook import Hook
+
+class CustomHook(Hook):
+  def hook(self, env):
+    # Do custom work
+
+if __name__ == "__main__":
+  CustomHook().execute()
+```
+
+### 配置s {#configurations}
+
+虽然大多数配置在服务级别设置,但也可以存在适用于所有服务、用于表示使用此堆栈安装的集群状态的配置。
+
+例如,[“是否启用安全?”](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml#L25)、[“由哪个用户运行冒烟测试?”](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml#L46) 等。
+
+这类配置可以在堆栈的 [configuration 文件夹](https://github.com/apache/ambari/tree/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration)中定义,访问方式与服务级配置相同。
+
+#### Stack Advisor {#stack-advisor}
+
+由于每个堆栈包含多个复杂服务,因此需要动态确定服务在集群中的布局以及某些配置的值。
+
+Ambari 提供 _Stack Advisor_ 功能,堆栈可以在 _services/_ 文件夹中编写名为 _stack-advisor.py_ 的 Python 脚本。示例:[HDP-2.0.6](https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/stack_advisor.py)。
+
+Stack-advisor 脚本会自动扩展父堆栈版本的 stack-advisor 脚本。这使较新的堆栈版本可以更改行为,而不影响早期行为。
+
+Stack advisor 提供以下 4 个重要方面的信息:
+
+1. 推荐服务在集群中的布局
+2. 推荐服务配置
+3. 验证服务在集群中的布局
+4. 验证服务配置
+
+通过提供 stack-advisor.py 文件,可以动态控制上述各个方面。
+
+stack-advisor 脚本的主接口包含上述各项的调用方式及所提供数据的文档。
+
+```python
+class StackAdvisor(object):
+"""
+  Abstract class implemented by all stack advisors. Stack advisors advise on stack specific questions.
+
+  Currently stack advisors provide following abilities:
+  - Recommend where services should be installed in cluster
+  - Recommend configurations based on host hardware
+  - Validate user selection of where services are installed on cluster
+  - Validate user configuration values
+
+  Each of the above methods is passed in parameters about services and hosts involved as described below.
+
+    @type services: dictionary
+    @param services: Dictionary containing all information about services selected by the user.
+
+      Example: {
+      "services": [
+        {
+          "StackServices": {
+            "service_name" : "HDFS",
+            "service_version" : "2.6.0.2.2",
+          },
+          "components" : [
+            {
+              "StackServiceComponents" : {
+                "cardinality" : "1+",
+                "component_category" : "SLAVE",
+                "component_name" : "DATANODE",
+                "display_name" : "DataNode",
+                "service_name" : "HDFS",
+                "hostnames" : []
+              },
+              "dependencies" : []
+            }, {
+              "StackServiceComponents" : {
+                "cardinality" : "1-2",
+                "component_category" : "MASTER",
+                "component_name" : "NAMENODE",
+                "display_name" : "NameNode",
+                "service_name" : "HDFS",
+                "hostnames" : []
+              },
+              "dependencies" : []
+            },
+            ...
... 14385 lines suppressed ...


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org