How can i trace an error for software configuration and deployment in openstack heat template execution
Hi all, I have executed a Heat template in with VM provisioning and software configuration and deployment. The templates that i get it from https://github.com/openstack/heat-templates (https://github.com/openstack/heat-tem...). And i have executed template for software configuration group "script" . It works fine and completed successfully. Command used to execute template with software configuration and deployment :
heat --debug --os-no-client-auth --os-username admin --os-password openstack --heat-url http://localhost:8004/v1/98073903698740af87fb57ca9e41eed5 --os-auth-url http://192.168.1.223:5000/v2.0 stack-create mystack -f example-templates/example-config-pristine-image.yaml -e boot-config/fedora_pip_env.yaml
It creates software configuration and deployment successfully Template file : https://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-config-pristine-image.yaml (https://github.com/openstack/heat-tem...)
Environment file : https://github.com/openstack/heat-templates/blob/master/hot/software-config/boot-config/fedora_pip_env.yaml (https://github.com/openstack/heat-tem...)
In this environment file they mapped "Heat::InstallConfigAgent": templates/install_config_agent_fedora_pip.yaml Please look at this https://github.com/openstack/heat-templates/blob/master/hot/software-config/boot-config/templates/install_config_agent_fedora_pip.yaml (https://github.com/openstack/heat-tem...) file . This contains boot config agents and hooks configuration. For group script its working fine. Because in templates/install_config_agent_fedora_pip.yaml they mapped heat-config-script and hook script for "script" group.
Issue : But for executing software configuration for puppet group. I need to know what are the configurations need to be change in environment file. It results in CREATE FAILED due to time out.
For software configuration (group : puppet) , i made some changes before executing template as follows,
Execution command :
heat --debug --os-no-client-auth --os-username admin --os-password openstack --heat-url http://localhost:8004/v1/98073903698740af87fb57ca9e41eed5 --os-auth-url http://192.168.1.223:5000/v2.0 stack-create nnnnn -f example-templates/example-puppet-template_bak.yaml -e boot-config/fedora_pip_env.yaml
In example-puppet-template_bak.yaml (https://github.com/openstack/heat-templates/blob/master/hot/software-config/example-templates/example-puppet-template.yaml (https://github.com/openstack/heat-tem...)) , I have added boot config resource and mapped to server shown here:
**boot_config:
type: Heat::InstallConfigAgent**
server:
type: OS::Nova::Server
properties:
image: {get_param: image}
flavor: {get_param: flavor}
key_name: {get_param: key_name}
networks:
- network: {get_param: private_net}
security_groups:
- {get_resource: the_sg}
**user_data_format: SOFTWARE_CONFIG
user_data: {get_attr: [boot_config, config]}**
And i made changes in https://github.com/openstack/heat-templates/blob/master/hot/software-config/boot-config/templates/install_config_agent_fedora_pip.yaml (https://github.com/openstack/heat-tem...), Replaced the $hook_script at line 25 with hook-puppet.py
Error Message:
stack_status | CREATE_FAILED
stack_status_reason | Create timed out
Debugging Steps:
--> [root@nnnnn-server-cmrdykc5fib2 etc]# ll /var/run/heat-config
total 8
drwx------. 2 root root 120 Jul 28 12:22 deployed
-rw-r--r--. 1 root root 4298 Jul 28 12:51 heat-config
drwx------. 2 root root 40 Jul 28 09:45 heat-config-puppet
--> [root@nnnnn-server-cmrdykc5fib2 etc]# cat /etc/os-collect-config.conf
[DEFAULT]
command = os-refresh-config
[cfn]
metadata_url = http://192.168.1.210:8000/v1/
stack_name = nnnnn
secret_access_key = b07c579cfbe34e1a89d0fee0c2240ca4
access_key_id = 704daf1078324dde92cd168b06459594
path = server.Metadata
--> [root@nnnnn-server-cmrdykc5fib2 os-collect-config]# cat heat_local.json
{
"deployments": [],
"os-collect-config": {
"cfn": {
"stack_name": "nnnnn",
"metadata_url": "http://192.168.1.210:8000/v1/",
"access_key_id": "704daf1078324dde92cd168b06459594",
"secret_access_key": "b07c579cfbe34e1a89d0fee0c2240ca4",
"path": "server.Metadata"
}
}
Shows some Warnings :
--> [root@nnnnn-server-cmrdykc5fib2 heat-config-puppet]# os-collect-config --one-time
2015-07-28 13:06:23.367 12772 WARNING os_collect_config.heat [-] No auth_url configured.
2015-07-28 ...