org.glassfish.paas.orchestrator
Interface ServiceOrchestrator

All Known Implementing Classes:
ServiceOrchestratorImpl

@Contract
public interface ServiceOrchestrator

The Orchestration Engine (OE) component in a PaaS runtime performs the following functions during deployment of an archive.

The Orchestrator performs these functions through the use of Service implementation specific Service Provisioning Engines (SPEs)


Nested Class Summary
static class ServiceOrchestrator.ReconfigAction
           
 
Method Summary
 void deployApplication(String appName, ReadableArchive cloudArchive)
          Deploys an application archive into the PaaS runtime.
 ServiceDescription getServiceDescription(String appName, String service)
          given the application-name and service-name, retrieve the service-description info.
 ServiceMetadata getServices(ReadableArchive archive)
          Provides the ServiceMetadata associated with an application archive.
 boolean scaleService(String appName, String svcName, int scaleCount, AllocationStrategy allocStrategy)
          Scales the size of a Service up or down as per the provided scalingFactor.
 

Method Detail

deployApplication

void deployApplication(String appName,
                       ReadableArchive cloudArchive)
Deploys an application archive into the PaaS runtime. XXX: This is currently used by the cloud-deploy command. The deploy command integration is through ApplicationLifecycleInterceptor and hence this can be removed later once we move to the deploy command fully.

Parameters:
appName - the name of the application as it should be referenced in the PaaS console
cloudArchive - the application archive

getServices

ServiceMetadata getServices(ReadableArchive archive)
                            throws Exception
Provides the ServiceMetadata associated with an application archive. This is used by GUI and the IDE plugin to get the service dependencies and default ServiceDescriptions associated that the OE and SPEs have discovered for the provided application archive.

Parameters:
archive - Application archive
Returns:
The ServiceMetadata of the application discovered by OE and SPEs.
Throws:
Exception

scaleService

boolean scaleService(String appName,
                     String svcName,
                     int scaleCount,
                     AllocationStrategy allocStrategy)
Scales the size of a Service up or down as per the provided scalingFactor. The Cloud Elasticity Manager(CEM) component uses this method to perform auto-scaling of Services (GlassFish Cluster etc) based on user-defined alerts and alarms.

Parameters:
appName - Name of the application
svcName - Names of the service to be scaled
scaleCount - Number of units of the Service that needs to be scaled. A positive number for scaling up and a negative number for scaling down.
allocStrategy - The allocationStrategy that needs to be utilized to scale the Service. The allocationStrategy implementation that is provided could be used to spawn a new instance in a less-loaded/underutilized machine in the ServerPool. This could be null, if the default allocation strategy needs to be employed.
Returns:
true if the scaling operation was successful, and false otherwise

getServiceDescription

ServiceDescription getServiceDescription(String appName,
                                         String service)
given the application-name and service-name, retrieve the service-description info.
Useful for GUI/Tooling modules to retrieve the service-description.

Parameters:
appName - application-name
service - service-name
Returns:
ServiceDescription


Copyright © 2012. All Rights Reserved.