public DeployNtServiceDeploymentTask(
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            IArtifactsRepository artifactsRepository,
            INtServiceManager ntServiceManager,
            IPasswordCollector passwordCollector,
            IFailoverClusterManager failoverClusterManager,
            IDirectoryAdapter directoryAdapter,
            IFileAdapter fileAdapter,
            IZipFileAdapter zipFileAdapter)
            : base(projectInfoRepository, environmentInfoRepository)
        {
            Guard.NotNull(artifactsRepository, "artifactsRepository");
            Guard.NotNull(ntServiceManager, "ntServiceManager");
            Guard.NotNull(passwordCollector, "passwordCollector");
            Guard.NotNull(failoverClusterManager, "failoverClusterManager");
            Guard.NotNull(directoryAdapter, "directoryAdapter");
            Guard.NotNull(fileAdapter, "fileAdapter");
            Guard.NotNull(zipFileAdapter, "zipFileAdapter");

            _artifactsRepository    = artifactsRepository;
            _ntServiceManager       = ntServiceManager;
            _passwordCollector      = passwordCollector;
            _failoverClusterManager = failoverClusterManager;
            _directoryAdapter       = directoryAdapter;
            _fileAdapter            = fileAdapter;
            _zipFileAdapter         = zipFileAdapter;
        }
        public DeployNtServiceDeploymentTask(
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            IArtifactsRepository artifactsRepository,
            INtServiceManager ntServiceManager,
            IPasswordCollector passwordCollector,
            IFailoverClusterManager failoverClusterManager,
            IDirectoryAdapter directoryAdapter,
            IFileAdapter fileAdapter,
            IZipFileAdapter zipFileAdapter)
            : base(projectInfoRepository, environmentInfoRepository)
        {
            Guard.NotNull(artifactsRepository, "artifactsRepository");
              Guard.NotNull(ntServiceManager, "ntServiceManager");
              Guard.NotNull(passwordCollector, "passwordCollector");
              Guard.NotNull(failoverClusterManager, "failoverClusterManager");
              Guard.NotNull(directoryAdapter, "directoryAdapter");
              Guard.NotNull(fileAdapter, "fileAdapter");
              Guard.NotNull(zipFileAdapter, "zipFileAdapter");

              _artifactsRepository = artifactsRepository;
              _ntServiceManager = ntServiceManager;
              _passwordCollector = passwordCollector;
              _failoverClusterManager = failoverClusterManager;
              _directoryAdapter = directoryAdapter;
              _fileAdapter = fileAdapter;
              _zipFileAdapter = zipFileAdapter;
        }
        public DeployUberDeployerAgentDeploymentTask(
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            IArtifactsRepository artifactsRepository,
            INtServiceManager ntServiceManager,
            IPasswordCollector passwordCollector,
            IFailoverClusterManager failoverClusterManager,
            IDirectoryAdapter directoryAdapter,
            IFileAdapter fileAdapter,
            IZipFileAdapter zipFileAdapter)
            : base(
                projectInfoRepository,
                environmentInfoRepository,
                artifactsRepository,
                ntServiceManager,
                passwordCollector,
                failoverClusterManager,
                directoryAdapter,
                fileAdapter,
                zipFileAdapter)
        {
            Guard.NotNull(directoryAdapter, "directoryAdapter");

            _directoryAdapter = directoryAdapter;
        }
