-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change ADU documentation to use Azure CLI instead of PS scripts #288
Conversation
@@ -35,6 +35,11 @@ This sample will allow you to update an ESP32 over the air (OTA) using Azure Dev | |||
For other Operating Systems or to update an existing installation, follow [Espressif official documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#get-started). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not merge until this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link here. Also note this has to be pulled up to the middleware as well.
$update = New-AduImportManifest -UpdateId $updateId -Compatibility $compat -InstallationSteps $installStep | ||
|
||
$update | Out-File "./$($updateId.provider).$($updateId.name).$($updateId.version).importmanifest.json" -Encoding utf8 | ||
az iot du update init v5 --update-provider Contoso --update-name ESP32-Azure-IoT-Kit --update-version 1.1 --compat deviceModel=ESP32-Azure-IoT-Kit deviceManufacturer=ESPRESSIF --step handler=microsoft/swupdate:1 properties='{\"installedCriteria\":\"1.1\"}' --file path=./azure_iot_freertos_esp32-v1.1.bin > ./Contoso.ESP32-Azure-IoT-Kit.1.1.importmanifest.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping the update to using the cli would remove the need to update the version number in a bunch of places :( I know before we had talked about using a script or something to simplify switching version numbers - should we consider doing something like that again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be something like
$version = 1.1
az iot du update init v5 --update-provider Contoso --update-name ESP32-Azure-IoT-Kit --update-version $version --compat deviceModel=ESP32-Azure-IoT-Kit deviceManufacturer=ESPRESSIF --step handler=microsoft/swupdate:1 properties='{\"installedCriteria\":\"$version\"}' --file path=./azure_iot_freertos_esp32-v1.1.bin > ./Contoso.ESP32-Azure-IoT-Kit.1.1.importmanifest.json
I'm forgetting if that's powershell syntax or not but that's the basic idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was intending on keeping it a single line, to make it simple for customers to copy and run it.
Since this is a sample, I rather keep the syntax explicit in showing the version, so people can clearly see what information goes where, instead of having to check where the variable $version (as suggested by Dane) is mentioned.
As I understand, your comment is guided by a desire to make this guidance more "productized" (with optimizations like what you proposed), but I believe we better keep this documentation written a more with an "educational" aspect.
If the team really prefers we do as suggested, I will for sure reconsider.
@@ -35,6 +35,11 @@ This sample will allow you to update an ESP32 over the air (OTA) using Azure Dev | |||
For other Operating Systems or to update an existing installation, follow [Espressif official documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html#get-started). | |||
|
|||
1. [Powershell](https://docs.microsoft.com/powershell/scripting/install/installing-powershell?view=powershell-7.2) | |||
|
|||
1. Azure CLI and Azure IoT Module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need changes to the H7/L4+ instructions as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but I unfortunately did not update that documentation for those :/
I'll make a card to make the changes and then we can more or less copy the L475 ones to the other ST boards.
Co-authored-by: Valerie Avva Lim <[email protected]>
Co-authored-by: Valerie Avva Lim <[email protected]>
Purpose
Replace the usage of the PS scripts in https://github.com/Azure/iot-hub-device-update by Azure CLI with the official ADU commands in Azure IoT module. Using the Azure CLI commands is the ADU recommended process for generating update manifests since GA.
Please do not merge this PR until further fixes in azure-sdk-for-c are merged to properly support ADU GA
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
Follow the instructions for any of the ADU samples in this repo.
What to Check
Verify that the ADU samples can be fully and successfully run using the respective readme.md/adu.md.
Other Information
Newborn human babies have around 300 bones, while an adult will have around 206.