if (getMaxSize() != null) sb.append("MaxSize: ").append(getMaxSize()).append(","); if (getDesiredCapacity() != null) sb.append("DesiredCapacity: ").append(getDesiredCapacity()).append(","); if (getDefaultCooldown() != null) sb.append("DefaultCooldown: ").append(getDefaultCooldown()).append(",");
hashCode = prime * hashCode + ((getMinSize() == null) ? 0 : getMinSize().hashCode()); hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); hashCode = prime * hashCode + ((getDefaultCooldown() == null) ? 0 : getDefaultCooldown().hashCode()); hashCode = prime * hashCode + ((getAvailabilityZones() == null) ? 0 : getAvailabilityZones().hashCode());
if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == false) return false; if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == null) return false; if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == false) return false; if (other.getDefaultCooldown() == null ^ this.getDefaultCooldown() == null)
if (getMaxSize() != null) sb.append("MaxSize: " + getMaxSize() + ","); if (getDesiredCapacity() != null) sb.append("DesiredCapacity: " + getDesiredCapacity() + ","); if (getDefaultCooldown() != null) sb.append("DefaultCooldown: " + getDefaultCooldown() + ",");
hashCode = prime * hashCode + ((getMaxSize() == null) ? 0 : getMaxSize().hashCode()); hashCode = prime * hashCode + ((getDesiredCapacity() == null) ? 0 : getDesiredCapacity().hashCode()); hashCode = prime * hashCode + ((getDefaultCooldown() == null) ? 0 : getDefaultCooldown().hashCode());
@Override public boolean calculate(DeployConfiguration activeConfiguration, AutoScalingGroup autoScalingGroup, long inService, long healthy, long inStandby) { if (activeConfiguration.useElbStatusCheck()) { return inService > autoScalingGroup.getDesiredCapacity()-1; } else { return healthy > autoScalingGroup.getDesiredCapacity()-1; } } }
if (other.getMaxSize() != null && other.getMaxSize().equals(this.getMaxSize()) == false) return false; if (other.getDesiredCapacity() == null ^ this.getDesiredCapacity() == null) return false; if (other.getDesiredCapacity() != null && other.getDesiredCapacity().equals(this.getDesiredCapacity()) == false) return false; if (other.getDefaultCooldown() == null ^ this.getDefaultCooldown() == null)
public void preDeploy(List<Ec2Instance> instances, AutoScalingGroup asGroup) throws MojoFailureException, MojoExecutionException { if (asGroup.getInstances().isEmpty()) { log.info("No instances found in autoscaling group, spinning new instance"); WaitForInstanceRequestExecutor.InstanceStatus instanceStatus = newInstance -> awsDeployUtils.checkInstanceInService(newInstance.getInstanceId()); awsDeployUtils.setDesiredCapacity(asGroup, asGroup.getDesiredCapacity() + 1); WaitForInstanceRequestExecutor waitForDeployedInstanceRequestExecutor = new WaitForInstanceRequestExecutor(log, 10); waitForDeployedInstanceRequestExecutor.executeRequest(asGroup, awsDeployUtils, instanceStatus); instances.addAll(awsDeployUtils.getInstancesForAutoScalingGroup(log, awsDeployUtils.getAutoScalingGroup())); } }
awsDeployUtils.setDesiredCapacity(asGroup, asGroup.getDesiredCapacity() + 1); WaitForInstanceRequestExecutor waitForDeployedInstanceRequestExecutor = new WaitForInstanceRequestExecutor(log, 10); waitForDeployedInstanceRequestExecutor.executeRequest(asGroup, awsDeployUtils, instanceStatus);
request.addParameter(prefix, StringUtils.fromInteger(maxSize)); if (_autoScalingGroup.getDesiredCapacity() != null) { prefix = _prefix + "DesiredCapacity"; Integer desiredCapacity = _autoScalingGroup.getDesiredCapacity(); request.addParameter(prefix, StringUtils.fromInteger(desiredCapacity));
if (desiredScaleSize > currentSize && desiredScaleSize > hosts.getASG().getDesiredCapacity()) {
final int originalDesiredCapacity = asGroup.getDesiredCapacity(); if (asGroup.getMinSize() >= asGroup.getDesiredCapacity()) { awsDeployUtils.setMinimalCapacity(asGroup.getDesiredCapacity() <= 0 ? 0 : asGroup.getDesiredCapacity() - 1);