快速入门:将第一个 IoT Edge 模块部署到虚拟 Windows 设备Quickstart: Deploy your first IoT Edge module to a virtual Windows device

在本快速入门中通过将容器化代码部署到虚拟 Windows IoT Edge 设备来试用 Azure IoT Edge。Try out Azure IoT Edge in this quickstart by deploying containerized code to a virtual Windows IoT Edge device. IoT Edge 允许你远程管理设备上的代码,这样你就可以将更多工作负荷发送到 Edge。IoT Edge allows you to remotely manage code on your devices so that you can send more of your workloads to the edge. 对于本快速入门,我们建议使用 Azure 虚拟机作为 IoT Edge 设备。For this quickstart, we recommend using an Azure virtual machine for your IoT Edge device. 使用虚拟机可以快速创建测试计算机,安装必备组件,并在完成后将其删除。Using a virtual machine allows you to quickly create a test machine, install the prerequisites, and then delete it when you're finished.

此快速入门介绍如何:In this quickstart you learn how to:

  • 创建 IoT 中心。Create an IoT hub.
  • 将 IoT Edge 设备注册到 IoT 中心。Register an IoT Edge device to your IoT hub.
  • 在虚拟设备上安装并启动 IoT Edge 运行时。Install and start the IoT Edge runtime on your virtual device.
  • 以远程方式将模块部署到 IoT Edge 设备并将遥测数据发送到 IoT 中心。Remotely deploy a module to an IoT Edge device and send telemetry to IoT Hub.

关系图 - 设备和云架构的快速入门

本快速入门将指导你创建 Windows 虚拟机并将其配置为 IoT Edge 设备。This quickstart walks you through creating a Windows virtual machine and configuring it to be an IoT Edge device. 然后,将模块从 Azure 门户部署到设备。Then, you deploy a module from the Azure portal to your device. 在本快速入门中所使用的模块为模拟传感器,可以生成温度、湿度和压强数据。The module used in this quickstart is a simulated sensor that generates temperature, humidity, and pressure data. 其他 Azure IoT Edge 教程均以本教程中通过部署额外模块(这些模块通过分析模拟数据来获得业务见解)所执行的操作为基础。The other Azure IoT Edge tutorials build upon the work you do here by deploying additional modules that analyze the simulated data for business insights.

如果没有可用的 Azure 订阅,可以在开始前创建一个试用帐户If you don't have an active Azure subscription, create a trial account before you begin.

你将使用 Azure CLI 完成本快速入门中的许多步骤。You use the Azure CLI to complete many of the steps in this quickstart. Azure IoT 具有启用附加功能的扩展。Azure IoT has an extension to enable additional functionality.

将 Azure IoT 扩展添加到 Azure CLI 实例。Add the Azure IoT extension to the Azure CLI instance.

az extension add --name azure-iot

备注

本文使用最新版本的 Azure IoT 扩展(称为 azure-iot)。This article uses the newest version of the Azure IoT extension, called azure-iot. 旧版本称为 azure-iot-cli-ext。只应同时安装有一个版本。The legacy version is called azure-iot-cli-ext.You should only have one version installed at a time. 可以使用命令 az extension list 来验证当前安装的扩展。You can use the command az extension list to validate the currently installed extensions.

使用 az extension remove --name azure-cli-iot-ext 可删除扩展的旧版本。Use az extension remove --name azure-cli-iot-ext to remove the legacy version of the extension.

使用 az extension add --name azure-iot 可添加扩展的新版本。Use az extension add --name azure-iot to add the new version of the extension.

若要查看已安装了哪些扩展,请使用 az extension listTo see what extensions you have installed, use az extension list.

先决条件Prerequisites

云资源:Cloud resources:

  • 一个资源组,用于管理在本快速入门中使用的所有资源。A resource group to manage all the resources you use in this quickstart.

    az group create --name IoTEdgeResources --location chinaeast
    

