|
| 1 | +# Deploying Azure Service Fabric (No Secured) |
| 2 | + |
| 3 | +The ARM template `servicefabricdeploy.json` and its parameter file (`servicefabricdeploy.parameters.json`) are used to create a service fabric cluster environment for linux containers. |
| 4 | + |
| 5 | +## Editing servicefabricdeploy.parameters.json file |
| 6 | + |
| 7 | +Edit the following params in `servicefabricdeploy.parameters.json` file to set your values: |
| 8 | + |
| 9 | +- clusterName: Name of your SF cluster |
| 10 | +- dnsName: Name assigned to your SF dns |
| 11 | +- adminUserName: user name for administration |
| 12 | +- adminPassword: user password for administration |
| 13 | + |
| 14 | +Optionally, you can modify which ports are opened in the LoadBalancer for accessing externally to the apps: |
| 15 | + |
| 16 | +- webMvcHttpPort: port externally exposed for the WebMVC app |
| 17 | +- webSpaHttpPort: port externally exposed for the WebSPA app |
| 18 | +- webStatusHttpPort: port externally exposed for the WebStatus app |
| 19 | +- IdSrvHttpRule: port externally exposed for the Identity app |
| 20 | + |
| 21 | +## Deploy the template |
| 22 | + |
| 23 | +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). |
| 24 | + |
| 25 | +i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type: |
| 26 | + |
| 27 | +``` |
| 28 | +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploy newResourceGroup -c westus |
| 29 | +``` |
| 30 | +## Deploy eShopOnServiceFabric with Visual Studio. |
| 31 | + |
| 32 | +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. |
| 33 | + |
| 34 | +# Deploying Azure Service Fabric (Secured) |
| 35 | + |
| 36 | +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. |
| 37 | + |
| 38 | +## Create Azure Keyvault service |
| 39 | +Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected. |
| 40 | + |
| 41 | +<img src="../../../../img/sf/create-kv.png"> |
| 42 | + |
| 43 | +## Generate a certificate in Azure Keyvault |
| 44 | +Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault. |
| 45 | + |
| 46 | +``` |
| 47 | +.\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 |
| 48 | +
|
| 49 | +``` |
| 50 | +## Install the certificate |
| 51 | +Install the certificate under 'Current User' store location and check it as exportable. |
| 52 | + |
| 53 | +<img src="../../../../img/sf/install-cert.png"> |
| 54 | + |
| 55 | +## Editing servicefabricdeploysecured.parameters.json file |
| 56 | + |
| 57 | +Edit the following params in `servicefabricdeploysecured.parameters.json` file to set your values: |
| 58 | + |
| 59 | +- clusterName: Name of your SF cluster |
| 60 | +- dnsName: Name assigned to your SF dns |
| 61 | +- adminUserName: user name for administration |
| 62 | +- adminPassword: user password for administration |
| 63 | +- sourceVaultValue: keyvault resource id (check azure keyvault properties) |
| 64 | +- certificateUrlValue: certificate url (check azure Keyvault certificate properties) |
| 65 | +- certificateThumbprint: certificate thumbprint (check azure Keyvault certificate properties) |
| 66 | + |
| 67 | +Optionally, you can modify which ports are opened in the LoadBalancer for accessing externally to the apps: |
| 68 | + |
| 69 | +- webMvcHttpPort: port externally exposed for the WebMVC app |
| 70 | +- webSpaHttpPort: port externally exposed for the WebSPA app |
| 71 | +- webStatusHttpPort: port externally exposed for the WebStatus app |
| 72 | +- IdSrvHttpRule: port externally exposed for the Identity app |
| 73 | + |
| 74 | +## Deploy the template |
| 75 | + |
| 76 | +Once parameter file is edited you can deploy it using [create-resources script](../readme.md). |
| 77 | + |
| 78 | +``` |
| 79 | +create-resources.cmd servicefabric\LinuxContainers\servicefabricdeploysecured newResourceGroup -c westus |
| 80 | +``` |
| 81 | +## Deploy eShopOnServiceFabric with Visual Studio. |
| 82 | + |
| 83 | +Modify the cloud.xml file of each Service Fabric application in PublishProfile directory and set your certificate settings to be able to deploy eshopOnContainers in the secured cluster: |
| 84 | + |
| 85 | +<img src="../../../../img/sf/cloud_publishProfile.png"> |
| 86 | + |
| 87 | + |
| 88 | + |
0 commit comments