[openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

Alex Yang alex890714 at gmail.com
Fri May 16 12:49:23 UTC 2014


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
<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 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/
<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
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
<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.spatzier at de.ibm.com>:

> Excerpts from Lingxian Kong's message on 15/05/2014 22:51:33:
> > From: Lingxian Kong <anlin.kong at gmail.com>
> > To: "OpenStack Development Mailing List (not for usage questions)"
> > <openstack-dev at 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 at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



-- 
  杨雨
  Email:       alex890714 at gmail.com
GitHub:       https://github.com/AlexYangYu
 Weibo:       http://www.weibo.com/alexyangyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140516/f6ec461b/attachment.html>


More information about the OpenStack-dev mailing list