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

ambari rest API + set config group according to json file

 

hi all

 

To create a new config group, it is mandatory to provide a config group name, a tag and the cluster name to which it belongs. The tag as seen in this example is a name of the service. Two config groups with the same tag cannot be associated with the same host.

 

how to run the following json file with curl ? in order to set this config group in ambari

 

 

 

POST /api/v1/clusters/c1/config_groups
[
   {
      "ConfigGroup": {
         "cluster_name": "c1",
         "group_name": "hdfs-nextgenslaves",
         "tag": "HDFS",
         "description": "HDFS configs for rack added on May 19, 2010",
         "hosts": [
            {
               "host_name": "host1"
            }
         ],
         "desired_configs": [
            {
               "type": "core-site",
               "tag": "nextgen1",
               "properties": {
                  "key": "value"
               }
            }
         ]
      }
   }
]

 

 reference - https://github.com/swagle/test/blob/master/docs/api/v1/config-groups.md

Michael-Bronson
0 REPLIES 0