Ejemplo n.º 4
0
        public override IEnumerable <string> GetTargetFolders(IObjectFactory objectFactory, EnvironmentInfo environmentInfo)
        {
            Guard.NotNull(objectFactory, "objectFactory");
            Guard.NotNull(environmentInfo, "environmentInfo");

            if (environmentInfo.EnableFailoverClusteringForNtServices)
            {
                IFailoverClusterManager failoverClusterManager =
                    objectFactory.CreateFailoverClusterManager();

                string clusterGroupName =
                    environmentInfo.GetFailoverClusterGroupNameForProject(Name);

                IEnumerable <string> possibleNodeNames =
                    failoverClusterManager.GetPossibleNodeNames(
                        environmentInfo.FailoverClusterMachineName,
                        clusterGroupName);

                return
                    (possibleNodeNames
                     .Select(node => EnvironmentInfo.GetNetworkPath(node, Path.Combine(environmentInfo.NtServicesBaseDirPath, NtServiceDirName)))
                     .ToList());
            }
            else
            {
                return
                    (new List <string>
                {
                    environmentInfo.GetAppServerNetworkPath(
                        Path.Combine(environmentInfo.NtServicesBaseDirPath, NtServiceDirName))
                });
            }
        }
        public MoveClusterGroupToAnotherNodeDeploymentStep(IFailoverClusterManager failoverClusterManager, string failoverClusterMachineName, string clusterGroupName, string targetNodeName)
        {
            if (failoverClusterManager == null)
              {
            throw new ArgumentNullException("failoverClusterManager");
              }

              if (string.IsNullOrEmpty(failoverClusterMachineName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "failoverClusterMachineName");
              }

              if (string.IsNullOrEmpty(clusterGroupName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "clusterGroupName");
              }

              if (string.IsNullOrEmpty(targetNodeName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "targetNodeName");
              }

              _failoverClusterManager = failoverClusterManager;
              _failoverClusterMachineName = failoverClusterMachineName;
              _clusterGroupName = clusterGroupName;
              _targetNodeName = targetNodeName;
        }
        public DeployNtServiceDeploymentTask(
      IEnvironmentInfoRepository environmentInfoRepository,
      IArtifactsRepository artifactsRepository,
      INtServiceManager ntServiceManager,
      IPasswordCollector passwordCollector,
      IFailoverClusterManager failoverClusterManager,
      NtServiceProjectInfo projectInfo,
      string projectConfigurationName,
      string projectConfigurationBuildId,
      string targetEnvironmentName)
            : base(environmentInfoRepository, targetEnvironmentName)
        {
            if (artifactsRepository == null)
              {
            throw new ArgumentNullException("artifactsRepository");
              }

              if (ntServiceManager == null)
              {
            throw new ArgumentNullException("ntServiceManager");
              }

              if (projectInfo == null)
              {
            throw new ArgumentNullException("projectInfo");
              }

              if (string.IsNullOrEmpty(projectConfigurationName))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "projectConfigurationName");
              }

              if (string.IsNullOrEmpty(projectConfigurationBuildId))
              {
            throw new ArgumentException("Argument can't be null nor empty.", "projectConfigurationBuildId");
              }

              if (passwordCollector == null)
              {
            throw new ArgumentNullException("passwordCollector");
              }

              if (failoverClusterManager == null)
              {
            throw new ArgumentNullException("failoverClusterManager");
              }

              _artifactsRepository = artifactsRepository;
              _projectInfo = projectInfo;
              _projectConfigurationName = projectConfigurationName;
              _projectConfigurationBuildId = projectConfigurationBuildId;
              _ntServiceManager = ntServiceManager;
              _passwordCollector = passwordCollector;
              _failoverClusterManager = failoverClusterManager;
        }
        public MoveClusterGroupToAnotherNodeDeploymentStep(IFailoverClusterManager failoverClusterManager, string failoverClusterMachineName, string clusterGroupName, string targetNodeName)
        {
            Guard.NotNull(failoverClusterManager, "failoverClusterManager");
            Guard.NotNullNorEmpty(failoverClusterMachineName, "failoverClusterMachineName");
            Guard.NotNullNorEmpty(clusterGroupName, "clusterGroupName");
            Guard.NotNullNorEmpty(clusterGroupName, "clusterGroupName");
            Guard.NotNullNorEmpty(targetNodeName, "targetNodeName");

            _failoverClusterManager     = failoverClusterManager;
            _failoverClusterMachineName = failoverClusterMachineName;
            _clusterGroupName           = clusterGroupName;
            _targetNodeName             = targetNodeName;
        }
        public MoveClusterGroupToAnotherNodeDeploymentStep(IFailoverClusterManager failoverClusterManager, string failoverClusterMachineName, string clusterGroupName, string targetNodeName)
        {
            Guard.NotNull(failoverClusterManager, "failoverClusterManager");
              Guard.NotNullNorEmpty(failoverClusterMachineName, "failoverClusterMachineName");
              Guard.NotNullNorEmpty(clusterGroupName, "clusterGroupName");
              Guard.NotNullNorEmpty(clusterGroupName, "clusterGroupName");
              Guard.NotNullNorEmpty(targetNodeName, "targetNodeName");

              _failoverClusterManager = failoverClusterManager;
              _failoverClusterMachineName = failoverClusterMachineName;
              _clusterGroupName = clusterGroupName;
              _targetNodeName = targetNodeName;
        }
        public DeployUberDeployerAgentDeploymentTask(
            IProjectInfoRepository projectInfoRepository,
            IEnvironmentInfoRepository environmentInfoRepository,
            IArtifactsRepository artifactsRepository,
            INtServiceManager ntServiceManager,
            IPasswordCollector passwordCollector,
            IFailoverClusterManager failoverClusterManager,
            IDirectoryAdapter directoryAdapter,
            IFileAdapter fileAdapter,
            IZipFileAdapter zipFileAdapter)
            : base(projectInfoRepository,
        environmentInfoRepository,
        artifactsRepository,
        ntServiceManager,
        passwordCollector,
        failoverClusterManager,
        directoryAdapter,
        fileAdapter,
        zipFileAdapter)
        {
            Guard.NotNull(directoryAdapter, "directoryAdapter");

              _directoryAdapter = directoryAdapter;
        }