IoT Edge 设备:IoT Edge device:

  • 充当 IoT Edge 设备的 Windows 虚拟机。A Windows virtual machine to act as your IoT Edge device. 你可通过使用以下命令并将 {password} 替换为安全密码来创建此虚拟机:You can create this virtual machine using the following command, replacing {password} with a secure password:

    az vm create --resource-group IoTEdgeResources --name EdgeVM --image MicrosoftWindowsDesktop:Windows-10:rs5-pro:latest --admin-username azureuser --admin-password {password} --size Standard_DS1_v2
    

    可能需要几分钟才能创建并启动新的虚拟机。It may take a few minutes to create and start the new virtual machine.

    虚拟机启动后,可以在连接到虚拟机时下载 RDP 文件以供使用:Once your virtual machine starts, you can download an RDP file for use when connecting to your virtual machine:

    1. 导航到 Azure 门户中新的 Windows 虚拟机。Navigate to your new Windows virtual machine in the Azure portal.
    2. 选择“连接”。Select Connect.
    3. 在“RDP”选项卡上,选择“下载 RDP 文件” 。On the RDP tab, select Download RDP File.

    使用远程桌面连接打开此文件,以通过用 az vm create 指定的管理员姓名和密码连接到 Windows 虚拟机。Open this file with Remote Desktop Connection to connect to your Windows virtual machine using the administrator name and password you specified with the az vm create command.

备注

你的 Windows 虚拟机的最低版本为 Windows 版本 1809(内部版本 17763),这是最新的 Windows 长期支持的内部版本Your Windows virtual machine starts with Windows version 1809 (build 17763), which is the latest Windows long-term support build. 默认情况下,Windows 每 22 小时自动检查一次更新。Windows automatically checks for updates every 22 hours by default. 检查虚拟机后,Windows 将推送与 Windows 版 IoT Edge 不兼容的版本更新,从而阻止进一步使用 Windows 版 IoT Edge 功能。After a check on your virtual machine, Windows pushes a version update that is incompatible with IoT Edge for Windows, which prevents further use of IoT Edge for Windows features. 建议将虚拟机的使用时长限制在 22 小时内,或暂停 Windows 更新We recommend limiting use of your virtual machine to within 22 hours or temporarily pausing Windows updates.

为简单起见,本快速入门使用 Windows 桌面虚拟机。This quickstart uses a Windows desktop virtual machine for simplicity. 要了解哪些 Windows 操作系统针对生产环境公开发布,请参阅 Azure IoT Edge 支持的系统For information about which Windows operating systems are generally available for production scenarios, see Azure IoT Edge supported systems.

如果你已准备好为 IoT Edge 配置自己的 Windows 设备,包括运行 IoT Core 的设备,请按照在 Windows 上安装 Azure IoT Edge 运行时中的步骤进行操作。If you're ready to configure your own Windows device for IoT Edge, including devices running IoT Core, follow the steps in Install the Azure IoT Edge runtime on Windows.

创建 IoT 中心Create an IoT hub

使用 Azure CLI 创建 IoT 中心,启动快速入门。Start the quickstart by creating an IoT hub with Azure CLI.

关系图 - 在云中创建 IoT 中心

免费级的 IoT 中心适用于此快速入门。The free level of IoT Hub works for this quickstart. 如果曾经用过 IoT 中心并且创建了一个中心,则可使用该 IoT 中心。If you've used IoT Hub in the past and already have a hub created, you can use that IoT hub.

以下代码将在资源组 IoTEdgeResources 中创建免费的 F1 中心。The following code creates a free F1 hub in the resource group IoTEdgeResources. {hub_name} 替换为 IoT 中心的唯一名称。Replace {hub_name} with a unique name for your IoT hub. 创建 IoT 中心可能需要数分钟的时间。It might take a few minutes to create an IoT Hub.

az iot hub create --resource-group IoTEdgeResources --name {hub_name} --sku F1 --partition-count 2

如果由于订阅中已经有一个免费的中心而出现错误,请将 SKU 更改为 S1If you get an error because there's already one free hub in your subscription, change the SKU to S1. 如果出现一条错误,指示 IoT 中心名称不可用,则表明他人已使用具有该名称的中心。If you get an error that the IoT Hub name isn't available, it means that someone else already has a hub with that name. 请尝试一个新名称。Try a new name.

注册 IoT Edge 设备Register an IoT Edge device

使用新创建的 IoT 中心注册 IoT Edge 设备。Register an IoT Edge device with your newly created IoT hub. 关系图 - 使用 IoT 中心标识注册设备Diagram - Register a device with an IoT Hub identity

