You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/FlightMap/README.md
+38-24Lines changed: 38 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This sample shows how to use Azure SignalR Service to build a realtime monitoring dashboard. Open the application, and you'll see flight locations in realtime.
4
4
5
-
A live demo can be found [here](http://flightmap-demo1.azurewebsites.net/).
5
+
A live demo can be found [here](https://signalr-flightmap-demo.azurewebsites.net/).
6
6
7
7
## How does it work?
8
8
@@ -16,36 +16,39 @@ In real world scenarios you can replace the web server and the blob storage with
16
16
17
17
## Deploy to Azure
18
18
19
-
1.Add your bing map key to `index.html`:
19
+
1.Create a Bing Maps API for Enterprise on Azure and add your Bing map key to `index.html`:
1. Create a SignalR Service instance using [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest):
26
26
27
27
```
28
-
docker build -t flightmap .
28
+
az group create --name <resource_group_name> --location WestUS
29
+
az signalr create --resource-group <resource_group_name> --name <signalr_name> --sku Standard_S1
29
30
```
30
31
31
-
1. Push the docker image to a docker registry such as DockHub or[Azure Container Registry](https://azure.microsoft.com/en-us/services/container-registry/). Below are the commands to push to Azure Container Registry.
32
+
1. Create a web app using [Azure CLI].
32
33
33
34
```
34
-
docker login <acr_name>.azurecr.io
35
-
docker tag flightmap <acr_name>.azurecr.io/flightmap
36
-
docker push <acr_name>.azurecr.io/flightmap
35
+
az appservice plan create --name <plan_name> --resource-group <resource_group_name> --sku S1 --is-linux
az webapp deployment source config-local-git --resource-group <resource_group_name> --name <app_name>
45
+
az webapp deployment user set --user-name <user_name> --password <password>
46
+
47
+
git init
48
+
git remote add origin <deploy_git_url>
49
+
git add -A
50
+
git commit -m "init commit"
51
+
git push origin master
49
52
```
50
53
51
54
1. Prepare flight data
@@ -66,16 +69,18 @@ In real world scenarios you can replace the web server and the blob storage with
66
69
67
70
A simple data generator can be found in [generate.js](data/generate.js). You can use it to generate some random flight data from input time range, plane count, and coordinates. You can also write your own data generate or download real data from other websites (e.g. https://www.adsbexchange.com/). Then upload the flight data to an online storage (recommend to use Azure blob storage) so it can be referenced in the web app.
68
71
69
-
1. Update web app with above docker image:
72
+
Below commands creates an Azure storage account and upload the flight data to Azure blob:
Copy file name to clipboardExpand all lines: samples/RealtimeSignIn/README.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This sample application shows how to build a realtime application using Azure SignalR Service and serverless architecture. When you open the homepage of the application, you will see how many people have visited this page (and their OS and browser distribution) and the page will automatically update when others open the same page.
4
4
5
-
A live demo can be found [here](https://signalrsignin.azurewebsites.net).
5
+
A live demo can be found [here](https://signalr-signin-demo.azurewebsites.net/).
6
6
7
7
## How Does It Work
8
8
@@ -37,7 +37,7 @@ Here is a diagram that illustrates the structure of this appliaction:
37
37
az storage table create --account-name <account_name> --name SignInInfo
38
38
az storage container create --account-name <account_name> --name content --public-access blob
39
39
```
40
-
**> Note:** Please take note of the endpoints created in the previous commands, as you will need it later to add to the Function App's application settings.
40
+
>Please take note of the endpoints created in the previous commands, as you will need it later to add to the Function App's application settings.
41
41
42
42
3. Navigate to the ```/content``` folder and upload the static files
43
43
@@ -50,19 +50,23 @@ Here is a diagram that illustrates the structure of this appliaction:
50
50
51
51
### Deploy Azure Function
52
52
53
-
1. Create a SignalR Service in Azure portal.
53
+
1. Create a SignalR Service instance:
54
+
55
+
```
56
+
az group create --name <resource_group_name> --location WestUS
57
+
az signalr create --resource-group <resource_group_name> --name <signalr_name> --sku Standard_S1
58
+
```
54
59
55
60
2. Create Azure function
56
61
57
62
```
58
-
az group create --name <resource_group_name> --location CentralUS
59
63
az storage account create --resource-group <resource_group_name> --name <storage_account_name> \
60
64
--location CentralUS --sku Standard_LRS
61
65
az functionapp create --resource-group <resource_group_name> --name <function_name> \
**> Note:** Please provide a unique name for ```function_name```
69
+
>Please provide a unique name for ```function_name```
66
70
67
71
3. Navigate to the ```/function``` folder and configure the deployment credentials
68
72
@@ -71,7 +75,7 @@ Here is a diagram that illustrates the structure of this appliaction:
71
75
az functionapp deployment user set --user-name <user_name> --password <password>
72
76
```
73
77
74
-
**> Note: **Please take note of the Git url returned as you will need it later on.
78
+
> Please take note of the Git url returned as you will need it later on.
75
79
76
80
4. Build and deploy Azure function
77
81
@@ -99,7 +103,7 @@ Here is a diagram that illustrates the structure of this appliaction:
99
103
100
104
```
101
105
102
-
**> Note: **```table_connection_string``` can be located in the Azure Portal from the Access Key section of the created storage account. ```blob_host``` is the blob service endpoint hostname (without https://), which you can find in the Blob Service Containers section. ```signalr_connection_string``` refers to the connection string you used before in the Chatroom sample.
106
+
>```table_connection_string``` can be located in the Azure Portal from the Access Key section of the created storage account. ```blob_host``` is the blob service endpoint hostname (without https://), which you can find in the Blob Service Containers section. ```signalr_connection_string``` refers to the connection string you used before in the Chatroom sample.
0 commit comments