Skip to content

Commit 3865c09

Browse files
2 parents e41b1c3 + f0f56c3 commit 3865c09

2 files changed

Lines changed: 68 additions & 15 deletions

File tree

deploy/az/servicefabric/LinuxContainers/readme.md

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Deploying a Service Fabric cluster based on Linux nodes
22

3-
## A. Not secured cluster (SF Linux cluster)
3+
## A. Unsecured cluster (SF Linux cluster)
44
For a secured cluster, see option B. below.
5+
56
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
67

78
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.
@@ -43,30 +44,55 @@ For example, to deploy the cluster to a new resourcegroup located in westus, go
4344
create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploy qa-eshop-sflinux-resgrp -c westus
4445
```
4546

46-
## Deploy eShopOnServiceFabric with Visual Studio.
47+
You should see a similar execution to the following:
48+
![image](https://user-images.githubusercontent.com/1712635/31638180-15da9f84-b287-11e7-9d4e-604f33690198.png)
49+
50+
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:
4751

48-
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.
52+
![image](https://user-images.githubusercontent.com/1712635/31638398-3fc08ad8-b288-11e7-879b-fc4df0daad2b.png)
53+
54+
In this case, this is an unsecured SF cluster with a single Linux node, good for initial tests and getting started with SF.
4955

5056
## B. Secured cluster (SF Linux cluster)
5157

58+
Within eShopOnContainers root folder, at the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers), you can find the ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) to create a secured Service Fabric cluster environment for Linux Containers (IN THIS CASE, IT IS A SECURED CLUSTER USING A CERTIFICATE).
59+
5260
The ARM template `servicefabricdeploysecured.json` and its parameter file (`servicefabricdeploysecured.parameters.json`) are used to create a service fabric cluster environment for linux containers secured with a certificate.
5361

5462
## Create Azure Keyvault service
5563
Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected.
5664

57-
<img src="../../../../img/sf/create-kv.png">
65+
![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png)
5866

5967
## Generate a certificate in Azure Keyvault
68+
In a POWER-SHELL window, move to the folder [..\deploy\az\servicefabric\LinuxContainers](https://github.com/dotnet-architecture/eShopOnContainers/tree/dev/deploy/az/servicefabric/LinuxContainers).
69+
70+
**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.
71+
72+
>```
73+
>az account list
74+
>```
75+
If you have multiple subscription accounts, you first need to select the Azure subscription account you want to target. Type the following:
76+
>```
77+
>az account set --subscription "Your Azure Subscription Name or ID"
78+
>```
79+
6080
Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault.
6181

6282
```
6383
.\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
6484
6585
```
86+
87+
You should see a similar execution to the following:
88+
![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png)
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+
6692
## Install the certificate
67-
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.
6894

69-
<img src="../../../../img/sf/install-cert.png">
95+
<img src="https://github.com/dotnet-architecture/eShopOnContainers/blob/dev/img/sf/install-cert.PNG">
7096

7197
## Editing servicefabricdeploysecured.parameters.json file
7298

deploy/az/servicefabric/WindowsContainers/readme.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Deploying a Service Fabric cluster based on Windows nodes
22

3-
## A. Not secured cluster (SF Windows cluster)
3+
## A. Unsecured cluster (SF Windows cluster)
44
For a secured cluster, see option B. below.
5+
56
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
67

78
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.
89

910
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:
1011

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).
1213

1314
## Edit the servicefabricdeploy.parameters.json file
1415

@@ -42,28 +43,54 @@ For example, to deploy the cluster to a new resourcegroup located in westus, usi
4243
create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploy qa-eshop-sfwin-resgrp -c westus
4344
```
4445

45-
## Deploy eShopOnServiceFabric with Visual Studio.
46+
You should see a similar execution to the following:
47+
![image](https://user-images.githubusercontent.com/1712635/31638979-4881d7aa-b28b-11e7-873c-e1185043a9eb.png)
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+
![image](https://user-images.githubusercontent.com/1712635/31639043-9b26c786-b28b-11e7-8d59-eeea97f74176.png)
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.
4654

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.
4855

4956
## B. Secured cluster (SF Windows cluster)
5057

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).
5259

5360
## Create Azure Keyvault service
5461
Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected.
5562

56-
<img src="../../../../img/sf/create-kv.PNG">
63+
![image](https://user-images.githubusercontent.com/1712635/31638848-9b266530-b28a-11e7-953b-1e3ec1a54f77.png)
5764

5865
## 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.
6082

6183
```
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
6385
6486
```
87+
You should see a similar execution to the following:
88+
![image](https://user-images.githubusercontent.com/1712635/31640172-93efcca0-b291-11e7-970e-5b5e6bf07042.png)
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+
6592
## 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.
6794

6895
<img src="../../../../img/sf/install-cert.PNG">
6996

0 commit comments

Comments
 (0)