为模拟设备创建设备标识,以便它可以与 IoT 中心通信。Create a device identity for your simulated device so that it can communicate with your IoT hub. 设备标识存在于云中,而将物理设备关联到设备标识时,则使用唯一的设备连接字符串。The device identity lives in the cloud, and you use a unique device connection string to associate a physical device to a device identity.

由于 IoT Edge 设备的行为和托管方式与典型 IoT 设备不同,请使用 --edge-enabled 标志声明此标识,使之用于 IoT Edge 设备。Since IoT Edge devices behave and can be managed differently than typical IoT devices, declare this identity to be for an IoT Edge device with the --edge-enabled flag.

  1. 在 Azure CLI 中输入以下命令,以便在中心创建名为“myEdgeDevice”的设备。In the Azure CLI, enter the following command to create a device named myEdgeDevice in your hub.

    az iot hub device-identity create --device-id myEdgeDevice --edge-enabled --hub-name {hub_name}
    

    如果出现有关 iothubowner 策略密钥的错误,请确保 Azure CLI 运行最新版的 azure-cli-iot-ext 扩展。If you get an error about iothubowner policy keys, make sure that your Azure CLI is running the latest version of the azure-cli-iot-ext extension.

  2. 查看设备的连接字符串,该字符串将物理设备与其在 IoT 中心的标识链接在一起。View the connection string for your device, which links your physical device with its identity in IoT Hub. 它包含 IoT 中心名称、设备名称,以及用于对这两者之间的连接进行身份验证的共享密钥。It contains the name of your IoT hub, the name of your device, and then a shared key that authenticates connections between the two.

    az iot hub device-identity connection-string show --device-id myEdgeDevice --hub-name {hub_name}
    
  3. 复制 JSON 输出中 connectionString 键的值并保存。Copy the value of the connectionString key from the JSON output and save it. 该值为设备连接字符串。This value is the device connection string. 在下一部分配置 IoT Edge 运行时中,将用到此连接字符串。You'll use this connection string to configure the IoT Edge runtime in the next section.

    从 CLI 输出中检索连接字符串

安装和启动 IoT Edge 运行时Install and start the IoT Edge runtime

在 IoT Edge 设备上安装 Azure IoT Edge 运行时,并使用设备连接字符串对其进行配置。Install the Azure IoT Edge runtime on your IoT Edge device and configure it with a device connection string. 关系图 - 在设备上启动运行时Diagram - Start the runtime on device

IoT Edge 运行时部署在所有 IoT Edge 设备上。The IoT Edge runtime is deployed on all IoT Edge devices. 它有三个组件。It has three components. 每次 IoT Edge 设备启动并通过启动 IoT Edge 代理启动设备时,IoT Edge 安全守护程序 就会启动。The IoT Edge security daemon starts each time an IoT Edge device boots and bootstraps the device by starting the IoT Edge agent. IoT Edge 代理 管理 IoT Edge 设备上模块(包括 IoT Edge 中心)的部署和监视。The IoT Edge agent manages deployment and monitoring of modules on the IoT Edge device, including the IoT Edge hub. IoT Edge 中心 处理 IoT Edge 设备模块之间以及设备和 IoT 中心之间的通信。The IoT Edge hub handles communications between modules on the IoT Edge device, and between the device and IoT Hub.

安装脚本还包含一个名为 Moby 的容器引擎,用于管理 IoT Edge 设备上的容器映像。The installation script also includes a container engine called Moby that manages the container images on your IoT Edge device.

在运行时安装期间,系统会要求你提供设备连接字符串。During the runtime installation, you're asked for a device connection string. 请使用从 Azure CLI 检索的字符串。Use the string that you retrieved from the Azure CLI. 此字符串将物理设备与 Azure 中的 IoT Edge 设备标识关联在一起。This string associates your physical device with the IoT Edge device identity in Azure.

连接到 IoT Edge 设备Connect to your IoT Edge device

本部分中的步骤均在 IoT Edge 设备上执行,因此需要立即通过远程桌面连接到此虚拟机。The steps in this section all take place on your IoT Edge device, so you want to connect to that virtual machine now via remote desktop.

安装并配置 IoT Edge 服务Install and configure the IoT Edge service

