Now that you've gotten your Hello, World! program running, you can start connecting your gateway to the cloud. The IoT cloud repository allows you to add support for multiple cloud platforms, such as Microsoft Azure*, Google Cloud Platform*, IBM Watson IoT* and Amazon Web Services (AWS)* to your Intel® IoT device. This section contains steps to install cloud support on your gateway.

This section is geared toward users working with Intel® IoT Gateway Software Suite.

For more information on the cloud platforms that Intel supports, see the official sites for the following:

Adding cloud support

  1. Load the IoT Gateway Developer Hub interface in your browser by entering the IP address of your gateway. The default username and password are both root.

    Tip: You can find your gateway’s IP address using the ifconfig command.
  2. Record the image version you have installed for use in later steps (for example, WR7.0.0.13):


  3. Next, you'll add the IoT cloud repository. Follow the steps to do so using the Developer Hub or the command line.

 

Installing cloud support using the Developer Hub

  1. Go to the Administration section and launch the Cloud Commander web console. Log in with the username root and password root if requested.


  2. Scroll to the bottom of the page and click the Console button in the bottom right of the window.


  3. In the console, enter the following command:
    rpm --import http://iotdk.intel.com/misc/iot_pub2.key
            

  4. Scroll to the top of the page and go to the Packages section. Click the Add Repo + button.


  5. Populate the fields with the following information and click Add Repository:
    • Name: IoT_Cloud
    • URL: http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcplXX (where XX is the last 2 digits of the image version you recorded earlier, for example http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcpl13/
  6. Finally, click the Update Repositories button to update the package list.


Install packages for cloud platforms

  1. Click the Add Packages + button to bring up the list of packages you can install.


  2. Search for cloud using the search box at the top of the package window to get a list of the supported cloud platforms.


  3. Click the Install button on any of these packages to install support for the cloud platform for all available programming languages.

    Note: Packages can also be installed for a specific programming language individually, if desired.

Now that you've installed cloud support for your gateway, you can continue with the steps below to install sensor support for Node-RED*. Refer to the Next Steps section for steps on how to get started programming your board to connect to the cloud using Node-RED, C++, or any of the other supported programming languages.

 


 

Installing cloud support using the command line

  1. From the command line, run the following commands to add the repository (where XX is the last 2 digits of the image version you recorded earlier, for example http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcpl13/
  2. rpm --import http://iotdk.intel.com/misc/iot_pub2.key
    smart channel --add IoT_Cloud type=rpm-md name="IoT_Cloud" 
     baseurl=http://iotdk.intel.com/repos/iot-cloud/wrlinux7/rcplXX/
    smart update
  3. Run the following commands to install support for a given cloud platform:

    smart update
    smart install packagegroup-cloud-azure
    smart install packagegroup-cloud-google smart install packagegroup-cloud-ibm smart install packagegroup-cloud-aws

Now that you've installed cloud support for your gateway, you can continue with the steps below to install sensor support for Node-RED. Refer to the Next Steps section for steps on how to get started programming your board to connect to the cloud using Node-RED, C++, or any of the other supported programming languages.

 


 

Installing sensor support for Node-RED*

There is a package available in the cloud repository which installs nodes for a limited number of sensors. To install this package, follow the instructions below for your given platform.

Using the Developer Hub (Wind River*)

  1. Go to the Packages section and click Add Package +.
  2. Search for node-red-contrib-upm and click the Install button.
  3. Next, you'll restart the Node-RED service. In the Packages section, scroll down until you find the node-red-experience package.
  4. Click the Stop button twice to stop and start the service. Wait for a few seconds before re-launching Node-RED from the Administration section, where any newly installed nodes should now appear.

Using the command line (Wind River*)

  1. From the command line, run the following commands:

    smart update
    smart install node-red-contrib-upm
    systemctl restart node-red-experience

Troubleshooting

Node-RED* nodes don’t show after installing support for a cloud platform

The Node-RED service needs to be restarted to pick up new nodes. Follow the instructions below to restart the service using either the Developer Hub or the command line.

Using the Developer Hub (Wind River*)

In the Packages section, scroll down until you find the node-red-experience package. Click the Stop button twice to stop and start the service. Wait for a few seconds before re-launching Node-RED from the Administration section, where any newly installed nodes should now appear.

Using the command line (Wind River*)

If you are using the command line instead of the Developer Hub, run the following command to restart the Node-RED service:

systemctl restart node-red-experience      
        

Next Steps

See the appropriate link below for details on enabling your gateway to connect to a cloud platform, based on your programming language of choice:

集成开发环境或开发框架: 
有关编译器优化的更完整信息,请参阅优化通知