Autoscaling with Heat and Ceilometer

asked 2016-08-23 11:59:37 -0500

yas gravatar image

updated 2016-08-23 12:02:38 -0500

Guys ,I'm working on auto-scaling using Heat and ceilometer , but I face a problem : When an alarm was triggered , Heat didn't launch a new instance here is my template :


    heat_template_version: 2016-04-08
description: autoscaling using cirros image.
    type: OS::Nova::Server
      flavor: m1.nano
        - network: private


    "OS::Nova::Server::Cirros": "cirros.yaml"


heat_template_version: 2015-04-30
description: A simple auto scaling group.
    type: OS::Heat::AutoScalingGroup
      cooldown: 600
      desired_capacity: 1
      max_size: 3
      min_size: 1
        type: OS::Nova::Server::Cirros
    type: OS::Heat::ScalingPolicy
      adjustment_type: change_in_capacity
      auto_scaling_group_id: { get_resource: group }
      cooldown: 600
      scaling_adjustment: 1

    type: OS::Ceilometer::Alarm
      meter_name: cpu_util
      statistic: avg
      period: 600
      evaluation_periods: 1
      threshold: 1
        - {get_attr: [scaleup_policy, alarm_url]}
      comparison_operator: ge

when i start the stack heat created one instance and an alarm named mystack-alarm-lq...bu, I waited 10 min then i gave a look to ceilometer alarm-list . I noticed that the alarm State changed to alarm but unfortunately there is no new instance launched .

Additional informations:

>I installed openstack using packstack
>openstack release : Mitaka
>openstack services status :

== Nova services ==
openstack-nova-api:                     active
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-cert:                    active
openstack-nova-conductor:               active
openstack-nova-console:                 inactive  (disabled on boot)
openstack-nova-consoleauth:             active
openstack-nova-xvpvncproxy:             inactive  (disabled on boot)
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
neutron-metering-agent:                 active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                inactive  (disabled on boot)
== Ceilometer services ==
openstack-ceilometer-api:               inactive  (disabled on boot)
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           active
openstack-ceilometer-collector:         active
openstack-ceilometer-notification:      active
== Heat services ==
openstack-heat-api:                     active
openstack-heat-api-cfn:                 inactive  (disabled on boot)
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  active
== Support services ==
mysqld:                                 inactive  (disabled on boot)
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
edit retag flag offensive close merge delete



Hi, first ensure all your .yaml files are proper with indentation. Also install heat-api-cfn service by executing the below commands:

yum install openstack-heat-api-cfn -y
systemctl enable  openstack-heat-api-cfn.service 
systemctl start  openstack-heat-api-cfn.service
Praveen N gravatar imagePraveen N ( 2016-08-23 22:56:48 -0500 )edit

Also service and service endpoint needs to created for heat-api-cfn service. FYI --Regards

Praveen N gravatar imagePraveen N ( 2016-08-23 23:02:02 -0500 )edit

Thank u so much @Praveen for commenting , I fix my issue by installing heat-api-cfn , now heat works like a charm

yas gravatar imageyas ( 2016-08-24 10:33:35 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2016-08-24 03:58:47 -0500

yprokule gravatar image

@yas - I'd recommend enable debug/verbose in aodh.conf ( or ceilometer.conf) and restart alarms services.

Then check aodh/notifier.log or ceilometer/alarm-notifier.log

If scale up request is sent - check the Heat's logs

edit flag offensive delete link more

answered 2016-08-24 10:45:33 -0500

yas gravatar image

updated 2016-08-24 10:48:25 -0500

I fix my issue by:

  1. creating heat-cfn service :
$ openstack service create --name heat-cfn --description "Orchestration" cloudformation

2.Create the Orchestration service API endpoint:

$ keystone endpoint-create \
      --service-id $(keystone service-list | awk '/ cloudformation / {print $2}') \
      --publicurl http://controllerIP:8000/v1 \
      --internalurl http://controllerIP:8000/v1 \
      --adminurl http://controllerIP:8000/v1 \
      --region regionOne

3.Installing openstack-heat-api-cfn:

# yum install openstack-heat-api-cfn

4.Starting the Orchestration service:

# systemctl enable openstack-heat-api-cfn.service 
# systemctl start openstack-heat-api-cfn.service


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-08-23 11:59:37 -0500

Seen: 1,155 times

Last updated: Aug 24 '16