public static ZooKeeperEnsemble DeployNew([NotNull] ZooKeeperEnsembleSettings settings, [NotNull] ILog log, bool startInstances = true)
        {
            var ensemble = new ZooKeeperEnsemble(settings, log);

            ensemble.Deploy(startInstances);

            return(ensemble);
        }
        public static ZooKeeperEnsemble DeployNew([NotNull] ZooKeeperEnsembleSettings settings, [NotNull] ILog log, bool startInstances = true)
        {
            ZooKeeperEnsemble ensemble = null;

            Retrier.RetryOnException(() =>
            {
                ensemble = new ZooKeeperEnsemble(settings, log);

                ensemble.Deploy(startInstances);
            },
                                     3,
                                     "Unable to start Zookeeper ensemble",
                                     () =>
            {
                log.Warn("Retrying Zookeeper.LocalEnsemble deployment...");
                ensemble?.Dispose();
            });

            return(ensemble);
        }