Ask Your Question

Installing application using HEAT template

asked 2014-05-16 04:38:48 -0600

Manikantan gravatar image

I am able to launch instance in openstack using HEAT template. Would like to know if we can launch+install app on top of it. For ex: Using heat template to launch a CentOS instance and perform MySQL Server installation in it and revert. Most of the examples I see - talks about launching instance and installing APP on AWS. But would like to know whether it can be done on openstack (KVM hyperviser).

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-05-17 00:39:45 -0600

OldCrowEW gravatar image

sure. just issue the commands needed. yum install or apt-get.

edit flag offensive delete link more

answered 2014-05-17 02:56:52 -0600

Main Aim of Heat is to orchestrate complex deployments on openstack. Not just that you can install any app but you can also write user-data scripts to perform required configurations after installation of app. For example if you install mysql you can also make a user and assign any privileges to it. Just use the proper commands according to the flavor of Linux that you are using and you are done. No need to login to instance for configurations.

You can edit/make your template in order to get more parameters and place them in proper places in template to have configurations done.

hope that helps!!

edit flag offensive delete link more


Yes, even I am looking for such examples in the net. When I try to write a template and use it - wondering how it will take the source of the application and use it - for example: on KVM - how the stack install MySQL package in the CentOS instance launched?. Looking for help on this.

Manikantan gravatar imageManikantan ( 2014-05-22 03:29:38 -0600 )edit

The template follows a certain syntax and rules like first part indicates the description of template then comes parameters and so on. So Heat basically is the answer to your question "how stack install MySQL package in CentOS". Heat is specialized for the purpose of automatically configuring and an instance so that you no longer need to configure it manually.

Syed Awais Ali gravatar imageSyed Awais Ali ( 2014-05-26 00:37:47 -0600 )edit

answered 2014-07-17 05:50:35 -0600


There are several ways to achieve a good working configuration, this is the method I use the most. "User_data" can take multiple formats but using 'raw' is simple to use.

Here in my example I build a server called PS and run what is essentially a bash script. This template also uses 'str_replace' to substitute values from the 'parameters' section of the Heat template.

    type: OS::Nova::Server
      name: PS
      image: RGB_CloudImage_Build_6.3
      flavor: m1.RGB_large
      key_name: { get_param: Key_name }
           template: |
              #!/bin/bash -v
              yum -y install aim
              echo "oss_ip_address  OSS" >> /etc/hosts
              echo "ads_ip_address  ADS" >> /etc/hosts
              echo "  AWE" >> /etc/hosts
              ip link set dev eth0 mtu 1450
              current_ip=`curl -s`
              echo "$current_ip $current_hostname $" >> /etc/hosts
              sed -i "s/client_host = ADS/client_host = AWE/" /opt/rgb/etc/abrain.config
              service aim restart
              ads_ip_address: { get_param: ADS_address }
              oss_ip_address: { get_param: OSS_address }
edit flag offensive delete link more

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


Asked: 2014-05-16 04:38:48 -0600

Seen: 1,783 times

Last updated: Jul 17 '14