Skip to content

Commit 8242329

Browse files
#36 run local
1 parent d88af24 commit 8242329

File tree

16 files changed

+110
-8
lines changed

16 files changed

+110
-8
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@
1717

1818
# Build temp package lock
1919
pipelines/package-lock.json
20+
21+
bicep/parameters.local.json
22+
local.settings.json
23+

documentation/setup.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,32 @@ In this document:
6767
- [Running in ACI](#running-in-aci)
6868
- [Running in AKS](#running-in-aks)
6969

70+
## Getting Started
71+
72+
In your local development environment you will need latest versions of:
73+
74+
* Visual Studio or VSCode
75+
* git
76+
* `func` CLI
77+
* `az` CLI
78+
* Powershell
79+
80+
Deploy Azure resources:
81+
82+
```powershell
83+
copy bicep/parameters.json bicep/parameters.local.json
84+
# Change params in @bicep/parameters.local.json to suit
85+
az group create -n serverless-microservices-dev -l westus2
86+
az deployment group create -g serverless-microservices-dev -f bicep/main.bicep -p @bicep/parameters.local.json
87+
```
88+
89+
Build and run local:
90+
91+
```powershell
92+
cd scripts
93+
./run-local.ps1
94+
```
95+
7096
## Resources
7197

7298
The following is a summary of all Azure resources required to deploy the solution:

dotnet/ServerlessMicroservices.FunctionApp.Drivers/ServerlessMicroservices.FunctionApp.Drivers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1818
</None>
1919
<None Update="local.settings.json">
20-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
20+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
2121
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
2222
</None>
2323
</ItemGroup>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"IsEncrypted": false,
3+
"Values": {
4+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
5+
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
6+
"DocDbEndpointUri": "",
7+
"DocDbApiKey": "",
8+
"DocDbRideShareDatabaseName": "",
9+
"DocDbRideShareMainCollectionName": ""
10+
}
11+
}

dotnet/ServerlessMicroservices.FunctionApp.Orchestrators/ServerlessMicroservices.FunctionApp.Orchestrators.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>netcoreapp3.1</TargetFramework>
44
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
@@ -12,6 +12,9 @@
1212
<None Update="host.json">
1313
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1414
</None>
15+
<None Update="local.settings.json">
16+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
17+
</None>
1518
</ItemGroup>
1619
<ItemGroup>
1720
<ProjectReference Include="..\ServerlessMicroservices.Models\ServerlessMicroservices.Models.csproj" />
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
{
2+
"version": "2.0"
23
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"IsEncrypted": false,
3+
"Values": {
4+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
5+
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
6+
"DocDbEndpointUri": "",
7+
"DocDbApiKey": "",
8+
"DocDbRideShareDatabaseName": "",
9+
"DocDbRideShareMainCollectionName": "",
10+
"TripMonitorsQueue": "trip-monitors",
11+
"TripManagersQueue": "trip-managers",
12+
"TripDemosQueue": "trip-demos",
13+
"TripDriversQueue": "trip-drivers"
14+
}
15+
}

dotnet/ServerlessMicroservices.FunctionApp.Passengers/ServerlessMicroservices.FunctionApp.Passengers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
1616
</None>
1717
<None Update="local.settings.json">
18-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1919
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
2020
</None>
2121
</ItemGroup>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
{
2+
"version": "2.0"
23
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"IsEncrypted": false,
3+
"Values": {
4+
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
5+
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
6+
"DocDbEndpointUri": "",
7+
"DocDbApiKey": "",
8+
"DocDbRideShareDatabaseName": "",
9+
"DocDbRideShareMainCollectionName": "",
10+
"GraphTenantId": "",
11+
"GraphClientId": "",
12+
"GraphClientSecret": ""
13+
}
14+
}

0 commit comments

Comments
 (0)