Skip to content

Commit e69305d

Browse files
committed
install.md
1 parent 13d4e37 commit e69305d

File tree

2 files changed

+250
-3
lines changed

2 files changed

+250
-3
lines changed

INSTALL.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,39 @@
11
# Install az-firewall-mon in your environment
22

3-
az-firewall-mod once installed in your environment, will result in the following architecture:
3+
az-firewall-mon once installed in your environment will result in the following architecture:
44

55
![architecture](./images/architecture.png)
66

7-
i passi da seguire per installare nel proprio ambiente una copia privata di az-firewall-man sono i seguenti:
7+
The steps to follow to install a private copy of az-firewall-mon in your environment are:
88

9-
* fork the public repo
9+
* Fork the GitHub repository
10+
* Create all Azure resources
11+
* Configure the GitHub Action to deploy both the SPA and the backend API
12+
* Environment variables
13+
14+
# Fork the GitHub repository
15+
16+
The first thing to do is clone the az-firewall-mon repository; this repository holds all the source code of az-firewall-mon. This will also allow to pull down and build the latest changes and updates from original repo having the stability of maintaining a own personal copy.
17+
18+
* Navigate to: <https://github.com/nicolgit/azure-firewall-mon>.
19+
* Click Fork > create a new fork (top right of the repository)
20+
* Click [Create fork]
21+
* You have now a fork of the 'az-firewall-mon' repository; when a new update comes out - you can also select 'Sync fork' - to keep your fork up-to-date and trigger a new build.
22+
23+
24+
# Create all Azure resources
25+
An instance of az-firewall-mon is composeb by
26+
* 1 Azure Static Web App (standard plan)
27+
* 1 Azure Map account
28+
* 1 Azure OpenAI account
29+
* 1 Application insight instance
30+
31+
All these resources can be deployed on your subscription clicking the button below:
32+
33+
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fnicolgit%2Fazure-firewall-mon%2Fmain%2Fbicep%2Fsetup.json)
34+
35+
# Configure the GitHub Action to deploy both the SPA and the backend API
36+
37+
38+
39+
# Environment variables

