CD edits
This commit is contained in:
Родитель
460deadbd4
Коммит
9193a19b35
|
@ -105,9 +105,9 @@ The following figures are intended to help you keep track of all the technologie
|
|||
|
||||
## Requirements
|
||||
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN.
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN
|
||||
|
||||
a. Trial subscriptions will not work.
|
||||
a. Trial subscriptions will not work
|
||||
|
||||
2. A virtual machine configured with (see Before the hands-on lab):
|
||||
|
||||
|
@ -133,31 +133,31 @@ Because this is a "born in Azure" solution, it depends on many Azure resources.
|
|||
|
||||
### Task 1: Download and open the ContosoEventsPoC starter solution
|
||||
|
||||
1. On your Lab VM, download the starter project from <http://bit.ly/2JO4yIB>. (Note: the URL is case sensitive, so you may need to copy and paste it into your browser's address bar.)
|
||||
1. On your Lab VM, download the starter project from <http://bit.ly/2JO4yIB>. (Note: the URL is case sensitive, so you may need to copy and paste it into your browser's address bar)
|
||||
|
||||
2. Unzip the contents to the folder C:\\handsonlab.
|
||||
2. Unzip the contents to the folder C:\\handsonlab
|
||||
|
||||
3. Locate the solution file (C:\\handsonlab\\ContosoEventsPoC\\Src\\ContosoEventsPOC.sln), and double-click it to open it with Visual Studio 2017.
|
||||
3. Locate the solution file (C:\\handsonlab\\ContosoEventsPoC\\Src\\ContosoEventsPOC.sln), and double-click it to open it with Visual Studio 2017
|
||||
|
||||
4. If prompted about how you want to open the file, select Visual Studio 2017, and select OK.
|
||||
4. If prompted about how you want to open the file, select Visual Studio 2017, and select OK
|
||||
|
||||
![In the How do you want to open this file dialog box, Visual Studio 2017 is selected.](images/Labs/image43.png "How do you want to open this file?")
|
||||
|
||||
5. Log into Visual Studio or set up an account, when prompted.
|
||||
5. Log into Visual Studio or set up an account, when prompted
|
||||
|
||||
![The Welcome to Visual Studio window displays, asking you to sign in.](images/Labs/image44.png "Welcome to Visual Studio window")
|
||||
|
||||
6. If presented with a security warning, uncheck Ask me for every project in this solution, and select OK.
|
||||
6. If presented with a security warning, uncheck Ask me for every project in this solution, and select OK
|
||||
|
||||
![A Security Warning displays for contosoEvents.WebApi. A message states that you should only open projects from a trustworthy source. At the bottom, the check box for Ask me for every project in this solution is circled.](images/Labs/image45.png "Security Warning for contosoEvents.WebApi")
|
||||
|
||||
7. If you are missing any prerequisites (listed under Requirements above), you may be prompted to install these at this point.
|
||||
7. If you are missing any prerequisites (listed under Requirements above), you may be prompted to install these at this point
|
||||
|
||||
8. Before you attempt to compile the solution, set the configuration to x64 by selecting it from the Solution Platforms drop down in the Visual Studio toolbar.
|
||||
8. Before you attempt to compile the solution, set the configuration to x64 by selecting it from the Solution Platforms drop down in the Visual Studio toolbar
|
||||
|
||||
![On the Visual Studio Toolbar, The Platforms drop-down carat is circled, and in its drop-down menu, x64 is circled.](images/Labs/image46.png "Visual Studio Toolbar")
|
||||
|
||||
9. Build the solution, by selecting Build from the Visual Studio menu, then selecting Build Solution.
|
||||
9. Build the solution, by selecting Build from the Visual Studio menu, then selecting Build Solution
|
||||
|
||||
![The Build button is circled on the Visual Studio menu. Under that, Build Solution is circled.](images/Labs/image47.png "Visual Studio menu")
|
||||
|
||||
|
@ -167,11 +167,11 @@ Because this is a "born in Azure" solution, it depends on many Azure resources.
|
|||
|
||||
In this task, you will provision an API Management Service in the Azure portal.
|
||||
|
||||
1. In the Azure portal, select +New, enter "API Management" into the Search the Marketplace box, then select API management from the results.
|
||||
1. In the Azure portal, select +New, enter "API Management" into the Search the Marketplace box, then select API management from the results
|
||||
|
||||
![In the Azure Portal Everything pane, API Management is typed in the search field. Under Results, API Management is circled.](images/Labs/image48.png "Azure Portal Everything pane")
|
||||
|
||||
2. In the API Management blade, select Create.
|
||||
2. In the API Management blade, select Create
|
||||
|
||||
3. In the API Management service blade, enter the following:
|
||||
|
||||
|
@ -179,7 +179,7 @@ In this task, you will provision an API Management Service in the Azure portal.
|
|||
|
||||
b. Subscription: Choose your subscription
|
||||
|
||||
c. Resource group: Select Use existing, and select the hands-on-labs resource group you created previously.
|
||||
c. Resource group: Select Use existing, and select the hands-on-labs resource group you created previously
|
||||
|
||||
d. Location: Select the same region used for the hands-on-labs resource group
|
||||
|
||||
|
@ -199,7 +199,7 @@ In this task, you will provision an API Management Service in the Azure portal.
|
|||
|
||||
In these steps, you will provision a Web App in a new App Service Plan.
|
||||
|
||||
1. Select +New in the Azure Portal, select Web, then select Web App.
|
||||
1. Select +New in the Azure Portal, select Web, then select Web App
|
||||
|
||||
![In the Azure Portal, New pane, under Azure Marketplace, Web and Web App (Quckstart tutorial) are both circled.](images/Labs/image50.png "Azure Portal, New pane")
|
||||
|
||||
|
@ -209,7 +209,7 @@ In these steps, you will provision a Web App in a new App Service Plan.
|
|||
|
||||
b. Subscription: Select your subscription
|
||||
|
||||
c. Resource group: Select Use existing, and select the hands-on-labs resource group created previously.
|
||||
c. Resource group: Select Use existing, and select the hands-on-labs resource group created previously
|
||||
|
||||
d. OS: Select Windows
|
||||
|
||||
|
@ -229,7 +229,7 @@ In these steps, you will provision a Web App in a new App Service Plan.
|
|||
|
||||
3. You will receive a notification in the Azure portal when the Web App deployment completes. From this, select Go to resource.
|
||||
|
||||
![The Azure Portal Notification displays, indicating that deployment succeeded. In the top, right corner of the notification window, a Bell (notification) icon is circled. At the bottom of the Deployment succeeded message, the Go to resource button is circled.](images/Labs/image52.png "Azure Portal Notification")
|
||||
![The Azure Portal Notification displays, indicating that deployment succeeded. In the top corner of the notification window, a Bell (notification) icon is circled. At the bottom of the Deployment succeeded message, the Go to resource button is circled.](images/Labs/image52.png "Azure Portal Notification")
|
||||
|
||||
4. On the Web Apps Overview blade, you can see the URL used to access your Web App. If you select this, it will open an empty site, indicating your App Services app is up and running.
|
||||
|
||||
|
@ -239,11 +239,11 @@ In these steps, you will provision a Web App in a new App Service Plan.
|
|||
|
||||
In this task, you will provision a Function App using a Consumption Plan. By using a Consumption Plan, you enable dynamic scaling of your Functions.
|
||||
|
||||
1. Select +New in the Azure Portal, and enter "Function App" in the Search the Marketplace box, then select Function App from the results.
|
||||
1. Select +New in the Azure Portal, and enter "Function App" in the Search the Marketplace box, then select Function App from the results
|
||||
|
||||
![In the Azure Portal Everything pane, the search field is set to Function App. Under Results, Function App is circled.](images/Labs/image54.png "Azure Portal Everything pane")
|
||||
|
||||
2. Select Create on the Function App blade.
|
||||
2. Select Create on the Function App blade
|
||||
|
||||
3. On the Create Function App blade, enter the following:
|
||||
|
||||
|
@ -271,7 +271,7 @@ In this task, you will provision a Function App using a Consumption Plan. By usi
|
|||
|
||||
In this section, you will create a Storage account for the application to create and use queues required by the solution.
|
||||
|
||||
1. In the Azure portal, select +New, Storage, then select Storage account -- blob, file, table, queue under Featured.
|
||||
1. In the Azure portal, select +New, Storage, then select Storage account -- blob, file, table, queue under Featured
|
||||
|
||||
![In the Azure Portal, New pane, under Azure Marketplace, Storage is circled. Under Featured, Storage account - blob, file, table, queue (Quickstart tutorial) is circled.](images/Labs/image56.png "Azure Portal, New pane")
|
||||
|
||||
|
@ -305,9 +305,9 @@ In this section, you will create a Storage account for the application to create
|
|||
|
||||
In this section, you will provision a Cosmos DB account, a Cosmos DB Database and a Cosmos DB collection that will be used to collect ticket orders.
|
||||
|
||||
1. In the Azure portal, select +New, Databases, then select Azure Cosmos DB.
|
||||
1. In the Azure portal, select +New, Databases, then select Azure Cosmos DB
|
||||
|
||||
![In the Azure Portal, New pane, in the left column, Databases is circled. In the right pane, Azure Cosmos DB (Quickstart tutorial) is circled.](images/Labs/image58.png "Azure Portal, New pane")
|
||||
![In the Azure Portal, New pane, in the left column, Databases is circled. In the side pane, Azure Cosmos DB (Quickstart tutorial) is circled.](images/Labs/image58.png "Azure Portal, New pane")
|
||||
|
||||
2. On the Azure Cosmos DB blade, enter the following:
|
||||
|
||||
|
@ -327,15 +327,15 @@ In this section, you will provision a Cosmos DB account, a Cosmos DB Database an
|
|||
|
||||
![In the Azure Cosmos DB blade, fields are set to the previously defined settings.](images/Labs/image59.png "Azure Cosmos DB blade")
|
||||
|
||||
3. When the Cosmos DB account is ready, navigate to the hands-on-labs Resource Group, and select your Cosmos DB account from the list.
|
||||
3. When the Cosmos DB account is ready, navigate to the hands-on-labs Resource Group, and select your Cosmos DB account from the list
|
||||
|
||||
![In the Resource Group pane, under Name, the contosoeventsdb-SUFFIX Azure Cosmos DB account is circled.](images/Labs/image60.png "Resource Group pane")
|
||||
|
||||
4. On the Cosmos DB account blade, under Collections in the left-hand menu, select Browse.
|
||||
4. On the Cosmos DB account blade, under Collections in the side menu, select Browse
|
||||
|
||||
![In the Cosmos DB account blade, Collections section, Browse is circled.](images/Labs/image61.png "Cosmos DB account blade")
|
||||
|
||||
5. On the Browse blade, select +Add Collection.
|
||||
5. On the Browse blade, select +Add Collection
|
||||
|
||||
![On the Browse blade menu, the Add Collections button is circled.](images/Labs/image62.png "Browse blade menu")
|
||||
|
||||
|
@ -355,7 +355,7 @@ In this section, you will provision a Cosmos DB account, a Cosmos DB Database an
|
|||
|
||||
![On the Add Collections blade, fields are set to the previously defined settings.](images/Labs/image63.png "Add Collections blade")
|
||||
|
||||
7. Select New collection from the screen that appears.
|
||||
7. Select New collection from the screen that appears
|
||||
|
||||
![The New Collection button is circled on the New Screen.](images/Labs/image64.png "New Screen")
|
||||
|
||||
|
@ -373,7 +373,7 @@ In this section, you will provision a Cosmos DB account, a Cosmos DB Database an
|
|||
|
||||
![On the Add Collection blade, fields are set to the previously defined settings.](images/Labs/image65.png "Add Collection blade")
|
||||
|
||||
9. You will be able to see that the two collections exist in the new database.
|
||||
9. You will be able to see that the two collections exist in the new database
|
||||
|
||||
![On the New Screen, under Collections, under TicketManager, the Orders and Events collections are circled.](images/Labs/image66.png "New Screen")
|
||||
|
||||
|
@ -393,11 +393,11 @@ The design also calls for saving the state of the ticket order to a Cosmos DB co
|
|||
|
||||
In this task, you will write code to process the cancellation of an order by interacting with the Ticket Order Actor. To cancel an order, a Ticket Order Actor instance must be retrieved, and the CancelTicket operation it provides is invoked that changes the actor's state to reflect a "canceled" status.
|
||||
|
||||
1. On your Lab VM, with the ContosoEventsPoC solution open in Visual Studio, use the Solution Explorer to open the TicketOrderActor.cs file, in the Service Fabric folder, under the ContosoEvents.TicketOrderActor project.
|
||||
1. On your Lab VM, with the ContosoEventsPoC solution open in Visual Studio, use the Solution Explorer to open the TicketOrderActor.cs file, in the Service Fabric folder, under the ContosoEvents.TicketOrderActor project
|
||||
|
||||
![In the Solution Explorer window, the following path is expanded: Service Fabric\\ContosoEvents.TicketOrderActor. Under ContosoEvents.TicketOrderActor, TicketOrderActor.cs is circled.](images/Labs/image68.png "Solution Explorer window")
|
||||
|
||||
2. Locate the CancelOrder method (line 239).
|
||||
2. Locate the CancelOrder method (line 239)
|
||||
|
||||
3. Locate the following TODO, and complete the commented line by replacing it with the following:
|
||||
|
||||
|
@ -442,11 +442,11 @@ In this task, you will write code to process the cancellation of an order by int
|
|||
|
||||
In this task, you will write code to enqueue an order to the Ticket Order Stateful Service whenever and order is being processed. This Order is enqueued by the Web API and then dequeued by the Ticket Order Stateful Service for processing by the Ticket Order Actor. To accomplish this, the order will be enqueued into a reliable queue.
|
||||
|
||||
1. Using Solution Explorer open TicketOrderService.cs under the ContosoEvents.TicketOrderService project.
|
||||
1. Using Solution Explorer open TicketOrderService.cs under the ContosoEvents.TicketOrderService project
|
||||
|
||||
![In the Solution Explorer window, the following path is expanded: Service Fabric\\ContosoEvents.TicketOrderService. Under ContosoEvents.TicketOrderService, TicketOrderService.cs is circled.](images/Labs/image69.png "Solution Explorer window")
|
||||
|
||||
2. Locate the EnqueueOrder method. (line 67)
|
||||
2. Locate the EnqueueOrder method (line 67)
|
||||
|
||||
3. Locate the following TODO and complete the commented line by replacing it with the following:
|
||||
|
||||
|
@ -484,11 +484,11 @@ In this task, you will write code to enqueue an order to the Ticket Order Statef
|
|||
|
||||
In this task, you will write code that runs within the Orders Web API controller that delegates the cancellation request to the actor.
|
||||
|
||||
1. Using Solution Explorer, open the OrdersController.cs file, in the Controllers folder of the ContosoEvents.WebApi project.
|
||||
1. Using Solution Explorer, open the OrdersController.cs file, in the Controllers folder of the ContosoEvents.WebApi project
|
||||
|
||||
![In the Solution Explorer window, under the Controllers folder, OrdersController.cs is circled.](images/Labs/image70.png "Solution Explorer window")
|
||||
|
||||
2. Locate the CancelOrder method. (line 179)
|
||||
2. Locate the CancelOrder method (line 179)
|
||||
|
||||
3. Locate the following TODO and complete the commented line by replacing it with the following:
|
||||
|
||||
|
@ -517,11 +517,11 @@ In this task, you will write code that runs within the Orders Web API controller
|
|||
|
||||
In this task, you will write code that runs within the Admin Web API controller that uses the Fabric Client to get information about all the Ticket Order Service partitions.
|
||||
|
||||
1. Using Solution Explorer, open AdminControllers.cs in the Controllers folder in the ContosoEvents.WebApi project.
|
||||
1. Using Solution Explorer, open AdminControllers.cs in the Controllers folder in the ContosoEvents.WebApi project
|
||||
|
||||
![In the Solution Explorer window, under the Controllers folder, AdminController.cs is circled.](images/Labs/image71.png "Solution Explorer window")
|
||||
|
||||
2. Locate the GetTicketOrderPartitions method. (line 37)
|
||||
2. Locate the GetTicketOrderPartitions method (line 37)
|
||||
|
||||
3. Locate the following TODO and complete the commented line by replacing it with the following:
|
||||
|
||||
|
@ -568,33 +568,33 @@ Note: Not all features are in place, but you will be able to see that the applic
|
|||
|
||||
![In the Start Menu, Service Fabric Local Cluster Manager is circled.](images/Labs/image73.png "Start Menu")
|
||||
|
||||
3. Right-click the system tray icon, and select Setup Local Cluster, 1 Node.
|
||||
3. Right-click the system tray icon, and select Setup Local Cluster, 1 Node
|
||||
|
||||
![In the System tray icon menu, Setup Local Cluster is selected. 1 Node is selected in the sub-menu. ](images/Labs/image74.png "System tray icon menu")
|
||||
|
||||
4. You should see a message that the local cluster is setting up.
|
||||
4. You should see a message that the local cluster is setting up
|
||||
|
||||
![The Service Fabric Local Cluster Manager message says that the setting up process may take a few minutes.](images/Labs/image75.png "Service Fabric Local Cluster Manager message")
|
||||
|
||||
5. Note: Sometimes you will see an error message appear indicating the cluster setup is retrying.
|
||||
5. Note: Sometimes you will see an error message appear indicating the cluster setup is retrying
|
||||
|
||||
6. Open the ContosoEventsPoc solution in Visual Studio, if it is not still open from the previous exercise.
|
||||
6. Open the ContosoEventsPoc solution in Visual Studio, if it is not still open from the previous exercise
|
||||
|
||||
7. Rebuild the solution to resolve all NuGet packages, and to make sure there are no compilation errors, by selecting Build from the menu, then selecting Rebuild Solution.
|
||||
7. Rebuild the solution to resolve all NuGet packages, and to make sure there are no compilation errors, by selecting Build from the menu, then selecting Rebuild Solution
|
||||
|
||||
![In Visual Studio, Rebuild Solution is circled. In the top menu, Build is circled.](images/Labs/image76.png "Visual Studio")
|
||||
|
||||
8. After the rebuild, you should see a Rebuild All succeeded message in the bottom left corner of Visual Studio, and that there are 0 Errors. Note: You may see some warnings, but these can be safely ignored.
|
||||
8. After the rebuild, you should see a Rebuild All succeeded message in the bottom corner of Visual Studio, and that there are 0 Errors. Note: You may see some warnings, but these can be safely ignored.
|
||||
|
||||
![In Visual Studio, under Error List, the 0 Errors message is circled. At the bottom, the Rebuild All succeeded message is circled.](images/Labs/image77.png "Visual Studio")
|
||||
|
||||
9. Now, you will Publish the Service Fabric app to the local cluster.
|
||||
9. Now, you will Publish the Service Fabric app to the local cluster
|
||||
|
||||
10. In Solution Explorer, right-click the Service Fabric Application, ContosoEventsApp, and select Publish.
|
||||
10. In Solution Explorer, right-click the Service Fabric Application, ContosoEventsApp, and select Publish
|
||||
|
||||
![In Solution Explorer, the Service Fabric folder is expanded, and ContosoEventsApp is circled. In the right-click menu, Publish is circled.](images/Labs/image78.png "Solution Explorer")
|
||||
|
||||
11. In the Publish Service Fabric Application dialog, select PublishProfiles\\Local.1Node.xml for the Target profile, ensure the correct account is selected, and select Publish.
|
||||
11. In the Publish Service Fabric Application dialog, select PublishProfiles\\Local.1Node.xml for the Target profile, ensure the correct account is selected, and select Publish
|
||||
|
||||
![In the Publish Service Fabric Application dialog box, the Target profile field is set to PublishProfiles\\Local.1Node.xml, and is circled.](images/Labs/image79.png "Publish Service Fabric Application dialog box")
|
||||
|
||||
|
@ -612,11 +612,11 @@ The Service Fabric Application includes a front-end Web API as the public-facing
|
|||
|
||||
![In the Swagger endpoint window, under ContosoEvents.WebApi, three endpoints are circled: Admin, Events, and Orders).](images/Labs/image81.png "Swagger endpoint window")
|
||||
|
||||
2. Select the Admin API, and observe the list of methods available.
|
||||
2. Select the Admin API, and observe the list of methods available
|
||||
|
||||
![In the Swagger endpoint window, under ContosoEvents.WebApi, Admin is circled, and its list of methods display below.](images/Labs/image82.png "Swagger endpoint window")
|
||||
|
||||
3. Select /api/admin/partitions, then select Try it out.
|
||||
3. Select /api/admin/partitions, then select Try it out
|
||||
|
||||
![In the Swagger endpoint window, the /api/admin/partitions method is circled. Below that, the Model Schema displays. At the bottom, the Try it out button is circled.](images/Labs/image83.png "Swagger endpoint window, Admin method section")
|
||||
|
||||
|
@ -624,15 +624,15 @@ The Service Fabric Application includes a front-end Web API as the public-facing
|
|||
|
||||
![In the Swagger endpoint window, under Admin, in the /api/admin/partitions method section, the Response Code 200 is circled.](images/Labs/image84.png "Swagger endpoint window, Admin method section")
|
||||
|
||||
5. After viewing the Swagger definition, and receiving a success response code from the partitions method, your environment is in a good state to continue.
|
||||
5. After viewing the Swagger definition, and receiving a success response code from the partitions method, your environment is in a good state to continue
|
||||
|
||||
### Task 3: Service Fabric Explorer
|
||||
|
||||
In this task, you will browse to the Service Fabric Explorer, and view the local cluster.
|
||||
|
||||
1. On your Lab VM, open a new tab in your Chrome browser, and navigate to the Service Fabric Explorer for the local cluster at <http://localhost:19080/Explorer/index.html>.
|
||||
1. On your Lab VM, open a new tab in your Chrome browser, and navigate to the Service Fabric Explorer for the local cluster at <http://localhost:19080/Explorer/index.html>
|
||||
|
||||
![In the Service Fabric Explorer window, in the left pane, Cluster is selected. In the right, Cluster http://local host pane, on the Essentials tab, both Cluster Health State and System Application Health State are okay. On the Dashboard, circle graphs show that 1 Node, 1 Application, 4 Services, 4 partitions, and 4 replicas are all healthy, and that there are no upgrades in progress.](images/Labs/image85.png "Service Fabric Explorer")
|
||||
![In the Service Fabric Explorer window, in the side pane, Cluster is selected. In the right, Cluster http://local host pane, on the Essentials tab, both Cluster Health State and System Application Health State are okay. On the Dashboard, circle graphs show that 1 Node, 1 Application, 4 Services, 4 partitions, and 4 replicas are all healthy, and that there are no upgrades in progress.](images/Labs/image85.png "Service Fabric Explorer")
|
||||
|
||||
2. Observe that the ContosoEventsApp is deployed with the following services:
|
||||
|
||||
|
@ -650,7 +650,7 @@ In this task, you will browse to the Service Fabric Explorer, and view the local
|
|||
|
||||
In this task, you will complete features of the Contoso Events POC so that placing an order also syncs with the back-end data store. You will also update the configuration settings to reference the Azure resources you previously created correctly.
|
||||
|
||||
1. Return to Visual Studio, and from Solution Explorer, open Local.1Node.xml, located in the ApplicationParameters folder under the ContosoEventsApp project in the Service Fabric folder.
|
||||
1. Return to Visual Studio, and from Solution Explorer, open Local.1Node.xml, located in the ApplicationParameters folder under the ContosoEventsApp project in the Service Fabric folder
|
||||
|
||||
![In Solution Explorer, the following path is expanded in the tree view: Service Fabric\\ContosoEventsApp\\ApplicationParameters. In ApplicationParameters, Local.1Node.xml is circled.](images/Labs/image87.png "Solution Explorer")
|
||||
|
||||
|
@ -671,21 +671,21 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
|
||||
Cosmos DB settings:
|
||||
|
||||
1. In the Azure Portal, browse to the Azure Cosmos DB account you created in Exercise 1, Task 6, and select Keys, under Settings in the left-hand menu.
|
||||
1. In the Azure Portal, browse to the Azure Cosmos DB account you created in Exercise 1, Task 6, and select Keys, under Settings in the side menu
|
||||
|
||||
![In the Azure Portal, Azure Cosmos DB account, under Settings, Keys is circled. In the right pane, under Read-write Keys, the URL, Primary Key, and their corresponding coopy buttons are circled.](images/Labs/image88.png "Azure Portal, Azure Cosmos DB account")
|
||||
|
||||
2. Select the Copy button next to the URI value, return to the Local.1Node.xml file in Visual Studio, and paste the URI value into the value for the DataStorageEndpointUri parameter.
|
||||
2. Select the Copy button next to the URI value, return to the Local.1Node.xml file in Visual Studio, and paste the URI value into the value for the DataStorageEndpointUri parameter
|
||||
|
||||
3. Now, on your Cosmos DB keys blade, copy the Primary Key value, return to the Local.1Node.xml file in Visual Studio, and paste the Primary Key value into the value for the DataStoragePrimaryKey parameter.
|
||||
3. Now, on your Cosmos DB keys blade, copy the Primary Key value, return to the Local.1Node.xml file in Visual Studio, and paste the Primary Key value into the value for the DataStoragePrimaryKey parameter
|
||||
|
||||
4. Back in the Azure portal, select Browse under Collections in the left-hand menu for your Cosmos DB. The database (TicketManager) and collection (Orders and Events) names are pre-set in the Local.1Node.xml file, so verify these match the collection and database names you see in the Azure portal.
|
||||
4. Back in the Azure portal, select Browse under Collections in the side menu for your Cosmos DB. The database (TicketManager) and collection (Orders and Events) names are pre-set in the Local.1Node.xml file, so verify these match the collection and database names you see in the Azure portal.
|
||||
|
||||
![In the Azure Portal, Azure Cosmos DB, in the left pane, under Collections, Browse is circled. In the right pane, the Database field is set to All Databases. Under That, the TicketManager databases for Orders and Events are circled.](images/Labs/image89.png "Azure Portal, Azure Cosmos DB")
|
||||
|
||||
5. If you used a different database name, modify the value of the DataStorageDatabaseName parameter to reflect the Cosmos DB database name.
|
||||
5. If you used a different database name, modify the value of the DataStorageDatabaseName parameter to reflect the Cosmos DB database name
|
||||
|
||||
6. If you used a different collection names for the Orders or Events collections, modify the values of the DataStorageEventsCollectionName and DataStorageOrdersCollectionName parameters to match your names.
|
||||
6. If you used a different collection names for the Orders or Events collections, modify the values of the DataStorageEventsCollectionName and DataStorageOrdersCollectionName parameters to match your names
|
||||
|
||||
7. Save the Local.1Node.xml file. The Cosmos DB parameters should now resemble the following:
|
||||
|
||||
|
@ -693,23 +693,23 @@ Cosmos DB settings:
|
|||
|
||||
Storage settings:
|
||||
|
||||
1. In the Azure Portal, browse to the Storage account you created in Exercise 1, Task 5, and select Access keys under Settings in the left-hand menu.
|
||||
1. In the Azure Portal, browse to the Storage account you created in Exercise 1, Task 5, and select Access keys under Settings in the side menu
|
||||
|
||||
2. Select the copy button to the right of key1 Connection String to copy the value.
|
||||
2. Select the copy button to the side of key1 Connection String to copy the value
|
||||
|
||||
![In Azure Portal, Storage account, in the left pane, under Settings, Access keys is circled. In the right pane, under Default keys, for key1, the Connection string and its corresponding copy button are circled.](images/Labs/image91.png "Azure Portal, Storage account")
|
||||
|
||||
3. Return to the Local.1Node.xml file in Visual Studio, and paste the key 1 Connection String into the value for the StorageConnectionString parameter, and save Local.1Node.xml.
|
||||
3. Return to the Local.1Node.xml file in Visual Studio, and paste the key 1 Connection String into the value for the StorageConnectionString parameter, and save Local.1Node.xml
|
||||
|
||||
![In the 1Node.xml file, the Key 1 Connection String displays.](images/Labs/image92.png "1Node.xml file")
|
||||
|
||||
Test configurations:
|
||||
|
||||
1. In Visual Studio, rebuild and publish the application to the local cluster using the steps you followed previously.
|
||||
1. In Visual Studio, rebuild and publish the application to the local cluster using the steps you followed previously
|
||||
|
||||
2. After the application is fully published, use Chrome to browse to the Swagger endpoint at <http://localhost:8082/swagger/ui/index>.
|
||||
2. After the application is fully published, use Chrome to browse to the Swagger endpoint at <http://localhost:8082/swagger/ui/index>
|
||||
|
||||
3. Select the Orders API methods, and select the POST operation for /api/orders.
|
||||
3. Select the Orders API methods, and select the POST operation for /api/orders
|
||||
|
||||
![In the Swagger endpoint window, Orders is circled. Below Orders, /api/orders method is circled. While the other methods have Get buttons next to them, the /api/orders method has a Post button next to it.](images/Labs/image93.png "Swagger Endpoint Window")
|
||||
|
||||
|
@ -735,7 +735,7 @@ Test configurations:
|
|||
|
||||
6. Now, you should have an order in the Service Fabric App, and it is being processed. In addition, the Ticket Order Actor should have sent the order to the externalization queue you set up in configuration earlier. The actor has pre-existing logic in place to write to this queue.
|
||||
|
||||
7. To verify that the order is in the queue, select View -\> Cloud Explorer from the menu in Visual Studio.
|
||||
7. To verify that the order is in the queue, select View -\> Cloud Explorer from the menu in Visual Studio
|
||||
|
||||
![In Visual Studio on the menu bar View and Cloud Explorer are circled.](images/Labs/image96.png "Visual Studio menu bar")
|
||||
|
||||
|
@ -747,7 +747,7 @@ Test configurations:
|
|||
|
||||
![In the Cloud Explorer tree view, under contosoeventskb, Queues is selected.](images/Labs/image98.png "Cloud Explorer tree view")
|
||||
|
||||
10. Double-click on the externalization queue, and you should see the message you just sent from Swagger in the document window.
|
||||
10. Double-click on the externalization queue, and you should see the message you just sent from Swagger in the document window
|
||||
|
||||
![In the Cloud Explorer tree view, under Queues, Contosoeventsexternalization-requests is circled. In the Cloud Explorer document window, a line of message text is circled.](images/Labs/image99.png "Cloud Explorer document window")
|
||||
|
||||
|
@ -763,67 +763,67 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
![The ContosoEvents app architecture has two columns - Cosmos DB (Data Store), and Contoso Events (Web API). It also has three rows - Azure Functions, Azure Storage Queues, and Queue Sources. For Cosmos DB, its order of flow begins with Ticket Order Actor, Queue Source. An arrow then points up from Ticket Order Actor to Order Externalization (Its Azure Storage Queue), which then points up to Process order externalization (its Azure Function), which points to its endpoint, Cosmos DB Data Store. For Contoso Events, its order of flow begins with Service Fabric App, its Queue Source. An arrow then points up from there to Order Simulation (Its Azure Storage Queue), which then points up to Process order simulation (its Azure Function), which points to its endpoint, Contoso Events (Web API). its Azure Function is to process order simulization, Its Azure Storage Queue is Order Simulation, and its Queue Source is Service Fabric App. ](images/Labs/image101.png "ContosoEvents app architecture")
|
||||
|
||||
1. There appears to be an issue with Azure Functions detecting Storage accounts, so before creating your function, you will manually add your Storage account connection string to the Application Settings for your Function App.
|
||||
1. There appears to be an issue with Azure Functions detecting Storage accounts, so before creating your function, you will manually add your Storage account connection string to the Application Settings for your Function App
|
||||
|
||||
2. In the Azure portal, browse to the Storage Account you created in Exercise 1, Step 5, then select Access keys under Settings on the left-hand menu, and copy the key1 Connection String value, as you did previously.
|
||||
2. In the Azure portal, browse to the Storage Account you created in Exercise 1, Step 5, then select Access keys under Settings on the side menu, and copy the key1 Connection String value, as you did previously
|
||||
|
||||
![In the Azure Portal, under Settings, Access keys is circled. Under Default keys, the key 1 connection string and its copy button are circled.](images/Labs/image102.png "Azure Portal")
|
||||
|
||||
3. Now, browse to the Function App you created in Exercise 1, Step 4.
|
||||
3. Now, browse to the Function App you created in Exercise 1, Step 4
|
||||
|
||||
4. Select your Function App in the left-hand menu, then select Application settings under Configured features.
|
||||
4. Select your Function App in the side menu, then select Application settings under Configured features
|
||||
|
||||
![In the Function Apps pane, in the left column, contosoeventsfn-SUFFIX is circled. In the right, Overview column, under Configured features, Application settings is circled.](images/Labs/image103.png "Function Apps pane")
|
||||
|
||||
5. On the Application Settings tab, scroll down and select +Add new setting under Application Settings, then enter contosoeventsstore in the name textbox, and paste the key1 Connection String value you copied from your Storage account into the value textbox.
|
||||
5. On the Application Settings tab, scroll down and select +Add new setting under Application Settings, then enter contosoeventsstore in the name textbox, and paste the key1 Connection String value you copied from your Storage account into the value textbox
|
||||
|
||||
![On the Application settings tab, contosoeventsstore and its corresponding connection string value are circled. At the bottom, the Add new settings button is circled.](images/Labs/image104.png "Application settings tab")
|
||||
|
||||
6. Scroll back to the top of the Application Settings tab, and select Save to apply the change.
|
||||
6. Scroll back to the top of the Application Settings tab, and select Save to apply the change
|
||||
|
||||
![Screenshot of the Save button](images/Labs/image105.png "Save button")
|
||||
|
||||
7. From the left-hand menu, place your mouse cursor over Functions, then select the + to the right of Functions.
|
||||
7. From the menu, place your mouse cursor over Functions, then select the + to the side of Functions
|
||||
|
||||
![In the Function Apps section, Functions is selected, and the Plus symbol to its right is circled.](images/Labs/image106.png "Function Apps section")
|
||||
|
||||
8. Select Data processing under the Get started quickly... header, leave CSharp selected for the language, and select the Create this function button.
|
||||
8. Select Data processing under the Get started quickly... header, leave CSharp selected for the language, and select the Create this function button
|
||||
|
||||
![On the Get started quickly with a premade function page, under Choose a scenario, the Data processing option is circled. Under Choose a language, CSharp is circled. At the bottom, the Create this function button is circled.](images/Labs/image107.png "Get started quickly page")
|
||||
|
||||
9. First, let's rename the function, so it has a more meaningful name.
|
||||
9. First, let's rename the function, so it has a more meaningful name
|
||||
|
||||
10. In the left-hand menu, select your Function app, then select the Platform features tab, and select Console under Development Tools.
|
||||
10. In the side menu, select your Function app, then select the Platform features tab, and select Console under Development Tools
|
||||
|
||||
![In the Function Apps pane, in the left column, under Function Apps, contosoeventsfn-SUFFIX is circled. In the right column, at the top, the Platform features tab is circled. Under Development Tools, Console is circled.](images/Labs/image108.png "Function Apps pane")
|
||||
![In the Function Apps pane, in the column, under Function Apps, contosoeventsfn-SUFFIX is circled. In the right column, at the top, the Platform features tab is circled. Under Development Tools, Console is circled.](images/Labs/image108.png "Function Apps pane")
|
||||
|
||||
11. At the Console command prompt, type ls to view the list of functions and files in the wwwroot folder.
|
||||
11. At the Console command prompt, type ls to view the list of functions and files in the wwwroot folder
|
||||
|
||||
![The Console command prompt displays.](images/Labs/image109.png "Console command prompt")
|
||||
|
||||
12. Next, paste the following command into the console to rename the QueueTriggerCSharp1 function to ProcessOrderExternalizations.
|
||||
12. Next, paste the following command into the console to rename the QueueTriggerCSharp1 function to ProcessOrderExternalizations
|
||||
|
||||
```
|
||||
rename QueueTriggerCSharp1 ProcessOrderExternalizations
|
||||
```
|
||||
|
||||
13. Typing ls at the command prompt again will show the function has been renamed.
|
||||
13. Typing ls at the command prompt again will show the function has been renamed
|
||||
|
||||
![The Console command prompt displays with the renamed ProcessOrderExternalizations.](images/Labs/image110.png "Console command prompt")
|
||||
|
||||
14. Exit the Console window by selecting the X in the top right corner, just below your account name.
|
||||
14. Exit the Console window by selecting the X in the top corner, just below your account name
|
||||
|
||||
![Just below the account icon, the Exit icon is circled.](images/Labs/image111.png "Exit icon")
|
||||
|
||||
15. Back on the Function app page, move your mouse cursor over your function app in the left-hand menu, and select the Refresh icon. Note the function name is still QueueTriggerCSharp1 before refreshing.
|
||||
15. Back on the Function app page, move your mouse cursor over your function app in the side menu, and select the Refresh icon. Note the function name is still QueueTriggerCSharp1 before refreshing.
|
||||
|
||||
![In the Function Apps section, next to contosoeventsfn-SUFFIX, the refresh icon is circled. under Functions, QueueTriggerCSharp1 is circled.](images/Labs/image112.png "Function Apps section")
|
||||
|
||||
16. After the refresh, the function name will change in the display to ProcessOrderExternalizations.
|
||||
16. After the refresh, the function name will change in the display to ProcessOrderExternalizations
|
||||
|
||||
![In the Function Apps section, under Functions, QueueTriggerCSharp1 has now changed to ProcessOrderExternalizations.](images/Labs/image113.png "Function Apps section")
|
||||
|
||||
17. Under the ProcessOrderExternalizations function, select Integrate.
|
||||
17. Under the ProcessOrderExternalizations function, select Integrate
|
||||
|
||||
![Under Functions\\ProcessOrderExternalizations, Integrate is circled.](images/Labs/image114.png "Functions App Section")
|
||||
|
||||
|
@ -839,13 +839,13 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
![On the Integrate screen, the Azure Queue Storage trigger section displays. The Message parameter name is orderItem, the Storage account connection is contosoeventsstore](images/Labs/image116.png "Integrate screen")
|
||||
|
||||
d. Select Save.
|
||||
d. Select Save
|
||||
|
||||
19. While still on the Integrate screen, select +New Output.
|
||||
19. While still on the Integrate screen, select +New Output
|
||||
|
||||
![On the Integrate Screen, under Outputs, + New Output is circled.](images/Labs/image117.png "Integrate Screen")
|
||||
|
||||
20. In the outputs box, locate and select Azure Cosmos DB, then select Select.
|
||||
20. In the outputs box, locate and select Azure Cosmos DB, then choose Select
|
||||
|
||||
![In the Azure Cosmos DB output window, next to the Azure Cosmos DB account connection field, the New button is circled.](images/Labs/image118.png "Azure Cosmos DB output window")
|
||||
|
||||
|
@ -859,7 +859,7 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
h. Database name: Enter TicketManager
|
||||
|
||||
i. Azure Cosmos DB account connection: Select new next to the text box, and select the Cosmos DB you created in Exercise 1, Task 6.
|
||||
i. Azure Cosmos DB account connection: Select new next to the text box, and select the Cosmos DB you created in Exercise 1, Task 6
|
||||
|
||||
![Screenshot of Azure Cosmos DB output window with the values specified above entered into the fields.](images/Labs/image119.png "Azure Cosmos DB output window")
|
||||
|
||||
|
@ -867,33 +867,33 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
![In the Integrate window, the fields under both Triggers and Outputs are circled. ](images/Labs/image120.png "Integrate window")
|
||||
|
||||
22. Next, select your function from the left-hand menu.
|
||||
22. Next, select your function from the side menu
|
||||
|
||||
![Under Functions, ProcessOrderExternailizations is circled.](images/Labs/image121.png "Functions section")
|
||||
|
||||
23. Now, you will retrieve the code for the function from a file in Visual Studio.
|
||||
23. Now, you will retrieve the code for the function from a file in Visual Studio
|
||||
|
||||
24. In Visual Studio, go to Solution Explorer, and locate ProcessTicketOrderExternalizationEvent.cs in the Azure Functions folder.
|
||||
24. In Visual Studio, go to Solution Explorer, and locate ProcessTicketOrderExternalizationEvent.cs in the Azure Functions folder
|
||||
|
||||
![In Solution Explorer, under Azure Functions, ProcessTicketOrderExternalizationEvent.cs is circled.](images/Labs/image122.png "Solution Explorer")
|
||||
|
||||
25. Select all the code in that file (CTRL+A) and copy (CTRL+C) it.
|
||||
25. Select all the code in that file (CTRL+A) and copy (CTRL+C) it
|
||||
|
||||
26. Return to your function's page in the Azure portal, and replace the code in the run.csx block with the code you just copied from Visual Studio, and select Save. The run.csx code should now look like the following. Note: The ProcessOrdersExternalization function will enable you to process another order, and see that it is saved to the Orders collection of the Cosmos DB.
|
||||
|
||||
![Code that was copied from Visual Studio displays in the Run.csx block.](images/Labs/image123.png "Azure Portal, Run.csx block")
|
||||
|
||||
27. You will now create another function.
|
||||
27. You will now create another function
|
||||
|
||||
28. As before, select + next to Functions in the left-hand menu.
|
||||
28. As before, select + next to Functions in the side menu
|
||||
|
||||
![Under Function Apps, contosoeventsfn-SUFFIX is expanded, and under it, the + icon is circled.](images/Labs/image106.png "Function Apps Section")
|
||||
|
||||
29. In the Choose a template... screen that appears, locate the Queue trigger box, and select PowerShell.
|
||||
29. In the Choose a template... screen that appears, locate the Queue trigger box, and select PowerShell
|
||||
|
||||
![In the Choose a template screen, in the Queue trigger box, at the bottom, PowerShell is circled.](images/Labs/image124.png "Choose a template, Queue trigger ")
|
||||
|
||||
> **Note**: If the PowerShell option does not show, ensure that the Experimental Language Support is set to Enabled.
|
||||
> **Note**: If the PowerShell option does not show, ensure that the Experimental Language Support is set to Enabled
|
||||
|
||||
30. In the Queue trigger dialog, enter the following:
|
||||
|
||||
|
@ -909,7 +909,7 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
![Fields in the Queue Trigger dialog box are set to the previously defined settings.](images/Labs/image125.png "Queue Trigger dialog box")
|
||||
|
||||
31. Select Integrate under the new ProcessSimulationRequests function in the left-hand menu.
|
||||
31. Select Integrate under the new ProcessSimulationRequests function in the menu
|
||||
|
||||
![Under Functions, under ProcessSimulation Requests, Integrate is circled.](images/Labs/image126.png "Functions section")
|
||||
|
||||
|
@ -921,21 +921,21 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
r. Queue name: Leave as contosoevents-simulation-requests
|
||||
|
||||
s. Select Save.
|
||||
s. Select Save
|
||||
|
||||
![In the Integrate Window, under Triggers, Azure Queue Storage (triggerInput) is circled. Under Azure Queue Storage trigger, the Message parameter name field is set to simulationRequest.](images/Labs/image127.png "Integrate window")
|
||||
|
||||
33. Select the ProcessSimulationRequests function in the left-hand menu.
|
||||
33. Select the ProcessSimulationRequests function in the side menu
|
||||
|
||||
![Under Functions, ProcessSimulation Requests is circled.](images/Labs/image128.png "Functions section")
|
||||
|
||||
34. Return to Visual Studio, and open the ProcessTicketOrderSimulationRequest.ps1 file in the Azure Functions folder.
|
||||
34. Return to Visual Studio, and open the ProcessTicketOrderSimulationRequest.ps1 file in the Azure Functions folder
|
||||
|
||||
![In Solution Explorer, in the Azure Functions folder, ProcessTicketOrderSimulationRequest.ps1 is circled.](images/Labs/image129.png "Solution Explorer")
|
||||
|
||||
35. Copy all the contents of this file (CTRL+A, then CTRL+C), then return to your function page in the Azure portal, and paste the code into the run.ps1 code block.
|
||||
35. Copy all the contents of this file (CTRL+A, then CTRL+C), then return to your function page in the Azure portal, and paste the code into the run.ps1 code block
|
||||
|
||||
36. Select Save.
|
||||
36. Select Save
|
||||
|
||||
37. The final setting to update is the API Management key. You will return to set this up when you set up the API Management service.
|
||||
|
||||
|
@ -943,43 +943,43 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
In this task, you will test the ticket order processing back-end, to validate that orders are queued and processed by the ProcessOrderExternalizations function -- ultimately saving the order to the Orders collection of the Cosmos DB instance.
|
||||
|
||||
1. In the Azure Portal, navigate to the Function App.
|
||||
1. In the Azure Portal, navigate to the Function App
|
||||
|
||||
2. Select the ProcessOrderExternalizations function (may be listed as the default QueueTriggerCSharp1 name if you did not rename it), and select Logs at the bottom of the screen. Leave the window open with the Logs visible.
|
||||
2. Select the ProcessOrderExternalizations function (may be listed as the default QueueTriggerCSharp1 name if you did not rename it), and select Logs at the bottom of the screen. Leave the window open with the Logs visible
|
||||
|
||||
![At the bottom of the Run.csx block, the Logs button is circled.](images/Labs/image130.png "Azure Portal Run.csx block")
|
||||
|
||||
3. Repeat the steps to post an order via Swagger to the /api/orders endpoint (Task 4, Test configurations, Steps 2 -- 5).
|
||||
3. Repeat the steps to post an order via Swagger to the /api/orders endpoint (Task 4, Test configurations, Steps 2 -- 5)
|
||||
|
||||
4. As orders are processed, you will see activity in the function logs in the Azure portal.
|
||||
4. As orders are processed, you will see activity in the function logs in the Azure portal
|
||||
|
||||
![In the Azure Portal function log window, the order id of the function is circled.](images/Labs/image131.png "Azure Portal function logs")
|
||||
|
||||
5. Copy the order id of the function just processed. You will use this information below to verify the order was persisted to the Orders collection in Cosmos DB.
|
||||
|
||||
6. If logs are not appearing in this view, click the Monitor tab under the ProcessOrderExternalizations function, then select a log item that has an "id" parameter value passed to the function, as shown below:
|
||||
6. If logs are not appearing in this view, select the Monitor tab under the ProcessOrderExternalizations function, then select a log item that has an "id" parameter value passed to the function, as shown below:
|
||||
|
||||
![In the function apps pane, under Function, the ProcessOrderExternalizations ID parameter value is circled. under Logs, the same ID value is circled.](images/Labs/image132.png "Function apps pane")
|
||||
|
||||
> If when clicking the Monitor tab a request to configure Application Insights is displayed, click Switch to classic view.
|
||||
> If when selecting the Monitor tab a request to configure Application Insights is displayed, choose Switch to classic view.
|
||||
>
|
||||
> ![In the Monitor tab, the Switch to classic view is circled.](images/Labs/image132a.png "Monitor tab Application Insights request")
|
||||
|
||||
7. In the Azure portal, navigate to your Cosmos DB account, and from the top menu of the Overview blade, select Data Explorer.
|
||||
7. In the Azure portal, navigate to your Cosmos DB account, and from the top menu of the Overview blade, select Data Explorer
|
||||
|
||||
![In the Azure Cosmos DB account pane, the Data Explorer button is circled.](images/Labs/image133.png "Azure Cosmos DB account pane")
|
||||
|
||||
8. In Cosmos DB Data Explorer, select Orders under the TicketManager database, then select New SQL Query from the toolbar, and enter the following query into the Query 1 window, replacing the ID in red with the order id you copied above.
|
||||
8. In Cosmos DB Data Explorer, select Orders under the TicketManager database, then select New SQL Query from the toolbar, and enter the following query into the Query 1 window, replacing the ID in red with the order id you copied above
|
||||
|
||||
```
|
||||
SELECT * FROM c WHERE c.id = '56dab32a-4154-4ea5-befa-2eb324e142ee'
|
||||
```
|
||||
|
||||
9. Select Execute Query.
|
||||
9. Select Execute Query
|
||||
|
||||
![In the Azure Cosmos DB account pane, in the left column, Data Explorer is selected. In the center column, at the top, the New SQL Query button is circled. Under Collections, TicketManager is expanded, and Orders is circled. In the right column, on the Query 1 tab, in the Query 1 field, a callout points to an ID in red, and says, \"Replace with your order ID.\" in the Results pane at the bottom, the same order ID is circled. The Execute Query button is circled as well. ](images/Labs/image134.png "Azure Cosmos DB account pane")
|
||||
|
||||
10. If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB.
|
||||
10. If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB
|
||||
|
||||
## Exercise 4: Publish the Service Fabric Application
|
||||
|
||||
|
@ -995,9 +995,9 @@ In this task, you will deploy the application to a hosted Service Fabric Cluster
|
|||
|
||||
![In the Solution Explorer window, the following path is expanded: Service Fabric\\ContosoEventsApp\\ApplicationParameters. Under ApplicationParameters, Cloud.xml is circled.](images/Labs/image135.png "Solution Explorer window")
|
||||
|
||||
2. Open Local.1Node.XML from the same folder.
|
||||
2. Open Local.1Node.XML from the same folder
|
||||
|
||||
3. To make sure you are using the same parameters you setup earlier for the Local cluster, copy just the following parameters from Local.1Node.xml to Cloud.xml, overwriting the existing parameters in Cloud.xml, then save Cloud.xml.
|
||||
3. To make sure you are using the same parameters you setup earlier for the Local cluster, copy just the following parameters from Local.1Node.xml to Cloud.xml, overwriting the existing parameters in Cloud.xml, then save Cloud.xml
|
||||
|
||||
```
|
||||
<Parameter Name="DataStorageEndpointUri" Value="" />
|
||||
|
@ -1012,11 +1012,11 @@ In this task, you will deploy the application to a hosted Service Fabric Cluster
|
|||
<Parameter Name="SimulationQueueName" Value="contosoevents-simulation-requests" />
|
||||
```
|
||||
|
||||
4. Review the settings related specifically to cloud publishing.
|
||||
4. Review the settings related specifically to cloud publishing
|
||||
|
||||
5. In Cloud.xml, verify the WebAPi\_InstanceCount parameter is set to -1. This instructs the cluster to create as many instances of the Web API as there are nodes in the cluster.
|
||||
|
||||
6. In Cloud.xml, verify the TicketOrderService\_PartitionCount parameter is set to 5.
|
||||
6. In Cloud.xml, verify the TicketOrderService\_PartitionCount parameter is set to 5
|
||||
|
||||
```
|
||||
<Parameter Name="TicketOrderService_PartitionCount" Value="5" />
|
||||
|
@ -1027,17 +1027,17 @@ In this task, you will deploy the application to a hosted Service Fabric Cluster
|
|||
<Parameter Name="EventActorService_PartitionCount" Value="1" />
|
||||
```
|
||||
|
||||
7. From Solution Explorer, right-click the ContosoEventsApp project and select Publish.
|
||||
7. From Solution Explorer, right-click the ContosoEventsApp project and select Publish
|
||||
|
||||
8. In the Publish Service Fabric Application dialog, set the Target profile to Cloud.xml, and select your Service Fabric Cluster endpoint from the Connection Endpoint drop down, then select Publish.
|
||||
8. In the Publish Service Fabric Application dialog, set the Target profile to Cloud.xml, and select your Service Fabric Cluster endpoint from the Connection Endpoint drop down, then select Publish
|
||||
|
||||
![In the Publish Service Fabric Application dialog box, the Target profile, which is circled, is set to PublishProfiles\\Cloud.xml. The Connection Endpoint also is circled, and is set to contosoeventssf-SUFFIX.westus2.cloudapp.azure.com:19000. StoreLocation and StoreName are also circled.](images/Labs/image136.png "Publish Service Fabric Application dialog box")
|
||||
|
||||
> Ensure that StoreLocation is LocalMachine and StoreName is My.
|
||||
> Ensure that StoreLocation is LocalMachine and StoreName is My
|
||||
|
||||
9. Publishing to the hosted Service Fabric Cluster takes about 5 minutes. It follows the same steps as a local publish step with an alternate configuration. The Visual Studio output window keeps you updated of progress.
|
||||
|
||||
10. From the Visual Studio output window, validate that the deployment has completed successfully before moving on to the next task.
|
||||
10. From the Visual Studio output window, validate that the deployment has completed successfully before moving on to the next task
|
||||
|
||||
### Task 2: Test an order from the cluster
|
||||
|
||||
|
@ -1049,11 +1049,11 @@ In this task, you will test an order against your application deployed to the ho
|
|||
>
|
||||
> <http://contosoeventssf-SUFFIX.eastus.cloudapp.azure.com:8082/swagger/ui/index>
|
||||
|
||||
2. Expand the Orders API and expand the POST method of the /api/orders endpoint.
|
||||
2. Expand the Orders API and expand the POST method of the /api/orders endpoint
|
||||
|
||||
![On the Swagger Endpoint webpage for ContosoEvents.WebApi, Orders is circled. Under Orders, the POST method for api/orders is expanded, and the order field, which currently is empty, is circled.](images/Labs/image137.png "Swagger Endpoint webpage")
|
||||
|
||||
3. Copy the JSON below, and paste it into the order field, highlighted in the screen shot above, then select Try it out.
|
||||
3. Copy the JSON below, and paste it into the order field, highlighted in the screen shot above, then select Try it out
|
||||
|
||||
```
|
||||
{
|
||||
|
@ -1072,9 +1072,9 @@ In this task, you will test an order against your application deployed to the ho
|
|||
|
||||
![In the Try it out section, the Response Body and unique order ID is circled, as is the Response Code (200).](images/Labs/image139.png "Try it out section")
|
||||
|
||||
5. Verify that the order was persisted to the Orders collection.
|
||||
5. Verify that the order was persisted to the Orders collection
|
||||
|
||||
6. In the Azure portal, navigate to your Cosmos DB account.
|
||||
6. In the Azure portal, navigate to your Cosmos DB account
|
||||
|
||||
7. Perform a query against the Orders collection, as you did previously, to verify the order exists in the collection. Replace the id in the query with the order id you copied from the Response Body above.
|
||||
|
||||
|
@ -1090,35 +1090,35 @@ In this exercise, you will configure the API Management service in the Azure por
|
|||
|
||||
In this task, you will import the Web API description to your API Management service to create an endpoint.
|
||||
|
||||
1. In the Azure portal, navigate to the hands-on-labs resource group, and select your API Management Service from the list of resources.
|
||||
1. In the Azure portal, navigate to the hands-on-labs resource group, and select your API Management Service from the list of resources
|
||||
|
||||
![In the Resource group list of resources, the contosoevents-SUFFIX API Management service is circled.](images/Labs/image141.png "Resource group list of resources")
|
||||
|
||||
2. In the API Management blade, select APIs under Api Management.
|
||||
2. In the API Management blade, select APIs under Api Management
|
||||
|
||||
![In the API Management blade, on the left, under Api Management, APIs is circled.](images/Labs//image142.png "API Management blade")
|
||||
|
||||
3. In the APIs blade, select OpenAPI specification.
|
||||
3. In the APIs blade, select OpenAPI specification
|
||||
|
||||
![In the APIs blade, OpenAPI specification is circled.](images/Labs//image143.png "APIs blade")
|
||||
|
||||
4. Return to your Swagger browser window, and copy the URL from the textbox at the top of the screen, next to the Swagger logo, as shown in the screen shot below.
|
||||
4. Return to your Swagger browser window, and copy the URL from the textbox at the top of the screen, next to the Swagger logo, as shown in the screen shot below
|
||||
|
||||
![In the Swagger browser window, the URL is circled.](images/Labs/image144.png "Swagger browser window")
|
||||
|
||||
5. Return to the Create from OpenAPI specification window, and do the following:
|
||||
|
||||
a. Paste the URL copied from Swagger into the OpenAPI specification textbox.
|
||||
a. Paste the URL copied from Swagger into the OpenAPI specification textbox
|
||||
|
||||
b. Select HTTPs as the URL scheme.
|
||||
b. Select HTTPs as the URL scheme
|
||||
|
||||
c. Enter events in the API URL suffix textbox.
|
||||
c. Enter events in the API URL suffix textbox
|
||||
|
||||
d. Note the URL under "Base URL". You will use this URL in your website configuration in the next exercise.
|
||||
|
||||
e. Select Unlimited in the Products.
|
||||
e. Select Unlimited in the Products
|
||||
|
||||
f. Select Create.
|
||||
f. Select Create
|
||||
|
||||
![On the Create from OpenAPI specification window, fields are set to previously defined settings and Base URL is circled.](images/Labs/image145.png "Create from OpenAPI specification")
|
||||
|
||||
|
@ -1140,37 +1140,37 @@ In this task, you will retrieve the subscription key for the client applications
|
|||
|
||||
![In the API Management service pane, on the toolbar, the Developer portal button is circled.](images/Labs/image147.png "API Management service")
|
||||
|
||||
2. In the Developer portal, expand the Administrator menu, and then select Profile.
|
||||
2. In the Developer portal, expand the Administrator menu, and then select Profile
|
||||
|
||||
![In the Contoso Events API Developer portal, the down-arrow next to Administrator is circled, and in its drop-down menu, Profile is circled.](images/Labs/image148.png "Developer portal")
|
||||
|
||||
3. Select Show for the Primary Key of the Unlimited subscription to reveal it.
|
||||
3. Select Show for the Primary Key of the Unlimited subscription to reveal it
|
||||
|
||||
![In the Your Subscriptions section, for the Unlimited (default) subscription\'s Primary key, the Show button is circled.](images/Labs/image149.png "Your Subscriptions section")
|
||||
|
||||
4. Save this key for next steps.
|
||||
4. Save this key for next steps
|
||||
|
||||
![The Unlimited (default) subscription\'s Primary key now displays, and is circled.](images/Labs/image150.png "Unlimited subscription's Primary key")
|
||||
|
||||
5. You now have the API Management application key you will need to configure the Function App settings.
|
||||
5. You now have the API Management application key you will need to configure the Function App settings
|
||||
|
||||
### Task 3: Configure the Function App with the API Management key
|
||||
|
||||
In this task, you will provide the API Management key in a setting for the Function App, so it can reach the Web API through the API Management service.
|
||||
|
||||
1. From the Azure Portal, browse to the Function App.
|
||||
1. From the Azure Portal, browse to the Function App
|
||||
|
||||
2. You will create an Application setting for the function to provide it with the API Management consumer key.
|
||||
2. You will create an Application setting for the function to provide it with the API Management consumer key
|
||||
|
||||
3. Select your Function App in the left-hand menu, then select Application settings under Configured features.
|
||||
3. Select your Function App in the side menu, then select Application settings under Configured features
|
||||
|
||||
![In the Function Apps pane, on the left under Function Apps, contosoeventsfn-SUFFIX is circled. On the right under Configured features, Application settings is circled.](images/Labs/image103.png "Function Apps")
|
||||
|
||||
4. Scroll down to the Application settings section, select +Add new setting, and enter contosoeventsapimgrkey into the name field, and paste the API key you copied from the Developer portal above into the value field.
|
||||
4. Scroll down to the Application settings section, select +Add new setting, and enter contosoeventsapimgrkey into the name field, and paste the API key you copied from the Developer portal above into the value field
|
||||
|
||||
![In the Application settings section, in the name field displays contosoeventsapimgrkey, and the copied API key displays in the value field. At the bottom, the + Add new setting button is circled.](images/Labs/image151.png "Application settings section")
|
||||
|
||||
5. Scroll back to the top of the Application Settings tab, and select Save to apply the change.
|
||||
5. Scroll back to the top of the Application Settings tab, and select Save to apply the change
|
||||
|
||||
![Screenshot of the Save button.](images/Labs/image105.png "Save button")
|
||||
|
||||
|
@ -1193,13 +1193,13 @@ In this task, you will update configuration settings to communicate with the API
|
|||
|
||||
![In Solution Explorer, the following folders are expanded: Web\\ContosoEvents.Web\\Web.config.](images/Labs/image152.png "Solution Explorer")
|
||||
|
||||
2. For the apimng:BaseUrl key, enter the base URL of the API you created in the API Management Publisher Portal (Exercise 5, Task 1, Step 5), such as <http://contosoeventsSUFFIX.azure-api.net/events/>.
|
||||
2. For the apimng:BaseUrl key, enter the base URL of the API you created in the API Management Publisher Portal (Exercise 5, Task 1, Step 5), such as <http://contosoeventsSUFFIX.azure-api.net/events/>
|
||||
|
||||
> **Note**: Make sure to include a trailing "/" or the exercise will not work.
|
||||
> **Note**: Make sure to include a trailing "/" or the exercise will not work
|
||||
|
||||
3. For the apimng:SubscriptionKey key, enter the subscription key you revealed in API Management developer portal (Exercise 5, Task 2, Step 4).
|
||||
3. For the apimng:SubscriptionKey key, enter the subscription key you revealed in API Management developer portal (Exercise 5, Task 2, Step 4)
|
||||
|
||||
4. Save Web.config. You should have values for two of the API Management app settings.
|
||||
4. Save Web.config. You should have values for two of the API Management app settings
|
||||
|
||||
![In Web.config, two values (one a URL, the other a subscription key), display.](images/Labs/image153.png "Web.config")
|
||||
|
||||
|
@ -1207,53 +1207,53 @@ In this task, you will update configuration settings to communicate with the API
|
|||
|
||||
In this task, you will test the web application calls to API Management by creating an order through the UI.
|
||||
|
||||
1. Using Solution Explorer in Visual Studio, expand the Web folder, then right-click the ContosoEvents.Web project, select Debug, and then Start new instance.
|
||||
1. Using Solution Explorer in Visual Studio, expand the Web folder, then right-click the ContosoEvents.Web project, select Debug, and then Start new instance
|
||||
|
||||
![In Solution Explorer, ContosoEvents.Web is circled, and its right-click menu displays.](images/Labs/image154.png "Solution Explorer")
|
||||
|
||||
2. If prompted about whether you would like to trust the IIS Express SSL certificate, select Yes, then select Yes again at the Security Warning prompt.
|
||||
2. If prompted about whether you would like to trust the IIS Express SSL certificate, select Yes, then select Yes again at the Security Warning prompt
|
||||
|
||||
![A Microsoft Visual Studio warning message displays, asking if you trust the IIS Express SSL certificate.](images/Labs/image155.png "Microsoft Visual Studio warning message")
|
||||
|
||||
3. If you receive a warning in the browser that "Your connection is not private," select Advanced.
|
||||
3. If you receive a warning in the browser that "Your connection is not private," select Advanced
|
||||
|
||||
![On the Your connection is not private warning, the Advanced button is circled.](images/Labs/image156.png "Your connection is not private warning")
|
||||
|
||||
4. Under Advanced, select Proceed to localhost (unsafe).
|
||||
4. Under Advanced, select Proceed to localhost (unsafe)
|
||||
|
||||
![The Advanced warning displays once you click the Advanced button. It explains that the server culd not prove that it is localhost, and its security certificate does not specify SANs. At the bottom, the Proceed to localhost (unsafe) button is circled.](images/Labs/image157.png "Advanced section")
|
||||
![The Advanced warning displays once you select the Advanced button. It explains that the server culd not prove that it is localhost, and its security certificate does not specify SANs. At the bottom, the Proceed to localhost (unsafe) button is circled.](images/Labs/image157.png "Advanced section")
|
||||
|
||||
5. When the application launches you will see the website home page as shown in the following screen shot.
|
||||
5. When the application launches you will see the website home page as shown in the following screen shot
|
||||
|
||||
![The Contoso Events website displays, with information about the Seattle Rock and Rollers concert tickets. At the bottom of the page is the Order tickets now button.](images/Labs/image158.png "Contoso Events website")
|
||||
|
||||
6. Note the event presented on the home page has an Order Tickets Now button. Click that to place an order.
|
||||
6. Note the event presented on the home page has an Order Tickets Now button. Select that to place an order.
|
||||
|
||||
7. Choose the number of tickets for the order, and then scroll down to see the billing fields.
|
||||
7. Choose the number of tickets for the order, and then scroll down to see the billing fields
|
||||
|
||||
![The ticket ordering page for the Seattle Rock and Rollers concert displays. Information includes date, time, and price per ticket. Under Order, a drop-down list lets users choose the number of tickets to purchase.](images/Labs/image159.png "Ticket Ordering page")
|
||||
|
||||
8. Enter values into the empty fields for your email, first name, last name, and Cardholder name.
|
||||
8. Enter values into the empty fields for your email, first name, last name, and Cardholder name
|
||||
|
||||
![On the Billing page, on the left under Billing, the Email, First name, and Last name fields are circled. On the right under Credit Card, the Cardholder Name field is circled, as is the Place Order button at the bottom. ](images/Labs/image160.png "Billing information page")
|
||||
![On the Billing page, on the left under Billing, the Email, First name, and Last name fields are circled. Under Credit Card, the Cardholder Name field is circled, as is the Place Order button at the bottom. ](images/Labs/image160.png "Billing information page")
|
||||
|
||||
9. Select Place Order.
|
||||
9. Select Place Order
|
||||
|
||||
10. Once the order is queued for processing, you will be redirected to a results page as shown in the following screen shot. It should indicate Success and show you the order id that was queued as confirmation.
|
||||
|
||||
![The Results page says Success, and includes an Order ID number.](images/Labs/image161.png "Results page")
|
||||
|
||||
11. Close the web browser to stop debugging the application.
|
||||
11. Close the web browser to stop debugging the application
|
||||
|
||||
### Task 3: Publish the web app
|
||||
|
||||
In this task, you will publish the web application to Azure.
|
||||
|
||||
1. From the Visual Studio Solution Explorer, right-click ContosoEvents.Web, and select Publish.
|
||||
1. From the Visual Studio Solution Explorer, right-click ContosoEvents.Web, and select Publish
|
||||
|
||||
![In Solution Explorer, on the right-click menu for ContosoEvents.Web, Publish is circled.](images/Labs/image162.png "Solution Explorer")
|
||||
|
||||
2. Select the App Service option, choose Select Existing, then select Publish.
|
||||
2. Select the App Service option, choose Select Existing, then select Publish
|
||||
|
||||
![Under Publish, the Microsoft Azure App Service tile is circled. Under this tile, the radio button is selected for Select Existing, and is circled. At the bottom, the Publish button is circled.](images/Labs/image163.png "Publish section")
|
||||
|
||||
|
@ -1263,7 +1263,7 @@ In this task, you will publish the web application to Azure.
|
|||
|
||||
![In the App Service window, in the Resource group pane, the hands-on-labs folder is expanded, and contosoeventsweb-SUFFIX is selected. At the bottom of the window, the OK button is circled.](images/Labs/image164.png "App Service window")
|
||||
|
||||
5. If the Publish does not start automatically, select Publish next to the Web Deploy publishing profile.
|
||||
5. If the Publish does not start automatically, select Publish next to the Web Deploy publishing profile
|
||||
|
||||
![In the Publish section, the Publish button is circled.](images/Labs/image165.png "Publish section")
|
||||
|
||||
|
@ -1295,7 +1295,7 @@ If you set the upgrade mode to Monitored, Service Fabric will be in full control
|
|||
|
||||
Currently, the TicketOrderActor does not have a status property to make it easier to check on the actor order status quickly. In this task, you will modify the Ticket Order State model to add a new status property.
|
||||
|
||||
1. In Visual Studio on the Lab VM, open TicketOrder.cs in the ContosoEvents.Models project, under the Common folder.
|
||||
1. In Visual Studio on the Lab VM, open TicketOrder.cs in the ContosoEvents.Models project, under the Common folder
|
||||
|
||||
![In Solution Explorer, under Common, under ContosoEvents.Models, TicketOrder.cs is circled.](images/Labs/image167.png "Solution Explorer")
|
||||
|
||||
|
@ -1321,9 +1321,9 @@ Currently, the TicketOrderActor does not have a status property to make it easie
|
|||
}
|
||||
```
|
||||
|
||||
4. Save TicketOrder.cs.
|
||||
4. Save TicketOrder.cs
|
||||
|
||||
5. From Solution Explorer, open TicketOrderActor.cs in the ContosoEvents.TicketOrderActor project, under the Service Fabric folder.
|
||||
5. From Solution Explorer, open TicketOrderActor.cs in the ContosoEvents.TicketOrderActor project, under the Service Fabric folder
|
||||
|
||||
6. Edit the TicketOrderActor to add the new order status. Uncomment all TODO: Exercise 6 -- Task 1. The change will uncomment several lines that set the new Status field to one of the OrderStatuses enumeration values. Be sure to find all of the following comments (there are 6 total):
|
||||
|
||||
|
@ -1342,19 +1342,19 @@ Currently, the TicketOrderActor does not have a status property to make it easie
|
|||
state.Status = OrderStatuses.Cancelled;
|
||||
```
|
||||
|
||||
7. Save TicketOrderActor.cs.
|
||||
7. Save TicketOrderActor.cs
|
||||
|
||||
8. After adding this field, the actor will now save it with each ticket order.
|
||||
8. After adding this field, the actor will now save it with each ticket order
|
||||
|
||||
9. After making this change, rebuild the solution (Build menu, Rebuild solution), and verify that there are no errors.
|
||||
9. After making this change, rebuild the solution (Build menu, Rebuild solution), and verify that there are no errors
|
||||
|
||||
### Task 3: Perform a smooth upgrade
|
||||
|
||||
In this task, you will configure settings for the Service Fabric application to perform an upgrade.
|
||||
|
||||
1. From the Visual Studio Solution Explorer, expand the Service Fabric folder, then right-click ContosoEventsApp, and select Publish.
|
||||
1. From the Visual Studio Solution Explorer, expand the Service Fabric folder, then right-click ContosoEventsApp, and select Publish
|
||||
|
||||
2. In the Public Service Fabric Application dialog, select PublishProfiles\\Cloud.xml for the target profile, and check Upgrade the Application.
|
||||
2. In the Public Service Fabric Application dialog, select PublishProfiles\\Cloud.xml for the target profile, and check Upgrade the Application
|
||||
|
||||
![In the Public Service Fabric Application dialog box, in the Target profile field, PublishProfiles\\Cloud.xml is circled. The checkbox for Upgrade the Application is selected and circled.](images/Labs/image168.png "Public Service Fabric Application dialog box")
|
||||
|
||||
|
@ -1362,17 +1362,17 @@ In this task, you will configure settings for the Service Fabric application to
|
|||
|
||||
![In the Edit Upgrade Settings dialog box, the Upgrade mode is set to Monitored, and is circled.](images/Labs/image169.png "Edit Upgrade Settings dialog box")
|
||||
|
||||
4. From the Publish Service Fabric Application dialog, select Manifest Versions.
|
||||
4. From the Publish Service Fabric Application dialog, select Manifest Versions
|
||||
|
||||
5. Change the TicketOrderActorPkg\\Code New Version to 1.1.0. This change will force the actor package and the app to change to 1.1.0 as well.
|
||||
|
||||
![In the Edit Versions dialog box, in the Application and Services section, ContosoEventsAppyType is expanded. Under that, ContosoEvents.TicketOrderActorPkg is expanded. Under that, the Code line is circled which shows that the current Code version is 1.0.0, and the new version is 1.1.0.](images/Labs/image170.png "Edit Versions dialog box")
|
||||
|
||||
6. Select Save.
|
||||
6. Select Save
|
||||
|
||||
7. Now that the upgrade configuration is set, select Publish.
|
||||
7. Now that the upgrade configuration is set, select Publish
|
||||
|
||||
8. Observe the Visual Studio Output window going through the upgrade process, which can take 5 minutes or more.
|
||||
8. Observe the Visual Studio Output window going through the upgrade process, which can take 5 minutes or more
|
||||
|
||||
![The Visual Studio Output window shows that the Upgrade completed successfully.](images/Labs/image171.png "Visual Studio Output window")
|
||||
|
||||
|
@ -1380,11 +1380,11 @@ In this task, you will configure settings for the Service Fabric application to
|
|||
|
||||
![In the Service Fabric cluster pane, on the top menu, the Explorer button is circled, as is the Service Fabric Explorer URL at the bottom.](images/Labs/image172.png "Service Fabric cluster pane")
|
||||
|
||||
10. It will show the app being upgraded one upgrade domain at a time.
|
||||
10. It will show the app being upgraded one upgrade domain at a time
|
||||
|
||||
![In the Service Fabric Explorer window, a callout arrow points to the Status, which is set to Upgrading. Under Upgrade in progress, the Current Version (1.0.0) and the Target Version (1.1.0) are circled.](images/Labs/image173.png "Service Fabric Explorer window")
|
||||
|
||||
11. When the upgrade is complete, from Service Fabric Explorer observe the new application version number.
|
||||
11. When the upgrade is complete, from Service Fabric Explorer observe the new application version number
|
||||
|
||||
![In the Service Fabric Explorer window, The Application Type (ContosoEventsAppType) and Version (1.1.0) are circled. Under Services, the Version numbers are circled for the listed services.](images/Labs/image174.png "Service Fabric Explorer window")
|
||||
|
||||
|
@ -1410,15 +1410,15 @@ Now that the upgrade is completed successfully, you will submit a new order, and
|
|||
|
||||
![In the POST method for api/orders section, the order field now contains the previous JSON. At the bottom, the Try it out button is circled.](images/Labs/image175.png "POST /api/orders section")
|
||||
|
||||
4. Once you get back a 200 response code, the order id will be returned in the Response Body.
|
||||
4. Once you get back a 200 response code, the order id will be returned in the Response Body
|
||||
|
||||
![In the Try it out section, the Response Body unique order ID is circled.](images/Labs/image176.png "Try it out section")
|
||||
|
||||
5. In the Azure portal, navigate to your Cosmos DB account.
|
||||
5. In the Azure portal, navigate to your Cosmos DB account
|
||||
|
||||
6. Go to Cosmos DB Data Explorer, and query for the order id to see the new extended state actually persisted to the database, as you did in Exercise 3, Task 6, Steps 7-9.
|
||||
6. Go to Cosmos DB Data Explorer, and query for the order id to see the new extended state actually persisted to the database, as you did in Exercise 3, Task 6, Steps 7-9
|
||||
|
||||
![In the Azure Cosmos DB account, on the top menu, the New SQL Query button is circled. In the left column, under Collections,TicketManager is expanded, and Orders is circled. In the right column, on the Query 1 tab, in the Query 1 field, an ID in red is circled. In the Results pane at the bottom, the same order ID is circled. The Execute Query button is circled as well. ](images/Labs/image177.png "Azure Cosmos DB account")
|
||||
![In the Azure Cosmos DB account, on the top menu, the New SQL Query button is circled. In the left column, under Collections,TicketManager is expanded, and Orders is circled. In one column, on the Query 1 tab, in the Query 1 field, an ID in red is circled. In the Results pane at the bottom, the same order ID is circled. The Execute Query button is circled as well. ](images/Labs/image177.png "Azure Cosmos DB account")
|
||||
|
||||
## After the hands-on lab
|
||||
|
||||
|
@ -1428,8 +1428,8 @@ In this exercise, attendees will deprovision any Azure resources that were creat
|
|||
|
||||
### Task 1: Delete the resource group
|
||||
|
||||
1. Using the Azure portal, navigate to the Resource group you used throughout this hands-on lab by selecting Resource groups in the left menu.
|
||||
1. Using the Azure portal, navigate to the Resource group you used throughout this hands-on lab by selecting Resource groups in the side menu
|
||||
|
||||
2. Search for the name of your research group, and select it from the list.
|
||||
2. Search for the name of your research group, and select it from the list
|
||||
|
||||
3. Select Delete in the command bar, and confirm the deletion by re-typing the Resource group name, and selecting Delete.
|
||||
3. Select Delete in the command bar, and confirm the deletion by re-typing the Resource group name, and selecting Delete
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -160,9 +160,9 @@ The following figures are intended to help you keep track of all the technologie
|
|||
|
||||
## Requirements
|
||||
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN.
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN
|
||||
|
||||
a. Trial subscriptions will not work.
|
||||
a. Trial subscriptions will not work
|
||||
|
||||
2. A virtual machine configured with (see Before the hands-on lab):
|
||||
|
||||
|
@ -192,15 +192,15 @@ Because this is a "born in Azure" solution, it depends on many Azure resources.
|
|||
|
||||
1. On your Lab VM, download the starter project from <http://bit.ly/2JO4yIB>. (Note: the URL is case sensitive, so you may need to copy and paste it into your browser's address bar.)
|
||||
|
||||
2. Unzip the contents to the folder C:\\handsonlab.
|
||||
2. Unzip the contents to the folder C:\\handsonlab
|
||||
|
||||
3. Open the ContosoEventsPoc.sln with Visual Studio.
|
||||
3. Open the ContosoEventsPoc.sln with Visual Studio
|
||||
|
||||
4. Before you compile the solution, set the configuration to x64.
|
||||
4. Before you compile the solution, set the configuration to x64
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You cannot successfully build the solution.
|
||||
- You cannot successfully build the solution
|
||||
|
||||
> **Note**: If you have the prerequisites on your VM, this solution should open without requesting additional software to be installed. You should have some compile-time errors at this point. These are expected, and will be fixed as you proceed with the hands-on lab.
|
||||
|
||||
|
@ -218,13 +218,13 @@ In this task, you will provision an API Management Service in the Azure portal.
|
|||
|
||||
### Task 3: Web App
|
||||
|
||||
In these steps, you will provision a Web App in a new App Service Plan.
|
||||
In these steps, you will provision a Web App in a new App Service Plan
|
||||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Provision a web app to host the website. Create an App Service Plan in the Resource Group and region you used previously. Name the Web App something like 'contosoeventsweb-SUFFIX'.
|
||||
|
||||
2. Select pricing tier S1 Standard.
|
||||
2. Select pricing tier S1 Standard
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -238,11 +238,11 @@ In this task, you will provision a Function App using a Consumption Plan. By usi
|
|||
|
||||
1. Provision a Function App to host the functions in the Visual Studio solution, in a Consumption Plan. Create a new Resource Group with a name similar to your main Resource Group such as 'contosoeventsfn-SUFFIX'.
|
||||
|
||||
2. Name the App something like 'contosoeventsfn-SUFFIX'.
|
||||
2. Name the App something like 'contosoeventsfn-SUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- When the provisioning completes, your Web App and Function App are listed in the Azure Portal.
|
||||
- When the provisioning completes, your Web App and Function App are listed in the Azure Portal
|
||||
|
||||
### Task 5: Storage account
|
||||
|
||||
|
@ -250,13 +250,13 @@ In this section, you will create a Storage account for the application to create
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Provision a Resource Manager based Storage account of type Standard LRS in the same Location and Resource Group as your other services.
|
||||
1. Provision a Resource Manager based Storage account of type Standard LRS in the same Location and Resource Group as your other services
|
||||
|
||||
2. Name it something like 'contosoeventsSUFFIX'.
|
||||
2. Name it something like 'contosoeventsSUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- After provisioning is complete, the Storage account will be listed in the Azure Portal.
|
||||
- After provisioning is complete, the Storage account will be listed in the Azure Portal
|
||||
|
||||
### Task 6: Cosmos DB
|
||||
|
||||
|
@ -266,13 +266,13 @@ In this section, you will provision a Cosmos DB account, a Cosmos DB Database an
|
|||
|
||||
1. Provision a new Cosmos DB account in the same region and Resource Group as your other services. Use the name 'contosoeventsdocdb-SUFFIX'.
|
||||
|
||||
2. Add a database with ID 'TicketManager'.
|
||||
2. Add a database with ID 'TicketManager'
|
||||
|
||||
3. Add two collections named 'Orders' and 'Events'.
|
||||
3. Add two collections named 'Orders' and 'Events'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will be able to see the two collections in the new database.
|
||||
- You will be able to see the two collections in the new database
|
||||
|
||||
## Exercise 2: Implementing the Service Fabric solution
|
||||
|
||||
|
@ -282,7 +282,7 @@ The agreed upon design with Contoso Events involves queuing ticket orders, and e
|
|||
|
||||
The design also calls for saving the state of the ticket order to a Cosmos DB collection for ad hoc queries. This exercise will guide you through adding configurations that will light up the actor code that externalizes its state to a storage queue. In addition, you will set up the Function App to read from the queue, and persist the order to the Orders collection of the Cosmos DB instance you created.
|
||||
|
||||
> Note: The code to write to the storage queue is already in place within the actor, so setting up configuration keys is the only requirement to lighting up that feature.
|
||||
> Note: The code to write to the storage queue is already in place within the actor, so setting up configuration keys is the only requirement to lighting up that feature
|
||||
|
||||
![The Ticket Ordering flowchart starts with Web API (Stateless Service). An arrow points to Ticket Order Service (Stateful Service), then to Ticket Order Actor (Processor). These three items make up the Contoso Events Service Fabric App. From Ticket Order Actor, an arrow points to Order Externalization (Queue). The next step is Process Order Externalization (Azure Function), and ends with Cosmos DB (Orders Collection).](images/Labs/image67.png "Ticket Ordering flowchart")
|
||||
|
||||
|
@ -292,17 +292,17 @@ In this task, you will write code to process the cancellation of an order by int
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. With the ContosoEventsPoC solution open in Visual Studio, using Solution Explorer navigate to TicketOrderActor.cs underneath the ContosoEvents.TicketOrderActor project.
|
||||
1. With the ContosoEventsPoC solution open in Visual Studio, using Solution Explorer navigate to TicketOrderActor.cs underneath the ContosoEvents.TicketOrderActor project
|
||||
|
||||
2. Locate the CancelOrder method.
|
||||
2. Locate the CancelOrder method
|
||||
|
||||
3. Locate and complete the lines commented with //TODO: Task 1.1 to //TODO: Task 1.5
|
||||
|
||||
4. Save TicketOrderActor.cs.
|
||||
4. Save TicketOrderActor.cs
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- All TODOs in TicketOrderActor.cs should be addressed.
|
||||
- All TODOs in TicketOrderActor.cs should be addressed
|
||||
|
||||
### Task 2: Interacting with a Stateful Service
|
||||
|
||||
|
@ -310,13 +310,13 @@ In this task, you will write code to enqueue an order to the Ticket Order Statef
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Using Solution Explorer navigate to TicketOrderService.cs underneath the ContosoEvents.TicketOrderService project.
|
||||
1. Using Solution Explorer navigate to TicketOrderService.cs underneath the ContosoEvents.TicketOrderService project
|
||||
|
||||
2. Locate the EnqueueOrder method.
|
||||
2. Locate the EnqueueOrder method
|
||||
|
||||
3. Locate and complete the lines commented with //TODO: Task 2.1 to //TODO: Task 2.4
|
||||
|
||||
4. Save TicketOrderService.cs.
|
||||
4. Save TicketOrderService.cs
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -328,13 +328,13 @@ In this task, you will write code that runs within the Orders Web API controller
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Using Solution Explorer navigate to TicketOrderService.cs underneath the Controllers folder in the ContosoEvents.WebApi project.
|
||||
1. Using Solution Explorer navigate to TicketOrderService.cs underneath the Controllers folder in the ContosoEvents.WebApi project
|
||||
|
||||
2. Locate the CancelOrder method.
|
||||
2. Locate the CancelOrder method
|
||||
|
||||
3. Locate and complete the lines commented with //TODO: Task 3.1 to //TODO: Task 3.3
|
||||
|
||||
4. Save TicketOrderService.cs.
|
||||
4. Save TicketOrderService.cs
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -346,13 +346,13 @@ In this task, you will write code that runs within the Admin Web API controller
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Using Solution Explorer navigate to AdminControllers.cs underneath the Controllers folder in the ContosoEvents.WebApi project.
|
||||
1. Using Solution Explorer navigate to AdminControllers.cs underneath the Controllers folder in the ContosoEvents.WebApi project
|
||||
|
||||
2. Locate the GetTicketOrderPartitions method.
|
||||
2. Locate the GetTicketOrderPartitions method
|
||||
|
||||
3. Locate and complete the lines commented with //TODO: Task 4.1 to //TODO: Task 4.2
|
||||
|
||||
4. Save AdminControllers.cs.
|
||||
4. Save AdminControllers.cs
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -374,7 +374,7 @@ Note: Not all features are in place, but you will be able to see that the applic
|
|||
|
||||
1. First, make sure the local Service Fabric environment is running. If not, set up the local cluster.
|
||||
|
||||
2. From Visual Studio, compile the solution and publish ContosoEventsApp to the local Service Fabric cluster.
|
||||
2. From Visual Studio, compile the solution and publish ContosoEventsApp to the local Service Fabric cluster
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -392,7 +392,7 @@ The Service Fabric Application includes a front-end Web API as the public-facing
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- If you were able to view the Swagger definition and select the partitions method with a successful response, your environment is in a good state to continue.
|
||||
- If you were able to view the Swagger definition and select the partitions method with a successful response, your environment is in a good state to continue
|
||||
|
||||
### Task 3: Service Fabric Explorer
|
||||
|
||||
|
@ -402,11 +402,11 @@ In this task, you will browse to the Service Fabric Explorer, and view the local
|
|||
|
||||
1. Browse to the Service Fabric Explorer for the local cluster at: <http://localhost:19080/Explorer/index.html>
|
||||
|
||||
2. Observe the services deployed with the application.
|
||||
2. Observe the services deployed with the application
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- If you are able to access the Service Fabric Explorer, your environment is in a good state to continue.
|
||||
- If you are able to access the Service Fabric Explorer, your environment is in a good state to continue
|
||||
|
||||
### Task 4: Set up the Ticket Order Sync queue
|
||||
|
||||
|
@ -422,9 +422,9 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
<Parameter Name="StorageConnectionString" Value="" />
|
||||
```
|
||||
|
||||
2. Set DataStorageEndpointUri to the Cosmos DB endpoint Uri.
|
||||
2. Set DataStorageEndpointUri to the Cosmos DB endpoint Uri
|
||||
|
||||
3. Set DataStoragePrimaryKey to the Cosmos DB Primary Key.
|
||||
3. Set DataStoragePrimaryKey to the Cosmos DB Primary Key
|
||||
|
||||
4. Set StorageConnectionString to the connection for your storage account in this format:
|
||||
|
||||
|
@ -432,7 +432,7 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
DefaultEndpointsProtocol=https;AccountName=ACCOUNTNAME;AccountKey=KEY1
|
||||
```
|
||||
|
||||
5. Rebuild and publish the application to the local cluster.
|
||||
5. Rebuild and publish the application to the local cluster
|
||||
|
||||
6. Browse to the local Swagger endpoint and test the POST /api/orders method by posting the following JSON formatted order payload:
|
||||
|
||||
|
@ -448,7 +448,7 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- In Visual Studio, open the Cloud Explorer, navigate to the externalization queue, and verify that the new order is in the queue.
|
||||
- In Visual Studio, open the Cloud Explorer, navigate to the externalization queue, and verify that the new order is in the queue
|
||||
|
||||
### Task 5: Set up the functions
|
||||
|
||||
|
@ -460,21 +460,21 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From the Azure portal, find the Function App you created previously.
|
||||
1. From the Azure portal, find the Function App you created previously
|
||||
|
||||
2. Create a function called 'ProcessOrderExternalizations' based on the QueueTrigger C\# template. Select the queue contosoevents-externalization-requests. Connect it to the Storage account created previously.
|
||||
|
||||
3. Select Azure Storage Queue as the trigger and select the queue name contosevents-externalization-requests.
|
||||
3. Select Azure Storage Queue as the trigger and select the queue name contosevents-externalization-requests
|
||||
|
||||
4. Connect the output to the Orders collection of the Cosmos DB instance you created previously.
|
||||
4. Connect the output to the Orders collection of the Cosmos DB instance you created previously
|
||||
|
||||
5. Copy the code from the ProcessTicketOrderExternalizationEvent.cs file in the solution.
|
||||
5. Copy the code from the ProcessTicketOrderExternalizationEvent.cs file in the solution
|
||||
|
||||
6. Create the ProcessSimulationRequests function from the QueueTrigger PowerShell template. Name the queue contosevents-simulation-requests.
|
||||
|
||||
7. There is no need to connect this function to an output. Copy the code from the ProcessOrderTicketSimulationRequest.PS1 file in the solution.
|
||||
|
||||
8. You will set up the API Management key in a later step when we use this function.
|
||||
8. You will set up the API Management key in a later step when we use this function
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -486,15 +486,15 @@ In this task, you will test the ticket order processing back-end, to validate th
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the logs for the ProcessOrderExternalizations function.
|
||||
1. Open the logs for the ProcessOrderExternalizations function
|
||||
|
||||
2. Process an order following your steps on Task 4. Note the order id that appears in the logs.
|
||||
|
||||
3. From the Azure portal, navigate to your Cosmos DB account and use query explorer to query the Orders collection for the order id.
|
||||
3. From the Azure portal, navigate to your Cosmos DB account and use query explorer to query the Orders collection for the order id
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB.
|
||||
- If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB
|
||||
|
||||
## Exercise 4: Publish the Service Fabric Application
|
||||
|
||||
|
@ -508,15 +508,15 @@ In this task, you will deploy the application to a hosted Service Fabric Cluster
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the Cloud.xml configuration file for the ContosoEventsApp project and validate that the settings modified in Exercise 2 also match this file.
|
||||
1. Open the Cloud.xml configuration file for the ContosoEventsApp project and validate that the settings modified in Exercise 2 also match this file
|
||||
|
||||
2. Verify the TicketOrderService\_PartitionCount is set to 5.
|
||||
2. Verify the TicketOrderService\_PartitionCount is set to 5
|
||||
|
||||
3. Publish the application using the Cloud.xml configuration to the cluster you created previously.
|
||||
3. Publish the application using the Cloud.xml configuration to the cluster you created previously
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- From the Visual Studio output window, you can validate that the deployment has completed with success.
|
||||
- From the Visual Studio output window, you can validate that the deployment has completed with success
|
||||
|
||||
### Task 2: Test an order from the cluster
|
||||
|
||||
|
@ -557,17 +557,17 @@ In this task, you will import the Web API description to your API Management ser
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From the Azure Portal, select the API Management Service that you created earlier.
|
||||
1. From the Azure Portal, select the API Management Service that you created earlier
|
||||
|
||||
2. Import the API that was deployed to the Service Fabric cluster.
|
||||
2. Import the API that was deployed to the Service Fabric cluster
|
||||
|
||||
3. Associate the "Unlimited" product.
|
||||
3. Associate the "Unlimited" product
|
||||
|
||||
> **Note**: You would typically create a new product subscription for each environment in a scenario like this one. For example, Development, Testing, Acceptance and Production (DTAP) and issue a key for your internal application usage for each environment, managed accordingly.
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will see your API listed under All APIs.
|
||||
- You will see your API listed under All APIs
|
||||
|
||||
### Task 2: Retrieve the user subscription key
|
||||
|
||||
|
@ -577,11 +577,11 @@ In this task, you will retrieve the subscription key for the client applications
|
|||
|
||||
1. Return to the API Management dashboard for the same service. Select the publisher portal link and navigate from there to the developer portal.
|
||||
|
||||
2. Reveal the primary key of the "Unlimited" subscription, storing that info for future usage.
|
||||
2. Reveal the primary key of the "Unlimited" subscription, storing that info for future usage
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You can view the revealed key and save it for other configuration steps.
|
||||
- You can view the revealed key and save it for other configuration steps
|
||||
|
||||
### Task 3: Configure the Function App with the API Management key
|
||||
|
||||
|
@ -593,13 +593,13 @@ In this task, you will provide the API Management key in a setting for the Funct
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will be able to issue a request from the website, and see that orders have been processed through the function -- as it will have successfully called the API and you will see results in the reports page.
|
||||
- You will be able to issue a request from the website, and see that orders have been processed through the function -- as it will have successfully called the API and you will see results in the reports page
|
||||
|
||||
## Exercise 6: Configure and publish the web application
|
||||
|
||||
Duration: 15 minutes
|
||||
|
||||
In this exercise, you will configure the website to communicate with the API Management service, deploy the application, and create an order.
|
||||
In this exercise, you will configure the website to communicate with the API Management service, deploy the application, and create an order
|
||||
|
||||
### Task 1: Configure the web app settings
|
||||
|
||||
|
@ -607,15 +607,15 @@ In this task, you will update configuration settings to communicate with the API
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the web.config for the ContosoEvents.Web project.
|
||||
1. Open the web.config for the ContosoEvents.Web project
|
||||
|
||||
2. For the apimng:BaseUrl enter the base URL of the API you created in API Management such as <https://contosoeventsSUFFIX.azure-api.net/events/>. Make sure to include the closing /.
|
||||
2. For the apimng:BaseUrl enter the base URL of the API you created in API Management such as <https://contosoeventsSUFFIX.azure-api.net/events/>. Make sure to include the closing /
|
||||
|
||||
3. For the apimng:SubscriptionKey enter the subscription key you revealed in API Management developer portal.
|
||||
3. For the apimng:SubscriptionKey enter the subscription key you revealed in API Management developer portal
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You should have values for the API Management app settings.
|
||||
- You should have values for the API Management app settings
|
||||
|
||||
### Task 2: Running the web app and creating an order
|
||||
|
||||
|
@ -625,13 +625,13 @@ In this task, you will test the web application calls to API Management by creat
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From Visual Studio, run the ContosoEvents.Web application.
|
||||
1. From Visual Studio, run the ContosoEvents.Web application
|
||||
|
||||
2. Place an order from the website, filling in the missing billing fields.
|
||||
2. Place an order from the website, filling in the missing billing fields
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Once the order is queued for processing, you will be redirected to a results page indicating Success and showing you your order id that was queued as confirmation.
|
||||
- Once the order is queued for processing, you will be redirected to a results page indicating Success and showing you your order id that was queued as confirmation
|
||||
|
||||
### Task 3: Publish the web app
|
||||
|
||||
|
@ -639,7 +639,7 @@ In this task, you will publish the web application to Azure.
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Publish the application to the Azure Web App you created previously named something like 'contosoeventsweb-SUFFIX'.
|
||||
1. Publish the application to the Azure Web App you created previously named something like 'contosoeventsweb-SUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -651,7 +651,7 @@ Duration: 30 minutes
|
|||
|
||||
In this task, you will make changes to the code, and deploy an update to the application to enhance functionality. Specifically, the update addresses the area of concern related to changes in the ticket order model, and the impact on the system.
|
||||
|
||||
This task will illustrate the mechanism that Service Fabric provides for upgrading an application in production.
|
||||
This task will illustrate the mechanism that Service Fabric provides for upgrading an application in production
|
||||
|
||||
### Task 1: How upgrade works
|
||||
|
||||
|
@ -673,11 +673,11 @@ Currently, the TicketOrderActor does not have a status property to make it easie
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Add a state field to the TicketOrderActor by uncommenting the TODO: Exercise 6 -- Task 1 sections in the solution.
|
||||
1. Add a state field to the TicketOrderActor by uncommenting the TODO: Exercise 6 -- Task 1 sections in the solution
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- After making this change, compile the solution and verify that there are no errors.
|
||||
- After making this change, compile the solution and verify that there are no errors
|
||||
|
||||
### Task 3: Perform a smooth upgrade
|
||||
|
||||
|
@ -685,19 +685,19 @@ In this task, you will configure settings for the Service Fabric application to
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Publish the ContosoEventsApp using the Cloud.xml configuration, selecting the Upgrade option.
|
||||
1. Publish the ContosoEventsApp using the Cloud.xml configuration, selecting the Upgrade option
|
||||
|
||||
2. Use 'Monitored' for the upgrade settings.
|
||||
2. Use 'Monitored' for the upgrade settings
|
||||
|
||||
3. Update the TicketOrderActor version to 1.1.0.
|
||||
3. Update the TicketOrderActor version to 1.1.0
|
||||
|
||||
4. View the upgrade status from the Visual Studio output window.
|
||||
4. View the upgrade status from the Visual Studio output window
|
||||
|
||||
5. Navigate to Service Fabric Explorer for the hosted cluster and watch the upgrade in progress.
|
||||
5. Navigate to Service Fabric Explorer for the hosted cluster and watch the upgrade in progress
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- When the upgrade is complete, from Service Fabric Explorer observe the new application version number.
|
||||
- When the upgrade is complete, from Service Fabric Explorer observe the new application version number
|
||||
|
||||
### Task 4: Submit a new order
|
||||
|
||||
|
@ -719,7 +719,7 @@ Now that the upgrade is completed successfully, you will submit a new order, and
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- Navigate to the Cosmos DB query explorer and create a query using this order id to see the new extended state actually persisted to the database.
|
||||
- Navigate to the Cosmos DB query explorer and create a query using this order id to see the new extended state actually persisted to the database
|
||||
|
||||
## After the hands-on lab
|
||||
|
||||
|
@ -729,7 +729,7 @@ In this exercise, attendees will deprovision any Azure resources that were creat
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Delete the Resource Group you created during this hands-on lab.
|
||||
1. Delete the Resource Group you created during this hands-on lab
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
|
|
@ -193,9 +193,9 @@ The following figures are intended to help you keep track of all the technologie
|
|||
|
||||
## Requirements
|
||||
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN.
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN
|
||||
|
||||
a. Trial subscriptions will not work.
|
||||
a. Trial subscriptions will not work
|
||||
|
||||
2. A virtual machine configured with (see Before the hands-on lab):
|
||||
|
||||
|
@ -225,15 +225,15 @@ Because this is a "born in Azure" solution, it depends on many Azure resources.
|
|||
|
||||
1. On your Lab VM, download the starter project from <http://bit.ly/2l7aCyg>. (Note: the URL is case sensitive, so you may need to copy and paste it into your browser's address bar.)
|
||||
|
||||
2. Unzip the contents to the folder C:\\handsonlab.
|
||||
2. Unzip the contents to the folder C:\\handsonlab
|
||||
|
||||
3. Open the ContosoEventsPoc.sln with Visual Studio.
|
||||
3. Open the ContosoEventsPoc.sln with Visual Studio
|
||||
|
||||
4. Before you compile the solution, set the configuration to x64.
|
||||
4. Before you compile the solution, set the configuration to x64
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You cannot successfully build the solution.
|
||||
- You cannot successfully build the solution
|
||||
|
||||
> **Note**: If you have the prerequisites on your VM, this solution should open without requesting additional software to be installed. You should have some compile-time errors at this point. These are expected, and will be fixed as you proceed with the hands-on lab.
|
||||
|
||||
|
@ -257,9 +257,9 @@ In this section, you will provision an Azure Active Directory B2C tenant. You wi
|
|||
|
||||
1. Create a new Azure Active Directory B2C tenant in the same region as your other items. Use the domain 'contosoeventsb2cSUFFIX'. Set it up as a B2C directory.
|
||||
|
||||
2. Configure the tenant for Username sign in.
|
||||
2. Configure the tenant for Username sign in
|
||||
|
||||
3. Create three profiles: sign in, sign up, and profile edit.
|
||||
3. Create three profiles: sign in, sign up, and profile edit
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -273,7 +273,7 @@ In these steps, you will provision a Web App in a new App Service Plan.
|
|||
|
||||
1. Provision a web app to host the website. Create an App Service Plan in the Resource Group and region you used previously. Name the Web App something like 'contosoeventsweb-SUFFIX'.
|
||||
|
||||
2. Select pricing tier S1 Standard.
|
||||
2. Select pricing tier S1 Standard
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -287,11 +287,11 @@ In this task, you will provision a Function App using a Consumption Plan. By usi
|
|||
|
||||
1. Provision a Function App to host the functions in the Visual Studio solution, in a Consumption Plan. Create a new Resource Group with a name similar to your main Resource Group such as 'contosoeventsfn-SUFFIX'.
|
||||
|
||||
2. Name the App something like 'contosoeventsfn-SUFFIX'.
|
||||
2. Name the App something like 'contosoeventsfn-SUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- When the provisioning completes, your Web App and Function App are listed in the Azure Portal.
|
||||
- When the provisioning completes, your Web App and Function App are listed in the Azure Portal
|
||||
|
||||
### Task 6: Storage account
|
||||
|
||||
|
@ -299,13 +299,13 @@ In this section, you will create a Storage account for the application to create
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Provision a Resource Manager based Storage account of type Standard LRS in the same Location and Resource Group as your other services.
|
||||
1. Provision a Resource Manager based Storage account of type Standard LRS in the same Location and Resource Group as your other services
|
||||
|
||||
2. Name it something like 'contosoeventsSUFFIX'.
|
||||
2. Name it something like 'contosoeventsSUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- After provisioning is complete, the Storage account will be listed in the Azure Portal.
|
||||
- After provisioning is complete, the Storage account will be listed in the Azure Portal
|
||||
|
||||
### Task 7: Cosmos DB
|
||||
|
||||
|
@ -313,15 +313,15 @@ In this section, you will provision a Cosmos DB account, a Cosmos DB Database an
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Provision a new Cosmos DB account in the same region and Resource Group as your other services. Use the name 'contosoeventsdocdb-SUFFIX'.
|
||||
1. Provision a new Cosmos DB account in the same region and Resource Group as your other services. Use the name 'contosoeventsdocdb-SUFFIX'
|
||||
|
||||
2. Add a database with ID 'TicketManager'.
|
||||
2. Add a database with ID 'TicketManager'
|
||||
|
||||
3. Add two collections named 'Orders' and 'Events'.
|
||||
3. Add two collections named 'Orders' and 'Events'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will be able to see the two collections in the new database.
|
||||
- You will be able to see the two collections in the new database
|
||||
|
||||
## Exercise 2: Placing ticket orders
|
||||
|
||||
|
@ -345,7 +345,7 @@ Note: Not all features are in place, but you will be able to see that the applic
|
|||
|
||||
1. First, make sure the local Service Fabric environment is running. If not, set up the local cluster.
|
||||
|
||||
2. From Visual Studio, compile the solution and publish ContosoEventsApp to the local Service Fabric cluster.
|
||||
2. From Visual Studio, compile the solution and publish ContosoEventsApp to the local Service Fabric cluster
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -363,7 +363,7 @@ The Service Fabric Application includes a front-end Web API as the public-facing
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- If you were able to view the Swagger definition and select the partitions method with a successful response, your environment is in a good state to continue.
|
||||
- If you were able to view the Swagger definition and select the partitions method with a successful response, your environment is in a good state to continue
|
||||
|
||||
### Task 3: Service Fabric Explorer
|
||||
|
||||
|
@ -373,11 +373,11 @@ In this task, you will browse to the Service Fabric Explorer, and view the local
|
|||
|
||||
1. Browse to the Service Fabric Explorer for the local cluster at: <http://localhost:19080/Explorer/index.html>
|
||||
|
||||
2. Observe the services deployed with the application.
|
||||
2. Observe the services deployed with the application
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- If you are able to access the Service Fabric Explorer, your environment is in a good state to continue.
|
||||
- If you are able to access the Service Fabric Explorer, your environment is in a good state to continue
|
||||
|
||||
### Task 4: Set up the Ticket Order Sync queue
|
||||
|
||||
|
@ -393,9 +393,9 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
<Parameter Name="StorageConnectionString" Value="" />
|
||||
```
|
||||
|
||||
2. Set DataStorageEndpointUri to the Cosmos DB endpoint Uri.
|
||||
2. Set DataStorageEndpointUri to the Cosmos DB endpoint Uri
|
||||
|
||||
3. Set DataStoragePrimaryKey to the Cosmos DB Primary Key.
|
||||
3. Set DataStoragePrimaryKey to the Cosmos DB Primary Key
|
||||
|
||||
4. Set StorageConnectionString to the connection for your storage account in this format:
|
||||
|
||||
|
@ -403,7 +403,7 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
DefaultEndpointsProtocol=https;AccountName=ACCOUNTNAME;AccountKey=KEY1
|
||||
```
|
||||
|
||||
5. Rebuild and publish the application to the local cluster.
|
||||
5. Rebuild and publish the application to the local cluster
|
||||
|
||||
6. Browse to the local Swagger endpoint and test the POST /api/orders method by posting the following JSON formatted order payload:
|
||||
|
||||
|
@ -419,7 +419,7 @@ In this task, you will complete features of the Contoso Events POC so that placi
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- In Visual Studio, open the Cloud Explorer, navigate to the externalization queue, and verify that the new order is in the queue.
|
||||
- In Visual Studio, open the Cloud Explorer, navigate to the externalization queue, and verify that the new order is in the queue
|
||||
|
||||
### Task 5: Set up the functions
|
||||
|
||||
|
@ -431,25 +431,25 @@ You will also create a second function that will be used to generate load agains
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From the Azure portal, find the Function App you created previously.
|
||||
1. From the Azure portal, find the Function App you created previously
|
||||
|
||||
2. Create a function called 'ProcessOrderExternalizations' based on the QueueTrigger C\# template. Select the queue contosoevents-externalization-requests. Connect it to the Storage account created previously.
|
||||
|
||||
3. Select Azure Storage Queue as the trigger and select the queue name contosevents-externalization-requests.
|
||||
3. Select Azure Storage Queue as the trigger and select the queue name contosevents-externalization-requests
|
||||
|
||||
4. Connect the output to the Orders collection of the Cosmos DB instance you created previously.
|
||||
4. Connect the output to the Orders collection of the Cosmos DB instance you created previously
|
||||
|
||||
5. Copy the code from the ProcessTicketOrderExternalizationEvent.cs file in the solution.
|
||||
5. Copy the code from the ProcessTicketOrderExternalizationEvent.cs file in the solution
|
||||
|
||||
6. Create the ProcessSimulationRequests function from the QueueTrigger PowerShell template. Name the queue contosevents-simulation-requests.
|
||||
|
||||
7. There is no need to connect this function to an output. Copy the code from the ProcessOrderTicketSimulationRequest.PS1 file in the solution.
|
||||
|
||||
8. You will set up the API Management key in a later step when we use this function.
|
||||
8. You will set up the API Management key in a later step when we use this function
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- If each function successfully compiled as you went through these steps, you are ready to proceed to the next exercise.
|
||||
- If each function successfully compiled as you went through these steps, you are ready to proceed to the next exercise
|
||||
|
||||
### Task 6: Test order data sync
|
||||
|
||||
|
@ -457,15 +457,15 @@ In this task, you will test the ticket order processing back-end, to validate th
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the logs for the ProcessOrderExternalizations function.
|
||||
1. Open the logs for the ProcessOrderExternalizations function
|
||||
|
||||
2. Process an order following your steps on Task 4. Note the order id that appears in the logs.
|
||||
|
||||
3. From the Azure portal, navigate to your Cosmos DB account and use query explorer to query the Orders collection for the order id.
|
||||
3. From the Azure portal, navigate to your Cosmos DB account and use query explorer to query the Orders collection for the order id
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB.
|
||||
- If the Cosmos DB query returns the order id specified, the order has been fully processed through to the Cosmos DB
|
||||
|
||||
## Exercise 3: Publish the Service Fabric Application
|
||||
|
||||
|
@ -479,15 +479,15 @@ In this task, you will deploy the application to a hosted Service Fabric Cluster
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the Cloud.xml configuration file for the ContosoEventsApp project and validate that the settings modified in Exercise 2 also match this file.
|
||||
1. Open the Cloud.xml configuration file for the ContosoEventsApp project and validate that the settings modified in Exercise 2 also match this file
|
||||
|
||||
2. Verify the TicketOrderService\_PartitionCount is set to 5.
|
||||
2. Verify the TicketOrderService\_PartitionCount is set to 5
|
||||
|
||||
3. Publish the application using the Cloud.xml configuration to the cluster you created previously.
|
||||
3. Publish the application using the Cloud.xml configuration to the cluster you created previously
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- From the Visual Studio output window, you can validate that the deployment has completed with success.
|
||||
- From the Visual Studio output window, you can validate that the deployment has completed with success
|
||||
|
||||
### Task 2: Test an order from the cluster
|
||||
|
||||
|
@ -528,17 +528,17 @@ In this task, you will import the Web API description to your API Management ser
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From the Azure Portal, select the API Management Service that you created earlier.
|
||||
1. From the Azure Portal, select the API Management Service that you created earlier
|
||||
|
||||
2. Import the API that was deployed to the Service Fabric cluster.
|
||||
2. Import the API that was deployed to the Service Fabric cluster
|
||||
|
||||
3. Associate the "Unlimited" product.
|
||||
3. Associate the "Unlimited" product
|
||||
|
||||
> **Note**: You would typically create a new product subscription for each environment in a scenario like this one. For example, Development, Testing, Acceptance and Production (DTAP) and issue a key for your internal application usage for each environment, managed accordingly.
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will see your API listed under All APIs.
|
||||
- You will see your API listed under All APIs
|
||||
|
||||
### Task 2: Retrieve the user subscription key
|
||||
|
||||
|
@ -548,11 +548,11 @@ In this task, you will retrieve the subscription key for the client applications
|
|||
|
||||
1. Return to the API Management dashboard for the same service. Select the publisher portal link and navigate from there to the developer portal.
|
||||
|
||||
2. Reveal the primary key of the "Unlimited" subscription, storing that info for future usage.
|
||||
2. Reveal the primary key of the "Unlimited" subscription, storing that info for future usage
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You can view the revealed key and save it for other configuration steps.
|
||||
- You can view the revealed key and save it for other configuration steps
|
||||
|
||||
### Task 3: Configure the Function App with the API Management key
|
||||
|
||||
|
@ -560,11 +560,11 @@ In this task, you will provide the API Management key in a setting for the Funct
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From the Azure Portal browse to the Function App. Create an application setting called 'contosoeventsapimgrkey' and set the value to the API Management key you saved in the previous step.
|
||||
1. From the Azure Portal browse to the Function App. Create an application setting called 'contosoeventsapimgrkey' and set the value to the API Management key you saved in the previous step
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will be able to issue a load test from the Web site in Exercise 5, and see that orders have been processed through the function -- as it will have successfully called the API and you will see results in the reports page.
|
||||
- You will be able to issue a load test from the Web site in Exercise 5, and see that orders have been processed through the function -- as it will have successfully called the API and you will see results in the reports page
|
||||
|
||||
## Exercise 5: Configure and publish the web application
|
||||
|
||||
|
@ -578,15 +578,15 @@ In this task, you will update configuration settings to communicate with the API
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Open the web.config for the ContosoEvents.Web project.
|
||||
1. Open the web.config for the ContosoEvents.Web project
|
||||
|
||||
2. For the apimng:BaseUrl enter the base URL of the API you created in API Management such as <https://contosoeventsSUFFIX.azure-api.net/events/>. Make sure to include the closing /.
|
||||
2. For the apimng:BaseUrl enter the base URL of the API you created in API Management such as <https://contosoeventsSUFFIX.azure-api.net/events/>. Make sure to include the closing /
|
||||
|
||||
3. For the apimng:SubscriptionKey enter the subscription key you revealed in API Management developer portal.
|
||||
3. For the apimng:SubscriptionKey enter the subscription key you revealed in API Management developer portal
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You should have values for the API Management app settings.
|
||||
- You should have values for the API Management app settings
|
||||
|
||||
### Task 2: Running the web app and creating an order
|
||||
|
||||
|
@ -596,13 +596,13 @@ In this task, you will test the web application calls to API Management by creat
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. From Visual Studio, run the ContosoEvents.Web application.
|
||||
1. From Visual Studio, run the ContosoEvents.Web application
|
||||
|
||||
2. Place an order from the website, filling in the missing billing fields.
|
||||
2. Place an order from the website, filling in the missing billing fields
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Once the order is queued for processing, you will be redirected to a results page indicating Success and showing you your order id that was queued as confirmation.
|
||||
- Once the order is queued for processing, you will be redirected to a results page indicating Success and showing you your order id that was queued as confirmation
|
||||
|
||||
### Task 3: Publish the web app
|
||||
|
||||
|
@ -610,7 +610,7 @@ In this task, you will publish the web application to Azure.
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Publish the application to the Azure Web App you created previously named something like 'contosoeventsweb-SUFFIX'.
|
||||
1. Publish the application to the Azure Web App you created previously named something like 'contosoeventsweb-SUFFIX'
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -644,11 +644,11 @@ Currently, the TicketOrderActor does not have a status property to make it easie
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Add a state field to the TicketOrderActor by uncommenting the TODO: Exercise 6 - Task 1 sections in the solution.
|
||||
1. Add a state field to the TicketOrderActor by uncommenting the TODO: Exercise 6 - Task 1 sections in the solution
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- After making this change, compile the solution and verify that there are no errors.
|
||||
- After making this change, compile the solution and verify that there are no errors
|
||||
|
||||
### Task 3: Perform a smooth upgrade
|
||||
|
||||
|
@ -656,23 +656,23 @@ In this task, you will configure settings for the Service Fabric application to
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Publish the ContosoEventsApp using the Cloud.xml configuration, selecting the Upgrade option.
|
||||
1. Publish the ContosoEventsApp using the Cloud.xml configuration, selecting the Upgrade option
|
||||
|
||||
2. Use 'Monitored' for the upgrade settings.
|
||||
2. Use 'Monitored' for the upgrade settings
|
||||
|
||||
3. Update the TicketOrderActor version to 1.1.0.
|
||||
3. Update the TicketOrderActor version to 1.1.0
|
||||
|
||||
4. View the upgrade status from the Visual Studio output window.
|
||||
4. View the upgrade status from the Visual Studio output window
|
||||
|
||||
5. Navigate to Service Fabric Explorer for the hosted cluster and watch the upgrade in progress.
|
||||
5. Navigate to Service Fabric Explorer for the hosted cluster and watch the upgrade in progress
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- When the upgrade is complete, from Service Fabric Explorer observe the new application version number.
|
||||
- When the upgrade is complete, from Service Fabric Explorer observe the new application version number
|
||||
|
||||
### Task 4: Submit a new order
|
||||
|
||||
Now that the upgrade is completed successfully, you will submit a new order, and make sure that the newly submitted order has the extended state.
|
||||
Now that the upgrade is completed successfully, you will submit a new order, and make sure that the newly submitted order has the extended state
|
||||
|
||||
#### Tasks to complete:
|
||||
|
||||
|
@ -690,7 +690,7 @@ Now that the upgrade is completed successfully, you will submit a new order, and
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- Navigate to the Cosmos DB query explorer and create a query using this order id to see the new extended state actually persisted to the database.
|
||||
- Navigate to the Cosmos DB query explorer and create a query using this order id to see the new extended state actually persisted to the database
|
||||
|
||||
## Exercise 7: Rollback
|
||||
|
||||
|
@ -704,11 +704,11 @@ In this task, you will add code to produce health checks that force the monitore
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Locate all TODO: Exercise 7 - Task 1 in the solution and uncomment the code as indicated.
|
||||
1. Locate all TODO: Exercise 7 - Task 1 in the solution and uncomment the code as indicated
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Compile the code to ensure there are no issues with the changes.
|
||||
- Compile the code to ensure there are no issues with the changes
|
||||
|
||||
### Task 2: Perform a troubled upgrade
|
||||
|
||||
|
@ -716,25 +716,25 @@ In this task, you will perform an upgrade and watch a rollback of the upgrade.
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Publish the application to the cluster again. During the process, set the TicketOrderService new version to 1.1.0.
|
||||
1. Publish the application to the cluster again. During the process, set the TicketOrderService new version to 1.1.0
|
||||
|
||||
2. From Service Fabric Explorer note the errors that appear.
|
||||
2. From Service Fabric Explorer note the errors that appear
|
||||
|
||||
3. Try posting to the service and note that the application is still responsive.
|
||||
3. Try posting to the service and note that the application is still responsive
|
||||
|
||||
4. So that you do not forget, return to the code and re-comment the failure report so that you can do future exercise without rollback!
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Look at the Visual Studio output window and note the rollback takes place after some seconds.
|
||||
- Look at the Visual Studio output window and note the rollback takes place after some seconds
|
||||
|
||||
- Note that Service Fabric Explorer shows the rollback as well with the current deployment now set to the previous version.
|
||||
- Note that Service Fabric Explorer shows the rollback as well with the current deployment now set to the previous version
|
||||
|
||||
- Also, note that the error remains until it is time to live expires or it is replaced by another health state. Until then, the unhealthy state will remain in the cluster, but the cluster will be running normally. You can proceed without clearing this for now.
|
||||
|
||||
- The subsequent exercises (i.e. 8 and beyond) will be executed using version 1.1.0 and while the cluster shows unhealthy state. You can ignore this for now.
|
||||
|
||||
- Optionally, from the Swagger endpoint for the deployed application, you can request health statistics at the following relative URL: /api/admin/applicationhealth.
|
||||
- Optionally, from the Swagger endpoint for the deployed application, you can request health statistics at the following relative URL: /api/admin/applicationhealth
|
||||
|
||||
## Exercise 8: Load testing
|
||||
|
||||
|
@ -748,15 +748,15 @@ In this task, you will simulate a load test of 50 orders against the cluster usi
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Navigate to the published Web application at a URL like <https://contosoeventsweb-SUFFIX.azurewebsites.net>.
|
||||
1. Navigate to the published Web application at a URL like <https://contosoeventsweb-SUFFIX.azurewebsites.net>
|
||||
|
||||
2. From the Load Test page, issue a load test for 50 iterations.
|
||||
2. From the Load Test page, issue a load test for 50 iterations
|
||||
|
||||
3. From the Load Test Status page, refresh and view the distribution of messages across the partitions where they are queued.
|
||||
3. From the Load Test Status page, refresh and view the distribution of messages across the partitions where they are queued
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- After a few minutes you will see that the queues are drained, and the orders were processed.
|
||||
- After a few minutes you will see that the queues are drained, and the orders were processed
|
||||
|
||||
> **Note**: If you still have more time, run this again with additional iterations progressively such as 100, 150, 200, 250. Or, take a look at Exercise 9 in the answers area which takes you through a much more comprehensive load test and partition analysis process using the API endpoint.
|
||||
|
||||
|
@ -785,11 +785,11 @@ In this task, you will simulate a load test against the Cluster using the curren
|
|||
}
|
||||
```
|
||||
|
||||
2. Issue a GET request against /api/admin/partitions to see how the different partitions are functioning.
|
||||
2. Issue a GET request against /api/admin/partitions to see how the different partitions are functioning
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Verify that queues are drained and that orders are processed before completing this task.
|
||||
- Verify that queues are drained and that orders are processed before completing this task
|
||||
|
||||
### Task 2: Setting up for load testing with different partition counts
|
||||
|
||||
|
@ -797,17 +797,17 @@ In this task, you will clean the existing orders from the Cosmos DB, so you can
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Use the Swagger UI to delete orders from the Cosmos DB.
|
||||
1. Use the Swagger UI to delete orders from the Cosmos DB
|
||||
|
||||
2. Unprovision the application type, using Service Fabric Explorer.
|
||||
2. Unprovision the application type, using Service Fabric Explorer
|
||||
|
||||
3. Make sure Upgrade the application checkbox is unchecked each time you publish.
|
||||
3. Make sure Upgrade the application checkbox is unchecked each time you publish
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Service Fabric Explorer shows no application types or applications deployed.
|
||||
- Service Fabric Explorer shows no application types or applications deployed
|
||||
|
||||
- You can verify from Cosmos DB Orders Document Explorer that there are no more orders in the database.
|
||||
- You can verify from Cosmos DB Orders Document Explorer that there are no more orders in the database
|
||||
|
||||
### Task 3: Using a partition count of 10, simulate 100 orders
|
||||
|
||||
|
@ -815,9 +815,9 @@ In this task, you will repeat the same load test you performed in Task 2 but usi
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Change the service and actor partition count to 10 in the Cloud.xml Application Parameters file.
|
||||
1. Change the service and actor partition count to 10 in the Cloud.xml Application Parameters file
|
||||
|
||||
2. Redeploy the app to the cluster.
|
||||
2. Redeploy the app to the cluster
|
||||
|
||||
3. Repeat the same load test you did in Task 1, but with a different tag:
|
||||
|
||||
|
@ -834,7 +834,7 @@ In this task, you will repeat the same load test you performed in Task 2 but usi
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- Verify that queues are drained and that orders are processed before completing this task.
|
||||
- Verify that queues are drained and that orders are processed before completing this task
|
||||
|
||||
### Task 4: Using a partition count of 15, simulate 100 orders
|
||||
|
||||
|
@ -842,9 +842,9 @@ In this task, you will repeat the same load test you performed in Task 2 but usi
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Change the service and actor partition count to 15 in the Cloud.xml Application Parameters file.
|
||||
1. Change the service and actor partition count to 15 in the Cloud.xml Application Parameters file
|
||||
|
||||
2. Redeploy the app to the cluster.
|
||||
2. Redeploy the app to the cluster
|
||||
|
||||
3. Repeat the same test load you did in Task 1 but with a different tag:
|
||||
|
||||
|
@ -860,7 +860,7 @@ In this task, you will repeat the same load test you performed in Task 2 but usi
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- Verify that queues are drained and that orders are processed before completing this task.
|
||||
- Verify that queues are drained and that orders are processed before completing this task
|
||||
|
||||
### Task 5: Using a partition count of 20, simulate 100 orders
|
||||
|
||||
|
@ -868,9 +868,9 @@ In this task, you will repeat the same load test you performed in Task 1 but usi
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Change the service and actor partition count to 15 in the Cloud.xml Application Parameters file.
|
||||
1. Change the service and actor partition count to 15 in the Cloud.xml Application Parameters file
|
||||
|
||||
2. Redeploy the app to the cluster.
|
||||
2. Redeploy the app to the cluster
|
||||
|
||||
3. Repeat the same test load you did in Task 2 but with a different tag:
|
||||
|
||||
|
@ -887,21 +887,21 @@ In this task, you will repeat the same load test you performed in Task 1 but usi
|
|||
|
||||
#### Exit criteria:
|
||||
|
||||
- Verify that queues are drained and that orders are processed before completing this task.
|
||||
- Verify that queues are drained and that orders are processed before completing this task
|
||||
|
||||
### Task 6: Determine the performance variations among the different load tests
|
||||
|
||||
In this task, you will find out how each load test performed and plot the result.
|
||||
|
||||
> **Note**: This step is out of scope and is shown here only to complete the picture.
|
||||
> **Note**: This step is out of scope and is shown here only to complete the picture
|
||||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Using the Service Fabric Web API Swagger UI, please issue a GET request against /api/orders/stats.
|
||||
1. Using the Service Fabric Web API Swagger UI, please issue a GET request against /api/orders/stats
|
||||
|
||||
2. Scale out the VMs count to 10 in your cluster, and repeat Tasks 1, 3, 4, and 5.
|
||||
2. Scale out the VMs count to 10 in your cluster, and repeat Tasks 1, 3, 4, and 5
|
||||
|
||||
3. Produce an Excel sheet from the data you collected.
|
||||
3. Produce an Excel sheet from the data you collected
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
@ -923,27 +923,27 @@ In this task, you will set up the Azure Active Directory B2C directory for your
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Register a new application in the Azure Active Directory B2C tenant you created previously.
|
||||
1. Register a new application in the Azure Active Directory B2C tenant you created previously
|
||||
|
||||
2. Add a reply URL for local testing: <https://localhost:44327/>
|
||||
|
||||
3. Add a reply URL for the hosted Web App as you named it, for example: <https://contosoeventsweb-SUFFIX.azurewebsites.net/>
|
||||
|
||||
4. Set local accounts to Username.
|
||||
4. Set local accounts to Username
|
||||
|
||||
5. Define policies for sign up, sign in and profile editing.
|
||||
5. Define policies for sign up, sign in and profile editing
|
||||
|
||||
6. For all policies, set Application Claims select Email Addresses, Given Name, Surname, and User's Object ID.
|
||||
6. For all policies, set Application Claims select Email Addresses, Given Name, Surname, and User's Object ID
|
||||
|
||||
7. For the sign up and sign in policies, set the Claim representing policy ID to acr.
|
||||
7. For the sign up and sign in policies, set the Claim representing policy ID to acr
|
||||
|
||||
8. For profile attributes, choose Given Name and Surname.
|
||||
8. For profile attributes, choose Given Name and Surname
|
||||
|
||||
9. When done take note of the Application ID for later. Also, take note of the policy names.
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Your B2C directory is ready for use and after Task 2 is complete, you will be able to exercise it.
|
||||
- Your B2C directory is ready for use and after Task 2 is complete, you will be able to exercise it
|
||||
|
||||
### Task 2: Configure the Web App Settings
|
||||
|
||||
|
@ -953,19 +953,19 @@ You will be guided through the instructions to find the information necessary to
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. For the ida:Tenant enter the domain of the Azure Active Directory B2C you created such as 'contosoeventsb2cSUFFIX.onmicrosoft.com'.
|
||||
1. For the ida:Tenant enter the domain of the Azure Active Directory B2C you created such as 'contosoeventsb2cSUFFIX.onmicrosoft.com'
|
||||
|
||||
2. For the ida:ClientId enter the Application ID generated for your B2C application created in the previous task.
|
||||
2. For the ida:ClientId enter the Application ID generated for your B2C application created in the previous task
|
||||
|
||||
3. For the ida:SignUpPolicyId enter the name of the sign-up policy you created in the tenant (e.g., B2C\_1\_signup).
|
||||
3. For the ida:SignUpPolicyId enter the name of the sign-up policy you created in the tenant (e.g., B2C\_1\_signup)
|
||||
|
||||
4. For the ida:SignInPolicyId enter the name of the sign in policy you created in the tenant (e.g., B2C\_1\_signin).
|
||||
4. For the ida:SignInPolicyId enter the name of the sign in policy you created in the tenant (e.g., B2C\_1\_signin)
|
||||
|
||||
5. For the ida:UserProfilePolicyId enter the name of the profile editing policy you created in the tenant (e.g., B2C\_1\_profileedit).
|
||||
5. For the ida:UserProfilePolicyId enter the name of the profile editing policy you created in the tenant (e.g., B2C\_1\_profileedit)
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- You will have set all the required settings.
|
||||
- You will have set all the required settings
|
||||
|
||||
### Task 3: Add security features to the web application
|
||||
|
||||
|
@ -973,13 +973,13 @@ In this task, you will enable security features that will leverage the configura
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. In the solution, look for all TODO Exercise 10 - Task 3 instructions and follow the steps.
|
||||
1. In the solution, look for all TODO Exercise 10 - Task 3 instructions and follow the steps
|
||||
|
||||
2. Compile the solution to ensure no issues.
|
||||
2. Compile the solution to ensure no issues
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Compile the application and ensure no errors before the next step.
|
||||
- Compile the application and ensure no errors before the next step
|
||||
|
||||
### Task 4: Running the Web App and signing in
|
||||
|
||||
|
@ -987,17 +987,17 @@ In this task, you will test the web application and register yourself as a user
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Run the Web App.
|
||||
1. Run the Web App
|
||||
|
||||
2. Register a new user and authenticate.
|
||||
2. Register a new user and authenticate
|
||||
|
||||
3. Sign out and sign in again.
|
||||
3. Sign out and sign in again
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
- Note your email is shown in the application header after you sign in.
|
||||
- Note your email is shown in the application header after you sign in
|
||||
|
||||
**Note**: You can optionally publish this application to Azure and test sign in, sign out continues to work from the deployed URL.
|
||||
**Note**: You can optionally publish this application to Azure and test sign in, sign out continues to work from the deployed URL
|
||||
|
||||
## After the hands-on lab
|
||||
|
||||
|
@ -1007,9 +1007,9 @@ In this exercise, attendees will deprovision any Azure resources that were creat
|
|||
|
||||
#### Tasks to complete:
|
||||
|
||||
1. Delete the Resource Group you created during this hands-on lab.
|
||||
1. Delete the Resource Group you created during this hands-on lab
|
||||
|
||||
2. Delete the Azure Active Directory B2C tenant.
|
||||
2. Delete the Azure Active Directory B2C tenant
|
||||
|
||||
#### Exit criteria:
|
||||
|
||||
|
|
144
HOL/Setup.md
144
HOL/Setup.md
|
@ -2,9 +2,9 @@
|
|||
|
||||
## Requirements
|
||||
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN.
|
||||
1. Microsoft Azure subscription must be pay-as-you-go or MSDN
|
||||
|
||||
- Trial subscriptions will not work.
|
||||
- Trial subscriptions will not work
|
||||
|
||||
2. A virtual machine configured with (see Before the hands-on lab):
|
||||
|
||||
|
@ -34,7 +34,7 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
![In the Azure Portal, in the left pane, New is selected. In the Marketplace pane, Everything is selected. In the Everything pane, Service Fabric is typed in the search field, and under Results, Service Fabric Cluster is circled.](images/Setup/image5.png "Azure Portal")
|
||||
|
||||
2. On the Service Fabric Cluster blade, select Create.
|
||||
2. On the Service Fabric Cluster blade, select Create
|
||||
|
||||
3. On the Basics blade of the Create Service Fabric cluster screen, enter the following:
|
||||
|
||||
|
@ -50,9 +50,9 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
- Resource Group: Select Create new, and enter hands-on-labs for the resource group name. You can add -SUFFIX, if needed to make resource group name unique. This is the resource group you will use for all resources you create for this hands-on lab.
|
||||
|
||||
- Location: Select the region to use.
|
||||
- Location: Select the region to use
|
||||
|
||||
- Select OK.
|
||||
- Select OK
|
||||
|
||||
![On the Basics blade, all fields are set to the previously defined settings.](images/Setup/image6.png "Basics blade")
|
||||
|
||||
|
@ -66,7 +66,7 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
- Durability tier: Leave Bronze selected
|
||||
|
||||
- Virtual machine size: Select a VM size of D1\_V2 Standard and select Select on the Choose a size blade.
|
||||
- Virtual machine size: Select a VM size of D1\_V2 Standard and select Select on the Choose a size blade
|
||||
|
||||
![On the Cluster configuration blade, under Virtual Machine Size, D1\_V2 Standard is circled.](images/Setup/image7.png "Cluster configuration blade")
|
||||
|
||||
|
@ -80,9 +80,9 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
- Configure advanced settings: Leave unchecked
|
||||
|
||||
- Select OK on the Node type configuration blade.
|
||||
- Select OK on the Node type configuration blade
|
||||
|
||||
- Select OK on the Cluster configuration blade.
|
||||
- Select OK on the Cluster configuration blade
|
||||
|
||||
![The Create Service Fabric cluster blade, Cluster configuration blade, and Node type configuration blade all display with the previously defined settings.](images/Setup/image8.png "Three blades")
|
||||
|
||||
|
@ -90,7 +90,7 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
- Configuration Type: Leave "Basic" selected
|
||||
|
||||
- Key vault: Select to configure required settings. On the Key vault configuration blade click "Create a new vault".
|
||||
- Key vault: Select to configure required settings. On the Key vault configuration blade select "Create a new vault".
|
||||
|
||||
- On the "Create key vault" configuration blade enter:
|
||||
|
||||
|
@ -98,27 +98,27 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
- Resource Group: hands-on-lab2-SUFFIX
|
||||
|
||||
- Location: Use the same location as the first resource group you created.
|
||||
- Location: Use the same location as the first resource group you created
|
||||
|
||||
![Create a new vault in selected in the Key vault blade, and the values specified above are entered into the Create key vault blade.](images/Setup/image9.png "Key vault and Create key vault blades")
|
||||
|
||||
- Click "Create" on the Create key vault configuration blade. Wait for the key vault deployment to complete.
|
||||
- Select "Create" on the Create key vault configuration blade. Wait for the key vault deployment to complete.
|
||||
|
||||
- When the key vault deployment completes you will return to the Security configuration blade. You will see a warning that the key vault is not enabled for deployment. Follow these steps to resolve the warning:
|
||||
|
||||
- Click "Edit access policies for hands-on-lab-SUFFIX"
|
||||
- Choose "Edit access policies for hands-on-lab-SUFFIX"
|
||||
|
||||
- In the Access policies configuration blade, click the link "Click to show advanced access policies"
|
||||
- In the Access policies configuration blade, choose the link "Click to show advanced access policies"
|
||||
|
||||
- Check the "Enable access to Azure Virtual Machines for deployment" checkbox.
|
||||
- Check the "Enable access to Azure Virtual Machines for deployment" checkbox
|
||||
|
||||
- Click "Save". When the key vault update completes, close the Access policies blade.
|
||||
- Choose "Save". When the key vault update completes, close the Access policies blade.
|
||||
|
||||
![Basic Configuration Type is selected on the Security blade, and Edit access policies for hands-on-lab-SUFFIX is selected. Enable access to Azure Virutal Machines for deployment is checked in the Access policies blade on the right.](images/Setup/image10.png "Security and Access policies blades")
|
||||
|
||||
- Enter "hands-on-lab-SUFFIX" as the certificate name. Then click OK on the Security configuration blade.
|
||||
- Enter "hands-on-lab-SUFFIX" as the certificate name. Then choose OK on the Security configuration blade.
|
||||
|
||||
6. On the Summary blade, review the summary, and select Create to begin provisioning the new cluster.
|
||||
6. On the Summary blade, review the summary, and select Create to begin provisioning the new cluster
|
||||
|
||||
![The Summary blade displays with the message that Validation has passed.](images/Setup/image11.png "Summary blade")
|
||||
|
||||
|
@ -130,17 +130,17 @@ In this task, you will provision the Service Fabric Cluster in Azure.
|
|||
|
||||
In this task, you will provision a virtual machine (VM) in Azure. The VM image used will have Visual Studio Community 2017 installed.
|
||||
|
||||
1. Launch a web browser and navigate to the [Azure portal](https://portal.azure.com/).
|
||||
1. Launch a web browser and navigate to the [Azure portal](https://portal.azure.com/)
|
||||
|
||||
2. Select +New, then type "Visual Studio" into the search bar. Select Visual Studio Community 2017 (latest release) on Windows Server 2016 (x64) from the results.
|
||||
|
||||
![In the left pane of the Azure portal, New is circled. In the Marketplace blade, Everything is selected. In the Everything blade, the search field contains Visual Studio. Under Results, Visual Studio Community 2017 on Windows Server 2016 (x64) is circled.](images/Setup/image12.png "Azure portal")
|
||||
|
||||
3. On the blade that comes up, ensure the deployment model is set to Resource Manager and select Create.
|
||||
3. On the blade that comes up, ensure the deployment model is set to Resource Manager and select Create
|
||||
|
||||
![Resource Manager displays in the the Select a deployment model field.](images/Setup/image13.png "Select a deployment model field")
|
||||
|
||||
4. Set the following configuration on the Basics tab.
|
||||
4. Set the following configuration on the Basics tab
|
||||
|
||||
- Name: Enter LabVM
|
||||
|
||||
|
@ -152,11 +152,11 @@ In this task, you will provision a virtual machine (VM) in Azure. The VM image u
|
|||
|
||||
- Subscription: Select the subscription you are using for this lab
|
||||
|
||||
- Resource group: Select Use existing, and select the hands-on-labs resource group created previously.
|
||||
- Resource group: Select Use existing, and select the hands-on-labs resource group created previously
|
||||
|
||||
- Location: Select the region you are using for resources in this lab.
|
||||
- Location: Select the region you are using for resources in this lab
|
||||
|
||||
- Select OK to move to the next step.
|
||||
- Select OK to move to the next step
|
||||
|
||||
![The Basics blade displays with the fields set to the previously stated settings.](images/Setup/image14.png "Basics blade")
|
||||
|
||||
|
@ -164,37 +164,37 @@ In this task, you will provision a virtual machine (VM) in Azure. The VM image u
|
|||
|
||||
![On the Choose a size blade, the Supported disk type, SSD, is circled. The D2S\_V3 Standard option is circled, as is the View all button.](images/Setup/image15.png "Choose a size blade")
|
||||
|
||||
6. Select Select to move on to the Settings blade.
|
||||
6. Select Select to move on to the Settings blade
|
||||
|
||||
7. Accept all the default values on the Settings blade and select OK.
|
||||
7. Accept all the default values on the Settings blade and select OK
|
||||
|
||||
8. Select Create on the Create blade to provision the virtual machine.
|
||||
8. Select Create on the Create blade to provision the virtual machine
|
||||
|
||||
![The Create blade displays with the Standard D2s v3 offer details.](images/Setup/image16.png "Create blade")
|
||||
|
||||
9. It may take 10+ minutes for the virtual machine to complete provisioning.
|
||||
9. It may take 10+ minutes for the virtual machine to complete provisioning
|
||||
|
||||
### Task 3: Connect to your lab VM
|
||||
|
||||
In this step, you will open an RDP connection to your Lab VM and disable Internet Explorer Enhanced Security Configuration.
|
||||
|
||||
1. Connect to the Lab VM. (If you are already connected to your Lab VM, skip to Step 9)
|
||||
1. Connect to the Lab VM (If you are already connected to your Lab VM, skip to Step 9)
|
||||
|
||||
2. From the left side menu in the Azure portal, select Resource groups, then enter your resource group name into the filter box, and select it from the list.
|
||||
2. From the side menu in the Azure portal, select Resource groups, then enter your resource group name into the filter box, and select it from the list
|
||||
|
||||
![In the Azure Portal, Resource groups pane, hands-on is typed in the search field, and under Name, hands-on-labs is circled.](images/Setup/image17.png "Azure Portal, Resource groups pane")
|
||||
|
||||
3. Next, select your lab virtual machine, LabVM, from the list.
|
||||
3. Next, select your lab virtual machine, LabVM, from the list
|
||||
|
||||
![In the Name list, the LabVM Virtual Machine is circled.](images/Setup/image18.png "Name list")
|
||||
|
||||
4. On your Lab VM blade, select Connect from the top menu.
|
||||
4. On your Lab VM blade, select Connect from the top menu
|
||||
|
||||
![The Connect button is circled on the lab VM blade top menu.](images/Setup/image19.png "Lab VM blade top menu")
|
||||
|
||||
5. Download and open the RDP file.
|
||||
5. Download and open the RDP file
|
||||
|
||||
6. Select Connect on the Remote Desktop Connection dialog.
|
||||
6. Select Connect on the Remote Desktop Connection dialog
|
||||
|
||||
![In the Remote Desktop Connection Dialog Box, the Connect button is circled.](images/Setup/image20.png "Remote Desktop Connection Dialog Box")
|
||||
|
||||
|
@ -206,7 +206,7 @@ In this step, you will open an RDP connection to your Lab VM and disable Interne
|
|||
|
||||
![The Windows Security Credentials page displays](images/Setup/image21.png "Windows Security Credentials page")
|
||||
|
||||
8. Select Yes to connect, if prompted that the identity of the remote computer cannot be verified.
|
||||
8. Select Yes to connect, if prompted that the identity of the remote computer cannot be verified
|
||||
|
||||
![In the Remote Desktop Connection dialog box, a warning states that the identity of the remote computer cannot be verified, and asks if you want to continue anyway. At the bottom, the Yes button is circled.](images/Setup/image22.png "Remote Desktop Connection dialog box")
|
||||
|
||||
|
@ -214,33 +214,33 @@ In this step, you will open an RDP connection to your Lab VM and disable Interne
|
|||
|
||||
![The Server Manager tile is circled in the Start Menu.](images/Setup/image23.png "Start Menu")
|
||||
|
||||
10. Select Local Server, then select On (might also display Off) next to IE Enhanced Security Configuration.
|
||||
10. Select Local Server, then select On (might also display Off) next to IE Enhanced Security Configuration
|
||||
|
||||
![In Server manager, in the left pane, Local Server is selected. In the right, Properties pane, IE Enhanced Security Configuration is circled, and a callout arrow points to On.](images/Setup/image24.png "Server manager")
|
||||
|
||||
11. In the Internet Explorer Enhanced Security Configuration dialog, select Off under Administrators and under Users, then select OK.
|
||||
11. In the Internet Explorer Enhanced Security Configuration dialog, select Off under Administrators and under Users, then select OK
|
||||
|
||||
![In the the Internet Explorer Enhanced Security Configuration dialog box, under Administrators and under Users, the Off button is selected and circled. ](images/Setup/image25.png "Internet Explorer Enhanced Security Configuration dialog box")
|
||||
|
||||
12. Close the Server Manager.
|
||||
12. Close the Server Manager
|
||||
|
||||
### Task 4: Install Chrome on LabVM
|
||||
|
||||
In this task, you will install the Google Chrome browser on your Lab VM.
|
||||
|
||||
1. On your Lab VM, open a web browser, and navigate to <https://www.google.com/chrome/browser/desktop/index.html>, and select Download Chrome.
|
||||
1. On your Lab VM, open a web browser, and navigate to <https://www.google.com/chrome/browser/desktop/index.html>, and select Download Chrome
|
||||
|
||||
![Screenshot of the Download Chrome button.](images/Setup/image26.png "Download Chrome button")
|
||||
|
||||
2. Select Accept and Install on the terms of service screen.
|
||||
2. Select Accept and Install on the terms of service screen
|
||||
|
||||
![The Download Chrome for Windows window displays.](images/Setup/image27.png "Download Chrome for Windows ")
|
||||
|
||||
3. Select Run on the Application Run -- Security Warning dialog.
|
||||
3. Select Run on the Application Run -- Security Warning dialog
|
||||
|
||||
![The Run button is circled in the Application Run -- Security Warning dialog box.](images/Setup/image28.png "Application Run ??? Security Warning dialog box")
|
||||
|
||||
4. Select Run again, on the Open File -- Security Warning dialog.
|
||||
4. Select Run again, on the Open File -- Security Warning dialog
|
||||
|
||||
![In the Open File -- Security Warning dialog box, a message asks if you want to run the file. At the bottom, the Run button is circled.](images/Setup/image29.png "Open File ??? Security Warning dialog box")
|
||||
|
||||
|
@ -250,27 +250,27 @@ In this task, you will install the Google Chrome browser on your Lab VM.
|
|||
|
||||
In this task, you will install the latest Service Fabric SDK for Visual Studio 2017 on your Lab VM.
|
||||
|
||||
1. On your Lab VM, open a browser, and navigate to <https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started>.
|
||||
1. On your Lab VM, open a browser, and navigate to <https://docs.microsoft.com/azure/service-fabric/service-fabric-get-started>
|
||||
|
||||
2. Scroll down on the page to the Install the SDK and tools section and select Install the Microsoft Azure Service Fabric SDK under the To use Visual Studio 2017 heading.
|
||||
2. Scroll down on the page to the Install the SDK and tools section and select Install the Microsoft Azure Service Fabric SDK under the To use Visual Studio 2017 heading
|
||||
|
||||
![In the Install the SDK and tools section, the link to Install the Microsoft Azure Service Fabric SDK is circled.](images/Setup/image30.png "Install the SDK and tools section")
|
||||
|
||||
3. Run the downloaded executable and select Install in the Web Platform Installer screen.
|
||||
3. Run the downloaded executable and select Install in the Web Platform Installer screen
|
||||
|
||||
![The Web Platform Installer window displays the information for Microsoft Azure Service Fabric SDK - 3.1.283.](images/Setup/image31.png "Web Platform Installer window")
|
||||
|
||||
4. On the Prerequisites screen, select I Accept.
|
||||
4. On the Prerequisites screen, select I Accept
|
||||
|
||||
![The Web Platform Installer Prerequisites window lists the file name and file size to be downloaded. At the bottom, the I Accept button to download additional software and review the license is circled.](images/Setup/image32.png "Web Platform Installer Prerequisites window")
|
||||
|
||||
5. Select Finish when the install completes.
|
||||
5. Select Finish when the install completes
|
||||
|
||||
![The Web Platform Installer Finish window shows that the installation was successful, and lists the products that were installed.](images/Setup/image33.png "Web Platform Installer Finish window")
|
||||
|
||||
6. Select Exit on the Web Platform installer to close it.
|
||||
6. Select Exit on the Web Platform installer to close it
|
||||
|
||||
7. Restart the VM to complete the installation and start the local Service Fabric cluster service.
|
||||
7. Restart the VM to complete the installation and start the local Service Fabric cluster service
|
||||
|
||||
### Task 6: Setup Service Fabric certificate
|
||||
|
||||
|
@ -278,71 +278,71 @@ When you create a new Service Fabric Cluster using the portal, a secure cluster
|
|||
|
||||
In this task, you will download the required certificate and install it on your Lab VM.
|
||||
|
||||
1. In the Azure portal, navigate to the Resource Group you created previously and where you created the Key vault that supports the cluster.
|
||||
1. In the Azure portal, navigate to the Resource Group you created previously and where you created the Key vault that supports the cluster
|
||||
|
||||
2. Select the key vault from the list of resources in the resource group.
|
||||
2. Select the key vault from the list of resources in the resource group
|
||||
|
||||
![In the Azure Portal Resource Group pane, in the list of resources, the hands-on-lab-SUFFIX key vault is circled.](images/Setup/image34.png "Resource group list")
|
||||
|
||||
3. Under the Settings category in the left-hand menu, select Certificates and then select the existing certificate.
|
||||
3. Under the Settings category in the menu, select Certificates and then select the existing certificate
|
||||
|
||||
![In the Settings section, Certificates and the existing certificate are circled.](images/Setup/image35.png "Certificates")
|
||||
|
||||
4. Select the Current Version of the existing certificate.
|
||||
4. Select the Current Version of the existing certificate
|
||||
|
||||
![In the certificate list, the existing certificate is circled.](images/Setup/image36.png "Existing certificate")
|
||||
|
||||
5. In the certificate information blade, select Download in PFX/PEM format and save the certificate.
|
||||
5. In the certificate information blade, select Download in PFX/PEM format and save the certificate
|
||||
|
||||
![In the certificate information blade, download the private certificate.](images/Setup/image37.png "Download certificate")
|
||||
|
||||
6. Copy the downloaded certificate into the Lab VM.
|
||||
6. Copy the downloaded certificate into the Lab VM
|
||||
|
||||
7. On the Lab VM, double-click the copied certificate to initiate it's installation. Select Local Machine as the Store Location and select Next.
|
||||
|
||||
![Double-click the certificate to install, select Local Machine and select Next.](images/Setup/image38.png "Certificate Import Wizard")
|
||||
|
||||
8. Select Next.
|
||||
8. Select Next
|
||||
|
||||
![Select Next.](images/Setup/image39.png "File to import")
|
||||
|
||||
9. Select Next.
|
||||
9. Select Next
|
||||
|
||||
![Select Next.](images/Setup/image40.png "Private key protection")
|
||||
|
||||
10. Select Next.
|
||||
10. Select Next
|
||||
|
||||
![In the Certificate Store, select Next.](images/Setup/image41.png "Certificate Store")
|
||||
|
||||
11. Select Finish.
|
||||
11. Select Finish
|
||||
|
||||
![In the review panel, select next.](images/Setup/image42.png "Review panel")
|
||||
|
||||
12. When the import finishes successfully, select OK.
|
||||
12. When the import finishes successfully, select OK
|
||||
|
||||
![Import success.](images/Setup/image43.png "Import successful")
|
||||
|
||||
13. On the Lab VM, double-click the copied certificate once again to initiate it's installation. Select Current User as the Store Location and select Next.
|
||||
13. On the Lab VM, double-click the copied certificate once again to initiate it's installation. Select Current User as the Store Location and select Next
|
||||
|
||||
![Double-click the certificate to install, select Local Machine and select Next.](images/Setup/image44.png "Certificate Import Wizard")
|
||||
|
||||
14. Select Next.
|
||||
14. Select Next
|
||||
|
||||
![Select Next.](images/Setup/image39.png "File to import")
|
||||
|
||||
15. Select Next.
|
||||
15. Select Next
|
||||
|
||||
![Select Next.](images/Setup/image40.png "Private key protection")
|
||||
|
||||
16. Select Next.
|
||||
16. Select Next
|
||||
|
||||
![In the Certificate Store, select Next.](images/Setup/image41.png "Certificate Store")
|
||||
|
||||
17. Select Finish.
|
||||
17. Select Finish
|
||||
|
||||
![In the review panel, select next.](images/Setup/image42.png "Review panel")
|
||||
|
||||
18. When the import finishes successfully, select OK.
|
||||
18. When the import finishes successfully, select OK
|
||||
|
||||
![Import success.](images/Setup/image43.png "Import successful")
|
||||
|
||||
|
@ -354,11 +354,11 @@ In this task, you will validate that the ports are open and if not, fix the issu
|
|||
|
||||
1. In the Azure portal, navigate to the Resource Group you created previously, and where you created the cluster. If your Service Fabric cluster is still deploying, do not proceed to the next step until the deployment is completed.
|
||||
|
||||
2. Select the load balancer from the list of resources in the resource group.
|
||||
2. Select the load balancer from the list of resources in the resource group
|
||||
|
||||
![In the Azure Portal Resource Group pane, in the list of resources, the LB-contosoeventssf-SUFFIX-Web load balancer is circled.](images/Setup/image45.png "Resource group list")
|
||||
|
||||
3. Under the Settings category in the left-hand menu, select Health probes.
|
||||
3. Under the Settings category in the menu, select Health probes
|
||||
|
||||
![In the Settings section, Health probes is circled.](images/Setup/image46.png "Settings section")
|
||||
|
||||
|
@ -366,7 +366,7 @@ In this task, you will validate that the ports are open and if not, fix the issu
|
|||
|
||||
![In the list of health probes, three health probes display. For AppPortProbe1, its Port (8082), and Used by value (AppPortLBRule1) are circled.](images/Setup/image47.png "Health probes list")
|
||||
|
||||
5. Select +Add on the Health probes blade.
|
||||
5. Select +Add on the Health probes blade
|
||||
|
||||
![Screenshot of an Add button.](images/Setup/image48.png "Add button")
|
||||
|
||||
|
@ -382,15 +382,15 @@ In this task, you will validate that the ports are open and if not, fix the issu
|
|||
|
||||
- Unhealthy threshold: Leave the default value
|
||||
|
||||
- Select OK to create the probe.
|
||||
- Select OK to create the probe
|
||||
|
||||
![Fields on the Add health probe blade are set to the previously listed settings.](images/Setup/image49.png "Add health probe blade")
|
||||
|
||||
7. Once the Health probe is added (this can take a few minutes to update), you will create a rule associated with this probe. Under the Settings block in the left-hand menu, select Load balancing rules.
|
||||
7. Once the Health probe is added (this can take a few minutes to update), you will create a rule associated with this probe. Under the Settings block in the menu, select Load balancing rules.
|
||||
|
||||
![In the Settings section, Load balancing rules are circled.](images/Setup/image50.png "Settings section")
|
||||
|
||||
8. Select +Add on the Load balancing rules blade.
|
||||
8. Select +Add on the Load balancing rules blade
|
||||
|
||||
![Screenshot of an Add button.](images/Setup/image48.png "Add button")
|
||||
|
||||
|
@ -412,7 +412,7 @@ In this task, you will validate that the ports are open and if not, fix the issu
|
|||
|
||||
- Health probe: Select the WebApiPortProbe you created previously
|
||||
|
||||
- Leave the default values for the remaining fields, and Select OK.
|
||||
- Leave the default values for the remaining fields, and Select OK
|
||||
|
||||
![Fields on the Add load balancing rule blade are set to the previously defined settings.](images/Setup/image51.png "Add load balancing rule blade")
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ There are two labs, one for each target audience:
|
|||
|
||||
## Whiteboard Design Session
|
||||
|
||||
This whiteboard design session is designed to help attendees gain a better understanding of implementing architectures leveraging aspects from microservices and serverless architectures, by helping an online concert ticket vendor survive the first 5 minutes of crushing load. They will handle the client\'s scaling needs through microservices built on top of Service Fabric, and apply smooth updates or roll back failing updates. Finally, students will design an implementation of load testing to optimize the architecture for handling spikes in traffic.
|
||||
This whiteboard design session is designed to help attendees gain a better understanding of implementing architectures leveraging aspects from microservices and serverless architectures, by helping an online concert ticket vendor survive the first 5 minutes of crushing load. They will handle the client's scaling needs through microservices built on top of Service Fabric, and apply smooth updates or roll back failing updates. Finally, students will design an implementation of load testing to optimize the architecture for handling spikes in traffic.
|
||||
|
||||
Attendees will learn how to:
|
||||
|
||||
|
|
Двоичный файл не отображается.
|
@ -53,8 +53,10 @@ Attendees will learn how to:
|
|||
**Outcome**
|
||||
|
||||
Analyze your customer’s needs.
|
||||
Time frame: 15 minutes
|
||||
Directions: With all participants in the session, the facilitator/SME presents an overview of the customer case study along with technical tips.
|
||||
|
||||
Timeframe: 15 minutes
|
||||
|
||||
Directions: With all participants in the session, the facilitator/SME presents an overview of the customer case study along with technical tips.
|
||||
1. Meet your table participants and trainer
|
||||
2. Read all of the directions for steps 1–3 in the student guide
|
||||
3. As a table team, review the following customer case study
|
||||
|
@ -79,7 +81,7 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
- **Consumer site (Web site)**: Customers search events, place ticket orders, return to view their orders and history of events
|
||||
|
||||
- **Search events**: Customers will search for events they are interested in, from the event catalog available via the web site. The event catalog is managed by an internal administrative site
|
||||
- **Search events**: Customers will search for events they are interested in, from the event catalog available via the web site. The event catalog is managed by an internal administrative site.
|
||||
|
||||
- **Event details**: Customers may visit a specific event page to order tickets, from search results or a direct link from an email campaign or referral
|
||||
|
||||
|
@ -99,23 +101,23 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
### Customer needs
|
||||
|
||||
1. Event tickets can be ordered from multiple channels: the web site, new mobile applications, and third-party site and applications via available APIs.
|
||||
1. Event tickets can be ordered from multiple channels: the web site, new mobile applications, and third-party site and applications via available APIs
|
||||
|
||||
2. Customers must be registered / logged in to place orders, so that they can login and find their orders, and for reporting and analytics purposes.
|
||||
2. Customers must be registered or logged in to place orders, so that they can login and find their orders, and for reporting and analytics purposes
|
||||
|
||||
3. Internal staff will manage orders and view reports from the Admin site.
|
||||
3. Internal staff will manage orders and view reports from the Admin site
|
||||
|
||||
4. The ability to rapidly release new features that may involve UI, business logic and data model changes by reducing dependency across features.
|
||||
4. The ability to rapidly release new features that may involve UI, business logic and data model changes by reducing dependency across features
|
||||
|
||||
5. Reduced overall downtime caused by system updates. Rollouts must be possible without scheduled downtime. Rollbacks must be possible in the event of failure.
|
||||
|
||||
6. The solution must be able to handle increased system load for ticket purchasing, including higher peak periods without excessive increases in management overhead and cost.
|
||||
6. The solution must be able to handle increased system load for ticket purchasing, including higher peak periods without excessive increases in management overhead and cost
|
||||
|
||||
7. Operations management overhead must be improved through better system monitoring, visibility, self-healing services and auto-scale features.
|
||||
7. Operations management overhead must be improved through better system monitoring, visibility, self-healing services and auto-scale features
|
||||
|
||||
8. The customer has decided to migrate from SQL Server to Cosmos DB for a more flexible schema and increased scalability across features.
|
||||
8. The customer has decided to migrate from SQL Server to Cosmos DB for a more flexible schema and increased scalability across features
|
||||
|
||||
9. A solution is required for securing and managing APIs used internally and by external partners, with the ability to easily publish APIs, version APIs, onboard consumers, control policy, monitor and audit usage.
|
||||
9. A solution is required for securing and managing APIs used internally and by external partners, with the ability to easily publish APIs, version APIs, onboard consumers, control policy, monitor and audit usage
|
||||
|
||||
10. The solution currently processes credit cards with a third-party payment-processing provider. This aspect of the solution will remain the same and requires integration into the new design.
|
||||
|
||||
|
@ -125,7 +127,7 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
2. Microservices architectures are completely new to the Contoso Events team. If we were to go forward with Service Fabric, we would like to understand what skills the team can carry forward, and how much of a learning curve exists.
|
||||
|
||||
3. We would like to understand if stateful services or stateful actors will help us with ticket ordering throughput, workflow and state management, and easier rollouts of changes to this process.
|
||||
3. We would like to understand if stateful services or stateful actors will help us with ticket ordering throughput, workflow and state management, and easier rollouts of changes to this process
|
||||
|
||||
4. We are not clear how and where to incorporate stateful services and actors alongside other storage such as Cosmos DB. We need the ability to support robust ad-hoc queries against our system data such as events, customers, orders and related metrics -- but would like to take advantage of the performance and reliability of Service Fabric stateful options as well.
|
||||
|
||||
|
@ -151,16 +153,17 @@ Reference: [*https://docs.microsoft.com/en-us/azure/service-fabric/service-fabri
|
|||
|
||||
***Storage State between Monolithic and Microservices Approaches***
|
||||
|
||||
The monolithic approach on the left has a single database and tiers of specific technologies. The microservices approach on the right has a graph of interconnected microservices where state is typically scoped to the microservice and various approaches are used to manage state.
|
||||
The monolithic approach has a single database and tiers of specific technologies. The microservices approach has a graph of interconnected microservices where state is typically scoped to the microservice and various approaches are used to manage state.
|
||||
|
||||
Source: *<https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices>*
|
||||
|
||||
## Step 2: Design a proof of concept solution
|
||||
|
||||
**Outcome**
|
||||
|
||||
Design a solution and prepare to present the solution to the target customer audience in a 15-minute chalk-talk format.
|
||||
|
||||
Time frame: 60 minutes
|
||||
Timeframe: 60 minutes
|
||||
|
||||
**Business needs**
|
||||
|
||||
|
@ -169,35 +172,36 @@ Directions: With all participants at your table, answer the following questions
|
|||
2. What customer business needs do you need to address with your solution?
|
||||
|
||||
**Design**
|
||||
|
||||
Directions: With all participants at your table, respond to the following questions on a flip chart.
|
||||
|
||||
*High-level architecture*
|
||||
|
||||
1. Without getting into the details (the following sections will address the particular details), diagram your initial vision for handling the top-level requirements for web sites, mobile applications, third party applications, access to APIs, compute and storage.
|
||||
1. Without getting into the details (the following sections will address the particular details), diagram your initial vision for handling the top-level requirements for web sites, mobile applications, third party applications, access to APIs, compute and storage
|
||||
|
||||
2. Based on the customer situation, what core services would you propose as part of the new microservices architecture? What state, if any, would those services hold? Illustrate with a diagram.
|
||||
|
||||
*Scalability of ticket orders*
|
||||
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket order request.
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket order request
|
||||
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable.
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable
|
||||
|
||||
3. Describe the resiliency of this use case. How can you create an asynchronous ticket order request and guarantee processing? Are there any potential points of failure? How will you address those?
|
||||
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer.
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer
|
||||
|
||||
*Improving DevOps workflows*
|
||||
|
||||
1. How would you structure the Visual Studio solution so that developers can run, debug, and publish the entire solution but also be able to publish and upgrade individual microservices (could be one or more service grouped together)?
|
||||
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features.
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features
|
||||
|
||||
3. Explain how the Service Fabric cluster handles auto-scaling. How does Service Fabric help the customer to make better utilization of their compute resources?
|
||||
|
||||
4. How would you recommend the customer plan for high availability (HA) in this solution?
|
||||
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health.
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health
|
||||
|
||||
6. How can you update cluster settings after the fact? What kind of settings might you want to update?
|
||||
|
||||
|
@ -213,9 +217,9 @@ Directions: With all participants at your table, respond to the following questi
|
|||
|
||||
Directions: With all participants at your table:
|
||||
|
||||
1. Identify any customer needs that are not addressed with the proposed solution.
|
||||
2. Identify the benefits of your solution.
|
||||
3. Determine how you will respond to the customer’s objections.
|
||||
1. Identify any customer needs that are not addressed with the proposed solution
|
||||
2. Identify the benefits of your solution
|
||||
3. Determine how you will respond to the customer’s objections
|
||||
|
||||
Prepare a 15-minute chalk-talk style presentation to the customer.
|
||||
|
||||
|
@ -225,18 +229,18 @@ Prepare a 15-minute chalk-talk style presentation to the customer.
|
|||
|
||||
Present a solution to the target customer audience in a 15-minute chalk-talk format.
|
||||
|
||||
Time frame: 30 minutes
|
||||
Timeframe: 30 minutes
|
||||
|
||||
**Presentation**
|
||||
|
||||
Directions:
|
||||
1. Pair with another table.
|
||||
2. One table is the Microsoft team and the other table is the customer.
|
||||
3. The Microsoft team presents their proposed solution to the customer.
|
||||
4. The customer makes one of the objections from the list of objections.
|
||||
5. The Microsoft team responds to the objection.
|
||||
6. The customer team gives feedback to the Microsoft team.
|
||||
7. Tables switch roles and repeat Steps 2–6.
|
||||
1. Pair with another table
|
||||
2. One table is the Microsoft team and the other table is the customer
|
||||
3. The Microsoft team presents their proposed solution to the customer
|
||||
4. The customer makes one of the objections from the list of objections
|
||||
5. The Microsoft team responds to the objection
|
||||
6. The customer team gives feedback to the Microsoft team
|
||||
7. Tables switch roles and repeat Steps 2–6
|
||||
|
||||
## Additional references
|
||||
| | |
|
||||
|
@ -247,3 +251,4 @@ Directions:
|
|||
| Azure Functions | <https://azure.microsoft.com/en-us/services/functions/> |
|
||||
| Cosmos DB | <https://azure.microsoft.com/en-us/documentation/articles/documentdb-introduction/> |
|
||||
| Azure AD | <https://azure.microsoft.com/en-us/services/active-directory-b2c/> |
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ Information in this document, including URL and other Internet Web site referenc
|
|||
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
|
||||
|
||||
The names of manufacturers, products, or URLs are provided for informational purposes only and Microsoft makes no representations and warranties, either expressed, implied, or statutory, regarding these manufacturers or the use of the products with any Microsoft technologies. The inclusion of a manufacturer or product does not imply endorsement of Microsoft of the manufacturer or product. Links may be provided to third party sites. Such sites are not under the control of Microsoft and Microsoft is not responsible for the contents of any linked site or any link contained in a linked site, or any changes or updates to such sites. Microsoft is not responsible for webcasting or any other form of transmission received from any linked site. Microsoft is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement of Microsoft of the site or the products contained therein.
|
||||
|
||||
© 2018 Microsoft Corporation. All rights reserved.
|
||||
|
||||
Microsoft and the trademarks listed at https://www.microsoft.com/en-us/legal/intellectualproperty/Trademarks/Usage/General.aspx are trademarks of the Microsoft group of companies. All other trademarks are property of their respective owners.
|
||||
|
@ -54,25 +55,25 @@ Thank you for taking time to support the whiteboard design sessions as a trainer
|
|||
|
||||
An amazing trainer:
|
||||
|
||||
- Creates a safe environment in which learning can take place.
|
||||
- Creates a safe environment in which learning can take place
|
||||
|
||||
- Stimulates the participant's thinking.
|
||||
- Stimulates the participant's thinking
|
||||
|
||||
- Involves the participant in the learning process.
|
||||
- Involves the participant in the learning process
|
||||
|
||||
- Manages the learning process (on time, on topic, and adjusting to benefit participants).
|
||||
- Manages the learning process (on time, on topic, and adjusting to benefit participants)
|
||||
|
||||
- Ensures individual participant accountability.
|
||||
- Ensures individual participant accountability
|
||||
|
||||
- Ties it all together for the participant.
|
||||
- Ties it all together for the participant
|
||||
|
||||
- Provides insight and experience to the learning process.
|
||||
- Provides insight and experience to the learning process
|
||||
|
||||
- Effectively leads the whiteboard design session discussion.
|
||||
- Effectively leads the whiteboard design session discussion
|
||||
|
||||
- Monitors quality and appropriateness of participant deliverables.
|
||||
- Monitors quality and appropriateness of participant deliverables
|
||||
|
||||
- Effectively leads the feedback process.
|
||||
- Effectively leads the feedback process
|
||||
|
||||
## Whiteboard design session flow
|
||||
|
||||
|
@ -120,13 +121,13 @@ Before conducting your first whiteboard design session:
|
|||
|
||||
- Read the Student guide (including the case study) and Trainer guide
|
||||
|
||||
- Become familiar with all key points and activities.
|
||||
- Become familiar with all key points and activities
|
||||
|
||||
- Plan the point you want to stress, which questions you want to drive, transitions, and be ready to answer questions.
|
||||
- Plan the point you want to stress, which questions you want to drive, transitions, and be ready to answer questions
|
||||
|
||||
- Prior to the whiteboard design session, discuss the case study to pick up more ideas.
|
||||
- Prior to the whiteboard design session, discuss the case study to pick up more ideas
|
||||
|
||||
- Make notes for later.
|
||||
- Make notes for later
|
||||
|
||||
## During the whiteboard design session: Tips for an effective whiteboard design session
|
||||
|
||||
|
@ -136,7 +137,7 @@ Before conducting your first whiteboard design session:
|
|||
|
||||
When participants are doing activities, you can **look ahead to refresh your memory**.
|
||||
|
||||
- **Adjust activity and whiteboard design session pace** as needed to allow time for presenting, feedback, and sharing.
|
||||
- **Adjust activity and whiteboard design session pace** as needed to allow time for presenting, feedback, and sharing
|
||||
|
||||
- **Add examples, points, and stories** from your own experience. Think about stories you can share that help you make your points clearly and effectively.
|
||||
|
||||
|
@ -173,8 +174,10 @@ Attendees will learn how to:
|
|||
**Outcome**
|
||||
|
||||
Analyze your customer’s needs.
|
||||
Time frame: 15 minutes
|
||||
Directions: With all participants in the session, the facilitator/SME presents an overview of the customer case study along with technical tips.
|
||||
|
||||
Timeframe: 15 minutes
|
||||
|
||||
Directions: With all participants in the session, the facilitator/SME presents an overview of the customer case study along with technical tips.
|
||||
1. Meet your table participants and trainer
|
||||
2. Read all of the directions for steps 1–3 in the student guide
|
||||
3. As a table team, review the following customer case study
|
||||
|
@ -199,7 +202,7 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
- **Consumer site (Web site)**: Customers search events, place ticket orders, return to view their orders and history of events
|
||||
|
||||
- **Search events**: Customers will search for events they are interested in, from the event catalog available via the web site. The event catalog is managed by an internal administrative site
|
||||
- **Search events**: Customers will search for events they are interested in, from the event catalog available via the web site. The event catalog is managed by an internal administrative site.
|
||||
|
||||
- **Event details**: Customers may visit a specific event page to order tickets, from search results or a direct link from an email campaign or referral
|
||||
|
||||
|
@ -219,23 +222,23 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
### Customer needs
|
||||
|
||||
1. Event tickets can be ordered from multiple channels: the web site, new mobile applications, and third-party site and applications via available APIs.
|
||||
1. Event tickets can be ordered from multiple channels: the web site, new mobile applications, and third-party site and applications via available APIs
|
||||
|
||||
2. Customers must be registered / logged in to place orders, so that they can login and find their orders, and for reporting and analytics purposes.
|
||||
2. Customers must be registered or logged in to place orders, so that they can login and find their orders, and for reporting and analytics purposes
|
||||
|
||||
3. Internal staff will manage orders and view reports from the Admin site.
|
||||
3. Internal staff will manage orders and view reports from the Admin site
|
||||
|
||||
4. The ability to rapidly release new features that may involve UI, business logic and data model changes by reducing dependency across features.
|
||||
4. The ability to rapidly release new features that may involve UI, business logic and data model changes by reducing dependency across features
|
||||
|
||||
5. Reduced overall downtime caused by system updates. Rollouts must be possible without scheduled downtime. Rollbacks must be possible in the event of failure.
|
||||
|
||||
6. The solution must be able to handle increased system load for ticket purchasing, including higher peak periods without excessive increases in management overhead and cost.
|
||||
6. The solution must be able to handle increased system load for ticket purchasing, including higher peak periods without excessive increases in management overhead and cost
|
||||
|
||||
7. Operations management overhead must be improved through better system monitoring, visibility, self-healing services and auto-scale features.
|
||||
7. Operations management overhead must be improved through better system monitoring, visibility, self-healing services and auto-scale features
|
||||
|
||||
8. The customer has decided to migrate from SQL Server to Cosmos DB for a more flexible schema and increased scalability across features.
|
||||
8. The customer has decided to migrate from SQL Server to Cosmos DB for a more flexible schema and increased scalability across features
|
||||
|
||||
9. A solution is required for securing and managing APIs used internally and by external partners, with the ability to easily publish APIs, version APIs, onboard consumers, control policy, monitor and audit usage.
|
||||
9. A solution is required for securing and managing APIs used internally and by external partners, with the ability to easily publish APIs, version APIs, onboard consumers, control policy, monitor and audit usage
|
||||
|
||||
10. The solution currently processes credit cards with a third-party payment-processing provider. This aspect of the solution will remain the same and requires integration into the new design.
|
||||
|
||||
|
@ -245,7 +248,7 @@ According to the CIO, the current system topology handles the following core use
|
|||
|
||||
2. Microservices architectures are completely new to the Contoso Events team. If we were to go forward with Service Fabric, we would like to understand what skills the team can carry forward, and how much of a learning curve exists.
|
||||
|
||||
3. We would like to understand if stateful services or stateful actors will help us with ticket ordering throughput, workflow and state management, and easier rollouts of changes to this process.
|
||||
3. We would like to understand if stateful services or stateful actors will help us with ticket ordering throughput, workflow and state management, and easier rollouts of changes to this process
|
||||
|
||||
4. We are not clear how and where to incorporate stateful services and actors alongside other storage such as Cosmos DB. We need the ability to support robust ad-hoc queries against our system data such as events, customers, orders and related metrics -- but would like to take advantage of the performance and reliability of Service Fabric stateful options as well.
|
||||
|
||||
|
@ -271,16 +274,17 @@ Reference: [*https://docs.microsoft.com/en-us/azure/service-fabric/service-fabri
|
|||
|
||||
***Storage State between Monolithic and Microservices Approaches***
|
||||
|
||||
The monolithic approach on the left has a single database and tiers of specific technologies. The microservices approach on the right has a graph of interconnected microservices where state is typically scoped to the microservice and various approaches are used to manage state.
|
||||
The monolithic approach has a single database and tiers of specific technologies. The microservices approach has a graph of interconnected microservices where state is typically scoped to the microservice and various approaches are used to manage state.
|
||||
|
||||
Source: *<https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices>*
|
||||
|
||||
## Step 2: Design a proof of concept solution
|
||||
|
||||
**Outcome**
|
||||
|
||||
Design a solution and prepare to present the solution to the target customer audience in a 15-minute chalk-talk format.
|
||||
|
||||
Time frame: 60 minutes
|
||||
Timeframe: 60 minutes
|
||||
|
||||
**Business needs**
|
||||
|
||||
|
@ -289,35 +293,36 @@ Directions: With all participants at your table, answer the following questions
|
|||
2. What customer business needs do you need to address with your solution?
|
||||
|
||||
**Design**
|
||||
|
||||
Directions: With all participants at your table, respond to the following questions on a flip chart.
|
||||
|
||||
*High-level architecture*
|
||||
|
||||
1. Without getting into the details (the following sections will address the particular details), diagram your initial vision for handling the top-level requirements for web sites, mobile applications, third party applications, access to APIs, compute and storage.
|
||||
1. Without getting into the details (the following sections will address the particular details), diagram your initial vision for handling the top-level requirements for web sites, mobile applications, third party applications, access to APIs, compute and storage
|
||||
|
||||
2. Based on the customer situation, what core services would you propose as part of the new microservices architecture? What state, if any, would those services hold? Illustrate with a diagram.
|
||||
|
||||
*Scalability of ticket orders*
|
||||
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket order request.
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket order request
|
||||
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable.
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable
|
||||
|
||||
3. Describe the resiliency of this use case. How can you create an asynchronous ticket order request and guarantee processing? Are there any potential points of failure? How will you address those?
|
||||
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer.
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer
|
||||
|
||||
*Improving DevOps workflows*
|
||||
|
||||
1. How would you structure the Visual Studio solution so that developers can run, debug, and publish the entire solution but also be able to publish and upgrade individual microservices (could be one or more service grouped together)?
|
||||
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features.
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features
|
||||
|
||||
3. Explain how the Service Fabric cluster handles auto-scaling. How does Service Fabric help the customer to make better utilization of their compute resources?
|
||||
|
||||
4. How would you recommend the customer plan for high availability (HA) in this solution?
|
||||
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health.
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health
|
||||
|
||||
6. How can you update cluster settings after the fact? What kind of settings might you want to update?
|
||||
|
||||
|
@ -333,9 +338,9 @@ Directions: With all participants at your table, respond to the following questi
|
|||
|
||||
Directions: With all participants at your table:
|
||||
|
||||
1. Identify any customer needs that are not addressed with the proposed solution.
|
||||
2. Identify the benefits of your solution.
|
||||
3. Determine how you will respond to the customer’s objections.
|
||||
1. Identify any customer needs that are not addressed with the proposed solution
|
||||
2. Identify the benefits of your solution
|
||||
3. Determine how you will respond to the customer’s objections
|
||||
|
||||
Prepare a 15-minute chalk-talk style presentation to the customer.
|
||||
|
||||
|
@ -345,18 +350,18 @@ Prepare a 15-minute chalk-talk style presentation to the customer.
|
|||
|
||||
Present a solution to the target customer audience in a 15-minute chalk-talk format.
|
||||
|
||||
Time frame: 30 minutes
|
||||
Timeframe: 30 minutes
|
||||
|
||||
**Presentation**
|
||||
|
||||
Directions:
|
||||
1. Pair with another table.
|
||||
2. One table is the Microsoft team and the other table is the customer.
|
||||
3. The Microsoft team presents their proposed solution to the customer.
|
||||
4. The customer makes one of the objections from the list of objections.
|
||||
5. The Microsoft team responds to the objection.
|
||||
6. The customer team gives feedback to the Microsoft team.
|
||||
7. Tables switch roles and repeat Steps 2–6.
|
||||
1. Pair with another table
|
||||
2. One table is the Microsoft team and the other table is the customer
|
||||
3. The Microsoft team presents their proposed solution to the customer
|
||||
4. The customer makes one of the objections from the list of objections
|
||||
5. The Microsoft team responds to the objection
|
||||
6. The customer team gives feedback to the Microsoft team
|
||||
7. Tables switch roles and repeat Steps 2–6
|
||||
|
||||
## Additional references
|
||||
| | |
|
||||
|
@ -373,43 +378,43 @@ Directions:
|
|||
|
||||
## Step 1: Review the customer case study
|
||||
|
||||
- Check in with your table participants to introduce yourself as the trainer.
|
||||
- Check in with your table participants to introduce yourself as the trainer
|
||||
|
||||
- Ask, "What questions do you have about the customer case study?"
|
||||
|
||||
- Briefly review the steps and time frames of the whiteboard design session.
|
||||
- Briefly review the steps and time frames of the whiteboard design session
|
||||
|
||||
- Ready, set, go! Let the table participants begin.
|
||||
- Ready, set, go! Let the table participants begin
|
||||
|
||||
## Step 2: Design a proof of concept solution
|
||||
|
||||
- Check in with your tables to ensure that they are transitioning from step to step on time.
|
||||
- Check in with your tables to ensure that they are transitioning from step to step on time
|
||||
|
||||
- Provide some feedback on their responses to the business needs and design.
|
||||
- Provide some feedback on their responses to the business needs and design
|
||||
|
||||
- Try asking questions first that will lead the participants to discover the answers on their own.
|
||||
- Try asking questions first that will lead the participants to discover the answers on their own
|
||||
|
||||
- Provide feedback for their responses to the customer's objections.
|
||||
- Provide feedback for their responses to the customer's objections
|
||||
|
||||
- Try asking questions first that will lead the participants to discover the answers on their own.
|
||||
- Try asking questions first that will lead the participants to discover the answers on their own
|
||||
|
||||
## Step 3: Present the solution
|
||||
|
||||
- Determine which table will be paired with your table before Step 3 begins.
|
||||
- Determine which table will be paired with your table before Step 3 begins
|
||||
|
||||
- For the first round, assign one table as the Microsoft team and the other table as the customer.
|
||||
- For the first round, assign one table as the Microsoft team and the other table as the customer
|
||||
|
||||
- Have the Microsoft team present their solution to the customer team.
|
||||
- Have the Microsoft team present their solution to the customer team
|
||||
|
||||
- Have the customer team provide one objection for the Microsoft team to respond to.
|
||||
- Have the customer team provide one objection for the Microsoft team to respond to
|
||||
|
||||
- The presentation and objections should be no longer than 10 minutes.
|
||||
- The presentation and objections should be no longer than 10 minutes
|
||||
|
||||
- Have participants on the customer team give feedback to the Microsoft team.
|
||||
- Have participants on the customer team give feedback to the Microsoft team
|
||||
|
||||
- The feedback should be no longer than 5 minutes.
|
||||
- The feedback should be no longer than 5 minutes
|
||||
|
||||
- If needed, the trainer may also provide feedback.
|
||||
- If needed, the trainer may also provide feedback
|
||||
|
||||
## Wrap-up
|
||||
|
||||
|
@ -442,19 +447,19 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
Summary of technologies in the topology:
|
||||
|
||||
- Contoso Events will have both web and mobile applications that consume the back-end APIs for the solution.
|
||||
- Contoso Events will have both web and mobile applications that consume the back-end APIs for the solution
|
||||
|
||||
- Users will authenticate to applications using tokens issued by Azure AD B2C.
|
||||
- Users will authenticate to applications using tokens issued by Azure AD B2C
|
||||
|
||||
- The API Management layer will act as a gateway to all HTTP Web APIs exposed by the solution. API Management will be configured to authorize tokens issued by trusted Azure B2C tenants and potentially additional token issuers for third parties in future.
|
||||
|
||||
- Requests to HTTP Web APIs at the front end will go through Azure Load Balancer and distribute across the available Service Fabric nodes in the cluster.
|
||||
- Requests to HTTP Web APIs at the front end will go through Azure Load Balancer and distribute across the available Service Fabric nodes in the cluster
|
||||
|
||||
- Business functionality will be implemented with stateful services and actors (microservices). Web APIs call to those microservices.
|
||||
|
||||
- Stateful services will sync their data back to the Cosmos DB instance for ad-hoc queries. They will write the job to an Azure queue.
|
||||
|
||||
- An Azure Function will handle processing the queue and updating the TicketOrders and related collections in Cosmos DB according to business rules.
|
||||
- An Azure Function will handle processing the queue and updating the TicketOrders and related collections in Cosmos DB according to business rules
|
||||
|
||||
2. Based on the customer situation, what core services would you propose as part of the new microservices architecture? What state, if any, would those services hold? Illustrate with a diagram.
|
||||
|
||||
|
@ -464,35 +469,35 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
*Scalability of ticket orders*
|
||||
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket ordering request.
|
||||
1. Illustrate in more detail the Service Fabric services and components participating in a ticket ordering request
|
||||
|
||||
![This Scalability of Ticket Orders diagram illustrates in more detail the Service Fabric services and components participating in a ticket ordering request. The diagram is discussed in slightly more detail in the text following this diagram. However, at this time, we are unable to capture all of the information in the diagram. Future versions of this course should address this.](images/Whiteboarddesignsessiontrainerguide-Microservicesarchitectureimages/media/image7.png "Scalability of Ticket Orders diagram")
|
||||
|
||||
Summary of technologies in the topology:
|
||||
|
||||
- Contoso Events will have a consumer web site and mobile applications, plus allow third parties to build applications that place ticket orders.
|
||||
- Contoso Events will have a consumer web site and mobile applications, plus allow third parties to build applications that place ticket orders
|
||||
|
||||
- The UI will pre-flight the credit card charge from the order page and supply the resulting token to the back-end processing of the order.
|
||||
- The UI will pre-flight the credit card charge from the order page and supply the resulting token to the back-end processing of the order
|
||||
|
||||
- All ticket order requests will call the Ticket Order API via the API Management layer.
|
||||
- All ticket order requests will call the Ticket Order API via the API Management layer
|
||||
|
||||
- The stateless Ticket Order API will queue the request to process an order, passing the token for credit card validation, order details, and any user details required to complete the request asynchronously.
|
||||
- The stateless Ticket Order API will queue the request to process an order, passing the token for credit card validation, order details, and any user details required to complete the request asynchronously
|
||||
|
||||
- The Ticket Order Queue stateful service will process requests by instantiating a Ticket Order Actor to handle the processing workflow. This actor is responsible for charging the credit card, finalizing the order, and notifying the customer to give them access to their order.
|
||||
|
||||
- The actor will also write to a Ticket Order Sync queue to offload sending order data to Cosmos DB for reports, analytics and related ad-hoc queries.
|
||||
- The actor will also write to a Ticket Order Sync queue to offload sending order data to Cosmos DB for reports, analytics and related ad-hoc queries
|
||||
|
||||
- An Azure Function will read from the queue and handle updates to Cosmos DB. To ensure the latest data is always persisted, the function will retrieve the latest order state and update the Cosmos DB Ticket Orders collection.
|
||||
|
||||
- Web APIs will expose data from Cosmos DB for additional ad-hoc queries against ticket orders.
|
||||
- Web APIs will expose data from Cosmos DB for additional ad-hoc queries against ticket orders
|
||||
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable.
|
||||
2. Describe the scalability features of this design, including any partitioning strategies that are applicable
|
||||
|
||||
When an event is published, and a flurry of customers arrive to the site to order tickets, a flood of requests (potentially in the 100,000s) will be sent from the web front end or various other client channels through the API Management gateway. API Management Premium features support scaling and multi-region topologies to meet demand and high availability requirements.
|
||||
|
||||
The stateless Ticket Order API offloads valid requests to the stateful Ticket Order Queue. This queue is partitioned by instance count (from 1 to n in the diagram below) and requests are randomly distributed by Service Fabric across partitions. Choosing an instance count (partition size) up front is important as today it requires a full redeploy to change this, however with a queue there are other rollover strategies you could employ to work around this. This removes the bottleneck of writes to the queue as it can distribute this load across all partitions in parallel.
|
||||
|
||||
![In this Ticket order Scalability diagram, on the left, an arrow labeled Partition Key equals Random, points right, to a vertical bar labeled 64-bit Addressable Range. To the right of this bar are three gray boxes labeled Partition 1, Partition 2, and Partition n. Each of these boxes has a blue box within labeled \"Ticket Order Queue Service.\" The three gray boxes also have a Reliable Queue section, with differing Order numbers.. ](images/Whiteboarddesignsessiontrainerguide-Microservicesarchitectureimages/media/image8.png "Ticket order Scalability diagram")
|
||||
![In this Ticket order Scalability diagram an arrow labeled Partition Key equals Random, points right, to a vertical bar labeled 64-bit Addressable Range. To the side of this bar are three gray boxes labeled Partition 1, Partition 2, and Partition n. Each of these boxes has a blue box within labeled \"Ticket Order Queue Service.\" The three gray boxes also have a Reliable Queue section, with differing Order numbers.. ](images/Whiteboarddesignsessiontrainerguide-Microservicesarchitectureimages/media/image8.png "Ticket order Scalability diagram")
|
||||
|
||||
The stateful Ticket Order Actor handles processing from this queue and, given the number of parallel orders, helps the solution to scale by maintaining the state of any number of parallel orders. The actor is able to negotiate payment, send notifications, persist its own state at each stage of processing, and send the final order data to the order synchronization queue on the back end. The actor is partitioned by order id, which allows for very fine-grained distribution of state, per order, across the cluster. Any number of concurrent orders may be concurrently available to active requests for fast retrieval. Millions of these can exist and distribute across the cluster and inactive actors are evicted from memory automatically to conserve resources.
|
||||
|
||||
|
@ -512,7 +517,7 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
For additional visibility into queue / function processing errors it is good practice to monitor queue sizes that pass a reasonable threshold of standard solution behavior.
|
||||
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer.
|
||||
4. Describe how you will enable external clients to reach stateless HTTP services exposed from the Azure load balancer
|
||||
|
||||
When you publish a stateless HTTP service the Service Fabric provides a relative URL to the service according to the configuration you supply. This way, multiple HTTP services can be deployed to a single node and still be uniquely addressable at port 80 or 443. In the case of this solution, the API Management layer will consume those endpoints and forward requests.
|
||||
|
||||
|
@ -524,7 +529,7 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
You can create additional Service Fabric applications in the solution that isolate specific services for deployment. For example, if there are 6 services in the solution, you may have 7 applications: 1 that deploys all services during development and test of the entire solution; and 1 for each individual service so that developers or DevOps workflows can update a single service.
|
||||
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features.
|
||||
2. Describe to the customer how they can upgrade services in situ and preserve state; handle rollback and roll forward; and service self-healing features
|
||||
|
||||
When an application is deployed, you can choose to "upgrade" the application. This preserves any state associated with stateful services if applicable. This will retire previous versions once they complete requests in process, while sending new requests to the new version of the service.
|
||||
|
||||
|
@ -546,7 +551,7 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
You achieve multi-region high availability for disaster recovery scenarios by using the backup/restore capability of stateful services. You can also create real time high availability across regions by configuring Traffic Manager to route traffic to both regions. In this case, any stateful services should be capable of reloading their latest state from external storage if not present in the region's cluster.
|
||||
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health.
|
||||
5. Explain to the customer how Service Fabric can help the customer have visibility into overall solution health
|
||||
|
||||
Azure Service Fabric introduces a health model that provides rich, flexible and extensible health evaluation and reporting. Service Fabric components use this health model to report their current state and the same mechanism can be used to report application health state. When your services encounter problems, your ability to respond to and fix incidents and outages depends on your ability to detect the issues quickly. If you report problems and failures to the Azure Service Fabric health manager from your service code, you can use standard health monitoring tools that Service Fabric provides to check the health status.
|
||||
|
||||
|
@ -558,11 +563,11 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
Examples of updates you can execute with ARM include:
|
||||
|
||||
- Adding new node types for additional scale tiers.
|
||||
- Adding new node types for additional scale tiers
|
||||
|
||||
- Adding memory or CPU capacity to a specific type of node.
|
||||
- Adding memory or CPU capacity to a specific type of node
|
||||
|
||||
- Modifying load balancer settings, opening ports, and adding or removing probes (these changes can also be applied directly through the Azure Portal without ARM).
|
||||
- Modifying load balancer settings, opening ports, and adding or removing probes (these changes can also be applied directly through the Azure Portal without ARM)
|
||||
|
||||
Once provisioned, you cannot change the security of the ServiceFabric cluster, so it is important to set the cluster up as a secure cluster, from the beginning. It may change in future.
|
||||
|
||||
|
@ -576,7 +581,7 @@ After evaluating the benefits of Service Fabric, with the team at Microsoft, Con
|
|||
|
||||
*Controlling access to APIs*
|
||||
|
||||
1. Describe how API Management may be useful to control access to APIs exposed by the solution.
|
||||
1. Describe how API Management may be useful to control access to APIs exposed by the solution
|
||||
|
||||
API management is sometimes thought of as a methodology only employed in the past for third party consumers and related usage monitoring and throttling. However, the value of API Management is becoming more mainstream for general purpose APIs and third-party APIs providing consistency with security features, API documentation, monitoring, audit, and logging, and as needed for consumer management and throttling.
|
||||
|
||||
|
@ -602,13 +607,13 @@ Service Fabric has been battle tested for many years prior to becoming generally
|
|||
|
||||
As for choosing between Service Fabric and App Services or SQL DB the benefits of the former include:
|
||||
|
||||
- The ability to deploy individual application services without concern over the target infrastructure -- let Service Fabric decide the target nodes appropriate for each tier and service type.
|
||||
- The ability to deploy individual application services without concern over the target infrastructure -- let Service Fabric decide the target nodes appropriate for each tier and service type
|
||||
|
||||
- Simplified approach to managing data persistence with stateful services.
|
||||
- Simplified approach to managing data persistence with stateful services
|
||||
|
||||
- Microservices design from the ground up on a platform that is specifically designed for that purpose -- with the ability to scale.
|
||||
- Microservices design from the ground up on a platform that is specifically designed for that purpose -- with the ability to scale
|
||||
|
||||
- The capability to deploy Service Fabric clusters in Azure and on-premises, across both Windows and Linux hosts.
|
||||
- The capability to deploy Service Fabric clusters in Azure and on-premises, across both Windows and Linux hosts
|
||||
|
||||
*Microservices concepts are completely new to the Contoso Events team. If we were to go forward with Service Fabric as our microservices platform, we would like to understand what skills the team can carry forward, and how much of a learning curve exists.*
|
||||
|
||||
|
@ -616,9 +621,9 @@ Service Fabric is a natural transition for .NET developers in many respects:
|
|||
|
||||
- They can continue to use Visual Studio for development, debugging and publishing applications
|
||||
|
||||
- They can continue to develop ASP.NET and Web API applications and can leverage Service Fabric project templates to kick-start their understanding of the specifics of Service Fabric services.
|
||||
- They can continue to develop ASP.NET and Web API applications and can leverage Service Fabric project templates to kick-start their understanding of the specifics of Service Fabric services
|
||||
|
||||
- The programming model for services is familiar in that it leverages features of existing .NET technologies and related concepts such as WCF endpoints (simplified), channels and serialization.
|
||||
- The programming model for services is familiar in that it leverages features of existing .NET technologies and related concepts such as WCF endpoints (simplified), channels and serialization
|
||||
|
||||
- Working with stateful services is also familiar in the sense that state is defined via objects (POCO) and serialized as part of the service implementation. Saving and retrieving state is just a few lines of code and the robustness, availability and reliability of that state is a feature of the stateful service.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче