Create a cluster from CLI

You can create a cluster from CDP CLI.

The easiest way to create a cluster from CLI is to provide all parameters in the CDP web interface, obtain a JSON definition file, and then use it to crate a cluster via CLI.
  1. Navigate to the CDP web interface > Management Console > Environments > navigate to an existing environment > Create Data Hub Cluster.
  2. Provide all cluster parameters.
  3. Obtain the JSON template from the last page of the environment wizard SHOW CLI COMMAND. This also provides the command to use.
  4. Save the template as a JSON file on your computer.
  5. In the JSON file, remove the cluster name so that it is set to a blank value:
    "name":" "
  6. Use the command provided in the UI to create the cluster.
  7. The environment creation takes at least 10 minutes (depending on cluster size). You can monitor the progress from the web UI. Once the environment creation has been completed, its status will change to “AVAILABLE” when you list clusters:
    cdp datahub list-environments
    }
        ]
            {
                "clusterName": "domi-cluster",
                "crn": "crn:cdp:datahub:us-west-1:9d74eee4-1cad-45d7-b645-7ccf9edbb73d:cluster:edda680b-329b-414f-9dff-15699ab7ed2d",
                "status": "AVAILABLE",
                "workloadType": "CDP 1.0 - Data Engineering: Apache Spark, Apache Hive, Apache Oozie",
                "environmentCrn": "crn:altus:environments:us-west-1:9d74eee4-1cad-45d7-b645-7ccf9edbb73d:environment:1b88682b-4661-4dbf-9d4d-66ff7ea5a6fc",
                "cloudPlatform": "AWS",
                "nodeCount": 4,
                "creationDate": "2019-08-16T05:42:08.857000+00:00",
                "blueprintCrn": "crn:altus:cloudbreak:us-west-1:9d74eee4-1cad-45d7-b645-7ccf9edbb73d:blueprint:2"
            }
        ]
    }