Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Not able to create HDF 3.2 Cluster over API

avatar
New Member

We are running HDF 3.1 clusters.

For the provisioning and maintenance we have an automated deploy and test process. Deployment is done with Ansible. Everytime we change something in our Ansible scripts, we deploy to fresh VM's, do automated tests and destroy the VM's.

Now for upgrading to HDF 3.2 our first stept is to change our scripts to install HDF 3.2 and then to create a fresh cluster. About the rollout of HDF 3.2 to our real environment we did not yet decide about the approach.

a) we automate the full upgrade process (https://docs.hortonworks.com/HDPDocuments/HDF3/HDF-3.2.0/ambari-managed-hdf-upgrade/content/upgradin...)
b) backup of states, we reinstall the cluster, restore states

Because the Blueprint looks different with the new version we created a cluster with the Wizard on Amabari UI, downloaded the blueprint.zip (with blueprint.json and clustertemplate.json).

Later sending the blueprint to the Ambari API works /api/v1/blueprints/:blueprintname and then sending the clustertemplate to /api/v1/clusters/:clustername ends in an error response:

status 400: Stack information should be provided when creating a cluster

The blueprint contains the version: "Blueprints":

{
        "blueprint_name": ":blueprintname",
        "stack_name": "HDF",
        "stack_version": "3.2"
    } 

The clustertemplate contains the version:

{
    "Clusters": {
        "cluster_name": ":clustername"
    },
    "blueprint": ":blueprintname",
    "host_groups": [
        {
            "hosts": [
                {
                    "fqdn": "node1"
                }
            ],
            "name": "host_group_0"
        },
        {
            "hosts": [
                {
                    "fqdn": "node2"
                },
                {
                    "fqdn": "node3"
                }
            ],
            "name": "host_group_1"
        }
    ],
    "provision_action": "INSTALL_ONLY"
}


Anybody an idea what we are doing wrong?

Thank you very much in advance for any kind of input.

1 ACCEPTED SOLUTION

avatar
New Member

After a successful try sending the clustertemplate with curl, we changed the ansible task (uri module):

  • Add Header "Content-Type: application/x-www-form-urlencoded"
  • Add Parameter "body_format: json"

Now we can provision a HDF 3.2 with our existing Ansible Scripts. Without these adjustments Ambari does not read properly the request.

View solution in original post

1 REPLY 1

avatar
New Member

After a successful try sending the clustertemplate with curl, we changed the ansible task (uri module):

  • Add Header "Content-Type: application/x-www-form-urlencoded"
  • Add Parameter "body_format: json"

Now we can provision a HDF 3.2 with our existing Ansible Scripts. Without these adjustments Ambari does not read properly the request.