使用命令行安装Ambari:通过两行命令安装Ambari服务器

使用蓝图(使用ambari-bootstrap),自动部署新的集群。

    • Bring up 4 VMs imaged with RHEL/CentOS 7.x (e.g. hdp-ambari, hdp-[1-4] in this case)

 

    • On non-ambari nodes, install ambari-agents and point them to hdp-ambari node (e.g. hdp-ambari in this case)

 

    • latest Ambari : https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.3/bk_ambari-release-notes/content/ch_relnotes-ambari-2.6.1.3.html

 

    2.6.1.3
export ambari_version=2.6.1.3
export ambari_server=zzeng-hdp-ambari
curl -sSL https://raw.githubusercontent.com/zz22394/ambari-bootstrap/master/ambari-bootstrap.sh | sudo -E sh
    On Ambari node, install ambari-server
sudo yum install -y git
export ambari_version=2.6.1.3
export install_ambari_server=true
curl -sSL https://raw.githubusercontent.com/seanorama/ambari-bootstrap/master/ambari-bootstrap.sh | sudo -E sh

    Confirm 4 agents were registered and agent is up
curl -u admin:admin -H  X-Requested-By:ambari http://localhost:8080/api/v1/hosts
service ambari-agent status
    • At this point you could install HDP via Ambari’s install wizard by opening http://:8080 and following the prompts to customize as needed. If you prefer to just deploy a cluster with default settings follow below steps instead

 

    • Generate blueprint: you can generate BP and cluster file using Ambari recommendations API using these steps.

 

    For more details on the bootstrap scripts, see bootstrap script github
yum install -y python-argparse
git clone https://github.com/seanorama/ambari-bootstrap.git

export ambari_stack_version=2.6
export recommendation_strategy="ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES"

#Select the services to be deployed

#option A: for minimal services
#export ambari_services="HDFS MAPREDUCE2 YARN ZOOKEEPER HIVE"

#option B: for most services
#export ambari_services="ATLAS HBASE PHOENIX HDFS HIVE KAFKA LOGSEARCH AMBARI_INFRA PIG SPARK SQOOP MAPREDUCE2 STORM TEZ YARN ZOOKEEPER ZEPPELIN"

bash ./ambari-bootstrap/deploy/deploy-recommended-cluster.bash

    You can monitor the progress of the deployment via Ambari (e.g. http://node1:8080).

参考来源:

bannerAds