Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the cloud service into two services, backend and frontend
- Loading branch information
1 parent
70d59b3
commit 029dff3
Showing
10 changed files
with
270 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildThisFileDirectory)\NuGetGallery.tasks.targets" /> | ||
<Target Name="SetVMSize" BeforeTargets="PrepareForCsPack" DependsOnTargets="FindServiceDefinition" Condition="'$(WebRole_VMSize)' != ''"> | ||
<Message Text="Patching @(TargetServiceDefinition) to set VMSize to $(WebRole_VMSize)" /> | ||
<Target Name="SetVMSize" BeforeTargets="PrepareForCsPack" DependsOnTargets="FindServiceDefinition" Condition="'$(VMSize)' != ''"> | ||
<Message Text="Patching @(TargetServiceDefinition) to set VMSize to $(VMSize)" /> | ||
<XPathSetAttribute | ||
XmlFiles="@(TargetServiceDefinition)" | ||
XPath="/csdef:ServiceDefinition/csdef:WebRole/@vmsize" | ||
XPath="/csdef:ServiceDefinition/csdef:WebRole/@vmsize | /csdef:ServiceDefinition/csdef:WorkerRole/@vmsize" | ||
Namespaces="csdef=http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" | ||
Value="$(WebRole_VMSize)" /> | ||
Value="$(VMSize)" /> | ||
</Target> | ||
</Project> |
63 changes: 63 additions & 0 deletions
63
src/NuGetGallery.Backend.Cloud/NuGetGallery.Backend.Cloud.ccproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProductVersion>2.1</ProductVersion> | ||
<ProjectGuid>1d0164b6-92d4-455a-ac68-c30b61733748</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>NuGetGallery.Backend.Cloud</RootNamespace> | ||
<AssemblyName>NuGetGallery.Backend.Cloud</AssemblyName> | ||
<StartDevelopmentStorage>True</StartDevelopmentStorage> | ||
<Name>NuGetGallery.Backend.Cloud</Name> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\NuGetGallery.Backend\NuGetGallery.Backend.csproj"> | ||
<Name>NuGetGallery.Backend</Name> | ||
<Project>{7F92C174-5310-4090-A6A3-3CC7C67C19D6}</Project> | ||
<Private>True</Private> | ||
<RoleType>Worker</RoleType> | ||
<RoleName>NuGetGallery.Backend</RoleName> | ||
<UpdateDiagnosticsConnectionStringOnPublish>True</UpdateDiagnosticsConnectionStringOnPublish> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<!-- Items for the project --> | ||
<ItemGroup> | ||
<ServiceDefinition Include="ServiceDefinition.csdef" /> | ||
<ServiceConfiguration Include="ServiceConfiguration.Local.cscfg" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="NuGetGallery.BackendContent\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="NuGetGallery.BackendContent\diagnostics.wadcfg"> | ||
<SubType>Content</SubType> | ||
</Content> | ||
</ItemGroup> | ||
<!-- Import the target files for this project template --> | ||
<PropertyGroup> | ||
<VisualStudioVersion Condition=" '$(VisualStudioVersion)' == '' ">10.0</VisualStudioVersion> | ||
<CloudExtensionsDir Condition=" '$(CloudExtensionsDir)' == '' ">$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Windows Azure Tools\2.1\</CloudExtensionsDir> | ||
</PropertyGroup> | ||
<Import Project="$(CloudExtensionsDir)Microsoft.WindowsAzure.targets" /> | ||
<Import Project="$(MSBuildProjectDirectory)\..\..\build\NuGetGallery.Cloud.targets" /> | ||
</Project> |
30 changes: 30 additions & 0 deletions
30
src/NuGetGallery.Backend.Cloud/NuGetGallery.BackendContent/diagnostics.wadcfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<DiagnosticMonitorConfiguration configurationChangePollInterval="PT1M" overallQuotaInMB="4096" xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"> | ||
<DiagnosticInfrastructureLogs bufferQuotaInMB="128" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error" /> | ||
<Directories bufferQuotaInMB="512" scheduledTransferPeriod="PT1M"> | ||
<CrashDumps container="wad-crash-dumps" directoryQuotaInMB="256" /> | ||
<DataSources> | ||
<DirectoryConfiguration container="wad-joblogs" directoryQuotaInMB="256"> | ||
<Absolute path="[Logs]\Jobs" expandEnvironment="false" /> | ||
</DirectoryConfiguration> | ||
<DirectoryConfiguration container="wad-hostlogs" directoryQuotaInMB="256"> | ||
<Absolute path="[Logs]\Host" expandEnvironment="false" /> | ||
</DirectoryConfiguration> | ||
</DataSources> | ||
</Directories> | ||
<Logs bufferQuotaInMB="512" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error" /> | ||
<PerformanceCounters bufferQuotaInMB="512"> | ||
<PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\.NET CLR Jit(_Global_)\% Time in Jit" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\.NET CLR Loading(_Global_)\% Time Loading" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\.NET CLR LocksAndThreads(_Global_)\Contention Rate / sec" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\.NET CLR Memory(_Global_)\# Bytes in all Heaps" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\.NET CLR Networking(_Global_)\Connections Established" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\Memory\Committed Bytes" sampleRate="PT1S" /> | ||
<PerformanceCounterConfiguration counterSpecifier="\Memory\Private Bytes" sampleRate="PT1S" /> | ||
</PerformanceCounters> | ||
<WindowsEventLog bufferQuotaInMB="512" scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error"> | ||
<DataSource name="System!*" /> | ||
</WindowsEventLog> | ||
</DiagnosticMonitorConfiguration> |
38 changes: 38 additions & 0 deletions
38
src/NuGetGallery.Backend.Cloud/ServiceConfiguration.Local.cscfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceConfiguration serviceName="NuGetGallery.Backend.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2013-03.2.0"> | ||
<Role name="NuGetGallery.Backend"> | ||
<Instances count="1" /> | ||
<ConfigurationSettings> | ||
<!-- ******************* --> | ||
<!-- DEPLOYMENT SPECIFIC --> | ||
<!-- ******************* --> | ||
<!-- These should change on every deployment (to rotate credentials, etc.) --> | ||
<Setting name="Operations.Sql.Primary" value="Data Source=(LocalDB)\v11.0;Initial Catalog=NuGetGallery;Integrated Security=SSPI" /> | ||
<Setting name="Operations.Sql.Warehouse" value="" /> | ||
<Setting name="Operations.Storage.Primary" value="UseDevelopmentStorage=true" /> | ||
<Setting name="Operations.Storage.Backup" value="UseDevelopmentStorage=true" /> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="MIIBnQYJKoZIhvcNAQcDoIIBjjCCAYoCAQAxggFOMIIBSgIBADAyMB4xHDAaBgNVBAMME1dpbmRvd3MgQXp1cmUgVG9vbHMCEG870pHsz0GPRZ18ZHEVMyMwDQYJKoZIhvcNAQEBBQAEggEABCvdlx/fjNaMh+I4tdArjlmC/KhsVISFYKP+Tppd4LJM4J67FUcgSnnZLp/fII7gvd0X7XHRjV9a9gTj15b3lexRXp36oDLiRpw9Ld0EbxNMB1CBPNDqYRlV8iZBLeER3KOq7b+6iUywx1TWRf3UtaIZYI1BU6XJXWlKKartrKFl7g1MV6T506xN5a2m+r9Wi9dTApOYx3mBl1ZICDPTQX5dMWP6aRslapdOcyp+cMAgNjdE0TW0jw5eVEY0m3PqxuSSI99xtXLcVYrz6H7K3C8lNoxR9BlL89XOBh2VGsrsNeDF80cwuZkLYkqL3koehilh6b+iIC74yjcNboPRajAzBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECCGRjuJpsHCYgBDKJqr9G6xa5kT1yQHFHx5Y" /> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="2014-10-12T23:59:59.0000000-07:00" /> | ||
<!-- ******************** --> | ||
<!-- ENVIRONMENT SPECIFIC --> | ||
<!-- ******************** --> | ||
<!-- These only need to change when defining a new environment --> | ||
<Setting name="Operations.EnvironmentName" value="" /> | ||
<Setting name="Operations.SqlDac" value="" /> | ||
<!-- *************** --> | ||
<!-- STABLE SETTINGS --> | ||
<!-- *************** --> | ||
<!-- Depending on your policy, these likely do not need to vary --> | ||
<Setting name="Operations.LicenseReport.Service" value="" /> | ||
<Setting name="Operations.LicenseReport.User" value="" /> | ||
<Setting name="Operations.LicenseReport.Password" value="" /> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="nuget" /> | ||
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" /> | ||
</ConfigurationSettings> | ||
<Certificates> | ||
<!-- Totally bogus set of Hex digits that get replaced by the actual thumbprints when generating a CSCFG --> | ||
<Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="D2CA3A778E08936DD4C61E2734158B0044831010" thumbprintAlgorithm="sha1" /> | ||
</Certificates> | ||
</Role> | ||
</ServiceConfiguration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ServiceDefinition name="NuGetGallery.Backend.Cloud" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-03.2.0"> | ||
<WorkerRole name="NuGetGallery.Backend" vmsize="Medium"> | ||
<ConfigurationSettings> | ||
<Setting name="Operations.EnvironmentName" /> | ||
<Setting name="Operations.Sql.Primary" /> | ||
<Setting name="Operations.Sql.Warehouse" /> | ||
<Setting name="Operations.Storage.Primary" /> | ||
<Setting name="Operations.Storage.Backup" /> | ||
<Setting name="Operations.SqlDac" /> | ||
<Setting name="Operations.LicenseReport.Service" /> | ||
<Setting name="Operations.LicenseReport.User" /> | ||
<Setting name="Operations.LicenseReport.Password" /> | ||
</ConfigurationSettings> | ||
<Imports> | ||
<Import moduleName="RemoteAccess" /> | ||
<Import moduleName="Diagnostics" /> | ||
</Imports> | ||
<LocalResources> | ||
<LocalStorage name="Logs" cleanOnRoleRecycle="false" sizeInMB="2048" /> | ||
</LocalResources> | ||
</WorkerRole> | ||
</ServiceDefinition> |
30 changes: 0 additions & 30 deletions
30
src/NuGetGallery.Cloud/NuGetGallery.BackendContent/diagnostics.wadcfg
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.