Exemplo n.º 1
0
        /// <summary>
        /// Create the web role coordinator.
        /// </summary>
        /// <param name="machineName">Specify the machineName if you would like to override the default machine name configuration.</param>
        public WebFarmRole(string machineName = null)
        {
            Log.Logger = AzureEnvironment.GetAzureLogger();
            _config    = AzureEnvironment.GetConfigSettings();

            machineName = machineName ?? AzureEnvironment.GetMachineName(_config);
            var octopusRepository = Infrastructure.OctopusDeploy.GetRepository(_config);
            var processRunner     = new ProcessRunner();

            _octopusDeploy = new Infrastructure.OctopusDeploy(machineName, _config, octopusRepository, processRunner);

            AzureEnvironment.RequestRecycleIfConfigSettingChanged(_config);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Create the web role coordinator.
        /// </summary>
        /// <param name="machineName">Specify the machineName if you would like to override the default machine name configuration.</param>
        /// <param name="purgeSites">Specify true to remove all sites before installing the tentacle</param>
        public WebFarmRole(string machineName = null, bool purgeSites = false)
        {
            Log.Logger = AzureEnvironment.GetAzureLogger();
            var config = AzureEnvironment.GetConfigSettings();

            machineName = machineName ?? AzureEnvironment.GetMachineName(config);
            var octopusRepository = Infrastructure.OctopusDeploy.GetRepository(config);
            var processRunner     = new ProcessRunner();
            var registryEditor    = new RegistryEditor();

            _octopusDeploy = new Infrastructure.OctopusDeploy(machineName, config, octopusRepository, processRunner, registryEditor);
            _purgesites    = purgeSites;

            AzureEnvironment.RequestRecycleIfConfigSettingChanged(config);
        }