Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-18 Thread Steve Baker
On 12/05/14 20:56, LIU Casper A wrote:

 Hello dear Heat Developers,
  
 I am Casper Liu from Alcatel-Lucent. I am doing a project based on
 *Heat(Icehouse)*, and have questions about Heat SoftwareConfig and
 SoftwareDevelopment resources.

 Your reply would be highly appreciated!
 We really anticipate your support and help.
  
 The key point of our project is to execute*heat stack-update *to
 update*a stack with a number of VMs*, and this heat stack-update
 will trigger a specified script to be executed on a specified VM
 instance(this VM already has the specified script) of the stack, and
 there should be no reboot/rebuild of any VM of the stack. If possible
 we would like to use SoftwareConfig to do this, for it is modularized
 and easy to manage, but cfn tool should also be OK.


 Takeour projectas example, we have one stack which has 4 VMs (we can
 name them as VM1, VM2, VM3 and VM4), there is an need to let Heat
 template to execute one script(we have coded this Python script.) on
 VM1 when I execute heat stack-update -f my_stack_template_file -p
 my_param_list each time.
 VM1 can be associated with SoftwareConfig and SoftwareDevelopment
 resources.
 VM1 can NOT be rebooted or rebuilt during execution of heat
 stack-update.
  
 My question is:

  

 (1) Could you advise a solution based on Heat for our project scenario?

Assuming you want to configure with shell scripts then this example
would be closest to what you require
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/example-templates/example-script-template.yaml

 (2) If a SoftwareDevelopment is set as UPDATE in actions field of
 template and associated with VM1 and SoftwareConfig and when heat
 stack-update happens, can the VM1 execute SoftwareConfig without reboot?

Yes, although default is to run on CREATE and UPDATE, which may be what
you need anyway.

