Azure / azure-iot-remote-monitoring

Azure IoT Remote Monitoring preconfigured solution
Other
249 stars 221 forks source link

Debugging and Deploying the solution #426

Closed a-karnik closed 3 years ago

a-karnik commented 7 years ago

Q1 How do I set config values for settings like these, e.g, docdb.EndpointUrl? I have the url, should I be adding that value in value attribute below?

Q2 My cloud deployment powershell works for resources (db, eventhub etc). How do I deploy Web project locally, so that I can point to the cloud resources and debug?

zhang-hua commented 7 years ago

Answer1: The configuration values for those settings are generated at deployment stage and these values will be saved into local file *.config.user files. So I would suggest not to change them in your source code repo. You can change them in the websites app settings on Azure portal once the deployment completes.

Answer2: If only one developer want to debug in each subscription, you can simply use local deployment command to set up which is pretty straightforward. build.cmd local If multiple developers in each subscription, you need to do following steps:

  1. Start msbuild cmd prompt

  2. Use the build.cmd to deploy all resources on the cloud environment ./build.cmd cloud release xxxDev AzureCloud

  3. (maybe if step 2 failed) packages\dotless.1.5.2\tool\dotless.compiler.exe DeviceAdministration\Web\Content\styles\main.less

  4. Stop two websites to host the web jobs and solution portal from Azure portal in order to use local websites and avoid conflicting.

  5. Rebuild the solution with debug configuration ./build.cmd build

  6. Change the AD Application's reply URL to local address, otherwise you cannot login. https://xxxdev.azurewebsites.net/ --> https://localhost:44305/

  7. Start multiple local projects in VS IDE In the VS solution properties -> common properties -> Startup project -> Mutiple start up projects Select three projects: 'Web', 'Simulator.WebJob', 'EventProcessor.WebJob'

  8. Add breakpoints and go debugging!

liqiwu commented 7 years ago

qq 20170711113912 when I open a Developer Command Prompt for Visual Studio 2013 (or 2015) as an Administrator and Navigate to the repository root directory and run build.cmd local ,the problem in the picture happened.How can I solve this?

ankitscribbles commented 3 years ago

Note: As of December 10th 2020, Remote Monitoring solution accelerator is no longer supported. All supporting repositories have been archived.