[Openstack] HEAT pattern error on wait condition

Pavlo Shchelokovskyy pshchelokovskyy at mirantis.com
Fri Jan 16 22:02:33 UTC 2015


Hi,

to use the token attribute you must use the OS::Heat::WaitConditionHandle
[1] (and OS::Heat::WaitCondition) resources instead. AWS one does not have
such attribute [2]

[1]
http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Heat::WaitConditionHandle
[2]
http://docs.openstack.org/developer/heat/template_guide/cfn.html#AWS::CloudFormation::WaitConditionHandle

Best regards,

Pavlo Shchelokovskyy
Software Engineer
Mirantis Inc
www.mirantis.com

On Fri, Jan 16, 2015 at 9:52 PM, Jesus arteche <chechu.linux at gmail.com>
wrote:

> Hey guys,
>
> I have this pattern:
>
> heat_template_version: 2013-05-23
>
> description: >
>   It deploys a Drupal web site on Internet Information Services
>   with PHP configured. It has a local database on SQL Server Express
>
> parameters:
>   key_name:
>     type: string
>     description: Name of an existing key pair used to encrypt Admin
> password.
>     default: chechu
>
>   flavor:
>     type: string
>     description: ID or name of an existing flavor to be used for the
> instance.
>     default: Standard_1_2
>
>   image:
>     type: string
>     description: ID or name of an existing valid Windows Server image.
>     default:     46c57db4-497f-45dd-89a5-21e0b283d279
>
>   public_network_id:
>     type: string
>     description: >
>       ID of an existing public network where a floating IP will be
> allocated.#
>     default: 2795f8ad-4820-4dd5-89e0-69f95931e287
>
>   private_network_id:
>     type: string
>     description: ID of an existing private network.
>     default: 6c18553b-6cca-4e88-bfa2-74e241f9a74b
>
>   sa_password:
>     type: string
>     description: SQL Server Express system administrator password.
>     hidden: true
>     default: OpenStack_2014
>     constraints:
>       - length: { min: 8 }
>         description: SA password must be at least 8 characters long.
>       - allowed_pattern:
> '(?=^.{6,255}$)((?=.*\\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.*'
>         description: >
>           SA password must contain uppercase and lowercase letters,
> numbers,
>           non-alphanumeric characters and it must not contain whitespaces.
>
>
>   drupal_admin_username:
>     type: string
>     description: Drupal admin user name.
>     default: cloudbase
>     constraints:
>       - length: { min: 4, max: 16 }
>         description: >
>           Drupal admin user name must be between 4 and 16 characters long.
>       - allowed_pattern: '^[a-zA-Z0-9]+$'
>         description: >
>           Drupal admin user name must contain only alphanumeric characters.
>
>   drupal_admin_password:
>     type: string
>     description: Drupal admin user password.
>     hidden: true
>     constraints:
>       - length: { min: 8 }
>         description: >
>           Drupal admin user password must be at least 8 characters long.
>       - allowed_pattern: '^[\S]+$'
>         description: Drupal admin user password must not contain
> whitespaces.
>     default: OpenStack_2014
>
>   drupal_admin_email:
>     type: string
>     description: Drupal administrator email.
>     default: chechu at test.com
>     constraints:
>       - length: { min: 1 }
>         description: Drupal admin email must not be empty.
>       - allowed_pattern:
> '^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,4}$'
>         description: Drupal admin email must be a valid email address.
>
>   drupal_site_name:
>     type: string
>     description: Drupal site name.
>     default: My Drupal IIS website created with Heat
>     constraints:
>       - length: { min: 1 }
>         description: Drupal site name must not be empty.
>       - allowed_pattern: '^(?!.*["\r\n\f]).*$'
>         description: >
>           Drupal site name must not contain double quotes and any
>           whitespace character (excepting spaces and tabs).
>
>   max_timeout:
>     type: number
>     default: 3600
>     description: >
>       The maximum allowed time (seconds) for the instalation to finish.
>
> resources:
>
>   wait_condition:
>     type: AWS::CloudFormation::WaitCondition
>     properties:
>       Handle: {get_resource: wait_handle}
>       # Note, count of 5 vs 6 is due to duplicate signal ID 5 sent below
>       Count: 5
>       Timeout: {get_param: max_timeout}
>
>   wait_handle:
>     type: AWS::CloudFormation::WaitConditionHandle
>
>   iis_drupal:
>     type: OS::Nova::Server
>     properties:
>       image: { get_param: image }
>       flavor: { get_param: flavor }
>       key_name: { get_param: key_name }
>       networks:
>         - port: { get_resource: server_port }
>       user_data_format: RAW
>       user_data: { get_resource: iis_drupal_init }
>
>
>
>   server_port:
>     type: OS::Neutron::Port
>     properties:
>       network_id: { get_param: private_network_id }
>
>   server_port_pu:
>     type: OS::Neutron::Port
>     properties:
>       network_id: { get_param: public_network_id }
>
>
>   utils_module:
>     type: OS::Heat::SoftwareConfig
>     properties:
>       group: ungrouped
>       config: { get_file: Common/heat-powershell-utils.psm1 }
>
>   iis_drupal_module:
>     type: OS::Heat::SoftwareConfig
>     properties:
>       group: ungrouped
>       config: { get_file: IIS_Drupal.psm1 }
>
>   iis_drupal_main:
>     type: OS::Heat::SoftwareConfig
>     properties:
>       group: ungrouped
>       config:
>         str_replace:
>           template: { get_file: IIS_Drupal.ps1 }
>           params:
>             sa_password: { get_param: sa_password }
>             admin_username: { get_param: drupal_admin_username }
>             admin_password: { get_param: drupal_admin_password }
>             admin_email: { get_param: drupal_admin_email }
>             website_name: { get_param: drupal_site_name }
>             wait_handle_endpoint:
>               { get_attr: [wait_handle, endpoint] }
>             wait_handle_token:
>               { get_attr: [wait_handle, token] }
>
>   iis_drupal_init:
>     type: OS::Heat::MultipartMime
>     properties:
>       parts:
>         [
>           {
>             filename: "heat-powershell-utils.psm1",
>             subtype: "x-cfninitdata",
>             config: { get_resource: utils_module }
>           },
>           {
>             filename: "IIS_Drupal.psm1",
>             subtype: "x-cfninitdata",
>             config: { get_resource: iis_drupal_module }
>           },
>           {
>             filename: "cfn-userdata",
>             subtype: "x-cfninitdata",
>             config: { get_resource: iis_drupal_main }
>           }
>         ]
>
> outputs:
>   drupal_url:
>     description: URL where you can access the Drupal web site
>     value:
>       str_replace:
>         template: >
>           URL: http://host
>         params:
>           host: { get_attr: [ server_port, server_port_pu ] }
>
>
> But I got this errror:
>
> Create Failed
>
> Resource Create Failed: Ht-15306c5 Stackvalidationfailed: Ht-Ea96e26
> Ht-E5bc283 Property Error : Iis Drupal Main: Config Ht-99828f1 The
> Referenced Attribute (Wait Handle Token) Is Incorrect.
>
>
>
>
> Any idea?
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150117/b157f447/attachment.html>


More information about the Openstack mailing list