From 77cc3f358e7206cf30234517c9b6a7c8a513da35 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Tue, 16 Dec 2014 21:02:34 -0800 Subject: [PATCH 1/9] first check in of removing cache scaffolding --- .../Common/ManagementConstants.cs | 15 - .../Properties/Resources.Designer.cs | 99 ---- .../Commands.Common/Properties/Resources.resx | 40 -- .../EnableAzureMemcacheRoleTests.cs | 427 ------------------ .../SaveAzureServiceProjectPackageTests.cs | 31 -- .../AddAzureCacheWorkerRoleTests.cs | 125 ----- .../Utilities/AzureServiceTests.cs | 10 - .../Commands.Test/Commands.Test.csproj | 2 - .../CloudService/CacheConfigurationFactory.cs | 330 -------------- .../Commands.Utilities.csproj | 1 - .../Commands.Utilities/Common/CloudRuntime.cs | 34 +- .../Properties/Resources.Designer.cs | 90 ---- .../Properties/Resources.resx | 37 -- .../Development/EnableAzureMemcacheRole.cs | 403 ----------------- .../Scaffolding/AddAzureCacheWorkerRole.cs | 92 ---- .../Services/Commands/Commands.csproj | 2 - 16 files changed, 1 insertion(+), 1737 deletions(-) delete mode 100644 src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs delete mode 100644 src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs delete mode 100644 src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs delete mode 100644 src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs diff --git a/src/Common/Commands.Common/Common/ManagementConstants.cs b/src/Common/Commands.Common/Common/ManagementConstants.cs index 269eaa2c119d..88fd49834bfc 100644 --- a/src/Common/Commands.Common/Common/ManagementConstants.cs +++ b/src/Common/Commands.Common/Common/ManagementConstants.cs @@ -41,21 +41,6 @@ public static class ApiConstants } - public class SDKVersion - { - public const string Version180 = "1.8.0"; - - public const string Version200 = "2.0.0"; - - public const string Version220 = "2.2.0"; - - public const string Version230 = "2.3.0"; - - public const string Version240 = "2.4.0"; - - public const string Version250 = "2.5.0"; - } - public enum DevEnv { Local, diff --git a/src/Common/Commands.Common/Properties/Resources.Designer.cs b/src/Common/Commands.Common/Properties/Resources.Designer.cs index 1a8465743d8b..28705c08771a 100644 --- a/src/Common/Commands.Common/Properties/Resources.Designer.cs +++ b/src/Common/Commands.Common/Properties/Resources.Designer.cs @@ -412,51 +412,6 @@ public static string BlobEndpointUriEnv { } } - /// - /// Looks up a localized string similar to Memcache is already enabled for role '{0}'.. - /// - public static string CacheAlreadyEnabledMessage { - get { - return ResourceManager.GetString("CacheAlreadyEnabledMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <configuration> - /// <configSections> - /// <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> - /// </configSections> - /// <dataCacheClients> - /// <tracing sinkType="DiagnosticSink" traceLevel="Error" /> - /// <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> - /// <autoDiscover isEnabled="true" identifier="$RoleName$" /> - /// </dataCacheClient> - /// </da [rest of string was truncated]";. - /// - public static string CacheAutoDiscoveryConfig { - get { - return ResourceManager.GetString("CacheAutoDiscoveryConfig", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. - /// - public static string CacheClientDiagnosticLevelAssemblyName { - get { - return ResourceManager.GetString("CacheClientDiagnosticLevelAssemblyName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DiagnosticStore. - /// - public static string CacheDiagnosticStoreName { - get { - return ResourceManager.GetString("CacheDiagnosticStoreName", resourceCulture); - } - } - /// /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. /// @@ -493,24 +448,6 @@ public static string CacheRuntimeVersionKey { } } - /// - /// Looks up a localized string similar to Resources\Scaffolding\Cache. - /// - public static string CacheScaffolding { - get { - return ResourceManager.GetString("CacheScaffolding", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to setup_cache.cmd > cache_log.txt. - /// - public static string CacheStartupCommand { - get { - return ResourceManager.GetString("CacheStartupCommand", resourceCulture); - } - } - /// /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). /// @@ -520,42 +457,6 @@ public static string CacheVersionWarningText { } } - /// - /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage. - /// - public static string CachingCacheSizePercentageSettingName { - get { - return ResourceManager.GetString("CachingCacheSizePercentageSettingName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString. - /// - public static string CachingConfigStoreConnectionStringSettingName { - get { - return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}. - /// - public static string CachingConfigStoreConnectionStringSettingValue { - get { - return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Caching. - /// - public static string CachingModuleName { - get { - return ResourceManager.GetString("CachingModuleName", resourceCulture); - } - } - /// /// Looks up a localized string similar to Cannot find {0} with name {1}.. /// diff --git a/src/Common/Commands.Common/Properties/Resources.resx b/src/Common/Commands.Common/Properties/Resources.resx index 9295f82d4c57..067fbdb84051 100644 --- a/src/Common/Commands.Common/Properties/Resources.resx +++ b/src/Common/Commands.Common/Properties/Resources.resx @@ -227,28 +227,6 @@ AZURE_BLOBSTORAGE_TEMPLATE - - Memcache is already enabled for role '{0}'. - - - <configuration> - <configSections> - <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> - </configSections> - <dataCacheClients> - <tracing sinkType="DiagnosticSink" traceLevel="Error" /> - <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> - <autoDiscover isEnabled="true" identifier="$RoleName$" /> - </dataCacheClient> - </dataCacheClients> -</configuration> - - - Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel - - - DiagnosticStore - Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} @@ -261,27 +239,9 @@ CacheRuntimeVersion - - Resources\Scaffolding\Cache - - - setup_cache.cmd > cache_log.txt - Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) - - Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage - - - Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString - - - DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1} - - - Caching - Cannot find {0} with name {1}. diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs deleted file mode 100644 index 27f967e5350c..000000000000 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/EnableAzureMemcacheRoleTests.cs +++ /dev/null @@ -1,427 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.IO; -using System.Linq; -using System.Management.Automation; -using Microsoft.WindowsAzure.Commands.CloudService.Development; -using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; -using Microsoft.WindowsAzure.Commands.Common; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Properties; -using Xunit; - -namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Tests -{ - using ConfigConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; - using DefinitionConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; - using TestResources = Commands.Common.Test.Properties.Resources; - - public class EnableAzureMemcacheRoleTests : TestBase - { - private MockCommandRuntime mockCommandRuntime; - - private AddAzureNodeWebRoleCommand addNodeWebCmdlet; - - private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; - - private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; - - private EnableAzureMemcacheRoleCommand enableCacheCmdlet; - - public EnableAzureMemcacheRoleTests() - { - AzureTool.IgnoreMissingSDKError = true; - AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; - mockCommandRuntime = new MockCommandRuntime(); - - enableCacheCmdlet = new EnableAzureMemcacheRoleCommand(); - addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); - addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; - enableCacheCmdlet.CommandRuntime = mockCommandRuntime; - } - - [Fact] - public void EnableAzureMemcacheRoleProcess() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); - - AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); - } - } - - /// - /// Verify that enabling cache on worker role will pass. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessOnWorkerRoleSuccess() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "CacheWorkerRole"; - string workerRoleName = "WorkerRole"; - string expectedMessage = string.Format(Resources.EnableMemcacheMessage, workerRoleName, cacheRoleName, Resources.MemcacheEndpointPort); - - addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = workerRoleName }; - addNodeWorkerCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(workerRoleName, cacheRoleName, rootPath); - - WorkerRole workerRole = AzureAssert.GetWorkerRole(rootPath, workerRoleName); - - AzureAssert.RuntimeUrlAndIdExists(workerRole.Startup.Task, Resources.CacheRuntimeValue); - - AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, serviceName, workerRoleName), Path.Combine(Resources.CacheScaffolding, Resources.WorkerRole)); - AzureAssert.StartupTaskExists(workerRole.Startup.Task, Resources.CacheStartupCommand); - - AzureAssert.InternalEndpointExists(workerRole.Endpoints.InternalEndpoint, - new InternalEndpoint { name = Resources.MemcacheEndpointName, protocol = InternalProtocol.tcp, port = Resources.MemcacheEndpointPort }); - - LocalStore localStore = new LocalStore - { - name = Resources.CacheDiagnosticStoreName, - cleanOnRoleRecycle = false - }; - - AzureAssert.LocalResourcesLocalStoreExists(localStore, workerRole.LocalResources); - - DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; - AzureAssert.ConfigurationSettingExist(diagnosticLevel, workerRole.ConfigurationSettings); - - ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; - AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, AzureAssert.GetCloudRole(rootPath, workerRoleName).ConfigurationSettings); - AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, AzureAssert.GetLocalRole(rootPath, workerRoleName).ConfigurationSettings); - - string workerConfigPath = string.Format(@"{0}\{1}\{2}", rootPath, workerRoleName, "web.config"); - string workerCloudConfig = File.ReadAllText(workerConfigPath); - Assert.True(workerCloudConfig.Contains("configSections")); - Assert.True(workerCloudConfig.Contains("dataCacheClients")); - - Assert.Equal(expectedMessage, mockCommandRuntime.VerboseStream[0]); - Assert.Equal(workerRoleName, (mockCommandRuntime.OutputPipeline[0] as PSObject).GetVariableValue(Parameters.RoleName)); - } - } - - /// - /// Verify that enabling cache with non-existing cache worker role will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessCacheRoleDoesNotExistFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expected = string.Format(Resources.RoleNotFoundMessage, cacheRoleName); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); - } - } - - /// - /// Verify that enabling cache with non-existing role to enable on will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessRoleDoesNotExistFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expected = string.Format(Resources.RoleNotFoundMessage, webRoleName); - - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); - } - } - - /// - /// Verify that enabling cache using same cache worker role on role with cache will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessAlreadyEnabledFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expected = string.Format(Resources.CacheAlreadyEnabledMessage, webRoleName); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); - } - } - - /// - /// Verify that enabling cache using different cache worker role on role with cache will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessAlreadyEnabledNewCacheRoleFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string newCacheRoleName = "NewCacheWorkerRole"; - string webRoleName = "WebRole"; - string expected = string.Format(Resources.CacheAlreadyEnabledMessage, webRoleName); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(newCacheRoleName, 1, rootPath); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, cacheRoleName, rootPath)); - } - } - - /// - /// Verify that enabling cache using non-cache worker role will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessUsingNonCacheWorkerRole() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string workerRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expected = string.Format(Resources.NotCacheWorkerRole, workerRoleName); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = workerRoleName }; - addNodeWorkerCmdlet.ExecuteCmdlet(); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, workerRoleName, rootPath)); - } - } - - [Fact] - public void EnableAzureMemcacheRoleProcessWithDefaultRoleName() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string originalDirectory = Directory.GetCurrentDirectory(); - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string webRoleName = "WebRole"; - string cacheRoleName = "WorkerRole"; - string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - Directory.SetCurrentDirectory(Path.Combine(rootPath, webRoleName)); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; - enableCacheCmdlet.RoleName = string.Empty; - enableCacheCmdlet.CacheWorkerRoleName = cacheRoleName; - enableCacheCmdlet.ExecuteCmdlet(); - - AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); - Directory.SetCurrentDirectory(originalDirectory); - } - } - - private void AssertCachingEnabled( - FileSystemHelper files, - string serviceName, - string rootPath, - string webRoleName, - string expectedMessage) - { - WebRole webRole = AzureAssert.GetWebRole(rootPath, webRoleName); - RoleSettings roleSettings = AzureAssert.GetCloudRole(rootPath, webRoleName); - - AzureAssert.RuntimeUrlAndIdExists(webRole.Startup.Task, Resources.CacheRuntimeValue); - - Assert.Equal(Resources.CacheRuntimeVersionKey, webRole.Startup.Task[0].Environment[0].name); - Assert.Equal(enableCacheCmdlet.CacheRuntimeVersion, webRole.Startup.Task[0].Environment[0].value); - - Assert.Equal(Resources.EmulatedKey, webRole.Startup.Task[2].Environment[0].name); - Assert.Equal("/RoleEnvironment/Deployment/@emulated", webRole.Startup.Task[2].Environment[0].RoleInstanceValue.xpath); - - Assert.Equal(Resources.CacheRuntimeUrl, webRole.Startup.Task[2].Environment[1].name); - Assert.Equal(TestResources.CacheRuntimeUrl, webRole.Startup.Task[2].Environment[1].value); - Assert.Equal(1, webRole.Startup.Task.Count(t => t.commandLine.Equals(Resources.CacheStartupCommand))); - - - AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, serviceName, webRoleName), Path.Combine(Resources.CacheScaffolding, Resources.WebRole)); - AzureAssert.StartupTaskExists(webRole.Startup.Task, Resources.CacheStartupCommand); - - AzureAssert.InternalEndpointExists(webRole.Endpoints.InternalEndpoint, - new InternalEndpoint { name = Resources.MemcacheEndpointName, protocol = InternalProtocol.tcp, port = Resources.MemcacheEndpointPort }); - - LocalStore localStore = new LocalStore - { - name = Resources.CacheDiagnosticStoreName, - cleanOnRoleRecycle = false - }; - - AzureAssert.LocalResourcesLocalStoreExists(localStore, webRole.LocalResources); - - DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; - AzureAssert.ConfigurationSettingExist(diagnosticLevel, webRole.ConfigurationSettings); - - ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; - AzureAssert.ConfigurationSettingExist(clientDiagnosticLevel, roleSettings.ConfigurationSettings); - - AssertWebConfig(string.Format(@"{0}\{1}\{2}", rootPath, webRoleName, Resources.WebCloudConfig)); - AssertWebConfig(string.Format(@"{0}\{1}\{2}", rootPath, webRoleName, Resources.WebConfigTemplateFileName)); - - Assert.Equal(expectedMessage, mockCommandRuntime.VerboseStream[0]); - Assert.Equal(webRoleName, (mockCommandRuntime.OutputPipeline[0] as PSObject).GetVariableValue(Parameters.RoleName)); - } - - private static void AssertWebConfig(string webCloudConfigPath) - { - string webCloudCloudConfigContents = FileUtilities.DataStore.ReadFileAsText(webCloudConfigPath); - Assert.True(webCloudCloudConfigContents.Contains("configSections")); - Assert.True(webCloudCloudConfigContents.Contains("dataCacheClients")); - } - - /// - /// Verify that enabling cache with non-existing cache worker role will fail. - /// - [Fact] - public void EnableAzureMemcacheRoleProcessOnCacheWorkerRoleFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string expected = string.Format(Resources.InvalidCacheRoleName, cacheRoleName); - - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(cacheRoleName, cacheRoleName, rootPath)); - } - } - - [Fact] - public void EnableAzureMemcacheWithoutCacheWorkerRoleName() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "WorkerRole"; - string webRoleName = "WebRole"; - string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath); - - AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); - } - } - - [Fact] - public void EnableAzureMemcacheWithoutCacheWorkerRoleNameAndServiceHasMultipleWorkerRoles() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string cacheRoleName = "CacheWorkerRole"; - string webRoleName = "WebRole"; - string expectedMessage = string.Format(Resources.EnableMemcacheMessage, webRoleName, cacheRoleName, Resources.MemcacheEndpointPort); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; - addNodeWorkerCmdlet.ExecuteCmdlet(); - addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; - enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath); - - AssertCachingEnabled(files, serviceName, rootPath, webRoleName, expectedMessage); - } - } - - [Fact] - public void EnableAzureMemcacheWithNoCacheWorkerRolesFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string serviceName = "AzureService"; - string rootPath = files.CreateNewService(serviceName); - string webRoleName = "WebRole"; - string expectedMessage = string.Format(Resources.NoCacheWorkerRoles); - - addNodeWebCmdlet = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRoleName }; - addNodeWebCmdlet.ExecuteCmdlet(); - addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = "WorkerRole" }; - addNodeWorkerCmdlet.ExecuteCmdlet(); - mockCommandRuntime.ResetPipelines(); - enableCacheCmdlet.PassThru = true; - enableCacheCmdlet.CacheRuntimeVersion = "2.5.0"; - - Testing.AssertThrows(() => enableCacheCmdlet.EnableAzureMemcacheRoleProcess(webRoleName, null, rootPath), expectedMessage); - } - } - } -} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs index b5851fa57a2c..b80274525404 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/SaveAzureServiceProjectPackageTests.cs @@ -119,36 +119,5 @@ public void TestCreatePackageWithMultipleRolesSuccessfull() Assert.True(File.Exists(packagePath)); } } - - [Fact] - public void ThrowsErrorForInvalidCacheVersion() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - files.CreateAzureSdkDirectoryAndImportPublishSettings(); - files.CreateNewService("NEW_SERVICE"); - string rootPath = Path.Combine(files.RootPath, "NEW_SERVICE"); - string packagePath = Path.Combine(rootPath, Resources.CloudPackageFileName); - string cacheRoleName = "WorkerRole1"; - AddAzureCacheWorkerRoleCommand addCacheWorkerCmdlet = new AddAzureCacheWorkerRoleCommand() - { - CommandRuntime = mockCommandRuntime - }; - EnableAzureMemcacheRoleCommand enableCacheCmdlet = new EnableAzureMemcacheRoleCommand() - { - CacheRuntimeVersion = "1.8.0", - CommandRuntime = mockCommandRuntime - }; - - CloudServiceProject service = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); - service.AddWebRole(Test.Utilities.Common.Data.NodeWebRoleScaffoldingPath); - addCacheWorkerCmdlet.AddAzureCacheWorkerRoleProcess(cacheRoleName, 1, rootPath); - enableCacheCmdlet.EnableAzureMemcacheRoleProcess("WebRole1", cacheRoleName, rootPath); - - Testing.AssertThrows( - () => cmdlet.ExecuteCmdlet(), - string.Format(Resources.CacheMismatchMessage, "WebRole1", "2.5.0")); - } - } } } diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs deleted file mode 100644 index 1ed81dfc23b6..000000000000 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Development/Scaffolding/AddAzureCacheWorkerRoleTests.cs +++ /dev/null @@ -1,125 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.IO; -using System.Management.Automation; -using Xunit; -using Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding; -using Microsoft.WindowsAzure.Commands.Common.Test.Mocks; -using Microsoft.WindowsAzure.Commands.Test.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Properties; - -namespace Microsoft.WindowsAzure.Commands.Test.CloudService.Development.Scaffolding -{ - using ConfigConfigurationSetting = Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; - using Microsoft.WindowsAzure.Commands.Common; - - - public class AddAzureCacheWorkerRoleTests : TestBase - { - private MockCommandRuntime mockCommandRuntime; - - private NewAzureServiceProjectCommand newServiceCmdlet; - - private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; - - public AddAzureCacheWorkerRoleTests() - { - AzureTool.IgnoreMissingSDKError = true; - AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; - mockCommandRuntime = new MockCommandRuntime(); - - newServiceCmdlet = new NewAzureServiceProjectCommand(); - addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); - - newServiceCmdlet.CommandRuntime = mockCommandRuntime; - addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; - } - - [Fact] - public void AddNewCacheWorkerRoleSuccessful() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string rootPath = Path.Combine(files.RootPath, "AzureService"); - string roleName = "WorkerRole"; - int expectedInstanceCount = 10; - newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); - WorkerRole cacheWorkerRole = addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(roleName, expectedInstanceCount, rootPath); - - AzureAssert.ScaffoldingExists(Path.Combine(files.RootPath, "AzureService", "WorkerRole"), Path.Combine(Resources.GeneralScaffolding, Resources.WorkerRole)); - - AzureAssert.WorkerRoleImportsExists(new Import { moduleName = Resources.CachingModuleName }, cacheWorkerRole); - - AzureAssert.LocalResourcesLocalStoreExists(new LocalStore { name = Resources.CacheDiagnosticStoreName, cleanOnRoleRecycle = false }, - cacheWorkerRole.LocalResources); - - Assert.Null(cacheWorkerRole.Endpoints.InputEndpoint); - - AssertConfigExists(AzureAssert.GetCloudRole(rootPath, roleName)); - AssertConfigExists(AzureAssert.GetLocalRole(rootPath, roleName), Resources.EmulatorConnectionString); - - PSObject actualOutput = mockCommandRuntime.OutputPipeline[1] as PSObject; - Assert.Equal(roleName, actualOutput.Members[Parameters.CacheWorkerRoleName].Value.ToString()); - Assert.Equal(expectedInstanceCount, int.Parse(actualOutput.Members[Parameters.Instances].Value.ToString())); - } - } - - private static void AssertConfigExists(RoleSettings role, string connectionString = "") - { - AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.NamedCacheSettingName, value = Resources.NamedCacheSettingValue }, role.ConfigurationSettings); - AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.DiagnosticLevelName, value = Resources.DiagnosticLevelValue }, role.ConfigurationSettings); - AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingCacheSizePercentageSettingName, value = string.Empty }, role.ConfigurationSettings); - AzureAssert.ConfigurationSettingExist(new ConfigConfigurationSetting { name = Resources.CachingConfigStoreConnectionStringSettingName, value = connectionString }, role.ConfigurationSettings); - } - - [Fact] - public void AddNewCacheWorkerRoleWithInvalidNamesFail() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string rootPath = Path.Combine(files.RootPath, "AzureService"); - newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); - - foreach (string invalidName in Test.Utilities.Common.Data.InvalidRoleNames) - { - Testing.AssertThrows(() => addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(invalidName, 1, rootPath)); - } - } - } - - [Fact] - public void AddNewCacheWorkerRoleDoesNotHaveAnyRuntime() - { - using (FileSystemHelper files = new FileSystemHelper(this)) - { - string rootPath = Path.Combine(files.RootPath, "AzureService"); - string roleName = "WorkerRole"; - int expectedInstanceCount = 10; - newServiceCmdlet.NewAzureServiceProcess(files.RootPath, "AzureService"); - - WorkerRole cacheWorkerRole = addCacheRoleCmdlet.AddAzureCacheWorkerRoleProcess(roleName, expectedInstanceCount, rootPath); - - Variable runtimeId = Array.Find(cacheWorkerRole.Startup.Task[0].Environment, v => v.name.Equals(Resources.RuntimeTypeKey)); - Assert.Equal(string.Empty, runtimeId.value); - } - } - } -} diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs index 34fd2df6c4f7..7c677120c2e1 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs @@ -39,10 +39,6 @@ public class AzureServiceTests: TestBase private AddAzureNodeWorkerRoleCommand addNodeWorkerCmdlet; - private AddAzureCacheWorkerRoleCommand addCacheRoleCmdlet; - - private EnableAzureMemcacheRoleCommand enableCacheCmdlet; - /// /// This method handles most possible cases that user can do to create role /// @@ -194,12 +190,6 @@ public AzureServiceTests() AzureTool.IgnoreMissingSDKError = true; AzurePowerShell.ProfileDirectory = Test.Utilities.Common.Data.AzureSdkAppDir; mockCommandRuntime = new MockCommandRuntime(); - - enableCacheCmdlet = new EnableAzureMemcacheRoleCommand(); - addCacheRoleCmdlet = new AddAzureCacheWorkerRoleCommand(); - - addCacheRoleCmdlet.CommandRuntime = mockCommandRuntime; - enableCacheCmdlet.CommandRuntime = mockCommandRuntime; } [Fact] diff --git a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj index f8c8093f264b..1782ecac7cff 100644 --- a/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj +++ b/src/ServiceManagement/Services/Commands.Test/Commands.Test.csproj @@ -161,11 +161,9 @@ - - diff --git a/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs b/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs deleted file mode 100644 index e163c564997e..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/CloudService/CacheConfigurationFactory.cs +++ /dev/null @@ -1,330 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Xml.Linq; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Properties; - -namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService -{ - using ConfigConfigurationSetting = Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; - using DefinitionConfigurationSetting = Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; - - static class CacheConfigurationFactory - { - private static string CurrentVersion { get; set; } - - private static Dictionary> cacheRoleConfigurationActions = - new Dictionary>() - { - { SDKVersion.Version180, CacheRole180 }, - { SDKVersion.Version200, CacheRole180 }, - { SDKVersion.Version220, CacheRole180 }, - { SDKVersion.Version230, CacheRole180 }, - { SDKVersion.Version240, CacheRole180 }, - { SDKVersion.Version250, CacheRole180 } - }; - - private static Dictionary> clientRoleConfigurationActions = - new Dictionary>() - { - { SDKVersion.Version180, CacheClientRole180 }, - { SDKVersion.Version200, CacheClientRole180 }, - { SDKVersion.Version220, CacheClientRole180 }, - { SDKVersion.Version230, CacheClientRole180 }, - { SDKVersion.Version240, CacheClientRole180 }, - { SDKVersion.Version250, CacheClientRole180 } - }; - - #region Cache Role Configuration - - /// - /// Configuration required to enable dedicated caching on a given role. - /// - /// The service project root path - /// The cache role info - private static void CacheRole180(string rootPath, RoleInfo cacheRoleInfo) - { - CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); - - if (!cloudServiceProject.Components.IsWebRole(cacheRoleInfo.Name)) - { - CacheWorkerRole180(rootPath, cacheRoleInfo); - } - } - - private static void CacheWorkerRole180(string rootPath, RoleInfo cacheRoleInfo) - { - // Fetch cache role information from service definition and service configuration files. - CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); - WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(cacheRoleInfo.Name); - RoleSettings cacheRoleSettings = cloudServiceProject.Components.GetCloudConfigRole(cacheRoleInfo.Name); - - // Add caching module to the role imports - cacheWorkerRole.Imports = GeneralUtilities.ExtendArray( - cacheWorkerRole.Imports, - new Import { moduleName = Resources.CachingModuleName }); - - // Enable caching Diagnostic store. - LocalStore diagnosticStore = new LocalStore - { - name = Resources.CacheDiagnosticStoreName, - cleanOnRoleRecycle = false - }; - cacheWorkerRole.LocalResources = GeneralUtilities.InitializeIfNull(cacheWorkerRole.LocalResources); - cacheWorkerRole.LocalResources.LocalStorage = GeneralUtilities.ExtendArray( - cacheWorkerRole.LocalResources.LocalStorage, - diagnosticStore); - - // Remove input endpoints. - cacheWorkerRole.Endpoints.InputEndpoint = null; - - // Add caching configuration settings - AddCacheConfiguration(cloudServiceProject.Components.GetCloudConfigRole(cacheRoleInfo.Name)); - AddCacheConfiguration( - cloudServiceProject.Components.GetLocalConfigRole(cacheRoleInfo.Name), - Resources.EmulatorConnectionString); - - cloudServiceProject.Components.Save(cloudServiceProject.Paths); - } - - private static void AddCacheConfiguration(RoleSettings cacheRoleSettings, string connectionString = "") - { - List cachingConfigSettings = new List(); - cachingConfigSettings.Add(new ConfigConfigurationSetting - { - name = Resources.NamedCacheSettingName, - value = Resources.NamedCacheSettingValue - }); - cachingConfigSettings.Add(new ConfigConfigurationSetting - { - name = Resources.DiagnosticLevelName, - value = Resources.DiagnosticLevelValue - }); - cachingConfigSettings.Add(new ConfigConfigurationSetting - { - name = Resources.CachingCacheSizePercentageSettingName, - value = string.Empty - }); - cachingConfigSettings.Add(new ConfigConfigurationSetting - { - name = Resources.CachingConfigStoreConnectionStringSettingName, - value = connectionString - }); - - cacheRoleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray( - cacheRoleSettings.ConfigurationSettings, - cachingConfigSettings); - } - - #endregion - - #region Cache Client Role Configuration - - /// - /// Configuration action to enable using dedicated caching on the client role. - /// - /// The cloud service project instance - /// The role name - /// The dedicated cache worker role name - private static void CacheClientRole180( - CloudServiceProject cloudServiceProject, - string roleName, - string cacheWorkerRoleName) - { - // Add MemcacheShim runtime installation. - cloudServiceProject.AddRoleRuntime( - cloudServiceProject.Paths, - roleName, - Resources.CacheRuntimeValue, - CurrentVersion); - - // Fetch web role information. - Startup startup = cloudServiceProject.Components.GetRoleStartup(roleName); - - // Assert that cache runtime is added to the runtime startup. - Debug.Assert(Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, - v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue))); - - if (cloudServiceProject.Components.IsWebRole(roleName)) - { - WebRole webRole = cloudServiceProject.Components.GetWebRole(roleName); - webRole.LocalResources = GeneralUtilities.InitializeIfNull(webRole.LocalResources); - DefinitionConfigurationSetting[] configurationSettings = webRole.ConfigurationSettings; - - CacheClientCommonConfiguration( - cloudServiceProject, - roleName, - true, - cacheWorkerRoleName, - webRole.Startup, - webRole.Endpoints, - webRole.LocalResources, - ref configurationSettings); - webRole.ConfigurationSettings = configurationSettings; - } - else - { - WorkerRole workerRole = cloudServiceProject.Components.GetWorkerRole(roleName); - workerRole.LocalResources = GeneralUtilities.InitializeIfNull(workerRole.LocalResources); - DefinitionConfigurationSetting[] configurationSettings = workerRole.ConfigurationSettings; - - CacheClientCommonConfiguration( - cloudServiceProject, - roleName, - false, - cacheWorkerRoleName, - workerRole.Startup, - workerRole.Endpoints, - workerRole.LocalResources, - ref configurationSettings); - workerRole.ConfigurationSettings = configurationSettings; - } - - // Save changes - cloudServiceProject.Components.Save(cloudServiceProject.Paths); - } - - private static void CacheClientCommonConfiguration( - CloudServiceProject cloudServiceProject, - string roleName, - bool isWebRole, - string cacheWorkerRole, - Startup startup, - Endpoints endpoints, - LocalResources localResources, - ref DefinitionConfigurationSetting[] configurationSettings) - { - if (isWebRole) - { - // Generate cache scaffolding for web role - cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WebRole.ToString()), - roleName, new Dictionary()); - - // Adjust web.config to enable auto discovery for the caching role. - string webCloudConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebCloudConfig); - string webConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebConfigTemplateFileName); - - UpdateWebConfig(roleName, cacheWorkerRole, webCloudConfigPath); - UpdateWebConfig(roleName, cacheWorkerRole, webConfigPath); - } - else - { - // Generate cache scaffolding for worker role - Dictionary parameters = new Dictionary(); - parameters[ScaffoldParams.RoleName] = cacheWorkerRole; - - cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WorkerRole.ToString()), - roleName, parameters); - } - - // Add default memcache internal endpoint. - InternalEndpoint memcacheEndpoint = new InternalEndpoint - { - name = Resources.MemcacheEndpointName, - protocol = InternalProtocol.tcp, - port = Resources.MemcacheEndpointPort - }; - endpoints.InternalEndpoint = GeneralUtilities.ExtendArray(endpoints.InternalEndpoint, memcacheEndpoint); - - // Enable cache diagnostic - LocalStore localStore = new LocalStore - { - name = Resources.CacheDiagnosticStoreName, - cleanOnRoleRecycle = false - }; - localResources.LocalStorage = GeneralUtilities.ExtendArray(localResources.LocalStorage, localStore); - - DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; - configurationSettings = GeneralUtilities.ExtendArray(configurationSettings, diagnosticLevel); - - // Add ClientDiagnosticLevel setting to service configuration. - AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetCloudConfigRole(roleName)); - AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetLocalConfigRole(roleName)); - } - - private static void AddClientDiagnosticLevelToConfig(RoleSettings roleSettings) - { - ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; - roleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray(roleSettings.ConfigurationSettings, clientDiagnosticLevel); - } - - /// - /// Updates the web.cloud.config with to auto-discover the cache role. - /// - /// The role name - /// The cache worker role name - /// The azure service instance for the role - private static void UpdateWebConfig(string roleName, string cacheWorkerRoleName, string webConfigPath) - { - XDocument webConfig = XDocument.Load(webConfigPath); - - Dictionary parameters = new Dictionary(); - parameters[ScaffoldParams.RoleName] = cacheWorkerRoleName; - string autoDiscoveryConfig = Scaffold.ReplaceParameter(Resources.CacheAutoDiscoveryConfig, parameters); - - // Adding the auto-discovery is sensetive to the placement of the nodes. The first node which is - // must be added at the first and the last node which is dataCacheClients must be added as last element. - XElement autoDiscoverXElement = XElement.Parse(autoDiscoveryConfig); - webConfig.Element("configuration").AddFirst(autoDiscoverXElement.FirstNode); - webConfig.Element("configuration").Add(autoDiscoverXElement.LastNode); - Debug.Assert(webConfig.Element("configuration").FirstNode.Ancestors("section").Attributes("name") != null); - Debug.Assert(webConfig.Element("configuration").LastNode.Ancestors("tracing").Attributes("sinkType") != null); - webConfig.Save(webConfigPath); - } - - #endregion - - /// - /// Gets the configuration action to enable dedicated caching on a role for the given SDK version. - /// - /// The SDK version - /// Action to apply to enable dedicated caching on a role - public static Action GetCacheRoleConfigurationAction(string version) - { - if (!cacheRoleConfigurationActions.ContainsKey(version)) - { - throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, - Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); - } - - CurrentVersion = version; - return cacheRoleConfigurationActions[version]; - } - - /// - /// Gets the configuration action to enable using dedicated caching on a role for the given SDK version. - /// - /// The SDK version - /// Action to apply on the client role - public static Action GetClientRoleConfigurationAction(string version) - { - if (!clientRoleConfigurationActions.ContainsKey(version)) - { - throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, - Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); - } - - CurrentVersion = version; - return clientRoleConfigurationActions[version]; - } - } -} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj index f3277cd1a8d8..104f1b7faeee 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj +++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj @@ -179,7 +179,6 @@ - diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs index f21e0f7f0910..b86974982f46 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs @@ -579,39 +579,7 @@ protected override bool GetChanges(CloudRuntimePackage package, out Dictionary - /// Looks up a localized string similar to Memcache is already enabled for role '{0}'.. - /// - public static string CacheAlreadyEnabledMessage { - get { - return ResourceManager.GetString("CacheAlreadyEnabledMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to <configuration> - /// <configSections> - /// <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> - /// </configSections> - /// <dataCacheClients> - /// <tracing sinkType="DiagnosticSink" traceLevel="Error" /> - /// <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> - /// <autoDiscover isEnabled="true" identifier="$RoleName$" /> - /// </dataCacheClient> - /// </da [rest of string was truncated]";. - /// - public static string CacheAutoDiscoveryConfig { - get { - return ResourceManager.GetString("CacheAutoDiscoveryConfig", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. - /// - public static string CacheClientDiagnosticLevelAssemblyName { - get { - return ResourceManager.GetString("CacheClientDiagnosticLevelAssemblyName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to DiagnosticStore. - /// - public static string CacheDiagnosticStoreName { - get { - return ResourceManager.GetString("CacheDiagnosticStoreName", resourceCulture); - } - } - /// /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. /// @@ -502,24 +457,6 @@ public static string CacheRuntimeVersionKey { } } - /// - /// Looks up a localized string similar to Resources\Scaffolding\Cache. - /// - public static string CacheScaffolding { - get { - return ResourceManager.GetString("CacheScaffolding", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to setup_cache.cmd > cache_log.txt. - /// - public static string CacheStartupCommand { - get { - return ResourceManager.GetString("CacheStartupCommand", resourceCulture); - } - } - /// /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). /// @@ -529,15 +466,6 @@ public static string CacheVersionWarningText { } } - /// - /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage. - /// - public static string CachingCacheSizePercentageSettingName { - get { - return ResourceManager.GetString("CachingCacheSizePercentageSettingName", resourceCulture); - } - } - /// /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString. /// @@ -547,24 +475,6 @@ public static string CachingConfigStoreConnectionStringSettingName { } } - /// - /// Looks up a localized string similar to DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}. - /// - public static string CachingConfigStoreConnectionStringSettingValue { - get { - return ResourceManager.GetString("CachingConfigStoreConnectionStringSettingValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Caching. - /// - public static string CachingModuleName { - get { - return ResourceManager.GetString("CachingModuleName", resourceCulture); - } - } - /// /// Looks up a localized string similar to Cannot find {0} with name {1}.. /// diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx index 3cea1ec63e68..985d03b9c2f8 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx @@ -236,28 +236,6 @@ AZURE_BLOBSTORAGE_TEMPLATE - - Memcache is already enabled for role '{0}'. - - - <configuration> - <configSections> - <section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" /> - </configSections> - <dataCacheClients> - <tracing sinkType="DiagnosticSink" traceLevel="Error" /> - <dataCacheClient name="DefaultShimConfig" useLegacyProtocol="false"> - <autoDiscover isEnabled="true" identifier="$RoleName$" /> - </dataCacheClient> - </dataCacheClients> -</configuration> - - - Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel - - - DiagnosticStore - Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} @@ -270,27 +248,12 @@ CacheRuntimeVersion - - Resources\Scaffolding\Cache - - - setup_cache.cmd > cache_log.txt - Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) - - Microsoft.WindowsAzure.Plugins.Caching.CacheSizePercentage - Microsoft.WindowsAzure.Plugins.Caching.ConfigStoreConnectionString - - DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1} - - - Caching - Cannot find {0} with name {1}. diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs deleted file mode 100644 index e28a437e4eb0..000000000000 --- a/src/ServiceManagement/Services/Commands/CloudService/Development/EnableAzureMemcacheRole.cs +++ /dev/null @@ -1,403 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Management.Automation; -using System.Security.Permissions; -using System.Xml.Linq; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceConfigurationSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Properties; - -namespace Microsoft.WindowsAzure.Commands.CloudService.Development -{ - using ConfigConfigurationSetting = Utilities.Common.XmlSchema.ServiceConfigurationSchema.ConfigurationSetting; - using DefinitionConfigurationSetting = Utilities.Common.XmlSchema.ServiceDefinitionSchema.ConfigurationSetting; - - /// - /// Enables memcache for specific role. - /// - [Cmdlet(VerbsLifecycle.Enable, "AzureMemcacheRole"), OutputType(typeof(bool))] - public class EnableAzureMemcacheRoleCommand : AzurePSCmdlet - { - /// - /// The role name to edit. - /// - [Parameter(Position = 0, Mandatory = false, ValueFromPipelineByPropertyName = true)] - [Alias("rn")] - [ValidateNotNullOrEmpty] - public string RoleName { get; set; } - - /// - /// The dedicated caching worker role name. - /// - [Parameter(Position = 1, Mandatory = false, ValueFromPipelineByPropertyName = true)] - [Alias("cn")] - [ValidateNotNullOrEmpty] - public string CacheWorkerRoleName { get; set; } - - [Parameter(Position = 2, Mandatory = false)] - public SwitchParameter PassThru { get; set; } - - /// - /// Cache runtime version - /// - [Parameter(Position = 3, Mandatory = false, ValueFromPipelineByPropertyName = true)] - [Alias("cv")] - public string CacheRuntimeVersion { get; set; } - - public EnableAzureMemcacheRoleCommand() - { - CacheRuntimeVersion = AzureTool.GetAzureSdkVersion(); - } - - [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] - public override void ExecuteCmdlet() - { - string rootPath = CommonUtilities.GetServiceRootPath(CurrentPath()); - RoleName = string.IsNullOrEmpty(RoleName) ? CommonUtilities.GetRoleName(rootPath, CurrentPath()) : RoleName; - - EnableAzureMemcacheRoleProcess(this.RoleName, this.CacheWorkerRoleName, CommonUtilities.GetServiceRootPath(CurrentPath())); - } - - /// - /// Process for enabling memcache for web roles. - /// - /// The web role name - /// The cache worker role name - /// The root path of the services - /// The resulted message - [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] - public WebRole EnableAzureMemcacheRoleProcess(string roleName, string cacheWorkerRoleName, string rootPath) - { - CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); - - if (string.IsNullOrEmpty(cacheWorkerRoleName)) - { - WorkerRole defaultCache = cloudServiceProject.Components.Definition.WorkerRole.FirstOrDefault( - w => w.Imports != null && w.Imports.Any(i => i.moduleName.Equals(Resources.CachingModuleName))); - - if (defaultCache == null) - { - throw new Exception(Resources.NoCacheWorkerRoles); - } - - cacheWorkerRoleName = defaultCache.name; - } - - // Verify cache worker role exists - if (!cloudServiceProject.Components.RoleExists(cacheWorkerRoleName)) - { - throw new Exception(string.Format(Resources.RoleNotFoundMessage, cacheWorkerRoleName)); - } - - WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(cacheWorkerRoleName); - - // Verify that the cache worker role has proper caching configuration. - if (!IsCacheWorkerRole(cacheWorkerRole)) - { - throw new Exception(string.Format(Resources.NotCacheWorkerRole, cacheWorkerRoleName)); - } - - // Verify that user is not trying to enable cache on a cache worker role. - if (roleName.Equals(cacheWorkerRole)) - { - throw new Exception(string.Format(Resources.InvalidCacheRoleName, roleName)); - } - - // Verify role to enable cache on exists - if (!cloudServiceProject.Components.RoleExists(roleName)) - { - throw new Exception(string.Format(Resources.RoleNotFoundMessage, roleName)); - } - - // Verify that caching is not enabled for the role - if (IsCacheEnabled(cloudServiceProject.Components.GetRoleStartup(roleName))) - { - throw new Exception(string.Format(Resources.CacheAlreadyEnabledMessage, roleName)); - } - - // All validations passed, enable caching. - //EnableMemcache(roleName, cacheWorkerRoleName, ref message, ref cloudServiceProject); - var applyConfiguration = CacheConfigurationFactory.GetClientRoleConfigurationAction(CacheRuntimeVersion); - applyConfiguration(cloudServiceProject, roleName, cacheWorkerRoleName); - string message = string.Format( - Resources.EnableMemcacheMessage, - roleName, - cacheWorkerRoleName, - Resources.MemcacheEndpointPort); - - WriteVerbose(message); - - if (PassThru) - { - SafeWriteOutputPSObject(typeof(RoleSettings).FullName, Parameters.RoleName, roleName); - } - - return cloudServiceProject.Components.GetWebRole(roleName); - } - - /// - /// Main entry for enabling memcache. - /// - /// The web role name - /// The cache worker role name - /// The service root path - /// The resulted message - /// The azure service instance - /// The web role to enable caching one - private void EnableMemcache(string roleName, string cacheWorkerRoleName, ref string message, ref CloudServiceProject cloudServiceProject) - { - // Add MemcacheShim runtime installation. - cloudServiceProject.AddRoleRuntime(cloudServiceProject.Paths, roleName, Resources.CacheRuntimeValue, CacheRuntimeVersion); - - // Fetch web role information. - Startup startup = cloudServiceProject.Components.GetRoleStartup(roleName); - - // Assert that cache runtime is added to the runtime startup. - Debug.Assert(Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, - v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue))); - - if (cloudServiceProject.Components.IsWebRole(roleName)) - { - WebRole webRole = cloudServiceProject.Components.GetWebRole(roleName); - webRole.LocalResources = GeneralUtilities.InitializeIfNull(webRole.LocalResources); - DefinitionConfigurationSetting[] configurationSettings = webRole.ConfigurationSettings; - - CachingConfigurationFactoryMethod( - cloudServiceProject, - roleName, - true, - cacheWorkerRoleName, - webRole.Startup, - webRole.Endpoints, - webRole.LocalResources, - ref configurationSettings, - CacheRuntimeVersion); - webRole.ConfigurationSettings = configurationSettings; - } - else - { - WorkerRole workerRole = cloudServiceProject.Components.GetWorkerRole(roleName); - workerRole.LocalResources = GeneralUtilities.InitializeIfNull(workerRole.LocalResources); - DefinitionConfigurationSetting[] configurationSettings = workerRole.ConfigurationSettings; - - CachingConfigurationFactoryMethod( - cloudServiceProject, - roleName, - false, - cacheWorkerRoleName, - workerRole.Startup, - workerRole.Endpoints, - workerRole.LocalResources, - ref configurationSettings, - CacheRuntimeVersion); - workerRole.ConfigurationSettings = configurationSettings; - } - - // Save changes - cloudServiceProject.Components.Save(cloudServiceProject.Paths); - - message = string.Format(Resources.EnableMemcacheMessage, roleName, cacheWorkerRoleName, Resources.MemcacheEndpointPort); - } - - /// - /// Factory method to apply memcache required configuration based on the installed SDK version. - /// - /// The azure service instance - /// The web role to enable caching on - /// Flag indicating if the provided role is web or not - /// The memcache worker role name - /// The role startup - /// The role endpoints - /// The role local resources - /// The role configuration settings - /// The current SDK version - private void CachingConfigurationFactoryMethod( - CloudServiceProject cloudServiceProject, - string roleName, - bool isWebRole, - string cacheWorkerRole, - Startup startup, - Endpoints endpoints, - LocalResources localResources, - ref DefinitionConfigurationSetting[] configurationSettings, - string sdkVersion) - { - switch (sdkVersion) - { - case SDKVersion.Version180: - Version180Configuration( - cloudServiceProject, - roleName, - isWebRole, - cacheWorkerRole, - startup, - endpoints, - localResources, - ref configurationSettings); - break; - - default: - throw new Exception(string.Format(Resources.AzureSdkVersionNotSupported, - Resources.MinSupportAzureSdkVersion, Resources.MaxSupportAzureSdkVersion)); - } - } - - /// - /// Applies required configuration for enabling cache in SDK 1.8.0 version by: - /// * Add MemcacheShim runtime installation. - /// * Add startup task to install memcache shim on the client side. - /// * Add default memcache internal endpoint. - /// * Add cache diagnostic to local resources. - /// * Add ClientDiagnosticLevel setting to service configuration. - /// * Adjust web.config to enable auto discovery for the caching role. - /// - /// The azure service instance - /// The web role to enable caching on - /// Flag indicating if the provided role is web or not - /// The memcache worker role name - /// The role startup - /// The role endpoints - /// The role local resources - /// The role configuration settings - private void Version180Configuration( - CloudServiceProject cloudServiceProject, - string roleName, - bool isWebRole, - string cacheWorkerRole, - Startup startup, - Endpoints endpoints, - LocalResources localResources, - ref DefinitionConfigurationSetting[] configurationSettings) - { - if (isWebRole) - { - // Generate cache scaffolding for web role - cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WebRole.ToString()), - roleName, new Dictionary()); - - // Adjust web.config to enable auto discovery for the caching role. - string webCloudConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebCloudConfig); - string webConfigPath = Path.Combine(cloudServiceProject.Paths.RootPath, roleName, Resources.WebConfigTemplateFileName); - - UpdateWebConfig(roleName, cacheWorkerRole, webCloudConfigPath); - UpdateWebConfig(roleName, cacheWorkerRole, webConfigPath); - } - else - { - // Generate cache scaffolding for worker role - Dictionary parameters = new Dictionary(); - parameters[ScaffoldParams.RoleName] = cacheWorkerRole; - - cloudServiceProject.GenerateScaffolding(Path.Combine(Resources.CacheScaffolding, RoleType.WorkerRole.ToString()), - roleName, parameters); - } - - // Add default memcache internal endpoint. - InternalEndpoint memcacheEndpoint = new InternalEndpoint - { - name = Resources.MemcacheEndpointName, - protocol = InternalProtocol.tcp, - port = Resources.MemcacheEndpointPort - }; - endpoints.InternalEndpoint = GeneralUtilities.ExtendArray(endpoints.InternalEndpoint, memcacheEndpoint); - - // Enable cache diagnostic - LocalStore localStore = new LocalStore - { - name = Resources.CacheDiagnosticStoreName, - cleanOnRoleRecycle = false - }; - localResources.LocalStorage = GeneralUtilities.ExtendArray(localResources.LocalStorage, localStore); - - DefinitionConfigurationSetting diagnosticLevel = new DefinitionConfigurationSetting { name = Resources.CacheClientDiagnosticLevelAssemblyName }; - configurationSettings = GeneralUtilities.ExtendArray(configurationSettings, diagnosticLevel); - - // Add ClientDiagnosticLevel setting to service configuration. - AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetCloudConfigRole(roleName)); - AddClientDiagnosticLevelToConfig(cloudServiceProject.Components.GetLocalConfigRole(roleName)); - } - - private static void AddClientDiagnosticLevelToConfig(RoleSettings roleSettings) - { - ConfigConfigurationSetting clientDiagnosticLevel = new ConfigConfigurationSetting { name = Resources.ClientDiagnosticLevelName, value = Resources.ClientDiagnosticLevelValue }; - roleSettings.ConfigurationSettings = GeneralUtilities.ExtendArray(roleSettings.ConfigurationSettings, clientDiagnosticLevel); - } - - /// - /// Updates the web.cloud.config with to auto-discover the cache role. - /// - /// The role name - /// The cache worker role name - /// The azure service instance for the role - private void UpdateWebConfig(string roleName, string cacheWorkerRoleName, string webConfigPath) - { - XDocument webConfig = XDocument.Load(webConfigPath); - - Dictionary parameters = new Dictionary(); - parameters[ScaffoldParams.RoleName] = cacheWorkerRoleName; - string autoDiscoveryConfig = Scaffold.ReplaceParameter(Resources.CacheAutoDiscoveryConfig, parameters); - - // Adding the auto-discovery is sensetive to the placement of the nodes. The first node which is - // must be added at the first and the last node which is dataCacheClients must be added as last element. - XElement autoDiscoverXElement = XElement.Parse(autoDiscoveryConfig); - webConfig.Element("configuration").AddFirst(autoDiscoverXElement.FirstNode); - webConfig.Element("configuration").Add(autoDiscoverXElement.LastNode); - Debug.Assert(webConfig.Element("configuration").FirstNode.Ancestors("section").Attributes("name") != null); - Debug.Assert(webConfig.Element("configuration").LastNode.Ancestors("tracing").Attributes("sinkType") != null); - webConfig.Save(webConfigPath); - } - - /// - /// Checks if memcache is already enabled or not for the given role startup. - /// It does this by checking the role startup task. - /// - /// The role startup - /// Either enabled or not - private bool IsCacheEnabled(Startup startup) - { - if (startup.Task != null) - { - return Array.Exists(CloudRuntime.GetRuntimeStartupTask(startup).Environment, - v => v.name.Equals(Resources.RuntimeTypeKey) && v.value.Contains(Resources.CacheRuntimeValue)); - } - - return false; - } - - /// - /// Checks if the worker role is configured as caching worker role. - /// - /// The worker role object - /// True if its caching worker role, false if not - private bool IsCacheWorkerRole(WorkerRole workerRole) - { - if (workerRole.Imports != null) - { - return Array.Exists(workerRole.Imports, i => i.moduleName == Resources.CachingModuleName); - } - - return false; - } - } -} diff --git a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs b/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs deleted file mode 100644 index e9194c082ca0..000000000000 --- a/src/ServiceManagement/Services/Commands/CloudService/Development/Scaffolding/AddAzureCacheWorkerRole.cs +++ /dev/null @@ -1,92 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System; -using System.IO; -using System.Management.Automation; -using System.Security.Permissions; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService; -using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; -using Microsoft.WindowsAzure.Commands.Utilities.Common; -using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities.Properties; - -namespace Microsoft.WindowsAzure.Commands.CloudService.Development.Scaffolding -{ - /// - /// Adds dedicated caching node worker role. - /// - [Cmdlet(VerbsCommon.Add, "AzureCacheWorkerRole"), OutputType(typeof(WorkerRole))] - public class AddAzureCacheWorkerRoleCommand : AzurePSCmdlet - { - [Parameter(Position = 0, HelpMessage = "Role name")] - [Alias("n")] - public string Name { get; set; } - - [Parameter(Position = 1, HelpMessage = "Instances count")] - [Alias("i")] - public int Instances { get; set; } - - /// - /// Creates new instance from AddAzureCacheWorkerRoleCommand - /// - public AddAzureCacheWorkerRoleCommand() - { - Instances = 1; - } - - [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] - public override void ExecuteCmdlet() - { - AddAzureCacheWorkerRoleProcess(Name, Instances, CommonUtilities.GetServiceRootPath(CurrentPath())); - } - - /// - /// Process for creating caching worker role. - /// - /// The cache worker role name - /// The instance count - /// The service root path - /// The added cache worker role - [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] - public WorkerRole AddAzureCacheWorkerRoleProcess(string workerRoleName, int instances, string rootPath) - { - // Create cache worker role. - Action cacheWorkerRoleAction = CacheConfigurationFactory.GetCacheRoleConfigurationAction( - AzureTool.GetAzureSdkVersion()); - - CloudServiceProject cloudServiceProject = new CloudServiceProject(rootPath, null); - - RoleInfo genericWorkerRole = cloudServiceProject.AddWorkerRole( - Path.Combine(Resources.GeneralScaffolding, RoleType.WorkerRole.ToString()), - workerRoleName, - instances); - - // Dedicate the worker role for caching. - cacheWorkerRoleAction(cloudServiceProject.Paths.RootPath, genericWorkerRole); - - cloudServiceProject.Reload(); - WorkerRole cacheWorkerRole = cloudServiceProject.Components.GetWorkerRole(genericWorkerRole.Name); - - // Write output - SafeWriteOutputPSObject( - cacheWorkerRole.GetType().FullName, - Parameters.CacheWorkerRoleName, genericWorkerRole.Name, - Parameters.Instances, genericWorkerRole.InstanceCount - ); - - return cloudServiceProject.Components.GetWorkerRole(workerRoleName); - } - } -} diff --git a/src/ServiceManagement/Services/Commands/Commands.csproj b/src/ServiceManagement/Services/Commands/Commands.csproj index c72ef1b612a9..eaf3db07b6e9 100644 --- a/src/ServiceManagement/Services/Commands/Commands.csproj +++ b/src/ServiceManagement/Services/Commands/Commands.csproj @@ -180,11 +180,9 @@ - - From 23abcacb05ec08cf11e92cc342960154445c5895 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Tue, 16 Dec 2014 21:31:31 -0800 Subject: [PATCH 2/9] remove scaffolding files --- .../Properties/Resources.Designer.cs | 9 -------- .../Properties/Resources.resx | 3 --- .../Commands.Utilities.csproj | 17 -------------- .../Common/CloudRuntimeCollection.cs | 11 --------- .../Scaffolding/Cache/WebRole/Scaffold.xml | 3 --- .../Cache/WebRole/bin/setup_cache.cmd | 23 ------------------- .../Scaffolding/Cache/WorkerRole/Scaffold.xml | 6 ----- .../Cache/WorkerRole/setup_cache.cmd | 23 ------------------- .../Scaffolding/Cache/WorkerRole/web.config | 23 ------------------- 9 files changed, 118 deletions(-) delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd delete mode 100644 src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config diff --git a/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs b/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs index e4a20eaa2fb9..f3da5ecc0ad9 100644 --- a/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs +++ b/src/Common/Commands.Common.Test/Properties/Resources.Designer.cs @@ -70,15 +70,6 @@ public static byte[] Azure { } } - /// - /// Looks up a localized string similar to http://az413943.vo.msecnd.net/cache/2.5.2.exe. - /// - public static string CacheRuntimeUrl { - get { - return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); - } - } - /// /// Looks up a localized resource of type System.Byte[]. /// diff --git a/src/Common/Commands.Common.Test/Properties/Resources.resx b/src/Common/Commands.Common.Test/Properties/Resources.resx index a3bbf003c590..ebf1d9dfbd53 100644 --- a/src/Common/Commands.Common.Test/Properties/Resources.resx +++ b/src/Common/Commands.Common.Test/Properties/Resources.resx @@ -121,9 +121,6 @@ ..\Resources\Azure.publishsettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - http://az413943.vo.msecnd.net/cache/2.5.2.exe - ..\Resources\InvalidProfile.PublishSettings;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj index 104f1b7faeee..956c9d240e20 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj +++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj @@ -417,14 +417,6 @@ PreserveNewest - - Designer - PreserveNewest - - - Designer - PreserveNewest - MSBuild:Compile Designer @@ -471,15 +463,6 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs index 6a192a0ff497..00fde260a55c 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntimeCollection.cs @@ -205,17 +205,6 @@ protected virtual void Dispose(bool disposing) } } } - - public static string GetRuntimeUrl(string runtimeType, string runtimeVersion, string manifest = null) - { - CloudRuntimeCollection collection; - CloudRuntimeCollection.CreateCloudRuntimeCollection(out collection, manifest); - CloudRuntime desiredRuntime = CloudRuntime.CreateCloudRuntime(runtimeType, runtimeVersion, null, null); - CloudRuntimePackage foundPackage; - bool found = collection.TryFindMatch(desiredRuntime, out foundPackage); - - return found ? foundPackage.PackageUri.AbsoluteUri : null; - } } class VersionComparer : IComparer diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml deleted file mode 100644 index 53e4d35bd023..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/Scaffold.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd deleted file mode 100644 index 07556ecc6eab..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WebRole/bin/setup_cache.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@echo on -cd /d "%~dp0" - -if "%EMULATED%"=="true" goto setup_emulator - -:start_cache -WindowsAzure.Caching.MemcacheShim\ClientPerfCountersInstaller.exe install -WindowsAzure.Caching.MemcacheShim\MemcacheShimInstaller.exe -if %ERRORLEVEL% neq 0 goto error - -echo SUCCESS -exit /b 0 - -:setup_emulator -echo Downloading and installing cache runtime -powershell .\download.ps1 '%CACHERUNTIMEURL%' -if %ERRORLEVEL% neq 0 goto error - -goto start_cache - -:error -echo FAILED -exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml deleted file mode 100644 index c0f813bbfd65..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/Scaffold.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd deleted file mode 100644 index 37685c2df2e8..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/setup_cache.cmd +++ /dev/null @@ -1,23 +0,0 @@ -@echo on -cd /d "%~dp0" - -if "%EMULATED%"=="true" goto setup_emulator - -:start_cache -bin\WindowsAzure.Caching.MemcacheShim\ClientPerfCountersInstaller.exe install -bin\WindowsAzure.Caching.MemcacheShim\MemcacheShimInstaller.exe -if %ERRORLEVEL% neq 0 goto error - -echo SUCCESS -exit /b 0 - -:setup_emulator -echo Downloading and installing cache runtime -powershell .\download.ps1 '%CACHERUNTIMEURL%' -if %ERRORLEVEL% neq 0 goto error - -goto start_cache - -:error -echo FAILED -exit /b -1 \ No newline at end of file diff --git a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config b/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config deleted file mode 100644 index 1d39964e6d65..000000000000 --- a/src/ServiceManagement/Services/Commands.Utilities/Resources/Scaffolding/Cache/WorkerRole/web.config +++ /dev/null @@ -1,23 +0,0 @@ - - - -
- - - - - - - - - - - - - - - - - - \ No newline at end of file From b2a4f5d5f59fb2a45be415737a86776b842c2823 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Wed, 17 Dec 2014 09:42:19 -0800 Subject: [PATCH 3/9] update wix file due to removing cache scaffolding files --- setup/azurecmdfiles.wxi | 44 +++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index 4c5401b9c16c..067e20ee27a4 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -709,6 +709,9 @@ + + + @@ -1057,6 +1060,9 @@ + + + @@ -1357,6 +1363,9 @@ + + + @@ -1467,29 +1476,6 @@ - - - - - - - - - - - - - - - - - - - - - - - @@ -1821,6 +1807,9 @@ + + + @@ -2327,6 +2316,7 @@ + @@ -2441,6 +2431,7 @@ + @@ -2539,6 +2530,7 @@ + @@ -2575,11 +2567,6 @@ - - - - - @@ -2679,6 +2666,7 @@ + From 4d27e5db333b4521b7f2b8ee20a7c2624fbb2299 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Wed, 17 Dec 2014 15:47:48 -0800 Subject: [PATCH 4/9] remove useless file from setup --- setup/azurecmdfiles.wxi | 20 -------------------- tools/VerifyAzureSDK.ps1 | 23 ----------------------- 2 files changed, 43 deletions(-) diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index 067e20ee27a4..404737cef437 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -709,9 +709,6 @@ - - - @@ -1060,9 +1057,6 @@ - - - @@ -1363,9 +1357,6 @@ - - - @@ -1699,9 +1690,6 @@ - - - @@ -1807,9 +1795,6 @@ - - - @@ -2316,7 +2301,6 @@ - @@ -2431,7 +2415,6 @@ - @@ -2530,7 +2513,6 @@ - @@ -2632,7 +2614,6 @@ - @@ -2666,7 +2647,6 @@ - diff --git a/tools/VerifyAzureSDK.ps1 b/tools/VerifyAzureSDK.ps1 index 348ae07e86c2..f4a1afccfd9a 100644 --- a/tools/VerifyAzureSDK.ps1 +++ b/tools/VerifyAzureSDK.ps1 @@ -8,34 +8,11 @@ Write-Host "**Node.js for Windows (32-bits) at http://nodejs.org/download/ and A Write-Host "**Azure PHP for Windows at http://azure.microsoft.com/en-us/downloads/." -ForegroundColor "Yellow" Write-Host "**It is recommended to reboot the machine after the setup, or at least relaunch the powershell." -ForegroundColor "Red" -Write-Host "Testing Caching role with MemCacheShim package, Node Web Role, and run under emulators" -ForegroundColor "Green" -#detect nodejs for x86 is installed, if not install it - # create testing folder $testFolder = "$env:AzurePSRoot\src\Package\" + [System.IO.Path]::GetRandomFileName() md $testFolder cd $testFolder -New-AzureServiceProject Cache -# the 'ClientRole' is coupled with the client script, do not change it unless you update the script as well -Add-AzureNodeWebRole ClientRole -Add-AzureCacheWorkerRole CacheRole -Enable-AzureMemcacheRole ClientRole CacheRole - -md "temp" -Copy-Item "$env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\*.js" ".\ClientRole\" -Force -Recurse -cd "$testFolder\Cache\ClientRole" -Start-Process "npm" "install $env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\mc.tgz $env:AzurePSRoot\src\Common\Commands.ScenarioTest\Resources\CloudService\Cache\connman.tgz" -Wait - -cd "$testFolder\Cache" -Start-AzureEmulator -v - -Write-Host "You can do some testing by loading role url in the browser and adding some key/value to mem cache emulators" -ForegroundColor "Yellow" -Write-Host "Press any key to continue to the next testing" -$keyPressed = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") - -Write-Host "Testing PHP web & worker roles with emulator" -ForegroundColor "Green" -cd $testFolder New-AzureServiceProject PHPTest Add-AzurePHPWebRole Add-AzurePHPWorkerRole From 0f849946a02a8396ed99733338fec40685dff653 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Wed, 17 Dec 2014 15:52:40 -0800 Subject: [PATCH 5/9] add back the web deployment setup for python --- setup/azurecmdfiles.wxi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index 404737cef437..9690736a94fd 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -1690,6 +1690,9 @@ + + + @@ -2614,6 +2617,7 @@ + From c589bbbfad80b153463086cee1fcd554dfdac100 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Wed, 17 Dec 2014 20:52:18 -0800 Subject: [PATCH 6/9] remove some more cache scaffolding bits --- .../Properties/Resources.Designer.cs | 129 +----------------- .../Commands.Common/Properties/Resources.resx | 43 ------ .../Utilities/AzureServiceTests.cs | 19 ++- .../Commands.Utilities.csproj | 1 + .../Common/AzureTools/AzureSdkVersionInfo.cs | 24 ++++ .../Common/AzureTools/AzureTool.cs | 18 ++- .../Commands.Utilities/Common/CloudRuntime.cs | 49 +------ .../Common/CloudServiceProject.cs | 6 +- .../Properties/Resources.Designer.cs | 70 ++-------- .../Properties/Resources.resx | 26 +--- 10 files changed, 69 insertions(+), 316 deletions(-) create mode 100644 src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureSdkVersionInfo.cs diff --git a/src/Common/Commands.Common/Properties/Resources.Designer.cs b/src/Common/Commands.Common/Properties/Resources.Designer.cs index 28705c08771a..808bc307e56f 100644 --- a/src/Common/Commands.Common/Properties/Resources.Designer.cs +++ b/src/Common/Commands.Common/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34014 +// Runtime Version:4.0.30319.18449 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -249,52 +249,6 @@ public static string AzureDirectoryName { } } - /// - /// Looks up a localized string similar to Emulator. - /// - public static string AzureEmulatorDirectory { - get { - return ResourceManager.GetString("AzureEmulatorDirectory", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Azure Emulator is not installed and is required. - /// - public static string AzureEmulatorNotInstalledMessage { - get { - return ResourceManager.GetString("AzureEmulatorNotInstalledMessage", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Azure Emulator\emulator. - /// - public static string AzureEmulatorPathPortion { - get { - return ResourceManager.GetString("AzureEmulatorPathPortion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Emulator. - /// - public static string AzureEmulatorRegistryKey { - get { - return ResourceManager.GetString("AzureEmulatorRegistryKey", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Azure service management error - ///{0}. - /// - public static string AzureException_WrapExistingError_DetailedErrorFormat { - get { - return ResourceManager.GetString("AzureException_WrapExistingError_DetailedErrorFormat", resourceCulture); - } - } - /// /// Looks up a localized string similar to https://manage.windowsazure.com. /// @@ -322,42 +276,6 @@ public static string AzureSdkDirectory { } } - /// - /// Looks up a localized string similar to InstallPath. - /// - public static string AzureSdkInstallPathRegistryKeyValue { - get { - return ResourceManager.GetString("AzureSdkInstallPathRegistryKeyValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting. - /// - public static string AzureSdkRegistryKeyName { - get { - return ResourceManager.GetString("AzureSdkRegistryKeyName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive. - /// - public static string AzureSdkVersionNotSupported { - get { - return ResourceManager.GetString("AzureSdkVersionNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx.. - /// - public static string AzureToolsNotInstalledMessage { - get { - return ResourceManager.GetString("AzureToolsNotInstalledMessage", resourceCulture); - } - } - /// /// Looks up a localized string similar to Base Uri was empty.. /// @@ -412,15 +330,6 @@ public static string BlobEndpointUriEnv { } } - /// - /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. - /// - public static string CacheMismatchMessage { - get { - return ResourceManager.GetString("CacheMismatchMessage", resourceCulture); - } - } - /// /// Looks up a localized string similar to CACHERUNTIMEURL. /// @@ -1767,42 +1676,6 @@ public static string ManifestUri { } } - /// - /// Looks up a localized string similar to v2.5. - /// - public static string MaxSupportAzureSdkVersion { - get { - return ResourceManager.GetString("MaxSupportAzureSdkVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to memcache_default. - /// - public static string MemcacheEndpointName { - get { - return ResourceManager.GetString("MemcacheEndpointName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 11211. - /// - public static string MemcacheEndpointPort { - get { - return ResourceManager.GetString("MemcacheEndpointPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to v2.5. - /// - public static string MinSupportAzureSdkVersion { - get { - return ResourceManager.GetString("MinSupportAzureSdkVersion", resourceCulture); - } - } - /// /// Looks up a localized string similar to Python 2.7 is not installed. Please install it as well as Django 1.4.. /// diff --git a/src/Common/Commands.Common/Properties/Resources.resx b/src/Common/Commands.Common/Properties/Resources.resx index 067fbdb84051..8374c78d8185 100644 --- a/src/Common/Commands.Common/Properties/Resources.resx +++ b/src/Common/Commands.Common/Properties/Resources.resx @@ -171,18 +171,6 @@ Windows Azure Powershell - - Emulator - - - Azure Emulator is not installed and is required - - - Azure Emulator\emulator - - - SOFTWARE\Microsoft\Windows Azure Emulator - https://manage.windowsazure.com @@ -192,22 +180,6 @@ Azure SDK\{0}\ - - InstallPath - - - SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting - - - The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive - - - Azure service management error -{0} - - - Azure Authoring Tools are not installed and are required. Installation of Azure SDK for .NET is recommended with Microsoft Web Platform Installer (PI) available at http://www.microsoft.com/web/downloads/platform.aspx. - Base Uri was empty. WAPackIaaS @@ -227,9 +199,6 @@ AZURE_BLOBSTORAGE_TEMPLATE - - Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} - CACHERUNTIMEURL @@ -676,18 +645,6 @@ Please follow these steps in the portal: http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml - - v2.5 - - - memcache_default - - - 11211 - - - v2.5 - Python 2.7 is not installed. Please install it as well as Django 1.4. diff --git a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs index 7c677120c2e1..901b5f58c1b8 100644 --- a/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs +++ b/src/ServiceManagement/Services/Commands.Test/CloudService/Utilities/AzureServiceTests.cs @@ -554,9 +554,8 @@ public void TestResolveRuntimePackageUrls() addNodeWorkerCmdlet = new AddAzureNodeWorkerRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = overrideWorkerRoleName, Instances = 2 }; addNodeWorkerCmdlet.ExecuteCmdlet(); - string cacheWebRoleName = "cacheWebRole"; - string cacheRuntimeVersion = "1.7.0"; - AddAzureNodeWebRoleCommand addAzureWebRole = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = cacheWebRoleName }; + string webRole2Name = "WebRole2"; + AddAzureNodeWebRoleCommand addAzureWebRole = new AddAzureNodeWebRoleCommand() { RootPath = rootPath, CommandRuntime = mockCommandRuntime, Name = webRole2Name }; addAzureWebRole.ExecuteCmdlet(); CloudServiceProject testService = new CloudServiceProject(rootPath, FileUtilities.GetContentFilePath("Services")); @@ -564,7 +563,18 @@ public void TestResolveRuntimePackageUrls() RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, matchWorkerRoleName, testService.Paths, version: "0.8.2"); RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, overrideWebRoleName, testService.Paths, overrideUrl: "http://OVERRIDE"); RuntimePackageHelper.SetRoleRuntime(testService.Components.Definition, overrideWorkerRoleName, testService.Paths, overrideUrl: "http://OVERRIDE"); - testService.AddRoleRuntime(testService.Paths, cacheWebRoleName, Resources.CacheRuntimeValue, cacheRuntimeVersion, RuntimePackageHelper.GetTestManifest(files)); + + bool exceptionWasThrownOnSettingCacheRole = false; + try + { + string cacheRuntimeVersion = "1.7.0"; + testService.AddRoleRuntime(testService.Paths, webRole2Name, Resources.CacheRuntimeValue, cacheRuntimeVersion, RuntimePackageHelper.GetTestManifest(files)); + } + catch (NotSupportedException) + { + exceptionWasThrownOnSettingCacheRole = true; + } + Assert.True(exceptionWasThrownOnSettingCacheRole); testService.Components.Save(testService.Paths); // Get the publishing process started by creating the package @@ -578,7 +588,6 @@ public void TestResolveRuntimePackageUrls() RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, matchWebRoleName, "http://cdn/node/foo.exe;http://cdn/iisnode/default.exe", null); RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, overrideWebRoleName, null, "http://OVERRIDE"); RuntimePackageHelper.ValidateRoleRuntime(updatedService.Components.Definition, overrideWorkerRoleName, null, "http://OVERRIDE"); - RuntimePackageHelper.ValidateRoleRuntimeVariable(updatedService.Components.GetRoleStartup(cacheWebRoleName), Resources.CacheRuntimeVersionKey, cacheRuntimeVersion); } } } diff --git a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj index 956c9d240e20..4daed1eab717 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj +++ b/src/ServiceManagement/Services/Commands.Utilities/Commands.Utilities.csproj @@ -192,6 +192,7 @@ + diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureSdkVersionInfo.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureSdkVersionInfo.cs new file mode 100644 index 000000000000..1fd5fd054552 --- /dev/null +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureSdkVersionInfo.cs @@ -0,0 +1,24 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +namespace Microsoft.WindowsAzure.Commands.Utilities.Common.AzureTools +{ + internal class AzureSdkVersionInfo + { + //When intergrate with new Azure SDK, please update the versions here. + //If you find there are other version strings to update, please move them to here. + public const string SupportAzureSdkVersionRegKey = "v2.5"; + public const string SupportAzureSdkVersion = "2.5.0"; + } +} diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs index 24be5e295970..c0554ab1db43 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/AzureTools/AzureTool.cs @@ -17,12 +17,15 @@ using System.IO; using System.Linq; using Microsoft.Win32; -using Microsoft.WindowsAzure.Commands.Common.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Properties; +using Microsoft.WindowsAzure.Commands.Utilities.Common.AzureTools; namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools { public class AzureTool { + public const string SupportAzureSdkVersion = "2.5.0"; + public static void Validate() { // This instantiation will throw if user is running with incompatible Microsoft Azure SDK version. @@ -82,9 +85,7 @@ public static string GetStorageEmulatorDirectory() private static string GetSdkVersionRegistryValue() { - string version = string.Empty; - string min = Resources.MinSupportAzureSdkVersion; - string max = Resources.MaxSupportAzureSdkVersion; + string version = string.Empty; try { using (RegistryKey key = Registry.LocalMachine.OpenSubKey(Resources.AzureSdkRegistryKeyName)) @@ -93,13 +94,11 @@ private static string GetSdkVersionRegistryValue() { throw new InvalidOperationException(Resources.AzureToolsNotInstalledMessage); } - version = key.GetSubKeyNames() - .Where(n => (n.CompareTo(min) == 1 && n.CompareTo(max) == -1) || n.CompareTo(min) == 0 || n.CompareTo(max) == 0) - .Max(); + version = key.GetSubKeyNames().FirstOrDefault(n => n == AzureSdkVersionInfo.SupportAzureSdkVersionRegKey); if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length > 0) { - throw new InvalidOperationException(string.Format(Resources.AzureSdkVersionNotSupported, min, max)); + throw new InvalidOperationException(string.Format(Resources.AzureSdkVersionNotSupported, AzureSdkVersionInfo.SupportAzureSdkVersionRegKey)); } else if (string.IsNullOrEmpty(version) && key.GetSubKeyNames().Length == 0) { @@ -109,10 +108,9 @@ private static string GetSdkVersionRegistryValue() } catch (InvalidOperationException) { - //temporary workaround: catch exception and fall back to v2.5 if (IgnoreMissingSDKError) { - version = "v2.5"; + version = AzureSdkVersionInfo.SupportAzureSdkVersionRegKey; } else { diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs index b86974982f46..d52e82353323 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudRuntime.cs @@ -89,8 +89,8 @@ private static CloudRuntime CreateRuntimeInternal(RuntimeType runtimeType, strin runtime = new NullCloudRuntime(); break; case RuntimeType.Cache: - runtime = new CacheCloudRuntime(); - break; + //Scaffolding for cache is no longer supported + throw new NotSupportedException(Resources.CacheScaffoldingIsNotSupport); case RuntimeType.PHP: runtime = new PHPCloudRuntime(); break; @@ -538,51 +538,6 @@ protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) } } - private class CacheCloudRuntime : CloudRuntime - { - protected override void Configure(Dictionary environment) - { - if (string.IsNullOrEmpty(this.Version)) - { - string version; - if (!environment.TryGetValue(Resources.CacheRuntimeVersionKey, out version)) - { - version = AzureTool.GetAzureSdkVersion(); - } - - this.Version = version; - } - } - - public override bool Match(CloudRuntimePackage runtime) - { - return this.Version.Equals(runtime.Version, StringComparison.OrdinalIgnoreCase); - } - - protected override string GenerateWarningText(CloudRuntimePackage package) - { - return string.Format(Resources.CacheVersionWarningText, package.Version, this.RoleName, - this.Version); - } - - protected override bool GetChanges(CloudRuntimePackage package, out Dictionary changes) - { - base.GetChanges(package, out changes); - - Debug.Assert(changes.ContainsKey(Resources.RuntimeTypeKey), "Cache runtime should be added before calling this method"); - Debug.Assert(changes.ContainsKey(Resources.RuntimeUrlKey), "Cache runtime should be added before calling this method"); - - changes[Resources.CacheRuntimeVersionKey] = package.Version; - - return true; - } - - protected override void ApplyScaffoldingChanges(CloudRuntimePackage package) - { - //Caching scaffolding is no longer supported. - } - } - private class NullCloudRuntime : CloudRuntime { public override bool Match(CloudRuntimePackage runtime) diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs index 3a14d0c9c888..485ffe677f49 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs @@ -25,7 +25,6 @@ using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -using Microsoft.WindowsAzure.Commands.Utilities; namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService { @@ -304,9 +303,8 @@ public void CreatePackage(DevEnv type) private void VerifyCloudServiceProjectComponents() { - const string CacheVersion = "2.5.0"; + string CacheVersion = AzureTool.SupportAzureSdkVersion; - // Verify caching version is 2.2 foreach (string roleName in Components.GetRoles()) { string value = Components.GetStartupTaskVariable( @@ -317,7 +315,7 @@ private void VerifyCloudServiceProjectComponents() if (!string.IsNullOrEmpty(value) && !string.Equals(value, CacheVersion, StringComparison.OrdinalIgnoreCase)) { - throw new Exception(string.Format(Resources.CacheMismatchMessage, roleName, CacheVersion)); + throw new Exception(string.Format(Microsoft.WindowsAzure.Commands.Utilities.Properties.Resources.CacheMismatchMessage, roleName, CacheVersion)); } } } diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs index 6a930c62dcd4..9d5583905102 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34014 +// Runtime Version:4.0.30319.18449 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -267,15 +267,6 @@ public static string AzureEmulatorNotRunningElevetaed { } } - /// - /// Looks up a localized string similar to Azure Emulator\emulator. - /// - public static string AzureEmulatorPathPortion { - get { - return ResourceManager.GetString("AzureEmulatorPathPortion", resourceCulture); - } - } - /// /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Emulator. /// @@ -285,16 +276,6 @@ public static string AzureEmulatorRegistryKey { } } - /// - /// Looks up a localized string similar to Azure service management error - ///{0}. - /// - public static string AzureException_WrapExistingError_DetailedErrorFormat { - get { - return ResourceManager.GetString("AzureException_WrapExistingError_DetailedErrorFormat", resourceCulture); - } - } - /// /// Looks up a localized string similar to https://manage.windowsazure.com. /// @@ -350,7 +331,7 @@ public static string AzureSdkRegistryKeyName { } /// - /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive. + /// Looks up a localized string similar to The installed Azure SDK version is not supported. Make sure you version is {0}. /// public static string AzureSdkVersionNotSupported { get { @@ -422,7 +403,7 @@ public static string BlobEndpointUriEnv { } /// - /// Looks up a localized string similar to Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1}. + /// Looks up a localized string similar to Your ServiceDefinition.csdef uses the cache runtime of role '{0}' which might not work correctly with '{1}' . /// public static string CacheMismatchMessage { get { @@ -457,6 +438,15 @@ public static string CacheRuntimeVersionKey { } } + /// + /// Looks up a localized string similar to Scaffolding for Cache Role is not supported any more.. + /// + public static string CacheScaffoldingIsNotSupport { + get { + return ResourceManager.GetString("CacheScaffoldingIsNotSupport", resourceCulture); + } + } + /// /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). /// @@ -2011,42 +2001,6 @@ public static string MarketplaceEndpoint { } } - /// - /// Looks up a localized string similar to v2.5. - /// - public static string MaxSupportAzureSdkVersion { - get { - return ResourceManager.GetString("MaxSupportAzureSdkVersion", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to memcache_default. - /// - public static string MemcacheEndpointName { - get { - return ResourceManager.GetString("MemcacheEndpointName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to 11211. - /// - public static string MemcacheEndpointPort { - get { - return ResourceManager.GetString("MemcacheEndpointPort", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to v2.5. - /// - public static string MinSupportAzureSdkVersion { - get { - return ResourceManager.GetString("MinSupportAzureSdkVersion", resourceCulture); - } - } - /// /// Looks up a localized string similar to Python 2.7 is not installed. Please install it as well as Django 1.4.. /// diff --git a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx index 985d03b9c2f8..dac9fb83dd78 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx +++ b/src/ServiceManagement/Services/Commands.Utilities/Properties/Resources.resx @@ -183,9 +183,6 @@ You must run PowerShell from an elevated PowerShell window to use the Azure Emulator. Please restart your PowerShell window as an administrator. - - Azure Emulator\emulator - SOFTWARE\Microsoft\Windows Azure Emulator @@ -208,11 +205,7 @@ SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting - The installed Azure SDK version is not supported. Make sure you version is between {0} and {1} inclusive - - - Azure service management error -{0} + The installed Azure SDK version is not supported. Make sure you version is {0} Azure Authoring Tools are not installed and are required @@ -237,7 +230,10 @@ AZURE_BLOBSTORAGE_TEMPLATE - Please upgrade the cache runtime of role '{0}' to '{1}' using Set-AzureServiceProjectRole -RoleName {0} -Runtime Cache -Version {1} + Your ServiceDefinition.csdef uses the cache runtime of role '{0}' which might not work correctly with '{1}' + + + Scaffolding for Cache Role is not supported any more. CACHERUNTIMEURL @@ -755,18 +751,6 @@ Please follow these steps in the portal: http://api.datamarket.azure.com/CatalogService.svc - - v2.5 - - - memcache_default - - - 11211 - - - v2.5 - Python 2.7 is not installed. Please install it as well as Django 1.4. From e1be9b34c580be245d98ede7aea5240dff8e1d4d Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Thu, 5 Feb 2015 12:44:17 -0800 Subject: [PATCH 7/9] updete set up files --- setup/azurecmdfiles.wxi | 1808 --------------------------------------- 1 file changed, 1808 deletions(-) diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index f65d620f4303..db327c6d787b 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -717,144 +717,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -864,505 +727,25 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1505,683 +888,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2330,80 +1036,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2641,218 +1273,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -2899,219 +1328,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -3160,30 +1376,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - From 7fe9a000578c3870036a0433d9fe024b113494d7 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Thu, 5 Feb 2015 14:00:08 -0800 Subject: [PATCH 8/9] delete the home made solution file --- src/Simple.sln | 170 ------------------------------------------------- 1 file changed, 170 deletions(-) delete mode 100644 src/Simple.sln diff --git a/src/Simple.sln b/src/Simple.sln deleted file mode 100644 index 964a80bc0aba..000000000000 --- a/src/Simple.sln +++ /dev/null @@ -1,170 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.30501.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}" - ProjectSection(SolutionItems) = preProject - local.runsettings = local.runsettings - Local.testsettings = Local.testsettings - Local.x64.testsettings = Local.x64.testsettings - UnitTest.testsettings = UnitTest.testsettings - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManagement\Services\Commands\Commands.csproj", "{CD5AA507-F5EF-473D-855B-84B91A1ABE54}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test", "ServiceManagement\Services\Commands.Test\Commands.Test.csproj", "{B7FD03F6-98BC-4F54-9A14-0455E579FCD4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase", "ServiceManagement\Sql\Commands.SqlDatabase\Commands.SqlDatabase.csproj", "{DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Storage", "ServiceManagement\Storage\Commands.Storage\Commands.Storage.csproj", "{08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ServiceManagement", "ServiceManagement\Compute\Commands.ServiceManagement\Commands.ServiceManagement.csproj", "{E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sync", "ServiceManagement\Compute\Sync\Sync.csproj", "{73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VhdManagement", "ServiceManagement\Compute\VhdManagement\VhdManagement.csproj", "{80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Utilities", "ServiceManagement\Services\Commands.Utilities\Commands.Utilities.csproj", "{4900EC4E-8DEB-4412-9108-0BC52F81D457}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test.Utilities", "ServiceManagement\Services\Commands.Test.Utilities\Commands.Test.Utilities.csproj", "{BC420543-C04E-4BF3-96E1-CD81B823BDD7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ExpressRoute", "ServiceManagement\ExpressRoute\Commands.ExpressRoute\Commands.ExpressRoute.csproj", "{45C2D687-E0CE-4C97-B731-335834DC2BF2}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Storage", "Common\Commands.Common.Storage\Commands.Common.Storage.csproj", "{65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Test", "Common\Commands.Common.Test\Commands.Common.Test.csproj", "{3B48A77B-5956-4A62-9081-92BA04B02B27}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{95C16AED-FD57-42A0-86C3-2CF4300A4817}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Profile", "Common\Commands.Profile\Commands.Profile.csproj", "{C60342B1-47D3-4A0E-8081-9B97CE60B7AF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Automation", "ServiceManagement\Automation\Commands.Automation\Commands.Automation.csproj", "{47CD7E95-5330-4384-ABCE-2C267C57085C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.HDInsight", "ServiceManagement\HDInsight\Commands.HDInsight\Commands.HDInsight.csproj", "{137D404A-865A-43DB-930C-6DA67DA048DF}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Tags", "ResourceManager\Tags\Commands.Tags\Commands.Tags.csproj", "{2493A8F7-1949-4F29-8D53-9D459046C3B8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.Common", "Common\Commands.ScenarioTests.Common\Commands.ScenarioTests.Common.csproj", "{C1BDA476-A5CC-4394-914D-48B0EC31A710}" - ProjectSection(ProjectDependencies) = postProject - {CD5AA507-F5EF-473D-855B-84B91A1ABE54} = {CD5AA507-F5EF-473D-855B-84B91A1ABE54} - {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} = {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA} - {137D404A-865A-43DB-930C-6DA67DA048DF} = {137D404A-865A-43DB-930C-6DA67DA048DF} - {4900EC4E-8DEB-4412-9108-0BC52F81D457} = {4900EC4E-8DEB-4412-9108-0BC52F81D457} - {45C2D687-E0CE-4C97-B731-335834DC2BF2} = {45C2D687-E0CE-4C97-B731-335834DC2BF2} - {47CD7E95-5330-4384-ABCE-2C267C57085C} = {47CD7E95-5330-4384-ABCE-2C267C57085C} - {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} = {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A} - {C60342B1-47D3-4A0E-8081-9B97CE60B7AF} = {C60342B1-47D3-4A0E-8081-9B97CE60B7AF} - {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} = {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F} - {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} = {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4} - {2493A8F7-1949-4F29-8D53-9D459046C3B8} = {2493A8F7-1949-4F29-8D53-9D459046C3B8} - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Sql", "ResourceManager\Sql\Commands.Sql\Commands.Sql.csproj", "{69ED499E-6F3C-488F-86B8-B74CFDA4D47E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.DataFactories", "ResourceManager\DataFactories\Commands.DataFactories\Commands.DataFactories.csproj", "{9577252E-0A6B-4D61-86E8-95F7F309A987}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Network", "ServiceManagement\Network\Commands.Network\Commands.Network.csproj", "{40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD5AA507-F5EF-473D-855B-84B91A1ABE54}.Release|Any CPU.Build.0 = Release|Any CPU - {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B7FD03F6-98BC-4F54-9A14-0455E579FCD4}.Release|Any CPU.Build.0 = Release|Any CPU - {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}.Release|Any CPU.Build.0 = Release|Any CPU - {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {08CF7DA7-0392-4A19-B79B-E1FF67CDB81A}.Release|Any CPU.Build.0 = Release|Any CPU - {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E1CA72BA-8374-45F6-904D-FD34ECDF5B6F}.Release|Any CPU.Build.0 = Release|Any CPU - {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73820CBC-F4EB-4C5E-B4F0-CC4A93FBF157}.Release|Any CPU.Build.0 = Release|Any CPU - {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Debug|Any CPU.Build.0 = Debug|Any CPU - {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.ActiveCfg = Release|Any CPU - {80496B7B-068A-4A1E-B0BB-4B1FFF3FA616}.Release|Any CPU.Build.0 = Release|Any CPU - {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4900EC4E-8DEB-4412-9108-0BC52F81D457}.Release|Any CPU.Build.0 = Release|Any CPU - {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BC420543-C04E-4BF3-96E1-CD81B823BDD7}.Release|Any CPU.Build.0 = Release|Any CPU - {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45C2D687-E0CE-4C97-B731-335834DC2BF2}.Release|Any CPU.Build.0 = Release|Any CPU - {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5EE72C53-1720-4309-B54B-5FB79703195F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5EE72C53-1720-4309-B54B-5FB79703195F}.Release|Any CPU.Build.0 = Release|Any CPU - {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {65C3A86A-716D-4E7D-AB67-1DB00B3BF72D}.Release|Any CPU.Build.0 = Release|Any CPU - {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B48A77B-5956-4A62-9081-92BA04B02B27}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B48A77B-5956-4A62-9081-92BA04B02B27}.Release|Any CPU.Build.0 = Release|Any CPU - {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C60342B1-47D3-4A0E-8081-9B97CE60B7AF}.Release|Any CPU.Build.0 = Release|Any CPU - {47CD7E95-5330-4384-ABCE-2C267C57085C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47CD7E95-5330-4384-ABCE-2C267C57085C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47CD7E95-5330-4384-ABCE-2C267C57085C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47CD7E95-5330-4384-ABCE-2C267C57085C}.Release|Any CPU.Build.0 = Release|Any CPU - {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {137D404A-865A-43DB-930C-6DA67DA048DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {137D404A-865A-43DB-930C-6DA67DA048DF}.Release|Any CPU.Build.0 = Release|Any CPU - {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2493A8F7-1949-4F29-8D53-9D459046C3B8}.Release|Any CPU.Build.0 = Release|Any CPU - {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1BDA476-A5CC-4394-914D-48B0EC31A710}.Release|Any CPU.Build.0 = Release|Any CPU - {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {69ED499E-6F3C-488F-86B8-B74CFDA4D47E}.Release|Any CPU.Build.0 = Release|Any CPU - {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9577252E-0A6B-4D61-86E8-95F7F309A987}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9577252E-0A6B-4D61-86E8-95F7F309A987}.Release|Any CPU.Build.0 = Release|Any CPU - {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {40FEE0BB-FD45-4EFC-85BC-0D602A6892C4}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {B7FD03F6-98BC-4F54-9A14-0455E579FCD4} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} - {BC420543-C04E-4BF3-96E1-CD81B823BDD7} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} - {3B48A77B-5956-4A62-9081-92BA04B02B27} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} - {C1BDA476-A5CC-4394-914D-48B0EC31A710} = {95C16AED-FD57-42A0-86C3-2CF4300A4817} - EndGlobalSection -EndGlobal From c3a32d6ec1391518e4de33051604fc0f9864f8e8 Mon Sep 17 00:00:00 2001 From: Yugang Wang Date: Thu, 5 Feb 2015 14:03:16 -0800 Subject: [PATCH 9/9] resolve a merging confliction --- .../Commands.Utilities/Common/CloudServiceProject.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs index c554fec88862..48dd6a294e94 100644 --- a/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs +++ b/src/ServiceManagement/Services/Commands.Utilities/Common/CloudServiceProject.cs @@ -20,17 +20,14 @@ using System.Security.Permissions; using System.Security.Principal; using System.Text; +using Microsoft.WindowsAzure.Commands.Common; using Microsoft.WindowsAzure.Commands.Common.Properties; using Microsoft.WindowsAzure.Commands.Utilities.CloudService.AzureTools; using Microsoft.WindowsAzure.Commands.Utilities.CloudService.Scaffolding; using Microsoft.WindowsAzure.Commands.Utilities.Common; using Microsoft.WindowsAzure.Commands.Utilities.Common.XmlSchema.ServiceDefinitionSchema; -<<<<<<< HEAD -======= using Microsoft.WindowsAzure.Commands.Utilities; -using Microsoft.WindowsAzure.Commands.Common; using Microsoft.Azure.Common.Extensions; ->>>>>>> dev namespace Microsoft.WindowsAzure.Commands.Utilities.CloudService {