|
1 | 1 | # Deploying a Service Fabric cluster based on Windows nodes |
2 | 2 |
|
3 | | -## A. Not secured cluster (SF Windows cluster) |
| 3 | +## A. Unsecured cluster (SF Windows cluster) |
4 | 4 | For a secured cluster, see option B. below. |
| 5 | + |
5 | 6 | You can always deploy a SF cluster through the Azure portal, as explained in this article: https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-get-started-azure-cluster |
6 | 7 |
|
7 | 8 | However, when creating a cluster, there are quite a few configurations to take into account, like enabling the internal DNS service or Reverse Proxy service, choosing between Linux/Windows, open/publish your application ports in the load-balancer and most of all (the most complex setup) how to create a secure cluster. |
8 | 9 |
|
9 | 10 | Because of those reasons, we have created a set of ARM templates and scripts so you can create, re-create and configure the SF clusters much faster, as explained below: |
10 | 11 |
|
11 | | -Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Windows Containers. |
| 12 | +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploy.json` and its parameters file (`servicefabricdeploy.parameters.json`) to create a Service Fabric cluster environment for Windows Containers (NOT SECURED CLUSTER). |
12 | 13 |
|
13 | 14 | ## Edit the servicefabricdeploy.parameters.json file |
14 | 15 |
|
@@ -42,28 +43,54 @@ For example, to deploy the cluster to a new resourcegroup located in westus, usi |
42 | 43 | create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploy qa-eshop-sfwin-resgrp -c westus |
43 | 44 | ``` |
44 | 45 |
|
45 | | -## Deploy eShopOnServiceFabric with Visual Studio. |
| 46 | +You should see a similar execution to the following: |
| 47 | + |
| 48 | + |
| 49 | +Now, if you go to your subscription in Azure, you should be able to see the SF cluster already created and available, like in the following image: |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | +In this case, this is an unsecured SF cluster with a single Windows node, good for initial tests and getting started with SF. |
46 | 54 |
|
47 | | -Alternatively, instead of using ARM templates, you can deploy eShop on service fabric directly by publishing the project eShopOnServiceFabric in eShopOnContainers-ServicesAndWebApps.sln with Visual Studio publish tool. |
48 | 55 |
|
49 | 56 | ## B. Secured cluster (SF Windows cluster) |
50 | 57 |
|
51 | | -The ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) are used to create a service fabric cluster environment for windows containers secured with a certificate. |
| 58 | +Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Windows Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE). |
52 | 59 |
|
53 | 60 | ## Create Azure Keyvault service |
54 | 61 | Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. |
55 | 62 |
|
56 | | -<img src="../../../../img/sf/create-kv.PNG"> |
| 63 | + |
57 | 64 |
|
58 | 65 | ## Generate a certificate in Azure Keyvault |
59 | | -Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault. |
| 66 | +In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\WindowsContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/WindowsContainers). |
| 67 | + |
| 68 | +**Select your Azure subscription** You might have [several Azure subscriptions](https://docs.microsoft.com/en-us/cli/azure/account#set) as shown if you type the following. |
| 69 | + |
| 70 | + >``` |
| 71 | + >az account list |
| 72 | + >``` |
| 73 | + If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following: |
| 74 | + >``` |
| 75 | + >az account set --subscription "Your Azure Subscription Name or ID" |
| 76 | + >``` |
| 77 | + |
| 78 | +**Execute the gen-keyvaultcert.ps1 script** to generate and download a certificate from Keyvault. |
| 79 | +Make sure you're going to run it against the Azure subscription you mean it. |
| 80 | + |
| 81 | +You might need to authenticate from the browser when running this PowerShell script. |
60 | 82 |
|
61 | 83 | ``` |
62 | | -.\gen-keyvaultcert.ps1 -vaultName <your_keyvault_service> -certName <your_cert_name> -certPwd <your_cert_pwd> -subjectName CN=<your_sf_dns_name>.westeurope.cloudapp.azure.com -saveDir C:\Users\<user>\Downloads |
| 84 | +.\gen-keyvaultcert.ps1 -vaultName <your_keyvault_service> -certName <your_cert_name> -certPwd <your_cert_pwd> -subjectName CN=<your_sf_dns_name>.westus.cloudapp.azure.com -saveDir C:\Users\<your-user>\Downloads |
63 | 85 |
|
64 | 86 | ``` |
| 87 | +You should see a similar execution to the following: |
| 88 | + |
| 89 | + |
| 90 | +IMPORTANT: At this point, copy/cut the .PFX certifiacte file saved in the downloads forlder and save it in a secure place. |
| 91 | + |
65 | 92 | ## Install the certificate |
66 | | -Install the certificate under 'Current User' store location and check it as exportable. |
| 93 | +Install the certificate (by double-clicking on the .PFX file) under 'Current User' store location (by default location) and check it as exportable. |
67 | 94 |
|
68 | 95 | <img src="../../../../img/sf/install-cert.PNG"> |
69 | 96 |
|
|
0 commit comments