Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Now Live: Explore expert insights and technical deep dives on the new Cloudera Community BlogsRead the Announcement
Labels (1)
avatar
Cloudera Employee

If you need to install the specific version of HDP using Blue prints use the Following steps.

  • Install ambari-server and ambari-agent and register it.
  • Use the appropriate os version. Here I have used the os version as centos/redhat 7
  • Make sure you do it on a clean host with no existing hadooppackages etc.

Create 4 files under say /root

[root@vijaybluetest1 ~]# ls

blueprint.json cluster.json repo.json utils.json

blueprint.json :- Contains cluster definition.

1) cat blueprint.json

{

"host_groups" : [

{ "name":"host_group_1",

"components":[

{ "name" : "NODEMANAGER" },

{ "name" : "DATANODE" },

{ "name" : "ZOOKEEPER_SERVER" },

{ "name" : "HISTORYSERVER" },

{ "name" : "JOURNALNODE" },

{ "name" : "APP_TIMELINE_SERVER" },

{ "name" : "RESOURCEMANAGER" },

{ "name" : "MAPREDUCE2_CLIENT" },

{ "name" : "YARN_CLIENT" },

{ "name" : "HDFS_CLIENT" },

{ "name" : "ZOOKEEPER_CLIENT" },

{ "name" : "NAMENODE" },

{ "name" : "SECONDARY_NAMENODE"}

],

"cardinality":"1"

}

],

"Blueprints" : {

"blueprint_name" : "vijay-test",

"stack_name" : "HDP",

"stack_version" : "2.5"

}

}

Command to register

curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://vijaybluetest1.openstacklocal:8080/api/v1/blueprints/vijay-test -d @blueprint.json

vijay-test :- is the blueprint_name specified in blueprint.json

2) cat repo.json

{

"Repositories":{

"base_url":"http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.3.0",

"verify_base_url":true

}

}

Register HDP version.

curl -H "X-Requested-By: ambari" -X PUT -u admin:admin http://vijaybluetest1.openstacklocal:8080/api/v1/stacks/HDP/versions/2.5/operating_systems/redhat7/r... -d @repo.json

please note :- repo.json contains the exact hdp version.

3) cat utils.json

{

"Repositories":{

"base_url":"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7",

"verify_base_url":true

}

}

Register Utils version

curl -H "X-Requested-By: ambari" -X PUT -u admin:admin http://vijaybluetest1.openstacklocal:8080/api/v1/stacks/HDP/versions/2.5/operating_systems/redhat7/r... -d @repo.json

4) cat cluster.json

{

"blueprint" : "vijay-test",

"host_groups" :[

{

"name" : "host_group_1",

"hosts" : [

{

"fqdn" : "vijaybluetest1.openstacklocal"

}

]

}

]

}

Trigger the cluster creation

[root@vijaybluetest1 ~]# curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://vijaybluetest1.openstacklocal:8080/api/v1/clusters/VIJAYCLUSTER -d @cluster.json

Here VIJAYCLUSTER is the name of the cluster.

{

"href" : "http://vijaybluetest1.openstacklocal:8080/api/v1/clusters/VIJAYCLUSTER/requests/1",

"Requests" : {

"id" : 1,

"status" : "Accepted"

}

}[root@vijaybluetest1 ~]#

  • 4)Login into Ambari to check the status.
1,984 Views
Version history
Last update:
‎08-25-2017 08:36 PM
Updated by:
Contributors