@Test public void testLaunch() throws BelugaException, UnknownIaasProviderException, ClusterExistException { String definitionId = "ec2-real"; clusterService.createCluster(definitionId, domainName, true); }
protected ClusterService createCluster(String definitionId, String domainName, boolean waitUntilInstanceAvailable) throws BelugaException, UnknownIaasProviderException { this.domainName = domainName; SettingManager settingManager = environment.settingManager(); ClusterDefinition clusterDefinition = settingManager.getClusterDefinition(definitionId); String iaasProfile = clusterDefinition.getIaasProfile(); IaasProvider iaasProvider = iaasProviderConfig.getIaasProvider(iaasProfile); ClusterTopology clusterTopology = new ClusterTopology(clusterId, definitionId, iaasProfile); createInstances(clusterTopology, clusterDefinition, iaasProvider, waitUntilInstanceAvailable); storeClusterTopologyConfig(); addClusterIdToSetting(clusterId, domainName); return this; }
ClusterService extends AbstractClusterService { protected ClusterService createCluster(String definitionId, String domainName, boolean waitUntilInstanceAvailable) throws BelugaException, UnknownIaasProviderException { this.domainName = domainName; SettingManager settingManager = environment.settingManager(); ClusterDefinition clusterDefinition = settingManager.getClusterDefinition(definitionId); String iaasProfile = clusterDefinition.getIaasProfile(); IaasProvider iaasProvider = iaasProviderConfig.getIaasProvider(iaasProfile); ClusterTopology clusterTopology = new ClusterTopology(clusterId, definitionId, iaasProfile); createInstances(clusterTopology, clusterDefinition, iaasProvider, waitUntilInstanceAvailable); storeClusterTopologyConfig(); addClusterIdToSetting(clusterId, domainName); return this; } }
ClusterService extends AbstractClusterService { protected ClusterService createCluster(String definitionId, String domainName, boolean waitUntilInstanceAvailable) throws BelugaException, UnknownIaasProviderException { this.domainName = domainName; SettingManager settingManager = environment.settingManager(); ClusterDefinition clusterDefinition = settingManager.getClusterDefinition(definitionId); String iaasProfile = clusterDefinition.getIaasProfile(); IaasProvider iaasProvider = iaasProviderConfig.getIaasProvider(iaasProfile); ClusterTopology clusterTopology = new ClusterTopology(clusterId, definitionId, iaasProfile); createInstances(clusterTopology, clusterDefinition, iaasProvider, waitUntilInstanceAvailable); storeClusterTopologyConfig(); addClusterIdToSetting(clusterId, domainName); return this; } ClusterService(String clusterId, Environment environment, Settings settings); }
ClusterService extends AbstractClusterService { protected ClusterService createCluster(String definitionId, String domainName, boolean waitUntilInstanceAvailable) throws BelugaException, UnknownIaasProviderException { this.domainName = domainName; SettingManager settingManager = environment.settingManager(); ClusterDefinition clusterDefinition = settingManager.getClusterDefinition(definitionId); String iaasProfile = clusterDefinition.getIaasProfile(); IaasProvider iaasProvider = iaasProviderConfig.getIaasProvider(iaasProfile); ClusterTopology clusterTopology = new ClusterTopology(clusterId, definitionId, iaasProfile); createInstances(clusterTopology, clusterDefinition, iaasProvider, waitUntilInstanceAvailable); storeClusterTopologyConfig(); addClusterIdToSetting(clusterId, domainName); return this; } ClusterService(String clusterId, Environment environment, Settings settings); String getDomainName(); boolean shutdownCluster(); CloudWatcher getCloudWatcher(); List<CommonInstance> addSlaveNode(int incrementSize); CommonInstance removeSlaveNode(String instanceId); void updateInstances(); void rebootInstances(boolean waitUntilInstanceAvailable); void rebootInstances(String role, boolean waitUntilInstanceAvailable); void rebootInstances(List<CommonInstance> instanceList, boolean waitUntilInstanceAvailable); void loadClusterTopology(); IaasProvider getIaasProvider(); ClusterDefinition getClusterDefinition(); ClusterTopology getClusterTopology(); HAProxyAPI getProxyAPI(); MesosAPI getMesosAPI(); MarathonAPI getMarathonAPI(); DockerAPI getDockerAPI(); }
ClusterService extends AbstractClusterService { protected ClusterService createCluster(String definitionId, String domainName, boolean waitUntilInstanceAvailable) throws BelugaException, UnknownIaasProviderException { this.domainName = domainName; SettingManager settingManager = environment.settingManager(); ClusterDefinition clusterDefinition = settingManager.getClusterDefinition(definitionId); String iaasProfile = clusterDefinition.getIaasProfile(); IaasProvider iaasProvider = iaasProviderConfig.getIaasProvider(iaasProfile); ClusterTopology clusterTopology = new ClusterTopology(clusterId, definitionId, iaasProfile); createInstances(clusterTopology, clusterDefinition, iaasProvider, waitUntilInstanceAvailable); storeClusterTopologyConfig(); addClusterIdToSetting(clusterId, domainName); return this; } ClusterService(String clusterId, Environment environment, Settings settings); String getDomainName(); boolean shutdownCluster(); CloudWatcher getCloudWatcher(); List<CommonInstance> addSlaveNode(int incrementSize); CommonInstance removeSlaveNode(String instanceId); void updateInstances(); void rebootInstances(boolean waitUntilInstanceAvailable); void rebootInstances(String role, boolean waitUntilInstanceAvailable); void rebootInstances(List<CommonInstance> instanceList, boolean waitUntilInstanceAvailable); void loadClusterTopology(); IaasProvider getIaasProvider(); ClusterDefinition getClusterDefinition(); ClusterTopology getClusterTopology(); HAProxyAPI getProxyAPI(); MesosAPI getMesosAPI(); MarathonAPI getMarathonAPI(); DockerAPI getDockerAPI();  }