microsoftarchive / iot-journey

a guidance project for implementing an IoT solution on Azure
Other
89 stars 34 forks source link

Replace provisioning scripts for Long-term storage with Stream Analytics with ARM templates #312

Closed bennage closed 9 years ago

bennage commented 9 years ago

The scripts cannot be completely replaced by ARM yet. At least, I don't think that it can be. The templates to use are here: https://github.com/mspnp/iot-journey/tree/bennage/using-arm/setup/LongTermStorage-StreamAnalytics

We'll need to do the following:

  1. Create a new resource group. Let's default this name to "IoTJourney", but someone running the script should be able to overwrite it.
  2. Create the EventHub (with namespace and consumer group) using a template

    New-AzureResourceGroupDeployment -ResourceGroupName SomeResourceGroup -TemplateFile .\setup\LongTermStorage-StreamAnalytics\deploy-eventhub.json -TemplateParameterObject @{ namespaceName = "mynamespace"; eventHubName="myhub"; consumerGroupName="mygroup" }

  3. Create a SharedAccessAuthorizationRule in the ASM imperative style. Very close to the code that we currently have in AzureServiceBus.pm1.
  4. Create the StreamAnalytics job with the template and New-AzureResourceGroupDeployment, passing in the shared access name/key.
bennage commented 9 years ago

I just realized that these templates do not set the Throughput Units on the Service Bus namespace. I'm not sure if we can even do that...