public static void createCluster(String destZkString, String destClusterName, VcrHelixConfig config) {
    HelixZkClient destZkClient = getHelixZkClient(destZkString);
    HelixAdmin destAdmin = new ZKHelixAdmin(destZkClient);
    if (ZKUtil.isClusterSetup(destClusterName, destZkClient)) {
      errorAndExit("Failed to create cluster because " + destClusterName + " already exist.");
    }
    ClusterSetup clusterSetup = new ClusterSetup.Builder().setZkAddress(destZkString).build();
    clusterSetup.addCluster(destClusterName, true);

    // set ALLOW_PARTICIPANT_AUTO_JOIN
    HelixConfigScope configScope = new HelixConfigScopeBuilder(HelixConfigScope.ConfigScopeProperty.CLUSTER).
        forCluster(destClusterName).build();
    Map<String, String> helixClusterProperties = new HashMap<>();
    helixClusterProperties.put(ZKHelixManager.ALLOW_PARTICIPANT_AUTO_JOIN,
        String.valueOf(config.getClusterConfigFields().isAllowAutoJoin()));
    destAdmin.setConfig(configScope, helixClusterProperties);

    setClusterConfig(destZkClient, destClusterName, config, false);
    logger.info("Cluster {} is created successfully!", destClusterName);
  }
Create a helix cluster with given information.
@param destZkString the cluster's zk string
@param destClusterName the cluster's name
ambry-commons/src/main/java/com/github/ambry/clustermap/HelixVcrUtil.java