autoscaling

How to stop/start an EC2 instance on a schedule within an autoscale group without terminating the instance?

巧了我就是萌 提交于 2019-12-02 08:23:39
If you have have an autoscaling group, how do you go about start/stopping the instances ( not launch/terminate) ? The default behaviour is only for launching and terminating instances, but since we also get cost savings for just stopping an instance, we would rather allow the instance to persist. For our purposes, we have a QA environment and we want to start/stop several autoscaling groups daily to save money when the development team leaves the office for evenings and weekends. So how to accomplish this? NOTE: I will be following up with my own detailed answer shortly. First and foremost,

What does setting the automatic_scaling max_idle_instances to zero (0) do?

流过昼夜 提交于 2019-12-02 02:51:21
What does setting the automatic_scaling max_idle_instances to zero (0) do? automatic_scaling: max_idle_instances: 0 min_idle_instances: 0 Does it cause an active instance to shutdown immediately once it has finished processing it's current requests? Technically you can't even set max_idle_instances it to 0 , you'll see this error at deployment time: Error 400: --- begin server output --- automatic_scaling.max_idle_instances (0), must be in the range [1,1000]. --- end server output --- Deploying a version with a lower number than the one already deployed might not (immediately) shut down idle

Running kubernetes autoscalar

不羁的心 提交于 2019-12-01 21:14:17
I have a replication controller running with the following spec: apiVersion: v1 kind: ReplicationController metadata: name: owncloud-controller spec: replicas: 1 selector: app: owncloud template: metadata: labels: app: owncloud spec: containers: - name: owncloud image: adimania/owncloud9-centos7 ports: - containerPort: 80 volumeMounts: - name: userdata mountPath: /var/www/html/owncloud/data resources: requests: cpu: 400m volumes: - name: userdata hostPath: path: /opt/data Now I run a hpa using autoscale command. $ kubectl autoscale rc owncloud-controller --max=5 --cpu-percent=10 I have also

AWS CloudFormation stack fails with error Received 0 SUCCESS signal(s) out of 1

扶醉桌前 提交于 2019-12-01 19:12:46
My AWS CloudFormation template fails with the error: Received 0 SUCCESS signal(s) out of 1. Unable to satisfy 100% MinSuccessfulInstancesPercent requirement I'm thinking my WaitConditionHandles are not set correctly (or maybe the EC2 instance is not sending one), but not sure how to fix this. Everything (ASG, EC2 instances) does appear to be created correctly in AWS. I'm using the following CloudFormation template: AWSTemplateFormatVersion: "2010-09-09" Description: "Auto Scaling Group" Outputs: AsgArn: Value: !Ref "AutoScalingGroup" AsgMinSize: Description: "The minimum size of the Auto

VMSS with service fabric cluster autoscale

只谈情不闲聊 提交于 2019-12-01 11:11:06
I want to scale out or scale in the service fabric application. For this I have added the autoscalesettings with CPU metric on VM scale set. And in VM scale set, I have the extension section with wadcfg section with counter on CPU metric. And the data is successfully getting emitted to storage account which I have specified.But scale out or scale on options are not getting done with VMSS and service fabric cluster. I have gone through trouble shooting steps which were specified in azure portal. https://azure.microsoft.com/en-us/documentation/articles/virtual-machine-scale-sets-troubleshoot/

How do I force a CloudFormation stack to update when the parameter is updated?

我的梦境 提交于 2019-11-30 14:24:47
I am running a AWS CloudFormation stack that takes in some parameters and launches EC2 instances along with other AWS resources. The parameters are fed into the user data of the EC2 instance and based on that changes are made dynamically to the web application residing on the EC2 instance. UserData: Fn::Base64: Fn::Join: - "" - - "#!/bin/bash \n" - "sh website-conf/website_mysql_config.sh " - " -c \"" - Ref: "CompanyName" As shown in the example above, CompanyName is one of the many parameters passed to the userdata script. The problem is, when any one or multiple of parameters are updated,

List instances in auto scaling group with boto

。_饼干妹妹 提交于 2019-11-30 09:32:47
I want to list all instances that are currently running within a auto scaling group. Can that be accomplished with boto? There must be some relation between the ASG and the instances as boto has the shutdown_instances method within the boto.ec2.autoscale.group.AutoScalingGroup class. Any pointers in the right direction is highly appreciated! garnaat Something like this should work: >>> import boto >>> autoscale = boto.connect_autoscale() >>> ec2 = boto.connect_ec2() >>> group = autoscale.get_all_groups(['mygroupname'])[0] >>> instance_ids = [i.instance_id for i in group.instances] >>>

Amazon Auto Scaling API for Job Servers

亡梦爱人 提交于 2019-11-30 07:11:31
I have read pretty much the entire documentation even beyond on the AWS AS API to understand all the AS stuff. However I am still wondering (without having actually used the API yet since I wanna find this out first from someone) if my scenario is viable with AS. Say I got a bunch of work servers setup within an AS group all working on a job each and suddenly it comes the time (I dunno say, AVG CPU is greater than or in another case less than 80%) to scale up or down. My main worry is the loss of a currently in progress job. Maybe this would be better explained with an example: I startup 5 job

How can I prevent EC2 instance termination by Auto Scaling?

让人想犯罪 __ 提交于 2019-11-30 07:08:23
问题 I would like to prevent EC2 instance termination by Auto Scaling feature if that instance is in the middle of some sort of processing. Background: Suppose I have an Auto Scaling group that currently has 5 instances running. I create an alarm on average CPU usage... Suppose 4 of the instances are idle and one is doing some heavy processing... The average CPU load will trigger the alarm and as a result the scale-down policy will execute. How do I get Auto Scaling to terminate one of the idle

Amazon Launch Template - Updated AMI

非 Y 不嫁゛ 提交于 2019-11-30 05:16:00
问题 I have started using Amazon's new Launch Templates and so far liking it however I just recently made an image from one of my instances, I then created a new version of the Launch template and used the new AMI. When updating my auto scaling group to the new version of the template, upon save it gives me the below error: Error You must use a valid fully-formed launch template. snapshotId cannot be modified on root device Do I need to recreate the AMI? If anyone has any suggestions that would be