public function initClusters()
{
foreach ((array) $this->clusterConfig as $name => $config) {
try {
$config = new Collection($config);
$clusterBuilder = $config->has('port') ? $this->clusterBuilders[] = \Deployer\cluster($name, $config['nodes'], $config['port']) : ($this->clusterBuilders[] = \Deployer\cluster($name, $config['nodes']));
unset($config['local']);
unset($config['nodes']);
unset($config['port']);
$this->executeBuilderMethods($config, $clusterBuilder);
} catch (\RuntimeException $e) {
throw new \RuntimeException("Error processing clusters: " . $name);
}
}
return $this;
}