lingdanglfw(DAX)

导航

IoT Edge for Dynamics 365 Finance and Operation

创建Azure IoT Hub,并创建IoT Edge Device

在IoT Hub-IoT Edge中点击添加IoT Edge设备

输入设备ID,其余保持默认,点击保存

 

在Edge 设备上安装IoT Edge Runtime

在windows 中安装Edge Runtime,请参见:https://docs.azure.cn/zh-cn/iot-edge/how-to-install-iot-edge-windows

注意,本节中,我们选择安装和手动预配,手动预配的意思是,在安装Runtime过程中,需要手动输入IoT Edge Device的连接字符串。

1. 在线安装Azure IoT Edge Runtime:

登录到Windows Server中,以管理员权限运行如下Power Shell脚本:

. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; `
Deploy-IoTEdge

 

画重点,如果此步骤,报网络错误,可以尝试打开连接 “https://aka.ms/iotedge-win”,如果打不开,可能存在网络问题,则此时需要使用离线安装方式。

2.离线安装Azure IoT Edge Runtime:

在页面上下载相应的 文件,https://github.com/Azure/azure-iotedge/releases

对于Windows 系统,需要根据系统是64/32位下载对应的cab文件和 vc_redist.exe(Visual C++ Redistributable Package)

注意,需要将下载的cab的包重命名为 Microsoft-Azure-IoTEdge.cab

vc_redist.exe 下载地址:vc_redist.exe

然后右键拷贝.ps1的路径,修改如如下的脚本中:

将https://aka.ms/iotedge-win改为https://github.com/Azure/azure-iotedge/releases/download/1.0.9-rc5/IotEdgeSecurityDaemon.ps1,意味着按照更改后的脚本安装对应的runtime 版本。

. {Invoke-WebRequest -useb https://github.com/Azure/azure-iotedge/releases/download/1.0.9-rc5/IotEdgeSecurityDaemon.ps1} | Invoke-Expression; `
Deploy-IoTEdge -OfflineInstallationPath D:\Downloads\iotedgeoffline

 

在PowerShell 管理员权限先运行上述脚本,如提示重启,则重启后需执行如下脚本:

. {Invoke-WebRequest -useb https://aka.ms/iotedge-win} | Invoke-Expression; `
Initialize-IoTEdge

 

注意:脚本中的 https://aka.ms/iotedge-win,如果安装的是指定版本,也需要替换为指定版本的ps1文件路径。

执行过程中需要按找提示输入IoT Edge 的连接字符串

使用 如下命令检查 IoT Runtime 运行状态:

Get-Service iotedge

使用如下命令检查当前运行的模块:

iotedge list

初次安装完成,只有一个edgeagent 模块,此现象是正常的,其他模块由edge agent 负责安装,需要时间。

 

在Portal上可以查看IoT Edge 的运行状态和模块状态:

 

 
 

posted on 2020-11-18 09:55  lingdanglfw  阅读(105)  评论(0编辑  收藏  举报