Setting Up the Device Cloud Definitions in Linux

The setup-cloud-deps.py program creates and updates the required applications and thing definitions in Device Cloud for the device manager and sample applications.

You need to know the organization into which you want to create the definitions. Your current organization appears in the upper-right corner of the Management Portal. If you are not sure what organizations you belong to, select Tools in the upper-right corner. If the Switch organization entry appears in the menu, select it to see your other organizations. If the entry does not appear, you are only a member in your current organization.

Device Cloud Tools Menu Switch Organization

You need organization administrator privileges to create the definitions. If the Administration entry appears in the Tools menu, you have organization administrator privileges for the organization. If you do not have organization administrator privileges, contact your administrator for help.

You need the following:

  • your user name, password, and URL for Device Cloud

    Note:

    The URL to the main Device Cloud LaunchPad page does not start with portal. If you do not see the LaunchPad shown below when you log in, remove portal from the URL.

  • organization administrator privileges for the organization in which to create the application and thing definitions

  1. In your browser's address bar, type the URL you were given when you received your Device Cloud account, and then on the Sign In page, type your user name and password in the boxes.
  2. To access the Management Portal, click Development Tools on the LaunchPad.
    Device Cloud - LaunchPad
  3. On the Management Portal, verify that the applications and thing definitions exist in your organization.
    1. On the top menu, click Developer, and then on the Developer page, click Thing definitions.
      Device Cloud - Thing Definitions

      You should see the following thing definitions:

      • hdc_device_manager_def

      • hdc_simple_actions_def

      • hdc_simple_location_def

      • hdc_simple_telemetry_def

    2. Click Developer, and then click Applications.

      You should see the following applications:

      • hdc_device_manager_app

      • hdc_simple_actions_app

      • hdc_simple_location_app

      • hdc_simple_telemetry_app

  4. If the thing definitions and applications do not exist, do the following:
    1. On the Developer page, take note of the URL shown in the Endpoints section.

      In the following example, the endpoint is api.devicecloud.windriver.com. Do not include the /api portion of the URL.

      Device Cloud - Management Portal Endpoints Section
    2. On your Linux computer, open a terminal window and run the script to set up the definitions and roles.

      For endPoint, specify the endpoint you noted on the Developer page.

      For yourOrg, specify the organization to which you want to add the definitions.

      $ /usr/local/share/device_cloud/share/admin-tools
      $ ./setup-cloud-deps.py
      Cloud Address: endPoint
      Username: yourDeviceCloudUsername
      Password: yourDeviceCloudPassword
      Org Key(Optional): yourOrg

      The thing definitions and applications are created in Device Cloud. Existing ones are updated.

    3. Repeat the step above to confirm that the applications and thing definitions are now present in your organization.