Ask Your Question
-2

Heat template to deploy multiple DB & App instances?

asked 2014-07-01 08:16:41 -0500

updated 2014-09-14 07:45:46 -0500

Is there a heat template to deploy multiple database instances in a single compute node? Also associated application stack can go along with each DB instance configuration, that will be great!

Let me add some more stuff to it. I can see a -1 vote on it.

Here is my question? Do I need to replicate the same template 10 times or run the stack with 10 times with different environment files? What is the best looping mechanism to deploy 'n' number of such stacks?

edit retag flag offensive close merge delete

Comments

Why there is "-2" vote - could some one please explain what is wrong with the question? I was expecting some kind of hints to move forward. Currently we are manipulating web applications and DB using some templates and then scripts.

krishna-mk gravatar imagekrishna-mk ( 2014-09-14 22:47:30 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-09-14 22:49:30 -0500

larsks gravatar image

The short answer is that it's not really clear from your question exactly what you're trying to accomplish, nor is it clear that you have actually tried anything on your own.

The longer answer is: it depends.

If you are trying to create a large number of identical nodes, Heat can absolutely help out. Through the use of nested stacks, which allow you to treat a Heat template as a resource in another Heat template, you can use something like the OS::Heat::ResourceGroup resource to create an arbitrary number of copies of a particular stack.

You can see an example of nested stacks in use here.

If you're environment is largely static, you could effectively "unroll" that loop and make a master Heat template that uses nested stacks to instantiate your N stacks with appropriate parameters, but this isn't substantially less work than just running Heat multiple times.

If each stack needs to be different, you're probably going to have to put something in front of Heat to manage the deployment...this would be the "run the stack 10 times with different environment files" option.

edit flag offensive delete link more
0

answered 2014-10-02 15:25:51 -0500

zaneb gravatar image

I'm afraid I don't really understand your question.

If your question is about how to deploy 10 different applications on 10 different machines, then yes, the answer is to deploy 10 different stacks (which may or may not share the same template, but be passed different parameters).

If your question is about how to deploy multiple applications to a single machine through a single stack then you should look in to SoftwareConfiguration and SoftwareDeployment resources.

Note that if you're doing stuff like spinning up 10 different instances of a database on a single VM then the majority of your work is in getting those to co-exist, which is out of scope for ask.openstack.org . That may be why you're getting downvoted.

Note also that if you are doing this in any type of volume then you should consider using a PaaS like OpenShift or CloudFoundry to manage the applications for you. There are Heat templates for deploying OpenShift Origin available.

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: 2014-07-01 08:16:41 -0500

Seen: 2,248 times

Last updated: Oct 02 '14