使用 PowerShell 下载并安装 IoT Edge 运行时。Use PowerShell to download and install the IoT Edge runtime. 使用从 IoT 中心检索的设备连接字符串来配置设备。Use the device connection string that you retrieved from IoT Hub to configure your device.

  1. 在虚拟机中,以管理员身份运行 PowerShell。In the virtual machine, run PowerShell as an administrator.

    备注

    使用 PowerShell 的 AMD64 会话安装 IoT Edge,不要使用 PowerShell (x86)。Use an AMD64 session of PowerShell to install IoT Edge, not PowerShell (x86). 如果不确定您使用的是什么会话类型,请运行以下命令:If you're not sure which session type you're using, run the following command:

    (Get-Process -Id $PID).StartInfo.EnvironmentVariables["PROCESSOR_ARCHITECTURE"]
    
  2. Deploy-IoTEdge 命令执行以下检查:Windows 计算机使用受支持版本、启用容器功能、下载 Moby 运行时并下载 IoT Edge 运行时。The Deploy-IoTEdge command checks that your Windows machine is on a supported version, turns on the containers feature, downloads the Moby runtime, and then downloads the IoT Edge runtime.

    . {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
    Deploy-IoTEdge -ContainerOs Windows
    
  3. 计算机可能会自动重新启动。Your machine may restart automatically. 如果 Deploy-IoTEdge 命令提示你重启,请重启。If you are prompted by the Deploy-IoTEdge command to reboot, do so now.

  4. 再次以管理员身份运行 PowerShell。Run PowerShell as an administrator again.

  5. Initialize-IoTEdge 命令在计算机上配置 IoT Edge 运行时。The Initialize-IoTEdge command configures the IoT Edge runtime on your machine. 该命令默认为使用 Windows 容器手动预配。The command defaults to manual provisioning with Windows containers.

    . {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
    Initialize-IoTEdge -ContainerOs Windows
    
  6. 当系统提示输入 DeviceConnectionString 时,请提供在上一部分复制的字符串。When prompted for a DeviceConnectionString, provide the string that you copied in the previous section. 请勿对连接字符串使用引号。Don't include quotes around the connection string.

查看 IoT Edge 运行时状态View the IoT Edge runtime status

验证是否已成功安装并配置运行时。Verify that the runtime was successfully installed and configured. 可能需要几分钟才能完成安装并启动 IoT Edge 代理模块。It may take a few minutes for the installation to complete and the IoT Edge agent module to start.

  1. 检查 IoT Edge 服务的状态。Check the status of the IoT Edge service.

    Get-Service iotedge
    
  2. 若需排查服务问题,请检索服务日志。If you need to troubleshoot the service, retrieve the service logs.

    . {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; Get-IoTEdgeLog
    
  3. 查看在 IoT Edge 设备上运行的所有模块。View all the modules running on your IoT Edge device. 由于此服务是第一次运行,因此只会看到 edgeAgent 模块在运行。Since the service just started for the first time, you should only see the edgeAgent module running. edgeAgent 模块会默认运行,用于安装并启动部署到设备的任何其他模块。The edgeAgent module runs by default and helps to install and start any additional modules that you deploy to your device.

    iotedge list
    

    查看设备上的一个模块

IoT Edge 设备现在已配置好。Your IoT Edge device is now configured. 它可以运行云部署型模块了。It's ready to run cloud-deployed modules.

部署模块Deploy a module

从云端管理 Azure IoT Edge 设备,部署将遥测数据发送到 IoT 中心的模块。Manage your Azure IoT Edge device from the cloud to deploy a module that sends telemetry data to IoT Hub.

关系图 - 将模块从云部署到设备

Azure IoT Edge 的主要功能之一是能够从云中将代码部署到 IoT Edge 设备。One of the key capabilities of Azure IoT Edge is being able to deploy code to your IoT Edge devices from the cloud. IoT Edge 模块 是以容器形式实现的可执行程序包。IoT Edge modules are executable packages implemented as containers. 在本部分中,你将直接从 Azure IoT 中心的 Azure 市场的 IoT Edge 模块部分部署一个预建的模块。In this section, you deploy a pre-built module from the IoT Edge Modules section of the Azure Marketplace directly from your Azure IoT Hub.

在本部分中部署的模块模拟一个传感器并发送生成的数据。The module that you deploy in this section simulates a sensor and sends generated data. 开始使用 IoT Edge 时,此模块是非常有用的代码段,因为你可以使用模拟的数据进行开发和测试。This module is a useful piece of code when you're getting started with IoT Edge because you can use the simulated data for development and testing. 如果要确切了解此模块的功能,则可以查看模拟的温度传感器源代码If you want to see exactly what this module does, you can view the simulated temperature sensor source code.

若要从 Azure 市场部署你的第一个模块,请使用以下步骤:To deploy your first module from the Azure Marketplace, use the following steps:

  1. 登录 Azure 门户,导航到 IoT 中心。Sign in to the Azure portal and navigate to your IoT hub.

  2. 从左窗格菜单中的“自动设备管理”下,选择“IoT Edge” 。From the menu on the left pane, under Automatic Device Management, select IoT Edge.

  3. 单击设备列表中目标设备的设备 ID。Click on the device ID of the target device from the list of devices.

  4. 在上方栏中,选择“设置模块”。On the upper bar, select Set Modules.

    从设备详细信息页选择“设置模块”

  5. 在该页的“IoT Edge 模块”部分中,单击“添加”,并从下拉菜单中选择“市场模块” 。In the IoT Edge Modules section of the page, click Add and select Marketplace Module from the drop-down menu.

    添加市场模块

  6. 在“IoT Edge 模块市场”中,搜索“模拟温度传感器”并选择该模块。In the IoT Edge Module Marketplace, search for "Simulated Temperature Sensor" and select that module.

  7. 请注意,SimulatedTemperatureSensor 模块将添加到“IoT Edge 模块”部分,并以所需的状态运行。Notice that the SimulatedTemperatureSensor module is added to the IoT Edge Modules section, with the desired status running.

    在完成时选择“下一步:”路由以继续执行向导的下一步。Select Next: Routes to continue to the next step of the wizard.

    列出温度传感器模块后,转到下一步

  8. 在向导的“路由”选项卡中,可以定义消息在模块和 IoT 中心之间的传递方式。On the Routes tab of the wizard, you can define how messages are passed between modules and the IoT Hub. 路由是使用名称/值对构造而成的。Routes are constructed using name/value pairs. 应在此页上看到两条路由。You should see two routes on this page. 称为“路由”的默认路由用于将所有消息发送到 IoT 中心(即 $upstream)。The default route called route sends all messages to IoT Hub (which is called $upstream). 从市场添加模块时,将自动创建名为“SimulatedTemperatureSensorToIoTHub”的第二条路由。A second route called SimulatedTemperatureSensorToIoTHub was created automatically when you added the module from the Marketplace. 此路由用于将所有消息(尤其是来自模拟温度模块中的消息)发送到 IoT 中心。This route sends all messages specifically from the simulated temperature module to IoT Hub. 可以删除默认路由,因为在这种情况下它是多余的。You can delete the default route because it's redundant in this case.

    在完成时选择“下一步:查看 + 创建”继续执行向导的下一步。Select Next: Review + create to continue to the next step of the wizard.

    删除默认路由,然后转到下一步

  9. 在向导的“查看 + 创建”选项卡中,可以预览定义部署到 IoT Edge 设备的所有模块的 JSON 文件。On the Review + create tab of the wizard, you can preview the JSON file that defines all the modules that get deployed to your IoT Edge device. 请注意,包括“SimulatedTemperatureSensor”模块以及名为“edgeAgent”和“edgeHub”的两个运行时模块 。Notice that the SimulatedTemperatureSensor module is included as well as the two runtime modules, edgeAgent and edgeHub. 完成查看后,选择“创建”。Select Create when you're done reviewing.

    在将新部署提交到 IoT Edge 设备时,不会向设备推送任何内容。When you submit a new deployment to an IoT Edge device, nothing is pushed to your device. 相反,设备会定期对 IoT 中心进行查询以获取任何新指令。Instead, the device queries IoT Hub regularly for any new instructions. 如果设备找到了更新的部署清单,则它会使用关于新部署的信息来从云中拉取模块映像,然后开始在本地运行模块。If the device finds an updated deployment manifest, it uses the information about the new deployment to pull the module images from the cloud then starts running the modules locally. 此过程可能需要几分钟时间。This process may take a few minutes.

  10. 创建模块部署详细信息后,向导会将你返回到设备详细信息页。After you create the module deployment details, the wizard returns you to the device details page. 在设备详细信息页上的“模块”选项卡中查看部署状态。应有三个模块列出:$edgeAgent、$edgeHub 和 SimulatedTemperatureSensor。On the device details page, view the deployment status in the Modules tab. Three modules should be listed: $edgeAgent, $edgeHub, and SimulatedTemperatureSensor. 如果列出了部署中指定的一个或多个模块,但设备未报告这些模块,则意味着 IoT Edge 设备仍在启动它们。If one or more of the modules are listed as specified in deployment but not reported by device, your IoT Edge device is still starting them. 请稍等片刻,然后选择页面顶部的“刷新”。Wait a few moments and select Refresh at the top of the page.

    查看已部署模块列表中的 SimulatedTemperatureSensor

查看生成的数据View generated data

此快速入门中,创建了新的 IoT Edge 设备,并在该设备上安装了 IoT Edge 运行时。In this quickstart, you created a new IoT Edge device and installed the IoT Edge runtime on it. 然后,使用了 Azure 门户部署 IoT Edge 模块,使其在不更改设备本身的情况下在设备上运行。Then, you used the Azure portal to deploy an IoT Edge module to run on the device without having to make changes to the device itself.

在这种情况下,推送的模块会生成示例环境数据,你可以在稍后使用该数据进行测试。In this case, the module that you pushed generates sample environment data that you can use for testing later. 模拟传感器正在监视一台计算机和该计算机周围的环境。The simulated sensor is monitoring both a machine and the environment around the machine. 例如,该传感器可能位于服务器机房中、工厂地板上或风力涡轮机上。For example, this sensor might be in a server room, on a factory floor, or on a wind turbine. 该消息包括环境温度和湿度、机器温度和压力以及时间戳。The message includes ambient temperature and humidity, machine temperature and pressure, and a timestamp. IoT Edge 教程使用此模块创建的数据作为测试数据进行分析。The IoT Edge tutorials use the data created by this module as test data for analytics.

确认从云中部署的模块正在 IoT Edge 设备上运行。Confirm that the module deployed from the cloud is running on your IoT Edge device.

iotedge list

查看设备上的三个模块

查看从温度传感器模块发送到云的消息。View the messages being sent from the temperature sensor module to the cloud.

iotedge logs SimulatedTemperatureSensor -f

提示

引用模块名称时,IoT Edge 命令区分大小写。IoT Edge commands are case-sensitive when referring to module names.

查看模块中的数据

也可使用 Visual Studio Code 的 Azure IoT 中心扩展查看到达 IoT 中心的消息。You can also watch the messages arrive at your IoT hub by using the Azure IoT Hub extension for Visual Studio Code.

清理资源Clean up resources

若要继续学习 IoT Edge 教程,可以使用在本快速入门中注册并设置的设备。If you want to continue on to the IoT Edge tutorials, you can use the device that you registered and set up in this quickstart. 否则,可删除已创建的 Azure 资源,避免产生费用。Otherwise, you can delete the Azure resources that you created to avoid charges.

如果是在新资源组中创建的虚拟机和 IoT 中心,则可删除该组以及所有关联的资源。If you created your virtual machine and IoT hub in a new resource group, you can delete that group and all the associated resources. 仔细检查资源组的内容,确保没有要保留的内容。Double check the contents of the resource group to make sure that there's nothing you want to keep. 如果不希望删除整个组,则可改为删除单个资源。If you don't want to delete the whole group, you can delete individual resources instead.

重要

删除资源组的操作不可逆。Deleting a resource group is irreversible.

删除 IoTEdgeResources 组。Remove the IoTEdgeResources group. 可能需要花费几分钟来删除资源组。It might take a few minutes to delete a resource group.

az group delete --name IoTEdgeResources

可以通过查看资源组列表来确认已删除该资源组。You can confirm the resource group is removed by viewing the list of resource groups.

az group list

后续步骤Next steps

在本快速入门中,你创建了一个 IoT Edge 设备并使用 Azure IoT Edge 云接口将代码部署到该设备上。In this quickstart, you created an IoT Edge device and used the Azure IoT Edge cloud interface to deploy code onto the device. 现在,你有了一个可以生成其环境的原始数据的测试设备。Now, you have a test device generating raw data about its environment.

下一步是设置本地开发环境,使你可以开始创建运行业务逻辑的 IoT Edge 模块。The next step is to set up your local development environment so that you can start creating IoT Edge modules that run your business logic.