Please note that the script is only triggered if something has actually
changed in the configuration since the previous update. We plan to
include the API request-id as a derived input value, which will
guarantee retriggering on UPDATE regardless of whether anything has
changed. In the meantime you might want to specify a unique value in the
deployment input_values from a param passed in to stack-update. This
will ensure re-triggering on every update

 (3) If SoftwareConfig can be execute successfully for VM1, then what
 packages/tools should be installed in VM instance?
 Such as hook-script.py (
 http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/elements/heat-config-script/install.d/hook-script.py(http://git.openstack.org/cgit/opensta...)
 ), is this a must for SoftwareDevelopment?

You can build an image with the recommended toolchain with these
instructions:
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/elements/README.rst

Please note that you'll need to wait for this fix to be included in a
released os-collect-config before the image will work for heat
software-config:
https://review.openstack.org/#/c/91733/4

 (4) Is my software version(icehouse) proper to support
 SoftwareDevelopment and SoftwareConfig?

Yes, although keep an eye out for activity in
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config
for changes which require a new image to be built.

Also I expect there will be some backports to icehouse for some issues,
so please keep up to date with the latest icehouse release.
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-18 Thread Steve Baker
On 17/05/14 00:49, Alex Yang wrote:
 Hi all and Baker,

 I had try to use Heat::SoftwareDeployment and Heat::SoftwareConfig but
 there may be someting wrong with my configuration that the hook-puppet
 didn't be invoked.

 Firstly, I follow this instruction
 https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements
 to build a golden image.

 /apt-get install qemu-utils/
 //
 /git clone https://github.com/openstack/diskimage-builder.git/
 /git clone https://github.com/openstack/tripleo-image-elements.git/
 /git clone https://github.com/openstack/heat-templates.git/
 //
 /root@cloud-t1:~/alex_scripts/heat# cat set_env_path.sh /
 /#!/bin/bash/
 //
 /export
 ELEMENTS_PATH=/root/alex_scripts/heat/tripleo-image-elements/elements:/root/alex_scripts/heat/heat-templates/hot/software-config/elements/
 /export DIB_CLOUD_IMAGES=https://cloud-images.ubuntu.com//
 /export DIB_RELEASE=trusty/
 /export BASE_IMAGE_FILE=trusty-server-cloudimg-amd64-root.tar.gz/
 /export
 SHA256SUMS=https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS/
 /export
 CACHED_FILE=/root/.cache/image-create/trusty-server-cloudimg-amd64-root.tar.gz/
 //
 /./diskimage-builder/bin/disk-image-create -a amd64 -o
 ubuntu-amd64-heat.qcow2 vm ubuntu heat-cfntools heat-config
 heat-config-cfn-init heat-config-puppet heat-config-script
 os-collect-config os-refresh-config os-apply-config/

I've not tested an ubuntu image recently, if you wanted to eliminate
this as an option then you could try the fedora instructions verbatim,
however see below.
 Secondly, I use this example
 https://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-puppet-template.yaml
  to
 try it out. Everything is OK but the resource of SoftwareDeployment.
 The state of SoftwareDeployment is always IN_PROGRESS. I login to the
 vm, I check something as follows:

 1. Checking the /var/lib/heat-config, hook-puppet is installed.

 /root@puppet-demo:/var/lib/heat-config# tree/
 /./
 /??? hooks/
 /??? cfn-init/
 /??? puppet/
 /??? script/
  
 2. Checking the WORKING_DIR(/var/lib/heat-config/heat-config-puppet)
 of hook-puppet. The WORKING_DIR is not created yet. No any .pp files
 in the directory.

 3. Checking the status of os-collect-config, it is running. But there
 are some warrning in the /var/log/upstart/os-collect-config.log.


 /2014-05-16 06:19:31.158 1140 WARNING os_collect_config.cfn [-] No
 metadata_url configured./
 /2014-05-16 06:19:31.158 1140 WARNING os-collect-config [-] Source
 [cfn] Unavailable./
 /2014-05-16 06:19:31.158 1140 WARNING os_collect_config.heat [-] No
 auth_url configured./
 /2014-05-16 06:19:31.159 1140 WARNING os-collect-config [-] Source
 [heat] Unavailable./

 4. Checking /var/lib/os-collect-config

 /root@puppet-demo:/var/lib/os-collect-config# ls/
 /ec2.json  ec2.json.last  ec2.json.orig  heat_local.json
  heat_local.json.last  heat_local.json.orig  os_config_files.json/
 /
 /
 /root@puppet-demo:/var/lib/os-collect-config# cat heat_local.json/
 /{/
 / os-collect-config: {/
 /  heat: {/
 /   password: 88cdca28611a47b6af3f92cf350d7e93, /
 /   user_id: 8a8e83631f4544b88435833512f4fe04, /
 /   stack_id: puppet-demo/52b04dbb-0bc5-4c89-b4bd-543975a32e06, /
 /   resource_name: server1, /
 /   auth_url: http://10.22.129.21:5000/v2.0;, /
 /   project_id: 156739be982340b9b6630bae76984634/
 /  }/
 / }, /
 / deployments: []/
 /}/

 5. Checking the connection between vm and heat-api-cfn server. It's OK.

 After checking above things, I still can't to handle thie problem.
 There are something I need to understand:

 1. Where to store the puppet file and inputs, after the heat-engine
 precessing the template?
 2. Which meatadata server(heat_local, ec2 or heat-api-cfn) the
 os-collect-config will fetching to get the SoftwareDeployment meatadata?
 3. Is there any chapter to introduce the whole process of
 SoftwareDeployment in detial?

You're possibly being hit by this bug:
https://launchpad.net/bugs/1299109

Which is fixed by:
https://review.openstack.org/#/c/91733/4

When an os-collect-config is released with this fix I'll let you know
and you can build a new image and try again.

Over time we'll have docs on how to diagnose these issues, but some
hints for this particular part of the toolchain would be to run the
following commands until a response yields an error which gives an
indication of where your issue might be:
  os-collect-config --one-time
  os-refresh-config
  os-apply-config

Clint might be able to provide some further advice for debugging
os-*-config toolchain issues

cheers
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-18 Thread Steve Baker
On 17/05/14 18:48, Lingxian Kong wrote:
 2014-05-16 11:33 GMT+08:00 Thomas Spatzier thomas.spatz...@de.ibm.com
 mailto:thomas.spatz...@de.ibm.com:

 Excerpts from Lingxian Kong's message on 15/05/2014 22:51:33:
  From: Lingxian Kong anlin.k...@gmail.com
 mailto:anlin.k...@gmail.com
  To: OpenStack Development Mailing List (not for usage questions)
  openstack-dev@lists.openstack.org
 mailto:openstack-dev@lists.openstack.org
  Date: 15/05/2014 22:53
  Subject: Re: [openstack-dev] Heat SoftwareConfig and
 SoftwareDevelopment
 
 snip
 
  Do you know any information about examples or tutorials when using
  SoftwareConfig and SoftwareDeployment? I found it's a little
 difficult
  to understand for me.

 Unfortunately, we do not have any good documentation (or any
 documentation
 at all) on this right now. I was planning to start some, but did
 not get to
 it so far. For now, you could look at some examples in the
 heat-templates
 repository at

 
 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates

 Especially in

 
 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates/wordpress

 you can see the WordPress example that has been widely used in Heat
 samples, but making use of SoftwareConfig and SoftwareDeployment.

 Regards,
 Thomas


 Hi, Thomas: 

 Thanks for your information and your plan is very appreciated! 

 But what I mean is, are there already some available images and 
 corresponding templates for beginners to use directly, it's better if 
 there are some docs under the hood. 

There are currently no downloadable images, so you'll need to build your
own with these instructions:
https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements

I don't want to speculate on this too much, but it is possible that
downloadable images will be available in the future as a by-product of a
successful CI test passing.
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-18 Thread Alex Yang
Thanks.


2014-05-19 6:52 GMT+08:00 Steve Baker sba...@redhat.com:

  On 17/05/14 00:49, Alex Yang wrote:

 Hi all and Baker,

  I had try to use Heat::SoftwareDeployment and Heat::SoftwareConfig but
 there may be someting wrong with my configuration that the hook-puppet
 didn't be invoked.

  Firstly, I follow this 
 instructionhttps://github.com/openstack/heat-templates/tree/master/hot/software-config/elementsto
  build a golden image.

  *apt-get install qemu-utils*

 *git clone https://github.com/openstack/diskimage-builder.git
 https://github.com/openstack/diskimage-builder.git*
 *git clone https://github.com/openstack/tripleo-image-elements.git
 https://github.com/openstack/tripleo-image-elements.git*
 *git clone https://github.com/openstack/heat-templates.git
 https://github.com/openstack/heat-templates.git*

 *root@cloud-t1:~/alex_scripts/heat# cat set_env_path.sh *
 *#!/bin/bash*

 *export
 ELEMENTS_PATH=/root/alex_scripts/heat/tripleo-image-elements/elements:/root/alex_scripts/heat/heat-templates/hot/software-config/elements*
 *export DIB_CLOUD_IMAGES=https://cloud-images.ubuntu.com/
 https://cloud-images.ubuntu.com/*
 *export DIB_RELEASE=trusty*
 *export BASE_IMAGE_FILE=trusty-server-cloudimg-amd64-root.tar.gz*
 *export
 SHA256SUMS=https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS
 https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS*
 *export
 CACHED_FILE=/root/.cache/image-create/trusty-server-cloudimg-amd64-root.tar.gz*

 *./diskimage-builder/bin/disk-image-create -a amd64 -o
 ubuntu-amd64-heat.qcow2 vm ubuntu heat-cfntools heat-config
 heat-config-cfn-init heat-config-puppet heat-config-script
 os-collect-config os-refresh-config os-apply-config*

   I've not tested an ubuntu image recently, if you wanted to eliminate
 this as an option then you could try the fedora instructions verbatim,
 however see below.

  Secondly, I use this 
 examplehttps://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-puppet-template.yaml
  to
 try it out. Everything is OK but the resource of SoftwareDeployment. The
 state of SoftwareDeployment is always IN_PROGRESS. I login to the vm, I
 check something as follows:

  1. Checking the /var/lib/heat-config, hook-puppet is installed.

  *root@puppet-demo:/var/lib/heat-config# tree*
 *.*
 *└── hooks*
 *├── cfn-init*
 *├── puppet*
  *└── script*

 2. Checking the WORKING_DIR(/var/lib/heat-config/heat-config-puppet) of
 hook-puppet. The WORKING_DIR is not created yet. No any .pp files in the
 directory.

  3. Checking the status of os-collect-config, it is running. But there
 are some warrning in the /var/log/upstart/os-collect-config.log.


  *2014-05-16 06:19:31.158 1140 WARNING os_collect_config.cfn [-] No
 metadata_url configured.*
 *2014-05-16 06:19:31.158 1140 WARNING os-collect-config [-] Source [cfn]
 Unavailable.*
 *2014-05-16 06:19:31.158 1140 WARNING os_collect_config.heat [-] No
 auth_url configured.*
 *2014-05-16 06:19:31.159 1140 WARNING os-collect-config [-] Source [heat]
 Unavailable.*

  4. Checking /var/lib/os-collect-config

  *root@puppet-demo:/var/lib/os-collect-config# ls*
 *ec2.json  ec2.json.last  ec2.json.orig  heat_local.json
  heat_local.json.last  heat_local.json.orig  os_config_files.json*

  *root@puppet-demo:/var/lib/os-collect-config# cat heat_local.json*
 *{*
 * os-collect-config: {*
 *  heat: {*
 *   password: 88cdca28611a47b6af3f92cf350d7e93, *
 *   user_id: 8a8e83631f4544b88435833512f4fe04, *
 *   stack_id: puppet-demo/52b04dbb-0bc5-4c89-b4bd-543975a32e06, *
 *   resource_name: server1, *
 *   auth_url: http://10.22.129.21:5000/v2.0
 http://10.22.129.21:5000/v2.0, *
 *   project_id: 156739be982340b9b6630bae76984634*
 *  }*
 * }, *
 * deployments: []*
 *}*

  5. Checking the connection between vm and heat-api-cfn server. It's OK.

  After checking above things, I still can't to handle thie problem. There
 are something I need to understand:

  1. Where to store the puppet file and inputs, after the heat-engine
 precessing the template?
 2. Which meatadata server(heat_local, ec2 or heat-api-cfn) the
 os-collect-config will fetching to get the SoftwareDeployment meatadata?
 3. Is there any chapter to introduce the whole process of
 SoftwareDeployment in detial?

  You're possibly being hit by this bug:
 https://launchpad.net/bugs/1299109

 Which is fixed by:
 https://review.openstack.org/#/c/91733/4

 When an os-collect-config is released with this fix I'll let you know and
 you can build a new image and try again.

 Over time we'll have docs on how to diagnose these issues, but some hints
 for this particular part of the toolchain would be to run the following
 commands until a response yields an error which gives an indication of
 where your issue might be:
   os-collect-config --one-time
   os-refresh-config
   os-apply-config

 Clint might be able to provide some further advice for debugging
 os-*-config 

Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-17 Thread Lingxian Kong
2014-05-16 11:33 GMT+08:00 Thomas Spatzier thomas.spatz...@de.ibm.com:

 Excerpts from Lingxian Kong's message on 15/05/2014 22:51:33:
  From: Lingxian Kong anlin.k...@gmail.com
  To: OpenStack Development Mailing List (not for usage questions)
  openstack-dev@lists.openstack.org
  Date: 15/05/2014 22:53
  Subject: Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment
 
 snip
 
  Do you know any information about examples or tutorials when using
  SoftwareConfig and SoftwareDeployment? I found it's a little difficult
  to understand for me.

 Unfortunately, we do not have any good documentation (or any documentation
 at all) on this right now. I was planning to start some, but did not get to
 it so far. For now, you could look at some examples in the heat-templates
 repository at


 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates

 Especially in


 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates/wordpress

 you can see the WordPress example that has been widely used in Heat
 samples, but making use of SoftwareConfig and SoftwareDeployment.

 Regards,
 Thomas


Hi, Thomas:

Thanks for your information and your plan is very appreciated!

But what I mean is, are there already some available images and
corresponding templates for beginners to use directly, it's better if
there are some docs under the hood.


-- 
*-*
*Lingxian Kong*
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-16 Thread Alex Yang
Hi all and Baker,

I had try to use Heat::SoftwareDeployment and Heat::SoftwareConfig but
there may be someting wrong with my configuration that the hook-puppet
didn't be invoked.

Firstly, I follow this
instructionhttps://github.com/openstack/heat-templates/tree/master/hot/software-config/elementsto
build a golden image.

*apt-get install qemu-utils*

*git clone https://github.com/openstack/diskimage-builder.git
https://github.com/openstack/diskimage-builder.git*
*git clone https://github.com/openstack/tripleo-image-elements.git
https://github.com/openstack/tripleo-image-elements.git*
*git clone https://github.com/openstack/heat-templates.git
https://github.com/openstack/heat-templates.git*

*root@cloud-t1:~/alex_scripts/heat# cat set_env_path.sh *
*#!/bin/bash*

*export
ELEMENTS_PATH=/root/alex_scripts/heat/tripleo-image-elements/elements:/root/alex_scripts/heat/heat-templates/hot/software-config/elements*
*export DIB_CLOUD_IMAGES=https://cloud-images.ubuntu.com/
https://cloud-images.ubuntu.com/*
*export DIB_RELEASE=trusty*
*export BASE_IMAGE_FILE=trusty-server-cloudimg-amd64-root.tar.gz*
*export
SHA256SUMS=https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS
https://cloud-images.ubuntu.com/trusty/current/SHA256SUMS*
*export
CACHED_FILE=/root/.cache/image-create/trusty-server-cloudimg-amd64-root.tar.gz*

*./diskimage-builder/bin/disk-image-create -a amd64 -o
ubuntu-amd64-heat.qcow2 vm ubuntu heat-cfntools heat-config
heat-config-cfn-init heat-config-puppet heat-config-script
os-collect-config os-refresh-config os-apply-config*

Secondly, I use this
examplehttps://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-puppet-template.yaml
to
try it out. Everything is OK but the resource of SoftwareDeployment. The
state of SoftwareDeployment is always IN_PROGRESS. I login to the vm, I
check something as follows:

1. Checking the /var/lib/heat-config, hook-puppet is installed.

*root@puppet-demo:/var/lib/heat-config# tree*
*.*
*└── hooks*
*├── cfn-init*
*├── puppet*
*└── script*

2. Checking the WORKING_DIR(/var/lib/heat-config/heat-config-puppet) of
hook-puppet. The WORKING_DIR is not created yet. No any .pp files in the
directory.

3. Checking the status of os-collect-config, it is running. But there are
some warrning in the /var/log/upstart/os-collect-config.log.


*2014-05-16 06:19:31.158 1140 WARNING os_collect_config.cfn [-] No
metadata_url configured.*
*2014-05-16 06:19:31.158 1140 WARNING os-collect-config [-] Source [cfn]
Unavailable.*
*2014-05-16 06:19:31.158 1140 WARNING os_collect_config.heat [-] No
auth_url configured.*
*2014-05-16 06:19:31.159 1140 WARNING os-collect-config [-] Source [heat]
Unavailable.*

4. Checking /var/lib/os-collect-config

*root@puppet-demo:/var/lib/os-collect-config# ls*
*ec2.json  ec2.json.last  ec2.json.orig  heat_local.json
 heat_local.json.last  heat_local.json.orig  os_config_files.json*

*root@puppet-demo:/var/lib/os-collect-config# cat heat_local.json*
*{*
* os-collect-config: {*
*  heat: {*
*   password: 88cdca28611a47b6af3f92cf350d7e93, *
*   user_id: 8a8e83631f4544b88435833512f4fe04, *
*   stack_id: puppet-demo/52b04dbb-0bc5-4c89-b4bd-543975a32e06, *
*   resource_name: server1, *
*   auth_url: http://10.22.129.21:5000/v2.0
http://10.22.129.21:5000/v2.0, *
*   project_id: 156739be982340b9b6630bae76984634*
*  }*
* }, *
* deployments: []*
*}*

5. Checking the connection between vm and heat-api-cfn server. It's OK.

After checking above things, I still can't to handle thie problem. There
are something I need to understand:

1. Where to store the puppet file and inputs, after the heat-engine
precessing the template?
2. Which meatadata server(heat_local, ec2 or heat-api-cfn) the
os-collect-config will fetching to get the SoftwareDeployment meatadata?
3. Is there any chapter to introduce the whole process of
SoftwareDeployment in detial?

Thanks very much.

Best Regards,



2014-05-16 11:33 GMT+08:00 Thomas Spatzier thomas.spatz...@de.ibm.com:

 Excerpts from Lingxian Kong's message on 15/05/2014 22:51:33:
  From: Lingxian Kong anlin.k...@gmail.com
  To: OpenStack Development Mailing List (not for usage questions)
  openstack-dev@lists.openstack.org
  Date: 15/05/2014 22:53
  Subject: Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment
 
 snip
 
  Do you know any information about examples or tutorials when using
  SoftwareConfig and SoftwareDeployment? I found it's a little difficult
  to understand for me.

 Unfortunately, we do not have any good documentation (or any documentation
 at all) on this right now. I was planning to start some, but did not get to
 it so far. For now, you could look at some examples in the heat-templates
 repository at


 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates

 Especially in


 https://github.com/openstack/heat-templates/tree/master/hot/software-config/example

Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-15 Thread Lingxian Kong
2014-05-14 11:51 GMT+08:00 Qiming Teng teng...@linux.vnet.ibm.com:

 Icehouse version should be okay. You may want to check the readme files
 and the sample templates.  In general, you need hooks specific to your
 configuration tool (shell script in this case) installed in your VM.


​hi ​Qiming:

Do you know any information about examples or tutorials when using
SoftwareConfig and SoftwareDeployment? I found it's a little difficult
to understand for me.

I know there are already some wikis, but not sufficient for me, :(

Thanks!


-- 
*-*
*Lingxian Kong*
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-15 Thread Thomas Spatzier
Excerpts from Lingxian Kong's message on 15/05/2014 22:51:33:
 From: Lingxian Kong anlin.k...@gmail.com
 To: OpenStack Development Mailing List (not for usage questions)
 openstack-dev@lists.openstack.org
 Date: 15/05/2014 22:53
 Subject: Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

snip

 Do you know any information about examples or tutorials when using
 SoftwareConfig and SoftwareDeployment? I found it's a little difficult
 to understand for me.

Unfortunately, we do not have any good documentation (or any documentation
at all) on this right now. I was planning to start some, but did not get to
it so far. For now, you could look at some examples in the heat-templates
repository at

https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates

Especially in

https://github.com/openstack/heat-templates/tree/master/hot/software-config/example-templates/wordpress

you can see the WordPress example that has been widely used in Heat
samples, but making use of SoftwareConfig and SoftwareDeployment.

Regards,
Thomas


 I know there are already some wikis, but not sufficient for me, :(

 Thanks!

 --
 -
 Lingxian Kong___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

2014-05-13 Thread Qiming Teng
On Mon, May 12, 2014 at 08:56:22AM +, LIU Casper A wrote:
 Hello dear Heat Developers,
 
 I am Casper Liu from Alcatel-Lucent. I am doing a project based on 
 Heat(Icehouse), and have questions about Heat SoftwareConfig and 
 SoftwareDevelopment resources.
 
 Your reply would be highly appreciated!
 We really anticipate your support and help.
 
 The key point of our project is to execute “heat stack-update” to update a 
 stack with a number of VMs, and this “heat stack-update” will trigger a 
 specified script to be executed on a specified VM instance(this VM already 
 has the specified script) of the stack, and there should be no reboot/rebuild 
 of any VM of the stack. If possible we would like to use SoftwareConfig to do 
 this, for it is modularized and easy to manage, but cfn tool should also be 
 OK.
 

I don't think heat stack-update is the real reason behind the VM reboot.
If you want a script executed when a stack is updated, you can use
SoftwareConfig and SoftwareDeployment resources.

 Take our project as example, we have one stack which has 4 VMs (we can name 
 them as VM1, VM2, VM3 and VM4), there is an need to let Heat template to 
 execute one script(we have coded this Python script.) on VM1 when I execute 
 heat stack-update -f my_stack_template_file -p my_param_list each time.
 VM1 can be associated with SoftwareConfig and SoftwareDevelopment resources.
 VM1 can NOT be rebooted or rebuilt during execution of heat stack-update.

I'm confused ... do you want the VM rebooted or not?
 
 My question is:
 
 (1) Could you advise a solution based on Heat for our project scenario?
 (2) If a SoftwareDevelopment is set as UPDATE in “actions” field of 
 template and associated with VM1 and SoftwareConfig and when heat 
 stack-update happens, can the VM1 execute SoftwareConfig without reboot?
 (3) If SoftwareConfig can be execute successfully for VM1, then what 
 packages/tools should be installed in VM instance?
 Such as hook-script.py ( 
 http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/elements/heat-config-script/install.d/hook-script.py
  (http://git.openstack.org/cgit/opensta...) ), is this a must for 
 SoftwareDevelopment?
 (4) Is my software version(icehouse) proper to support SoftwareDevelopment 
 and SoftwareConfig?

Icehouse version should be okay. You may want to check the readme files
and the sample templates.  In general, you need hooks specific to your
configuration tool (shell script in this case) installed in your VM.

 Below is the version of my Openstack pakages:
 
 root@heatorch:~# pip freeze
 ... heat==2014.1.dev58.g5896354
 python-ceilometerclient==1.0.8
 python-cinderclient==1.0.7
 python-debian==0.1.21ubuntu1
 python-heatclient==0.2.6
 python-keystoneclient==0.4.2
 python-neutronclient==2.3.3
 python-novaclient==2.15.0
 python-swiftclient==1.8.0
 python-troveclient==1.0.3
 ...
 
 SoftwareDeployment introduction is as below:
 http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::Software
 
 Your reply would be highly appreciated!
 
 Thanks a lot!
 
 Regards,
 Casper
 
 

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev