Terraform: OpenStack autoscaling

Created on 13 Apr 2016  ·  14Comments  ·  Source: hashicorp/terraform

Is there any plan to implement autoscaling for the OpenStack provider? Is there an alternate option to configure autoscaling in Terraform today?

question

Most helpful comment

Please reopen this! Autoscaling and provisioning with set number of instances is NOT the same. The keyword here is "auto"..

For example, if I simply "kill" (shutdown, reboot, what have you) a physical compute node, in an Autoscaling group, the instance(s) running on that host would just be respawned automatically by Openstack. Or simple kill an instance because it's "not behaving" (or for whatever other reason), same thing - Openstack will/would simply start a new instance.

Another important reason for autoscaling is the second part of the word - scaling. Meaning that Openstack would start new instance(s) if/when the load of the existing instances have reached a [maximum] threshold. And likewise kill instance(s) when the load have decreased beyond a lower threshold.

PS. This is how autoscaling works with Terraform in the AWS provider.

All 14 comments

Just to clarify: would this be Terraform interacting with OpenStack Heat?

Terraform interacting with OpenStack directly. A replacement for Heat basically.

Ah, understood. I think that would fall under Terraform as a whole. I'll label this question as such so someone with better knowledge/insight can answer 😄

Thank you.

After looking into this, autoscaling strictly within Terraform really just involves modifying the count parameter, running Terraform via cron, things like that. Totally up to the user to trigger the count update and when/how Terraform runs.

I'm going to close this issue, but please feel free to re-open if this doesn't entirely answer your question!

I am not sure which count you're referring to.

count is an argument that can specify a number of identical resources:

https://www.terraform.io/docs/configuration/resources.html

Please reopen this! Autoscaling and provisioning with set number of instances is NOT the same. The keyword here is "auto"..

For example, if I simply "kill" (shutdown, reboot, what have you) a physical compute node, in an Autoscaling group, the instance(s) running on that host would just be respawned automatically by Openstack. Or simple kill an instance because it's "not behaving" (or for whatever other reason), same thing - Openstack will/would simply start a new instance.

Another important reason for autoscaling is the second part of the word - scaling. Meaning that Openstack would start new instance(s) if/when the load of the existing instances have reached a [maximum] threshold. And likewise kill instance(s) when the load have decreased beyond a lower threshold.

PS. This is how autoscaling works with Terraform in the AWS provider.

@FransUrbo Thanks for the comments.

This issue was closed because the user was specifically asking about autoscaling native to Terraform, which doesn't exist. Autoscaling works with Terraform in the AWS provider by utilizing AWS's autoscaling feature.

I know OpenStack supports some level of autoscaling through Heat and Ceilometer, though I'm not familiar with either to say how easy/hard it would be to add support for those two services to the Terraform OpenStack provider. If you're interested in this feature, could you open a new issue with this feature request?

Let me know if that helps clarify things or if you have any other questions. 😄

On Jul 30, 2016, at 5:56 AM, Joe Topjian wrote:

If you're interested in this feature, could you open a new issue with this feature request?

Why? This issue is _exactly_ what I would write in that new ticket - native support for Openstack autoscaling, like the AWS provider does it with "aws_autoscaling_*" etc.

Which is what the original poster wanted as well.

The original poster of this issue stated this:

Terraform interacting with OpenStack directly. A replacement for Heat basically.

Terraform does not provide autoscaling on its own. It _must_ leverage the cloud provider's autoscaling feature. With AWS, this is done with AWS's autoscaling feature.

Perhaps this is just confusion of semantics, but I think it's important to understand that Terraform does not have native autoscaling. Terraform will not be a replacement for Heat and therefore in order to leverage autoscaling with OpenStack, Terraform will need to support Heat and Ceilometer.

Sorry, my bad. I've been investigating this over the last week or so. I was under the impression that heat was "just" a orchestration layer on top of the existing services (Nova, Neutron, Cinder, etc, etc). It now occurred to me that Heat is so much more, and yes you're right - Terraform does not fit in there.

However, would it be possible to reopen this with the title OpenStack Heat autoscaling instead?

Sorry for the late reply. I've created issue #8022 as a dedicated issue for this :smile:

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings