ERROR: The Parameter (ImageID) was not defined in template.
Hi ,
I have created the template for the stack and environment file. It is getting failed with below error. So can you please look into the files, templates and let me know why the stack creation is failing??
[root@controller log(keystone)]# echo $Int_Net_ID
8a5b893e-7ea1-45cb-ae5f-aa0c8d7c33da
[root@controller log(keystone)]#
[root@controller log(keystone)]# glance image-list
+--------------------------------------+----------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+----------+-------------+------------------+-----------+--------+
| e6edb708-cdb9-4866-a2d0-6cf6bda3b530 | cirros | qcow2 | bare | 13167616 | active |
| fc761829-869e-42ab-bae8-82b56289d990 | Fedora22 | qcow2 | bare | 228599296 | active |
+--------------------------------------+----------+-------------+------------------+-----------+--------+
[root@controller log(keystone)]#
[root@controller log(keystone)]# heat stack-create -f simple.yaml -P "ImageID=cirros;NetID=$Int_Net_ID" -e environment.yaml stack1
ERROR: The Parameter (ImageID) was not defined in template.
[root@controller log(keystone)]# cat cirros.yaml
heat_template_version: 2014-10-16
description: Heat Sample Template
parameters:
ImageID:
type: string
description: Image used to boot a server
NetID:
type: string
description: Network ID for the server
resources:
server1:
type: OS::Nova::Server
properties:
name: "Heat_Deployed_Server"
image: { get_param: ImageID }
flavor: "m1.small"
networks:
- network: { get_param: NetID }
outputs:
server1_private_ip:
description: IP address of the server in the private network
value: { get_attr: [ server1, first_address ] }
[root@controller log(keystone)]#
[root@controller log(keystone)]# cat simple.yaml
heat_template_version: 2014-10-16
description: A simple auto scaling group.
resources:
group:
type: OS::Heat::AutoScalingGroup
properties:
cooldown: 60
desired_capacity: 2
max_size: 5
min_size: 1
resource:
type: OS::Nova::Server::Cirros
scaleup_policy:
type: OS::Heat::ScalingPolicy
properties:
adjustment_type: change_in_capacity
auto_scaling_group_id: { get_resource: group }
cooldown: 60
scaling_adjustment: 1
cpu_alarm_high:
type: OS::Ceilometer::Alarm
properties:
meter_name: cpu_util
statistic: avg
period: 60
evaluation_periods: 1
threshold: 50
alarm_actions:
- {get_attr: [scaleup_policy, alarm_url]}
comparison_operator: gt
[root@controller log(keystone)]#
[root@controller log(keystone)]# cat environment.yaml
resource_registry:
"OS::Nova::Server::Cirros": "cirros.yaml"
[root@controller log(keystone)]#
Thanks a lott!!!!