Support Questions
Find answers, ask questions, and share your expertise

cluster setup using ambari blueprint

I am planning to build cluster with the help of ambari-blueprint option . I am referring below link to achieve same but some of doubts are there please help me out to understand better.

https://cwiki.apache.org/confluence/display/AMBARI/Blueprints#Blueprints-BlueprintUsageOverview

please find below confusion I have :

Step 1: Create Blueprint

  • I want to create blueprint exporting from other cluster , my doubt is if i export blueprint from other cluster then if kerberos is implemented in the cluster and HA is achieved then will all configuration reflect in the blueprint ?
  • Is mapping of hosts to its component also comes when we export ambari blueprint from other cluster ?

command I am using to export blueprint :

GET /api/v1/clusters/:clusterName?format=blueprint and saving this file to some name , that is name of my blueprint which i will use to register with server .

Step 2: Register Blueprint with Ambari :

POST /api/v1/blueprints/:blueprintName?validate_topology=false

what is the use of validate_topology ?

Step 3: Create Cluster Creation Template :

How to achieve this step as specified in the link

"configuration can be applied at the cluster and host group scope and overrides any configurations specified in the blueprint."

[ Request Body is above Cluster Creation Template ] ------> What does it signify ?

Note : I am much confused with all these steps if my doubts do not present clear understanding please provide your suggestions, if possible step wise, my requirement is to export ambari blueprint from other cluster and use this blueprint to build cluster. I am able to manually setup ambari blueprint but exporting the blueprint and then all the whole procedure I am not very clear with .

1 ACCEPTED SOLUTION

Accepted Solutions

Re: cluster setup using ambari blueprint

Super Mentor

@Anurag Mishra

- Query1: I want to create blueprint exporting from other cluster , my doubt is if i export blueprint from other cluster then if kerberos is implemented in the cluster and HA is achieved then will all configuration reflect in the blueprint ?

>>>> When we export the blueprint of an existing cluster like following then the Kerberos configuration also comes as it is. However you may need to change the KDC/AD hostname & Port etc details while creating a new cluster to point to Other KDC/AD host. (If HA is enabled then the HA related information also will appear in the blueprint JSON file)

GET /api/v1/clusters/:clusterName?format=blueprint

.

-Query2: Is mapping of hosts to its component also comes when we export ambari blueprint from other cluster ?

>>> When we export the blueprint of an existing cluster then only the cluster service/component configurations are exported. We will need to write write our own Hostmaping file based on our requirement.

- Query3: You can store (save) the JSON file with any name you like. The Blueprint name Is defined inside the Hostmapping JSON file that we create on our own and the same name need to be passed in the POST API call.


Example hostmapping.json

{
  "blueprint" : "BlueprintTest",
  "default_password" : "admin",
  "host_groups" :[
    {
      "name" : "host_group_1", 
      "hosts" : [         
        {
          "fqdn" : "test1.example.com"
        }
      ]
    },
.
.
  ],
    "credentials" : [
     {
       "alias" : "kdc.admin.credential",
       "principal" : "admin/admin",
       "key" : "admin",
       "type" : "TEMPORARY"
     }
    ],
    "security" : {
        "type" : "KERBEROS"
   },
   "Clusters" : {
      "cluster_name":"BlueprintCluster"
    }
}

.

- Query4: The "validate_topology" optional flag we can use to tell ambari to enable / disable topology validation and register a blueprint:

When a blueprint is submitted, topology validation is performed. During this validation, the blueprint validator ensures that the blueprint topology is valid based on the component cardinalities specified in the stack.

Some components are specified as being "auto-deploy" enabled in the stack. This means that if the component in not explicitly specified in the blueprint that it will be added according to the information provided in the stack. In the case where a component is added because it wasn't explicitly specified and it is auto-deploy enabled, if it has dependencies itself, these should be validated.

POST /api/v1/blueprints/:blueprintName?validate_topology=false

.

View solution in original post

3 REPLIES 3

Re: cluster setup using ambari blueprint

Super Mentor

@Anurag Mishra

- Query1: I want to create blueprint exporting from other cluster , my doubt is if i export blueprint from other cluster then if kerberos is implemented in the cluster and HA is achieved then will all configuration reflect in the blueprint ?

>>>> When we export the blueprint of an existing cluster like following then the Kerberos configuration also comes as it is. However you may need to change the KDC/AD hostname & Port etc details while creating a new cluster to point to Other KDC/AD host. (If HA is enabled then the HA related information also will appear in the blueprint JSON file)

GET /api/v1/clusters/:clusterName?format=blueprint

.

-Query2: Is mapping of hosts to its component also comes when we export ambari blueprint from other cluster ?

>>> When we export the blueprint of an existing cluster then only the cluster service/component configurations are exported. We will need to write write our own Hostmaping file based on our requirement.

- Query3: You can store (save) the JSON file with any name you like. The Blueprint name Is defined inside the Hostmapping JSON file that we create on our own and the same name need to be passed in the POST API call.


Example hostmapping.json

{
  "blueprint" : "BlueprintTest",
  "default_password" : "admin",
  "host_groups" :[
    {
      "name" : "host_group_1", 
      "hosts" : [         
        {
          "fqdn" : "test1.example.com"
        }
      ]
    },
.
.
  ],
    "credentials" : [
     {
       "alias" : "kdc.admin.credential",
       "principal" : "admin/admin",
       "key" : "admin",
       "type" : "TEMPORARY"
     }
    ],
    "security" : {
        "type" : "KERBEROS"
   },
   "Clusters" : {
      "cluster_name":"BlueprintCluster"
    }
}

.

- Query4: The "validate_topology" optional flag we can use to tell ambari to enable / disable topology validation and register a blueprint:

When a blueprint is submitted, topology validation is performed. During this validation, the blueprint validator ensures that the blueprint topology is valid based on the component cardinalities specified in the stack.

Some components are specified as being "auto-deploy" enabled in the stack. This means that if the component in not explicitly specified in the blueprint that it will be added according to the information provided in the stack. In the case where a component is added because it wasn't explicitly specified and it is auto-deploy enabled, if it has dependencies itself, these should be validated.

POST /api/v1/blueprints/:blueprintName?validate_topology=false

.

View solution in original post

Re: cluster setup using ambari blueprint

Super Mentor

Re: cluster setup using ambari blueprint

@Jay Kumar SenSharma

I am familiar with the manual creating but exporting blueprint form other cluster some confusions , below i am listing the steps I do while creating blueprint manually, and iits replacement when we export from other cluster .

  • while we do manual our first step is to create hostmapping.json file but when we have to export blueprint still we have to do the same .
  • Then we create cluster_configuration.json file but in export method all these configs will come automatically so we do not need to create this file , am i right with this ?
  • then we have to create nternal repo .
  • : Register blueprint with ambari server by executing below command

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 [here in place of cluster_config.json we have to pass ambari blueprint that we exported from other cluster .

  • setup internal repos
  • pull the trigger! below command to start cluster isntallation

curl -H "X-Requested-By: ambari" -X POST -u admin:admin http://<ambari-server-hostname>:8080/api/v1/clusters/multinode-hdp -d @hostmap.json

conclusion : basically all the steps are same except creating cluster_configuration.json file we are exporting this from another cluster .

This is my whole understanding If I am wrong somewhere please highlight the same .

Thanks in advance .

@Jay Kumar SenSharma can you please check above and help me out