Ask Your Question
0

How to modify a heat template to update a stack

asked 2013-12-12 06:13:12 -0600

vladber gravatar image

updated 2013-12-17 13:39:45 -0600

Does someone have an example or explanation how to modify a stack template properly .I've been using the WordPress_Single_Instance template on Havana . As a test I'd like to change some settings in a running configuration but I suspect that only specific settings are to be specified in the modified template ,right ?

For example create a new file : ..... "systemctl restart httpd.service\n", "touch /tmp/kuku\n", <-------New def

Thanks .

Ok ,let's try this again . I have a stack ( mystack ) was deployed using this template :https://github.com/openstack/heat-templates/blob/master/cfn/F17/WordPress_Single_Instance.template

Now I want to update it - install openssl package for example .Then I add the following line in the tempate within the yum module : "openssl" : [],

and I run heat stack-update command using modified template .

Q. 1. Do I need to leave the rest template configurations as they were in original version ? 2. I left all defs as they are .After update commad - the stack's IP has changed .I may live with that .

but Wordpress is not accesible with a new IP . - I cannot ssh to the updated stack with ec2 user .Before stack update it worked ( ssh -i .ssh/id_rsa ec2-user@stack_IP) - remotely I see that updated stack's ports 80 and 3306 are not opened now ( nmap ) That's why I suspect that may be not all new template should be applied to the running stack but only part of the file . Thanks .

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-12-13 14:14:06 -0600

smaffulli gravatar image

Please check the official documentation http://docs.openstack.org/user-guide/content/heat-stack-create.html as it provides instructions on how to update a template, too.

edit flag offensive delete link more
0

answered 2013-12-14 11:03:25 -0600

vladber gravatar image

updated 2013-12-14 11:04:51 -0600

I was working with this doc while building the heat . The question is how say the modified WordPress_Single_Instance_v2.template must look like ? If I add as a test "touch /tmp/kuku" the heat stack-update mystack will work but after that :

mystack will get a new IP I'll lost ssh access to mystack

I guess that not all existing defs are to be deployed in new template but only a delta .

So, how a new tempate should be set ?

edit flag offensive delete link more

Comments

I'm not sure I understand your issue. Are you saying that when you run the modified heat template you get a different IP address? that's entirely possible, depending on your cloud. Please update your original question to frame the problem more precisely.

smaffulli gravatar imagesmaffulli ( 2013-12-16 11:50:46 -0600 )edit

Ok ,let's try this again . I have a stack ( mystack ) wasdeployed using this template :https://github.com/openstack/heat-templates/blob/master/cfn/F17/WordPress_Single_Instance.template Now I want to update it - install openssl package for example .Then I add the following line in the tempate within the yum module : "openssl" : [], and I run heat stack-update command using modified template . Q. 1. Do I need to leave the rest template configurations as they were in original version ? 2. I left all defs as they are .After update commad - the stack's IP has changed .I may live with that .but Wordpress is not accesible with a new IP . - I cannot ssh to the updated stack with ec2 user .Before stack update it worked ( ssh -i .ssh/id_rsa ec2-user@stack_IP) - remotely I see that updated stack's ports 80 and 3306 are not opened now ( nmap ) That;s why I suspect ...(more)

vladber gravatar imagevladber ( 2013-12-17 03:43:22 -0600 )edit

@vladber you should update your question instead of adding more details in the space for comments or using the space destined to answers. Let me know if you need help to learn how to edit the question.

smaffulli gravatar imagesmaffulli ( 2013-12-17 13:18:52 -0600 )edit

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: 2013-12-12 06:13:12 -0600

Seen: 2,240 times

Last updated: Dec 17 '13