Iotedge: IOT Edge Automatic DPS Provisioning for X509 attestation

Created on 4 Feb 2020  路  2Comments  路  Source: Azure/iotedge

Expected Behavior

Running following command should able to initialize iot edge device
. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; Initialize-IoTEdge -Dps -ScopeId ###### -X509IdentityCertificate file:///C:/local/path/DeviceIdentity/PublicCert.pem -X509IdentityPrivateKey file:///C:/local/path/DeviceIdentity/DeviceKey.pem

Current Behavior

. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; Initialize-IoTEdge -Dps -ScopeId ##### -X509IdentityCertificate file:///C:/local/path/DeviceIdentity/PublicCert.pem -X509IdentityPrivateKey file:///C:/local/path/DeviceIdentity/DeviceKey.pem is failing to create config.yaml with proper configuration. it is creating the default conifg.yaml coming as part of the installation.

the work around is to use normal windows style file location instead of file URL format. this will create the config.yaml file but the initialization fails due to the format of file lcoation for X509 certs and key.so i had to manually fix the config.yaml file to use file format to make the initialization to work.

Steps to Reproduce

Provide a detailed set of steps to reproduce the bug.
1.Created public private key pair locally and ca signed using our ca for device identity into enrollment

  1. Created device enrollment using .X509 attestation and device identity certificate
    3.Tried initializing the IOT edge device using above command for auto provisioning using X509 cert.
    the exact command i tried is, . {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; Initialize-IoTEdge -Dps -ScopeId ##### -X509IdentityCertificate

Context (Environment)

Output of iotedge check


Click here

<Paste here between the triple backticks>

Device Information

  • Host OS : Windows 10 Enterprise LTSC
  • Architecture: amd64
  • Container OS : Windows containers

Runtime Versions

  • iotedged : 1.0.9~rc3
  • Edge Agent:
  • Edge Hub:
  • Docker/Moby : 3.0.5

Note: when using Windows containers on Windows, run docker -H npipe:////./pipe/iotedge_moby_engine version instead

Logs


iotedged logs

<Paste here between the triple backticks>


edge-agent logs

<Paste here between the triple backticks>


edge-hub logs

<Paste here between the triple backticks>

Additional Information

Please provide any additional information that may be helpful in understanding the issue.

customer-reported iotedge

Most helpful comment

Hello!

If you are using our 1.0.9-rc3 bits, you cannot use the scripts found at https://aka.ms/iotedge-win as that link points to our 1.0.8 configuration/install scripts.

Please try again using: https://raw.githubusercontent.com/Azure/iotedge/1.0.9-rc3/scripts/windows/setup/IotEdgeSecurityDaemon.ps1 in place of the aka.ms URL.

Thanks,
Kevin

All 2 comments

Hello!

If you are using our 1.0.9-rc3 bits, you cannot use the scripts found at https://aka.ms/iotedge-win as that link points to our 1.0.8 configuration/install scripts.

Please try again using: https://raw.githubusercontent.com/Azure/iotedge/1.0.9-rc3/scripts/windows/setup/IotEdgeSecurityDaemon.ps1 in place of the aka.ms URL.

Thanks,
Kevin

It is working now. It was not obvious from documentation that we need to use different scripts for different versions, especially for release versions. But thanks for prompt reply. It solved my problem.

Was this page helpful?
0 / 5 - 0 ratings