bicep/setup.json

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"metadata": {
5+
"_generator": {
6+
"name": "bicep",
7+
"version": "0.36.1.42791",
8+
"templateHash": "8888054241536279544"
9+
}
10+
},
11+
"parameters": {
12+
"staticWebAppName": {
13+
"type": "string",
14+
"defaultValue": "my-firewall-mon-web",
15+
"metadata": {
16+
"description": "Name of the Static Web App"
17+
}
18+
},
19+
"appInsightsName": {
20+
"type": "string",
21+
"defaultValue": "firewall-mon-insights",
22+
"metadata": {
23+
"description": "Name of the Application Insights instance"
24+
}
25+
},
26+
"mapsAccountName": {
27+
"type": "string",
28+
"defaultValue": "firewall-mon-maps",
29+
"metadata": {
30+
"description": "Name of the Azure Maps Account"
31+
}
32+
},
33+
"openAiAccountName": {
34+
"type": "string",
35+
"defaultValue": "firewall-mon-openai",
36+
"metadata": {
37+
"description": "Name of the Azure OpenAI Account"
38+
}
39+
},
40+
"gpt4oDeploymentName": {
41+
"type": "string",
42+
"defaultValue": "gpt4o",
43+
"metadata": {
44+
"description": "Name of the GPT-4o model deployment"
45+
}
46+
},
47+
"openAiLocation": {
48+
"type": "string",
49+
"defaultValue": "eastus",
50+
"metadata": {
51+
"description": "Location for Azure OpenAI resources"
52+
}
53+
},
54+
"location": {
55+
"type": "string",
56+
"defaultValue": "[resourceGroup().location]",
57+
"metadata": {
58+
"description": "Location for Application Insights"
59+
}
60+
},
61+
"baseTime": {
62+
"type": "string",
63+
"defaultValue": "[utcNow()]",
64+
"metadata": {
65+
"description": "Base deployment time for use with dateTimeAdd function"
66+
}
67+
},
68+
"retentionInDays": {
69+
"type": "int",
70+
"defaultValue": 90,
71+
"metadata": {
72+
"description": "The retention period in days for Application Insights data"
73+
}
74+
},
75+
"logAnalyticsSku": {
76+
"type": "string",
77+
"defaultValue": "PerGB2018",
78+
"allowedValues": [
79+
"PerGB2018",
80+
"Free",
81+
"PerNode",
82+
"Standard",
83+
"Standalone",
84+
"Premium"
85+
],
86+
"metadata": {
87+
"description": "The Log Analytics workspace SKU"
88+
}
89+
}
90+
},
91+
"resources": [
92+
{
93+
"type": "Microsoft.Web/staticSites",
94+
"apiVersion": "2023-01-01",
95+
"name": "[parameters('staticWebAppName')]",
96+
"location": "[resourceGroup().location]",
97+
"sku": {
98+
"name": "Standard",
99+
"tier": "Standard"
100+
},
101+
"properties": {}
102+
},
103+
{
104+
"type": "Microsoft.Web/staticSites/config",
105+
"apiVersion": "2023-01-01",
106+
"name": "[format('{0}/{1}', parameters('staticWebAppName'), 'appsettings')]",
107+
"properties": {
108+
"APPLICATIONINSIGHTS_CONNECTION_STRING": "[reference(resourceId('Microsoft.Insights/components', parameters('appInsightsName')), '2020-02-02').ConnectionString]",
109+
"ip_api_key": "[listKeys(resourceId('Microsoft.Maps/accounts', parameters('mapsAccountName')), '2023-06-01').primaryKey]",
110+
"ip_throttling_calls": "1",
111+
"ip_throttling_window_milliseconds": "1000",
112+
"aoai_api_key": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', parameters('openAiAccountName')), '2024-10-01').key1]",
113+
"aoai_endpoint": "[reference(resourceId('Microsoft.CognitiveServices/accounts', parameters('openAiAccountName')), '2024-10-01').endpoint]",
114+
"aoai_deployment": "[parameters('gpt4oDeploymentName')]",
115+
"llm_throttling_calls": "5",
116+
"llm_throttling_window_milliseconds": "1000",
117+
"BUILD_DATE": "[parameters('baseTime')]"
118+
},
119+
"dependsOn": [
120+
"[resourceId('Microsoft.Insights/components', parameters('appInsightsName'))]",
121+
"[resourceId('Microsoft.Maps/accounts', parameters('mapsAccountName'))]",
122+
"[resourceId('Microsoft.CognitiveServices/accounts', parameters('openAiAccountName'))]",
123+
"[resourceId('Microsoft.Web/staticSites', parameters('staticWebAppName'))]"
124+
]
125+
},
126+
{
127+
"type": "Microsoft.OperationalInsights/workspaces",
128+
"apiVersion": "2022-10-01",
129+
"name": "[format('{0}-workspace', parameters('appInsightsName'))]",
130+
"location": "[parameters('location')]",
131+
"properties": {
132+
"sku": {
133+
"name": "[parameters('logAnalyticsSku')]"
134+
},
135+
"retentionInDays": "[parameters('retentionInDays')]",
136+
"features": {
137+
"enableLogAccessUsingOnlyResourcePermissions": true
138+
}
139+
}
140+
},
141+
{
142+
"type": "Microsoft.Insights/components",
143+
"apiVersion": "2020-02-02",
144+
"name": "[parameters('appInsightsName')]",
145+
"location": "[parameters('location')]",
146+
"kind": "web",
147+
"properties": {
148+
"Application_Type": "web",
149+
"WorkspaceResourceId": "[resourceId('Microsoft.OperationalInsights/workspaces', format('{0}-workspace', parameters('appInsightsName')))]",
150+
"RetentionInDays": "[parameters('retentionInDays')]",
151+
"IngestionMode": "LogAnalytics",
152+
"publicNetworkAccessForIngestion": "Enabled",
153+
"publicNetworkAccessForQuery": "Enabled"
154+
},
155+
"dependsOn": [
156+
"[resourceId('Microsoft.OperationalInsights/workspaces', format('{0}-workspace', parameters('appInsightsName')))]"
157+
]
158+
},
159+
{
160+
"type": "Microsoft.Maps/accounts",
161+
"apiVersion": "2023-06-01",
162+
"name": "[parameters('mapsAccountName')]",
163+
"location": "global",
164+
"sku": {
165+
"name": "G2"
166+
},
167+
"properties": {}
168+
},
169+
{
170+
"type": "Microsoft.CognitiveServices/accounts",
171+
"apiVersion": "2024-10-01",
172+
"name": "[parameters('openAiAccountName')]",
173+
"location": "[parameters('openAiLocation')]",
174+
"kind": "OpenAI",
175+
"sku": {
176+
"name": "S0"
177+
},
178+
"properties": {
179+
"customSubDomainName": "[parameters('openAiAccountName')]",
180+
"publicNetworkAccess": "Enabled"
181+
}
182+
},
183+
{
184+
"type": "Microsoft.CognitiveServices/accounts/deployments",
185+
"apiVersion": "2024-10-01",
186+
"name": "[format('{0}/{1}', parameters('openAiAccountName'), parameters('gpt4oDeploymentName'))]",
187+
"sku": {
188+
"name": "Standard",
189+
"capacity": 1
190+
},
191+
"properties": {
192+
"model": {
193+
"format": "OpenAI",
194+
"name": "gpt-4o",
195+
"version": "2024-11-20"
196+
}
197+
},
198+
"dependsOn": [
199+
"[resourceId('Microsoft.CognitiveServices/accounts', parameters('openAiAccountName'))]"
200+
]
201+
}
202+
],
203+
"outputs": {
204+
"mapsAccountId": {
205+
"type": "string",
206+
"value": "[resourceId('Microsoft.Maps/accounts', parameters('mapsAccountName'))]"
207+
},
208+
"openAiEndpoint": {
209+
"type": "string",
210+
"value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', parameters('openAiAccountName')), '2024-10-01').endpoint]"
211+
},
212+
"openAiDeploymentId": {
213+
"type": "string",
214+
"value": "[resourceId('Microsoft.CognitiveServices/accounts/deployments', parameters('openAiAccountName'), parameters('gpt4oDeploymentName'))]"
215+
}
216+
}
217+
}

0 commit comments

Comments
 (0)