Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #67 from ashishnegi/sfrv_yaml
Browse files Browse the repository at this point in the history
Service Fabric Reliable Volume yaml files
  • Loading branch information
anantshankar17 authored Dec 14, 2018
2 parents 74f82ae + 0e0d514 commit 6e8b578
Show file tree
Hide file tree
Showing 26 changed files with 429 additions and 127 deletions.
Original file line number Diff line number Diff line change
@@ -1,31 +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("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {99AE5AC4-7192-4E37-91B5-9280EBBC58A6}
EndGlobalSection
EndGlobal

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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
application:
schemaVersion: 1.0.0-preview1
name: counterApp
properties:
application:
schemaVersion: 1.0.0-preview1
name: counterApp
properties:
description: Azure Service Fabric Mesh Counter Application.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Network definition ##
network:
schemaVersion: 1.0.0-preview1
name: counterAppNetwork
properties:
description: Azure Service Fabric Mesh Counter Application network.
addressPrefix: 10.0.0.4/22
ingressConfig:
layer4:
- name: counterServiceIngress
publicPort: 8080
applicationName: counterApp
serviceName: counterService
## Network definition ##
network:
schemaVersion: 1.0.0-preview1
name: counterAppNetwork
properties:
description: Azure Service Fabric Mesh Counter Application network.
addressPrefix: 10.0.0.4/22
ingressConfig:
layer4:
- name: counterServiceIngress
publicPort: 8080
applicationName: counterApp
serviceName: counterService
endpointName: counterServiceListener
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
volume:
schemaVersion: 1.0.0-preview1
name: counterVolume
properties:
description: Azure Files storage volume for counter App.
provider: SFAzureFile
azureFileParameters:
shareName: "[parameters('azurefile-shareName')]"
accountName: "[parameters('azurefile-accountName')]"
volume:
schemaVersion: 1.0.0-preview1
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')]"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Visual Studio SFApp Publish Profile ##
vsSFAppPublishProfile:
schemaVersion: 1.0.0-preview1
## Visual Studio SFApp Publish Profile ##
vsSFAppPublishProfile:
schemaVersion: 1.0.0-preview1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.SFApp.Sdk">
<PropertyGroup Label="Globals">
<ProjectGuid>7d82c8e1-bb96-4224-9313-66e4708f84ec</ProjectGuid>
<SFApplicationProjectVersion>1.0</SFApplicationProjectVersion>
<SFApplicationTargetsVersion>1.0.0-preview.4.3</SFApplicationTargetsVersion>
<SFApplicationToolingVersion>0.8.0.0</SFApplicationToolingVersion>
</PropertyGroup>
<ItemGroup>
<None Include="App Resources\volume.yaml" />
<None Include="App Resources\app.yaml" />
<None Include="App Resources\network.yaml" />
<None Include="Publish Profiles\cloud.yaml" />
</ItemGroup>
<Project Sdk="Microsoft.SFApp.Sdk">
<PropertyGroup Label="Globals">
<ProjectGuid>7d82c8e1-bb96-4224-9313-66e4708f84ec</ProjectGuid>
<SFApplicationProjectVersion>1.0</SFApplicationProjectVersion>
<SFApplicationTargetsVersion>1.0.0-preview.4.3</SFApplicationTargetsVersion>
<SFApplicationToolingVersion>0.8.0.0</SFApplicationToolingVersion>
</PropertyGroup>
<ItemGroup>
<None Include="App Resources\volume.yaml" />
<None Include="App Resources\app.yaml" />
<None Include="App Resources\network.yaml" />
<None Include="Publish Profiles\cloud.yaml" />
</ItemGroup>
</Project>
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"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
## Service definition ##
application:
schemaVersion: 1.0.0-preview1
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
endpoints:
- name: counterServiceListener
port: 8080
environmentVariables:
- name: ASPNETCORE_URLS
value: http://+:8080
resources:
requests:
cpu: 0.5
memoryInGB: 0.5
replicaCount: 1
networkRefs:
- name: counterAppNetwork
## Service definition ##
application:
schemaVersion: 1.0.0-preview1
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
endpoints:
- name: counterServiceListener
port: 8080
environmentVariables:
- name: ASPNETCORE_URLS
value: http://+:8080
resources:
requests:
cpu: 0.5
memoryInGB: 0.5
replicaCount: 1
networkRefs:
- name: counterAppNetwork
34 changes: 34 additions & 0 deletions src/counter/src/azurefiles/counterService/counterService.csproj
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>
7 changes: 4 additions & 3 deletions src/counter/src/counterService/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY counterService/counterService.csproj counterService/
RUN dotnet restore counterService/counterService.csproj
# Using sfvolume here does not matter as code files are in this directory.
COPY sfvolume/counterService/counterService.csproj sfvolume/counterService/
RUN dotnet restore sfvolume/counterService/counterService.csproj
COPY . .
WORKDIR /src/counterService
WORKDIR /src/sfvolume/counterService
RUN dotnet build counterService.csproj -c Release -o /app

FROM build AS publish
Expand Down
22 changes: 0 additions & 22 deletions src/counter/src/counterService/counterService.csproj

This file was deleted.

7 changes: 4 additions & 3 deletions src/counter/src/counterService/linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ EXPOSE 80

FROM microsoft/aspnetcore-build:2.0 AS build
WORKDIR /src
COPY counterService/counterService.csproj counterService/
RUN dotnet restore counterService/counterService.csproj
# Using sfvolume here does not matter as code files are in this directory.
COPY sfvolume/counterService/counterService.csproj sfvolume/counterService/
RUN dotnet restore sfvolume/counterService/counterService.csproj
COPY . .
WORKDIR /src/counterService
WORKDIR /src/sfvolume/counterService
RUN dotnet build counterService.csproj -c Release -o /app

FROM build AS publish
Expand Down
35 changes: 35 additions & 0 deletions src/counter/src/sfvolume/counter.sln
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\windows\counter.sfaproj", "{E465F30F-4EF0-4C63-90C1-6AE2DC3CB135}"
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
Loading

0 comments on commit 6e8b578

Please sign in to comment.