You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.9 KiB

7 years ago
7 years ago
7 years ago
  1. # Deploying Azure Service Fabric (No Secured)
  2. The ARM template `servicefabricdeploy.json` and its parameter file (`servicefabricdeploy.parameters.json`) are used to create a service fabric cluster environment for windows containers.
  3. ## Editing servicefabricdeploy.parameters.json file
  4. Edit the following params in `servicefabricdeploy.parameters.json` file to set your values:
  5. - clusterName: Name of your SF cluster
  6. - dnsName: Name assigned to your SF dns
  7. - adminUserName: user name for administration
  8. - adminPassword: user password for administration
  9. Optionally, you can modify which ports are opened in the LoadBalancer for accessing externally to the apps:
  10. - webMvcHttpPort: port externally exposed for the WebMVC app
  11. - webSpaHttpPort: port externally exposed for the WebSPA app
  12. - webStatusHttpPort: port externally exposed for the WebStatus app
  13. - IdSrvHttpRule: port externally exposed for the Identity app
  14. ## Deploy the template
  15. Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
  16. 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:
  17. ```
  18. create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploy newResourceGroup -c westus
  19. ```
  20. ## Deploy eShopOnServiceFabric with Visual Studio.
  21. 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.
  22. # Deploying Azure Service Fabric (Secured)
  23. 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.
  24. ## Create Azure Keyvault service
  25. Go to PortalAzure and create a Keyvault service. Make sure Enable access for deployment checkboxes are selected.
  26. <img src="../../../../img/sf/create-kv.PNG">
  27. ## Generate a certificate in Azure Keyvault
  28. Execute the gen-keyvaultcert.ps1 script to generate and download a certificate from Keyvault.
  29. ```
  30. .\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
  31. ```
  32. ## Install the certificate
  33. Install the certificate under 'Current User' store location and check it as exportable.
  34. <img src="../../../../img/sf/install-cert.PNG">
  35. ## Editing servicefabricdeploysecured.parameters.json file
  36. Edit the following params in `servicefabricdeploysecured.parameters.json` file to set your values:
  37. - clusterName: Name of your SF cluster
  38. - dnsName: Name assigned to your SF dns
  39. - adminUserName: user name for administration
  40. - adminPassword: user password for administration
  41. - sourceVaultValue: keyvault resource id (check azure keyvault properties)
  42. - certificateUrlValue: certificate url (check azure Keyvault certificate properties)
  43. - certificateThumbprint: certificate thumbprint (check azure Keyvault certificate properties)
  44. Optionally, you can modify which ports are opened in the LoadBalancer for accessing externally to the apps:
  45. - webMvcHttpPort: port externally exposed for the WebMVC app
  46. - webSpaHttpPort: port externally exposed for the WebSPA app
  47. - webStatusHttpPort: port externally exposed for the WebStatus app
  48. - IdSrvHttpRule: port externally exposed for the Identity app
  49. ## Deploy the template
  50. Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
  51. ```
  52. create-resources.cmd servicefabric\WindowsContainers\servicefabricdeploysecured newResourceGroup -c westus
  53. ```
  54. ## Deploy eShopOnServiceFabric with Visual Studio.
  55. 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:
  56. <img src="../../../../img/sf/cloud_publishProfile.PNG">