|
3 | 3 | In this document: |
4 | 4 |
|
5 | 5 | - [Serverless Microservices reference architecture](#serverless-microservices-reference-architecture) |
| 6 | + - [Getting Started](#getting-started) |
6 | 7 | - [Resources](#resources) |
7 | 8 | - [Provision](#provision) |
8 | 9 | - [Manual via the Portal](#manual-via-the-portal) |
@@ -67,6 +68,53 @@ In this document: |
67 | 68 | - [Running in ACI](#running-in-aci) |
68 | 69 | - [Running in AKS](#running-in-aks) |
69 | 70 |
|
| 71 | +## Getting Started |
| 72 | + |
| 73 | +In your local development environment you will need latest versions of: |
| 74 | + |
| 75 | +* Visual Studio or VSCode |
| 76 | +* git |
| 77 | +* `func` CLI |
| 78 | +* `az` CLI |
| 79 | +* Powershell |
| 80 | + |
| 81 | +Deploy Azure resources: |
| 82 | + |
| 83 | +```powershell |
| 84 | +copy bicep/parameters.json bicep/parameters.local.json |
| 85 | +# Change params in @bicep/parameters.local.json to suit |
| 86 | +az group create -n serverless-microservices-dev -l westus2 |
| 87 | +az deployment group create -g serverless-microservices-dev -f bicep/main.bicep -p @bicep/parameters.local.json |
| 88 | +``` |
| 89 | + |
| 90 | +Create local settings: |
| 91 | + |
| 92 | +``` powershell |
| 93 | +cd dotnet |
| 94 | +copy ServerlessMicroservices.FunctionApp.Drivers/local.settings.example.json ServerlessMicroservices.FunctionApp.Drivers/local.settings.json |
| 95 | +copy ServerlessMicroservices.FunctionApp.Orchestrators/local.settings.example.json ServerlessMicroservices.FunctionApp.Orchestrators/local.settings.json |
| 96 | +copy ServerlessMicroservices.FunctionApp.Passengers/local.settings.example.json ServerlessMicroservices.FunctionApp.Passengers/local.settings.json |
| 97 | +copy ServerlessMicroservices.FunctionApp.Trips/local.settings.example.json ServerlessMicroservices.FunctionApp.Trips/local.settings.json |
| 98 | +
|
| 99 | +cd ../nodejs |
| 100 | +copy serverless-microservices-functionapp-triparchiver/local.settings.example.json serverless-microservices-functionapp-triparchiver/local.settings.json |
| 101 | +# Update local settings with your environment's values |
| 102 | +``` |
| 103 | + |
| 104 | +Build and run local: |
| 105 | + |
| 106 | +```powershell |
| 107 | +cd scripts |
| 108 | +./run-local.ps1 |
| 109 | +``` |
| 110 | + |
| 111 | +Integration test: |
| 112 | + |
| 113 | +```powershell |
| 114 | +cd scripts |
| 115 | +./test-local.ps1 |
| 116 | +``` |
| 117 | + |
70 | 118 | ## Resources |
71 | 119 |
|
72 | 120 | The following is a summary of all Azure resources required to deploy the solution: |
@@ -103,11 +151,12 @@ The following is a summary of all Azure resources required to deploy the solutio |
103 | 151 |
|
104 | 152 | ## Provision |
105 | 153 |
|
106 | | -There are 3 ways to provision the required resources: |
| 154 | +There are 4 ways to provision the required resources: |
107 | 155 |
|
108 | 156 | - [Manual via the Portal](#manual-via-the-portal) |
109 | 157 | - [ARM Template](#deploy-from-arm-template) |
110 | 158 | - [Cake](#cake-provision) |
| 159 | +- [Bicep](#deploy-from-bicep) (recommended) |
111 | 160 |
|
112 | 161 | ### Manual via the Portal |
113 | 162 |
|
@@ -1476,16 +1525,27 @@ From a PowerShell command, use the following commands for the `Prod` environment |
1476 | 1525 |
|
1477 | 1526 | ## Seeding |
1478 | 1527 |
|
1479 | | -The .NET `ServerlessMicroservices.Seeder` project contains a seeding command that can be used to seed `drivers` and `passengers` using the `Drivers APIs` and `Passengers APIs`, respectively. |
| 1528 | +The .NET `ServerlessMicroservices.Seeder` project contains a seeding command that can be used to seed `drivers` using the `Drivers APIs`. |
1480 | 1529 |
|
1481 | | -**Please note** that the `seed` command will seed drivers only if there are no drivers and will seed passengers only if there are no passengers in the solution's database. |
| 1530 | +**Please note** that the `seed` command will seed drivers only if there are no drivers. |
1482 | 1531 |
|
1483 | 1532 | > You must set the **EnableAuth** App Setting on the **Drivers** and **Passengers** Function Apps to `false` for the seeder to work. |
1484 | 1533 |
|
1485 | | -The `seed` command takes 5 non-optional arguments i.e. `ServerlessMicroservices.Seeder.exe seed --seeddriversurl https://ridesharedrivers.azurewebsites.net --seedpassengersurl https://ridesharepassengers.azurewebsites.net` |
| 1534 | +``` |
| 1535 | +> ServerlessMicroservices.Seeder.exe seed --help |
| 1536 | +
|
| 1537 | +Usage: seed [options] |
1486 | 1538 |
|
1487 | | -- Drivers Function Base URL |
1488 | | -- Passengers Function Base URL |
| 1539 | +Options: |
| 1540 | + --help Show help information |
| 1541 | + -t|--seeddriversurl Set seed drivers url |
| 1542 | + -t|--testurl Set test url |
| 1543 | + -i|--testiterations Set test iterations |
| 1544 | + -s|--testseconds Set test seconds |
| 1545 | + -v|--signalrinfourl Set SignalR Info URL |
| 1546 | +
|
| 1547 | +> ServerlessMicroservices.Seeder.exe seed --seeddriversurl https://ridesharedrivers.azurewebsites.net |
| 1548 | +``` |
1489 | 1549 |
|
1490 | 1550 | ## Containers |
1491 | 1551 |
|
|
0 commit comments