Ask Your Question

Revision history [back]

Can you specify user_data in the .template type referenced by OS::Heat::AutoScalingGroup or does it have to be provided in the OS::Heat::AutoScalingGroup user_data?

The main HOT document resource:

  tomcat_server_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: { get_param: cooldown_period }
      desired_capacity: { get_param: desired_capacity_requested }
      max_size: { get_param: max_capacity_requested }
      min_size: { get_param: min_capacity_requested }
      #rolling_updates: {"min_in_service": 1, "pause_time": 180, "max_batch_size": 1}
      resource:
        type: sprint8_tomcat_server.template
        properties:
          key_name: { get_param:  ssh_key_name }
          image: { get_param: image_id }
          flavor: { get_param: instance_type }


the .template file:


resources:



 #############################################################
  # Define the application server (Tomcat)
  #############################################################
  tomcat_server:
    type: OS::Nova::Server
    properties:
      key_name: { get_param:  ssh_key_name }
       image: { get_param: image_id }
       flavor: { get_param: instance_type }
       networks:
         - port: { get_resource: tomcat_server_port }
       user_data:
         str_replace:
           template: { get_file:  "http://haasaet.web.att.com/depot/hot-skel.sh" }
           params:
             $APP_HOST_IP_ENV: { get_param: db_server_ip }
             $HOTSKEL1: { get_file:  "http://haasaet.web.att.com/depot/deploy-chef-client-as3525.sh" }
             $HOTSKEL2: { get_file:  "http://haasaet.web.att.com/depot/milestone2-app-only.sh" }

  tomcat_server_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: CustNetZone1 }
      fixed_ips:
        - subnet_id: { get_resource: Zone1_Subnet }
      security_groups: [{ get_resource: server_security_group }]

I'm getting this error:

Create_Failed: Resource CREATE failed: StackValidationFailed: Property error : 3xjnxxmvpbgo: Property user_data not assigned

click to hide/show revision 2
No.2 Revision

Can you specify user_data in the .template type referenced by OS::Heat::AutoScalingGroup or does it have to be provided in the OS::Heat::AutoScalingGroup user_data?

The main HOT document resource:

  tomcat_server_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: { get_param: cooldown_period }
      desired_capacity: { get_param: desired_capacity_requested }
      max_size: { get_param: max_capacity_requested }
      min_size: { get_param: min_capacity_requested }
      #rolling_updates: {"min_in_service": 1, "pause_time": 180, "max_batch_size": 1}
      resource:
        type: sprint8_tomcat_server.template
        properties:
          key_name: { get_param:  ssh_key_name }
          image: { get_param: image_id }
          flavor: { get_param: instance_type }
 

the .template file: file:

resources:



 #############################################################
  # Define the application server (Tomcat)
  #############################################################
  tomcat_server:
    type: OS::Nova::Server
    properties:
      key_name: { get_param:  ssh_key_name }
       image: { get_param: image_id }
       flavor: { get_param: instance_type }
       networks:
         - port: { get_resource: tomcat_server_port }
       user_data:
         str_replace:
           template: { get_file:  "http://haasaet.web.att.com/depot/hot-skel.sh" }
           params:
             $APP_HOST_IP_ENV: { get_param: db_server_ip }
             $HOTSKEL1: { get_file:  "http://haasaet.web.att.com/depot/deploy-chef-client-as3525.sh" }
             $HOTSKEL2: { get_file:  "http://haasaet.web.att.com/depot/milestone2-app-only.sh" }

  tomcat_server_port:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: CustNetZone1 }
      fixed_ips:
        - subnet_id: { get_resource: Zone1_Subnet }
      security_groups: [{ get_resource: server_security_group }]

I'm getting this error:

Create_Failed: Resource CREATE failed: StackValidationFailed: Property error : 3xjnxxmvpbgo: Property user_data not assigned

assigned