private void initHostComponentResources() {
    String      clusterName = getClusterDefinition().getClusterName();
    Set<String> services    = getClusterDefinition().getServices();
    for (String serviceName : services) {
      Set<String> hosts = getClusterDefinition().getHosts();
      for (String hostName : hosts) {
        Set<String> hostComponents = getClusterDefinition().getHostComponents(serviceName, hostName);
        for (String componentName : hostComponents) {
          Resource hostComponent = new ResourceImpl(Resource.Type.HostComponent);
          hostComponent.setProperty(HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID, clusterName);
          hostComponent.setProperty(HOST_COMPONENT_SERVICE_NAME_PROPERTY_ID, serviceName);
          hostComponent.setProperty(HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID, componentName);
          hostComponent.setProperty(HOST_COMPONENT_HOST_NAME_PROPERTY_ID, hostName);

          addResource(hostComponent);
        }
      }
    }
  }
Create the resources based on the cluster definition.
contrib/ambari-scom/ambari-scom-server/src/main/java/org/apache/ambari/msi/HostComponentProvider.java