Ask Your Question
2

Can I define an auto-scaling Heat template that does the scaling at specific times of day?

asked 2014-09-12 13:41:09 -0500

vahidh gravatar image

updated 2014-09-12 14:25:37 -0500

Hi there,

This question is based on the auto-scaling template at https://github.com/openstack/heat-templates/blob/master/hot/autoscaling.yaml. In this template when CPU utilization reaches certain thresholds scaling up/down happens. What I want, however, is for scaling up and down to happen at certain times of the day. For example, I want my web server group to scale up at 8:00 am and down at 6:00 pm during weekdays.

Can I achieve this with a Heat template like this?

Thanks.

--vahidh

P.S. Amazon supports this time-based auto-scaling: http://docs.aws.amazon.com/cli/latest/reference/opsworks/set-time-based-auto-scaling.html (http://docs.aws.amazon.com/cli/latest...)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-09-12 15:28:53 -0500

pas-ha gravatar image

I think it is pretty possible - see https://github.com/openstack/heat-templates/blob/master/cfn/aws_asg.template (https://github.com/openstack/heat-tem...) as a starting point.

What you need to do is setup the cron job inside your vm that will post to the webhook URLs of appropriate SaclingPolicy. But that might multiply VMs (as every new VM will post to the same hook so the scaling might be multiplied, either up or down, so set your limits accordingly). Thus may be it would be better to set up the autoscaling group and one separate "controller" instance that will post to the scaling webhooks based on the cron job.

edit flag offensive delete link more

Comments

Thanks a lot pas-ha. I'm going to try this out and let you know about the outcome.

vahidh gravatar imagevahidh ( 2014-09-12 16:43:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-09-12 13:41:09 -0500

Seen: 634 times

Last updated: Sep 12 '14