private void createResources(Cluster cluster, AddServiceInfo request) {
    LOG.info("Creating resources for {}", request);

    Set<String> existingServices = cluster.getServices().keySet();

    updateKerberosDescriptor(request);

    resourceProviders.createServices(request);
    resourceProviders.createComponents(request);

    resourceProviders.updateServiceDesiredState(request, State.INSTALLED);
    resourceProviders.updateServiceDesiredState(request, State.STARTED);

    resourceProviders.createHostComponents(request);

    configureKerberos(request, cluster, existingServices);
    resourceProviders.updateExistingConfigs(request, existingServices);
    resourceProviders.createConfigs(request);
  }
Creates the service, component and host component resources for the request.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/AddServiceOrchestrator.java