Example: A cluster template with parameters

If you pass the supported parameters in a cluster template are dynamically fetched and replaced.

Example cluster template that includes placeholder values (the {{{general.clusterName}}} is included as a template):
{
  "cdhVersion": "7.0.0",
  "products": [
    {
      "version": "7.0.0-1.cdh7.0.0.p0.1309226",
      "product": "CDH"
    }
  ],
  "services": [
    {
      "refName": "hdfs",
      "serviceType": "HDFS",
      "serviceConfigs": [],
      "roleConfigGroups": [
        {
          "refName": "hdfs-NAMENODE-BASE",
          "roleType": "NAMENODE",
          "base": true,
          "displayName": null,
          "configs": [
            {
              "name": "dfs_name_dir_list",
              "value": "/hadoopfs/{{{general.clusterName}}}/namenode"
            }
          ]
        }
      ],
      "roles": null,
      "displayName": null
    }
  ],
  "hostTemplates": [
    {
      "refName": "master",
      "roleConfigGroupsRefNames": [
        "hdfs-BALANCER-BASE",
        "hdfs-NAMENODE-BASE",
        "hdfs-SECONDARYNAMENODE-BASE",
        "hms-GATEWAY-BASE",
        "hms-HIVEMETASTORE-BASE",
        "hive_on_tez-HIVESERVER2-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "hue-HUE_SERVER-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "spark_on_yarn-SPARK_YARN_HISTORY_SERVER-BASE",
        "livy-LIVY_SERVER-BASE",
        "zeppelin-ZEPPELIN_SERVER-BASE",
        "oozie-OOZIE_SERVER-BASE",
        "yarn-JOBHISTORY-BASE",
        "yarn-RESOURCEMANAGER-BASE",
        "zookeeper-SERVER-BASE",
        "knox-KNOX_GATEWAY-BASE"
      ],
      "cardinality": 1
    },
    {
      "refName": "worker",
      "roleConfigGroupsRefNames": [
        "hdfs-DATANODE-BASE",
        "hms-GATEWAY-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "livy-GATEWAY-BASE",
        "yarn-NODEMANAGER-WORKER"
      ],
      "cardinality": 1
    },
    {
      "refName": "compute",
      "roleConfigGroupsRefNames": [
        "hms-GATEWAY-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "yarn-NODEMANAGER-COMPUTE"
      ],
      "cardinality": 0
    }
  ],
  "displayName": "dataengineering",
  "cmVersion": "7.x.0",
  "repositories": [
    "http://cloudera-build-us-west-1.vpc.cloudera.com/s3/build/1309226/cdh/7.x/parcels/"
  ],
  "clusterSpec": null
}
Example cluster template after {{{general.clusterName}}} is set to my-super-cluster based on the actual cluster name:
{
  "cdhVersion": "7.0.0",
  "products": [
    {
      "version": "7.0.0-1.cdh7.0.0.p0.1309226",
      "product": "CDH"
    }
  ],
  "services": [
    {
      "refName": "hdfs",
      "serviceType": "HDFS",
      "serviceConfigs": [],
      "roleConfigGroups": [
        {
          "refName": "hdfs-NAMENODE-BASE",
          "roleType": "NAMENODE",
          "base": true,
          "displayName": null,
          "configs": [
            {
              "name": "dfs_name_dir_list",
              "value": "/hadoopfs/my-cluster-name/namenode"
            }
          ]
        }
      ],
      "roles": null,
      "displayName": null
    }
  ],
  "hostTemplates": [
    {
      "refName": "master",
      "roleConfigGroupsRefNames": [
        "hdfs-BALANCER-BASE",
        "hdfs-NAMENODE-BASE",
        "hdfs-SECONDARYNAMENODE-BASE",
        "hms-GATEWAY-BASE",
        "hms-HIVEMETASTORE-BASE",
        "hive_on_tez-HIVESERVER2-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "hue-HUE_SERVER-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "spark_on_yarn-SPARK_YARN_HISTORY_SERVER-BASE",
        "livy-LIVY_SERVER-BASE",
        "zeppelin-ZEPPELIN_SERVER-BASE",
        "oozie-OOZIE_SERVER-BASE",
        "yarn-JOBHISTORY-BASE",
        "yarn-RESOURCEMANAGER-BASE",
        "zookeeper-SERVER-BASE",
        "knox-KNOX_GATEWAY-BASE"
      ],
      "cardinality": 1
    },
    {
      "refName": "worker",
      "roleConfigGroupsRefNames": [
        "hdfs-DATANODE-BASE",
        "hms-GATEWAY-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "livy-GATEWAY-BASE",
        "yarn-NODEMANAGER-WORKER"
      ],
      "cardinality": 1
    },
    {
      "refName": "compute",
      "roleConfigGroupsRefNames": [
        "hms-GATEWAY-BASE",
        "hive_on_tez-GATEWAY-BASE",
        "tez-GATEWAY-BASE",
        "spark_on_yarn-GATEWAY-BASE",
        "yarn-NODEMANAGER-COMPUTE"
      ],
      "cardinality": 0
    }
  ],
  "displayName": "dataengineering",
  "cmVersion": "7.x.0",
  "repositories": [
    "http://cloudera-build-us-west-1.vpc.cloudera.com/s3/build/1309226/cdh/7.x/parcels/"
  ],
  "clusterSpec": null
}