Skip to content

Commit 1139d71

Browse files
authored
Merge branch 'refresh-functions-v4' into dependabot/npm_and_yarn/web/serverless-microservices-web/axios-0.21.1
2 parents 6397bd2 + 1500acb commit 1139d71

File tree

25 files changed

+6533
-258
lines changed

25 files changed

+6533
-258
lines changed

.github/workflows/dotnet.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup .NET
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 5.0.x
21+
- name: Build, restore, test
22+
shell: pwsh
23+
run: ./pipelines/build-dotnet.ps1

.github/workflows/nodejs.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Node.js CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./nodejs/serverless-microservices-functionapp-triparchiver
17+
18+
strategy:
19+
matrix:
20+
# https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=csharp%2Cv4#languages
21+
node-version: [14.x, 12.x, 10.x]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v2
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
cache-dependency-path: ./nodejs/serverless-microservices-functionapp-triparchiver
31+
- run: npm install
32+
- run: npm run pack

.github/workflows/spa.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: spa build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./web/serverless-microservices-web
17+
18+
strategy:
19+
matrix:
20+
# https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=csharp%2Cv4#languages
21+
node-version: [14.x, 12.x, 10.x]
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Use Node.js ${{ matrix.node-version }}
26+
uses: actions/setup-node@v2
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
cache: 'npm'
30+
cache-dependency-path: ./web/serverless-microservices-web
31+
- run: npm install
32+
- run: npm run build

.gitignore

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/Docs/*
2-
#.vscode/
2+
.vscode/
33

44
# Exclude temporary files:
55
*.tmp
@@ -10,4 +10,10 @@
1010
# PowerPoint temporary
1111
~$*.ppt*
1212
# Visio autosave temporary files
13-
*.~vsd*
13+
*.~vsd*
14+
15+
# Funcpack
16+
.funcpack
17+
18+
# Build temp package lock
19+
pipelines/package-lock.json

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,12 @@
22
"azureFunctions.projectRuntime": "~1",
33
"azureFunctions.projectLanguage": "JavaScript",
44
"appService.zipIgnorePattern": ["node_modules{,/**}"],
5-
"appService.deploySubpath": "serverless-microservices-web"
5+
"appService.deploySubpath": "serverless-microservices-web",
6+
"WhiteSource Advise.Diff.BaseBranch": "main",
7+
"markdownlint.config": {
8+
"MD028": false,
9+
"MD025": {
10+
"front_matter_title": ""
11+
}
12+
}
613
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ description: "This architecture walks you through the process involved in develo
1818

1919
# Serverless Microservices reference architecture
2020

21+
[![.NET](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/dotnet.yml/badge.svg)](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/dotnet.yml)
22+
[![Node.js CI](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/nodejs.yml/badge.svg)](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/nodejs.yml)
23+
[![spa build](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/spa.yml/badge.svg)](https://github.com/Azure-Samples/Serverless-microservices-reference-architecture/actions/workflows/spa.yml)
24+
2125
## The reference architecture
2226

2327
![RideShare Macro Architecture](documentation/media/macro-architecture.png)

bicep/main.bicep

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
param applicationName string = 'Rideshare'
2+
3+
@allowed([
4+
'centralus'
5+
'eastus2'
6+
'eastasia'
7+
'westeurope'
8+
'westus2'
9+
])
10+
param staticWebAppLocation string
11+
param sqlAdminLogin string
12+
13+
@secure()
14+
param sqlAdminPassword string
15+
param resourceTags object = {
16+
ProjectType: 'Azure Serverless Microservices'
17+
Purpose: 'Sample'
18+
}
19+
20+
var location = resourceGroup().location
21+
var functionAppServicePlanName = '${applicationName}Plan'
22+
var keyVaultName = '${applicationName}KeyVault'
23+
var cosmosdbName = '${applicationName}Cosmos'
24+
var eventGridName = '${applicationName}TripExternalizations'
25+
var signalRName = applicationName
26+
var applicationInsightsName = '${applicationName}Insights'
27+
var apimName = '${applicationName}Apim'
28+
var sqlServerName = '${applicationName}-db'
29+
var staticWebAppName = '${applicationName}Web'
30+
var storageAccountName = toLower('${applicationName}functionstore')
31+
var functionsApps = [
32+
'Trips'
33+
'Drivers'
34+
'Passengers'
35+
'TripArchiver'
36+
'Orchestrators'
37+
]
38+
39+
module cosmos 'modules/cosmosdb.bicep' = {
40+
name: cosmosdbName
41+
params: {
42+
accountName: cosmosdbName
43+
location: location
44+
databaseName: applicationName
45+
resourceTags: resourceTags
46+
}
47+
}
48+
49+
module sqlDb 'modules/sqldb.bicep' = {
50+
name: 'sqldb'
51+
params: {
52+
sqlServerName: sqlServerName
53+
sqlDatabaeName: applicationName
54+
administratorLogin: sqlAdminLogin
55+
administratorPassword: sqlAdminPassword
56+
location: location
57+
resourceTags: resourceTags
58+
}
59+
}
60+
61+
module eventGrid 'modules/eventgrid.bicep' = {
62+
name: eventGridName
63+
params: {
64+
eventGridTopicName: eventGridName
65+
location: location
66+
resourceTags: resourceTags
67+
}
68+
}
69+
70+
module signalR 'modules/signalr.bicep' = {
71+
name: signalRName
72+
params: {
73+
signalRName: signalRName
74+
location: location
75+
resourceTags: resourceTags
76+
}
77+
}
78+
79+
module applicationInsights 'modules/applicationInsights.bicep' = {
80+
name: applicationInsightsName
81+
params: {
82+
applicationInsightsName: applicationInsightsName
83+
location: location
84+
resourceTags: resourceTags
85+
}
86+
}
87+
88+
module apim 'modules/apim.bicep' = {
89+
name: apimName
90+
params: {
91+
apimName: apimName
92+
appInsightsName: applicationInsights.outputs.appInsightsName
93+
appInsightsInstrumentationKey: applicationInsights.outputs.appInsightsInstrumentationKey
94+
resourceTags: resourceTags
95+
}
96+
}
97+
98+
module staticeWebApp 'modules/staticwebapp.bicep' = {
99+
name: staticWebAppName
100+
params: {
101+
staticWebAppName: staticWebAppName
102+
location: staticWebAppLocation
103+
resourceTags: resourceTags
104+
}
105+
}
106+
107+
module functions 'modules/functions.bicep' = {
108+
name: 'functions'
109+
params: {
110+
storageAccountName: storageAccountName
111+
functionAppPrefix: applicationName
112+
functionApps: functionsApps
113+
appServicePlanName: functionAppServicePlanName
114+
location: location
115+
staticWebAppURL: staticeWebApp.outputs.staticWebAppURL
116+
appInsightsInstrumentationKey: applicationInsights.outputs.appInsightsInstrumentationKey
117+
resourceTags: resourceTags
118+
}
119+
}
120+
121+
module keyVault 'modules/keyvault.bicep' = {
122+
name: keyVaultName
123+
params: {
124+
keyVaultName: keyVaultName
125+
functionAppPrefix: applicationName
126+
functionApps: functionsApps
127+
resourceTags: resourceTags
128+
}
129+
dependsOn: [
130+
functions
131+
]
132+
}
133+

0 commit comments

Comments
 (0)