Created on 03-06-2017 08:31 PM
.
.
.
http://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-installation/content/ch_Installing...
.
Install ambari-agent package on all the nodes in the cluster and modify hostname to ambari server host(fqdn) in /etc/ambari-agent/conf/ambari-agent.ini
.
Please follow below steps to create Blueprints
.
Note – This file will have information related to all the hosts which are part of your HDP cluster. This is also called as cluster is creation template as per Apache Ambari documentation.
{ "blueprint" : "hdptest", "default_password" : "hadoop", "host_groups" :[ { "name" : "blueprint1", "hosts" : [ { "fqdn" : "blueprint1.crazyadmins.com" } ] }, { "name" : "blueprint2", "hosts" : [ { "fqdn" : "blueprint2.crazyadmins.com" } ] }, { "name" : "blueprint3", "hosts" : [ { "fqdn" : "blueprint3.crazyadmins.com" } ] } ] }
.
{ "configurations" : [ { "core-site": { "properties" : { "fs.defaultFS" : "hdfs://%HOSTGROUP::blueprint1%:8020" }} },{ "yarn-site" : { "properties" : { "hadoop.registry.rm.enabled" : "false", "hadoop.registry.zk.quorum" : "%HOSTGROUP::blueprint3%:2181,%HOSTGROUP::blueprint2%:2181,%HOSTGROUP::blueprint1%:2181", "yarn.log.server.url" : "http://%HOSTGROUP::blueprint3%:19888/jobhistory/logs", "yarn.resourcemanager.address" : "%HOSTGROUP::blueprint2%:8050", "yarn.resourcemanager.admin.address" : "%HOSTGROUP::blueprint2%: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::blueprint2%", "yarn.resourcemanager.hostname.rm1" : "%HOSTGROUP::blueprint2%", "yarn.resourcemanager.hostname.rm2" : "%HOSTGROUP::blueprint3%", "yarn.resourcemanager.webapp.address.rm1" : "%HOSTGROUP::blueprint2%:8088", "yarn.resourcemanager.webapp.address.rm2" : "%HOSTGROUP::blueprint3%:8088", "yarn.resourcemanager.recovery.enabled" : "true", "yarn.resourcemanager.resource-tracker.address" : "%HOSTGROUP::blueprint2%:8025", "yarn.resourcemanager.scheduler.address" : "%HOSTGROUP::blueprint2%:8030", "yarn.resourcemanager.store.class" : "org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore", "yarn.resourcemanager.webapp.address" : "%HOSTGROUP::blueprint2%:8088", "yarn.resourcemanager.webapp.https.address" : "%HOSTGROUP::blueprint2%:8090", "yarn.timeline-service.address" : "%HOSTGROUP::blueprint3%:10200", "yarn.timeline-service.webapp.address" : "%HOSTGROUP::blueprint3%:8188", "yarn.timeline-service.webapp.https.address" : "%HOSTGROUP::blueprint3%:8190" } } } ], "host_groups" : [ { "name" : "blueprint1", "components" : [ { "name" : "NAMENODE" }, { "name" : "NODEMANAGER" }, { "name" : "DATANODE" }, { "name" : "ZOOKEEPER_CLIENT" }, { "name" : "HDFS_CLIENT" }, { "name" : "YARN_CLIENT" }, { "name" : "MAPREDUCE2_CLIENT" }, { "name" : "ZOOKEEPER_SERVER" } ], "cardinality" : 1 }, { "name" : "blueprint2", "components" : [ { "name" : "SECONDARY_NAMENODE" }, { "name" : "RESOURCEMANAGER" }, { "name" : "NODEMANAGER" }, { "name" : "DATANODE" }, { "name" : "ZOOKEEPER_CLIENT" }, { "name" : "ZOOKEEPER_SERVER" }, { "name" : "HDFS_CLIENT" }, { "name" : "YARN_CLIENT" }, { "name" : "MAPREDUCE2_CLIENT" } ], "cardinality" : 1 }, { "name" : "blueprint3", "components" : [ { "name" : "RESOURCEMANAGER" }, { "name" : "APP_TIMELINE_SERVER" }, { "name" : "HISTORYSERVER" }, { "name" : "NODEMANAGER" }, { "name" : "DATANODE" }, { "name" : "ZOOKEEPER_CLIENT" }, { "name" : "ZOOKEEPER_SERVER" }, { "name" : "HDFS_CLIENT" }, { "name" : "YARN_CLIENT" }, { "name" : "MAPREDUCE2_CLIENT" } ], "cardinality" : 1 } ], "Blueprints" : { "blueprint_name" : "hdptest", "stack_name" : "HDP", "stack_version" : "2.5" } }
Note - I have kept Resource Managers on blueprint1 and blueprint2, you can change it according to your requirement.
.
.
{ "Repositories":{ "base_url":"http://<ip-address-of-repo-server>/hdp/centos6/HDP-2.5.3.0", "verify_base_url":true } }
.
{ "Repositories":{ "base_url":"http://<ip-address-of-repo-server>/hdp/centos6/HDP-UTILS-1.1.0.21", "verify_base_url":true } }
.
curl -H "X-Requested-By: ambari"-X POST -u admin:admin http://<ambari-server-hostname>:8080/api/v1/blueprints/multinode-hdp -d @cluster_config.json
.
Execute below curl calls to setup internal repositories.
curl -H "X-Requested-By: ambari"-X PUT -u admin:admin http://<ambari-server-hostname>:8080/api/v1/stacks/HDP/versions/2.4/operating_systems/redhat6/reposi... -d @repo.json
curl -H "X-Requested-By: ambari"-X PUT -u admin:admin http://<ambari-server-hostname>:8080/api/v1/stacks/HDP/versions/2.4/operating_systems/redhat6/reposi... -d @hdputils-repo.json
.
curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://<ambari-server-hostname>:8080/api/v1/clusters/multinode-hdp -d @hostmap.json
.
Created on 09-21-2017 06:43 PM
One thing you will want to change is you are missing a <space> in your curl command! You should have a space between "X-Requested-By: ambari" and -X. For example, step 7 should look like this:
curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://<ambari-server-hostname>:8080/api/v1/clusters/multinode-hdp -d @hostmap.json
You will want to update this for all your curl examples that have this issue on any of your helpful guides!
Created on 04-19-2018 09:40 PM
Thanks @Chad Woodhead - Updated! 🙂