+1. Will define the interface for that and share it with you ASAP.. Thanks, Reka
On Wed, Oct 23, 2013 at 3:17 PM, Lahiru Sandaruwan <[email protected]> wrote: > Hi Reka, > > Thanks and looks good. > Shall we also introduce an interfaces for spawning and terminating several > instances at once? > > These instances might be from different partitions. i.e. spawn 1 instance > from EC2, Asia region and spawn 2 instances from EC2, Europe region. Same > way for termination. > > Thanks. > > > On Tue, Oct 22, 2013 at 10:48 AM, Reka Thirunavukkarasu <[email protected]>wrote: > >> Hi Lahiru and Devs, >> >> Please find the service methods to talk to jclouds as below. Also, Please >> provide your suggestions to make the interface more flexible. Let me >> explain, why we have to change the interface? >> >> With the new architecture, autoscaler can take more robust decision from >> the stats, its collects from the Event Processing Engine. In the case of >> scale down or scale up, it can start/terminate instances within a cloud, >> within a region, within a zone, within a network and within a host. If any >> of them is not specified in the Locationscope, the cloud controller will >> take the decision with the default location. Also, autoscaler can terminate >> the unhealthy instances by providing the instance ID. >> >> /** >> * Calling this method will result in an instance startup, which is >> belong >> * to the provided Cluster ID. Also note that the instance that is >> starting up >> * belongs to the group whose name is derived from its Cluster ID, >> replacing <i>.</i> >> * by a hyphen (<i>-</i>). >> * >> * @param clusterId >> * cluster ID of the instance to be started up. >> * @param locationScope >> * It contains the region, zone, network and host of a >> IaaS where >> * an instance need to be started. >> * @return public IP which is associated with the newly started >> instance. >> */ >> public String startInstance(String clusterId, LocationScope >> locationScope); >> >> /** >> * Calling this method will result in termination of an instance >> which is belong >> * to the provided cluster Id and the location scope.. >> * >> * @param clusterId >> * cluster ID of the instance to be terminated. >> * @param locationScope >> * It contains the region, zone, network and host of a >> IaaS where >> * an instance need to be terminated.. >> * @return whether an instance terminated successfully or not. >> */ >> public boolean terminateInstance(String clusterId, LocationScope >> locationScope); >> >> /** >> * Calling this method will result in termination of an instance >> which is belong >> * to the provided instance Id. >> * >> * @param instanceId >> * instance Id of the instance to be terminated. >> * @return whether an instance terminated successfully or not. >> */ >> public boolean terminateInstance(String instanceId); >> >> /** >> * Calling this method will result in termination of all instances >> belong >> * to the provided cluster ID. >> * >> * @param clusterId >> * cluster ID of the instance to be terminated. >> * @return whether an instance terminated successfully or not. >> */ >> public boolean terminateAllInstances(String clusterId); >> >> >> /** >> * Calling this method will result in termination of the lastly >> spawned instance which is >> * belong to the provided clusterID. >> * >> * @param clusterId >> * service domain of the instance to be terminated. >> * @return whether the termination is successful or not. >> */ >> public boolean terminateLastlySpawnedInstance(String clusterId); >> >> >> The LocationScope can be found as below: >> >> public class LocationScope { >> private String zone; >> private String network; >> private String host; >> private String region; >> private String cloud; >> ............ >> } >> >> >> Thanks, >> Reka >> >> >> On Tue, Oct 22, 2013 at 8:09 AM, Lahiru Sandaruwan <[email protected]>wrote: >> >>> Hi Reka, >>> >>> What will be the $subject? Just want to get an idea what kind of service >>> methods they would be. >>> >>> Thanks. >>> >>> -- >>> -- >>> Lahiru Sandaruwan >>> Software Engineer, >>> Platform Technologies, >>> WSO2 Inc., http://wso2.com >>> lean.enterprise.middleware >>> >>> email: [email protected] cell: (+94) 773 325 954 >>> blog: http://lahiruwrites.blogspot.com/ >>> twitter: http://twitter.com/lahirus >>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>> >>> >> >> >> -- >> Reka Thirunavukkarasu >> Software Engineer, >> WSO2, Inc.:http://wso2.com, >> Mobile: +94776442007 >> >> >> > > > -- > -- > Lahiru Sandaruwan > Software Engineer, > Platform Technologies, > WSO2 Inc., http://wso2.com > lean.enterprise.middleware > > email: [email protected] cell: (+94) 773 325 954 > blog: http://lahiruwrites.blogspot.com/ > twitter: http://twitter.com/lahirus > linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 > > -- Reka Thirunavukkarasu Software Engineer, WSO2, Inc.:http://wso2.com, Mobile: +94776442007
