Ask Your Question
0

heat deployment on launched VMs

asked 2015-04-10 20:15:23 -0500

Reeni Mathew gravatar image

Hi community members,

Am very new to Heat. I have gone through good amount of documentation and blogs to understand HEAT. But I couldn't figure out a solid answer for my question. I have a use case where I need to deploy an application on VM launch - I know it is supported by HEAT Deploy some configuration change for the installed applications in these launched VMs - I couldn't find more information about this use case. Is this supported by HEAT right now? And is it possible for me to write a custom logic to give list of machines for which this upgrade should happen? I saw a Rolling Updates blueprint, but am not sure whether its available.

Thanks Reeni

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2017-03-18 12:02:23 -0500

Hi Reeni,

Answering your first question: Yes, you can deploy an application with a VM launch. In your HEAT template, include this section for that particular VM.

user_data:
  str_replace:
    template: |
      < your script for ur application >

Your second question: Yes you can decide for which VM you want to run this script. Just include the above section for the machines of your choice.

The generic syntax for your use case would be:

my_instance:
  type: OS::Nova::Server
  depends_on: <..>
  properties: 
    networks: <..>
    user_data_format: RAW
    user_data:
      str_replace:
        template: |
        params:
edit flag offensive delete link more
0

answered 2017-03-17 15:39:29 -0500

zaneb gravatar image

You could use user_data to get cloud-init to run whatever you need to deploy your application. Here is an example.

Another way is to use Heat's Software Deployments. There are dozens of examples of this available too. Note that this requires certain agents to be baked in to the image.

edit flag offensive delete link more
0

answered 2017-03-16 13:34:23 -0500

nishpatwa gravatar image

Hi Thanks for the question.

Yes heat do support deploying an application on the launched VM

Follow this URL for you reference:

https://github.com/osic/ops-workload-...

You can write the shell commands to be executed under templates section of user_data

Thanks, Nish Patwa

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

Stats

Asked: 2015-04-10 20:15:23 -0500

Seen: 129 times

Last updated: Mar 17 '17