udmi

UDMI / Docs / Specs / Site Model

Project Site Model

A project “site model” contains information necessary to specify the configuration for a particular site. This is a logical representation of the underlying information, and can be applied against different cloud projects or device configurations to ensure that things are configured appropriately. It’s fundamentally the building model that describes the on-prem devices and how they communicate with the cloud.

Typically, each site has its own git repo, with the site model files (cloud_iot_config.json, devices/, reflector/, etc.) located either at the repository root or inside a udmi/ subdirectory (<repo>/udmi/) when the repository also stores non-UDMI site artifacts. For test and development, this only needs to be an on-disk directory. The udmi_site_model repo provides an up-to-date example of what a site model might look like (actively used by some of the integration tests).

At a high-level, the various constructs relevant to UDMI are (described in more detail below):

Registrar Tool

The primary use of the site_model will be through the registrar and validator tools. Primarily, they look for the existence of metadata device/{device_id}/metadata.json files in the site model and process the information found there.

cloud_iot_config.json

The cloud_iot_config.json schema specifies some cloud-centric configuration parameters (example).

devices/

The devices directory contains a set of descriptions for individual devices in the system. Each device directory name corresponds to the Cloud IoT Core device entry and represents the canonical name for the device. Inside of this directory will be various bits and pieces of information used by different tools for managing the devices.

reflector/

The reflector directory contains the key pair (rsa_private.pem, rsa_private.pkcs8, and rsa_public.pem) used by reflector tools (registrar, validator, sequencer) to authenticate as this site (projects/<PROJECT_ID>/locations/<REGION>/registries/UDMI-REFLECT/devices/<SITE_ID>) when connecting via //gbos/<PROJECT_ID>. The corresponding rsa_public.pem must be registered under devices/<SITE_ID>/ in the target project’s UDMI-REFLECT registry.