This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AzureFiles Counter src code preview2 changes
- Loading branch information
Cai Wang
committed
Dec 14, 2018
1 parent
e04d008
commit eedfc21
Showing
13 changed files
with
193 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27428.2043 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9B56FCB0-63B4-404F-8A09-42EF52B53347}") = "counter", "counter\counter.sfaproj", "{7D82C8E1-BB96-4224-9313-66E4708F84EC}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "counterService", "counterService\counterService.csproj", "{76F462BC-5933-4211-BE85-660B974C5764}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{7D82C8E1-BB96-4224-9313-66E4708F84EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{7D82C8E1-BB96-4224-9313-66E4708F84EC}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{7D82C8E1-BB96-4224-9313-66E4708F84EC}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{7D82C8E1-BB96-4224-9313-66E4708F84EC}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{76F462BC-5933-4211-BE85-660B974C5764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{76F462BC-5933-4211-BE85-660B974C5764}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{76F462BC-5933-4211-BE85-660B974C5764}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{76F462BC-5933-4211-BE85-660B974C5764}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{E465F30F-4EF0-4C63-90C1-6AE2DC3CB135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{E465F30F-4EF0-4C63-90C1-6AE2DC3CB135}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{E465F30F-4EF0-4C63-90C1-6AE2DC3CB135}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{E465F30F-4EF0-4C63-90C1-6AE2DC3CB135}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {99AE5AC4-7192-4E37-91B5-9280EBBC58A6} | ||
EndGlobalSection | ||
EndGlobal |
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,5 @@ | ||
application: | ||
schemaVersion: 1.0.0-preview2 | ||
name: counterApp | ||
properties: | ||
description: Azure Service Fabric Mesh Counter Application. |
16 changes: 16 additions & 0 deletions
16
src/counter/src/azurefiles/counter/App Resources/gateway.yaml
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,16 @@ | ||
gateway: | ||
schemaVersion: 1.0.0-preview2 | ||
name: counterAppGateway | ||
properties: | ||
description: counterApp Gateway Resource | ||
sourceNetwork: | ||
name: Open | ||
destinationNetwork: | ||
name: counterAppNetwork | ||
tcp: | ||
- name: tcpconfiguration | ||
port: 80 | ||
destination: | ||
applicationName: counterApp | ||
serviceName: counterService | ||
endpointName: counterServiceListener |
7 changes: 7 additions & 0 deletions
7
src/counter/src/azurefiles/counter/App Resources/network.yaml
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,7 @@ | ||
network: | ||
schemaVersion: 1.0.0-preview2 | ||
name: counterAppNetwork | ||
properties: | ||
kind: Local | ||
description: Azure Service Fabric Mesh Counter Application network. | ||
networkAddressPrefix: 10.0.0.0/24 |
10 changes: 10 additions & 0 deletions
10
src/counter/src/azurefiles/counter/App Resources/volume.yaml
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,10 @@ | ||
volume: | ||
schemaVersion: 1.0.0-preview2 | ||
name: counterVolume | ||
properties: | ||
description: Azure Files storage volume for counter App. | ||
provider: SFAzureFile | ||
azureFileParameters: | ||
shareName: "[parameters('azurefile-shareName')]" | ||
accountName: "[parameters('azurefile-accountName')]" | ||
accountKey: "[parameters('azurefile-accountKey')]" |
4 changes: 4 additions & 0 deletions
4
src/counter/src/azurefiles/counter/Environments/Cloud/parameters.yaml
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,4 @@ | ||
## Parameters File ## | ||
azurefile-accountName: "" | ||
azurefile-accountKey: "" | ||
azurefile-shareName: "" |
3 changes: 3 additions & 0 deletions
3
src/counter/src/azurefiles/counter/Environments/Cloud/profile.yaml
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,3 @@ | ||
## Visual Studio SFApp Publish Profile ## | ||
vsSFAppPublishProfile: | ||
schemaVersion: 1.0.0-preview2 |
4 changes: 4 additions & 0 deletions
4
src/counter/src/azurefiles/counter/Environments/Local/parameters.yaml
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,4 @@ | ||
## Parameters File ## | ||
azurefile-accountName: "" | ||
azurefile-accountKey: "" | ||
azurefile-shareName: "" |
3 changes: 3 additions & 0 deletions
3
src/counter/src/azurefiles/counter/Environments/Local/profile.yaml
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,3 @@ | ||
## Visual Studio SFApp Publish Profile ## | ||
vsSFAppPublishProfile: | ||
schemaVersion: 1.0.0-preview2 |
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,7 @@ | ||
<Project Sdk="Microsoft.SFApp.Sdk"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>7d82c8e1-bb96-4224-9313-66e4708f84ec</ProjectGuid> | ||
<SFApplicationProjectVersion>2.0</SFApplicationProjectVersion> | ||
<SFApplicationToolingVersion>0.8.0.0</SFApplicationToolingVersion> | ||
</PropertyGroup> | ||
</Project> |
34 changes: 34 additions & 0 deletions
34
src/counter/src/azurefiles/counterService/Properties/launchSettings.json
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,34 @@ | ||
{ | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:53300/", | ||
"sslPort": 0 | ||
} | ||
}, | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"counterService": { | ||
"commandName": "Project", | ||
"launchBrowser": true, | ||
"launchUrl": "api/values", | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
}, | ||
"applicationUrl": "http://localhost:53301/" | ||
}, | ||
"Service Fabric Local Cluster": { | ||
"commandName": "SFApp", | ||
"launchBrowser": true, | ||
"launchUrl": "http://{ServiceIpAddress}:{ServicePort}/api/values" | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/counter/src/azurefiles/counterService/Service Resources/service.yaml
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,31 @@ | ||
## Service definition ## | ||
application: | ||
schemaVersion: 1.0.0-preview2 | ||
name: counterApp | ||
properties: | ||
services: | ||
- name: counterService | ||
properties: | ||
description: A web service that serves the counter value stored in the Azure Files volume. | ||
osType: Windows | ||
codePackages: | ||
- name: counterService | ||
image: counterservice:dev | ||
volumeRefs: | ||
- name: counterVolume | ||
destinationPath: C:\app\data | ||
endpoints: | ||
- name: counterServiceListener | ||
port: 80 | ||
environmentVariables: | ||
- name: ASPNETCORE_URLS | ||
value: http://+:8080 | ||
resources: | ||
requests: | ||
cpu: 0.5 | ||
memoryInGB: 0.5 | ||
replicaCount: 1 | ||
networkRefs: | ||
- name: counterAppNetwork | ||
endpointRefs: | ||
- name: counterServiceListener |
34 changes: 34 additions & 0 deletions
34
src/counter/src/azurefiles/counterService/counterService.csproj
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,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.0</TargetFramework> | ||
<IsSFAppServiceProject>true</IsSFAppServiceProject> | ||
<RootNamespace>Microsoft.ServiceFabricMesh.Samples.Counter.Service</RootNamespace> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | ||
<DockerfileContext>..\..</DockerfileContext> | ||
<DockerfileFile>..\..\counterService\Dockerfile</DockerfileFile> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\..\counterService\Controllers\ValuesController.cs" /> | ||
<Compile Include="..\..\counterService\Counter.cs" /> | ||
<Compile Include="..\..\counterService\FileStore.cs" /> | ||
<Compile Include="..\..\counterService\Program.cs" /> | ||
<Compile Include="..\..\counterService\Startup.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\counterService\wwwroot\**" CopyToOutputDirectory="PreserveNewest" LinkBase="wwwroot\" /> | ||
<None Include="..\..\counterService\appsettings*.json" CopyToOutputDirectory="PreserveNewest" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.6" /> | ||
<PackageReference Include="Microsoft.VisualStudio.Azure.SFApp.Targets" Version="1.0.0-preview.7.5" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.3" /> | ||
</ItemGroup> | ||
|
||
</Project> |