private void initComponentResources() {
    String      clusterName = getClusterDefinition().getClusterName();
    Set<String> services    = getClusterDefinition().getServices();
    for (String serviceName : services) {
      Set<String> components = getClusterDefinition().getComponents(serviceName);
      for (String componentName : components) {
        Resource component = new ResourceImpl(Resource.Type.Component);
        component.setProperty(COMPONENT_CLUSTER_NAME_PROPERTY_ID, clusterName);
        component.setProperty(COMPONENT_SERVICE_NAME_PROPERTY_ID, serviceName);
        component.setProperty(COMPONENT_COMPONENT_NAME_PROPERTY_ID, componentName);

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