[openstack-dev] Heat SoftwareConfig and SoftwareDevelopment
Steve Baker
sbaker at redhat.com
Sun May 18 22:52:59 UTC 2014
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 at 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 at 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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140519/5fa407d1/attachment.html>
More information about the OpenStack-dev
mailing list