In order to deploy Device Silhouette to production, you will have to create the resources in the list below. Follow the links provided and create those resources. Make sure to create all resources in the same location.
- IoT Hub - Get started with Azure IoT Hub
- Blob Storage - About Azure storage accounts
- Service Fabric Cluster, Azure Active Directory and Azure Key Vault - Create a Service Fabric cluster in Azure
- Recommendation: Create a secure Service Fabric cluster utilising Azure Active Directory for authentication and authorisation.
Create MyCloudConfig.ps1 configuration file for StateManagementService, same as you created for running locally, this time with the connection strings and properties for production. For more details see the configuration section.
$env:Silhouette_IotHubConnectionString="HostName=yourhub.azure-devices.net;SharedAccessKeyName=hubowner;SharedAccessKey=JHMBDjasb12masbdk1289askbsd9SjfHkJSFjqwhfqq="
$env:Silhouette_StorageConnectionString="DefaultEndpointsProtocol=https;AccountName=yourstorage;AccountKey=JkafnSADl34lNSADgd09ldsmnMASlfvmsvds9sd23dmvdsv/9dsv/sdfkjqwndssdljkvds9kjKJHhfds9Jjha=="
$env:Persistent_StorageConnectionString="DefaultEndpointsProtocol=https;AccountName=yourstorage;AccountKey=JkafnSADl34lNSADgd09ldsmnMASlfvmsvds9sd23dmvdsv/9dsv/sdfkjqwndssdljkvds9kjKJHhfds9Jjha=="
$env:Repository_MessagesRetentionMilliseconds = 120000
$env:Repository_MessagesTimerInterval=1
$env:Repository_MinMessagesToKeep=3
-
- Make a decision about the port you want the service to be available.
- Make sure this port is configured correctly on the Load balancer load balancing rules, and it is enable on the VNET/ Network Security group.
- Set the service in StateManagementServiceWebAPI\PackageRoot\ServiceManifest.xml
- Run the MyCloudConfig.ps1 script in the Package Manager Console before running the Publish.
- Deploy by the instructions in Publish an application to a remote cluster by using Visual Studio
Follow the instruction in Deploy and remove applications using PowerShell. Make sure to run the MyCloudConfig.ps1 script before running the Deploy-FabricApplication.ps1 script.