Please check out the article on our blog !
ansible / autoscaling-blog Goto Github PK
View Code? Open in Web Editor NEWCompanion playbooks to an article at http://www.ansible.com/blog/autoscaling-infrastructures
Companion playbooks to an article at http://www.ansible.com/blog/autoscaling-infrastructures
Please check out the article on our blog !
I made sure all the configurations were ok and that the My Inventory had some hosts in it, I even scheduled to update every 5 min and still the /tmp/autoscale.log file in the actual instances reports a 400, no hosts found. Even when I do it manually.
`curl -k -s -i --data host_config_key=My-key_here https://FQDN/api/v1/job_templates/759/callback/
HTTP/1.1 400 BAD REQUEST
Date: Tue, 03 May 2016 03:01:03 GMT
Server: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.1e-fips mod_wsgi/3.4 Python/2.7.5
Vary: Accept,Cookie
Allow: GET, POST, HEAD, OPTIONS
X-API-Time: 0.042s
Content-Length: 43
Connection: close
Content-Type: application/json
{"msg": "No matching host could be found!"}`
I am getting the following errors when trying to attach autoscaling group to elb
just following same example as the one you have
did you guys test this code?
the error is below
"msg": "Failed to create Autoscaling Group: BotoServerError: 400 Bad Request\n<ErrorResponse xmlns=\"http://autoscaling.amazonaws.com/doc/2011-01-01/\">\n <Error>\n <Type>Sender</Type>\n <Code>ValidationError</Code>\n <Message>Provided Load Balancers may not be valid. Please ensure they exist and try again.</Message>\n </Error>\n <RequestId>bc6fc38e-8dfe-11e7-bbae-d56fd34454</RequestId>\n</ErrorResponse>\n"
checked and the loadbalancer were created and exist and they are fine but i have no idea why the autoscaling group is not able to find them
roles/infra/tasks/main.yml
- name: create scale down alarm
ec2_metric_alarm:
state: present
region: "{{ region }}"
name: "cpu-low"
metric: CPUUtilization
namespace: "AWS/EC2"
statistic: Average
comparison: "<="
threshold: 5.0
period: 300
evaluation_periods: 3
unit: "Percent"
description: "This will alarm when cpu usage average is lower than 5% for 15 minutes "
dimensions:
AutoScalingGroupName: "{{ app_name }}"
alarm_actions:
- "{{ scale_down_policy.arn }}"
tags: alarm
Attempting to run this playbook as-is results in the following error:
argument threshold is of invalid type: <type 'int'>, required: float
This is due to the threshold
variable in the "create scale down alarm" play being cast automatically as "int" instead of float. This can be resolved by ensuring the value of threshold
is in decimal form, i.e. "5.0"
Most of the images are missing in the blog post. Could you update the image urls? Its hard to figure out whats going on without them.
You have <= 90.0 % CPU usage for scale up which is basically ALWAYS true which will keep the ASG spinning instances up unnecessarily.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.