<commit_before>heat_template_version: 2014-10-16

description: Deploy an instance with mysql installed

parameters:
  key_name:
    type: string
    description: Name of key-pair to be used for the default user
  flavor:
    type: string
    description: |
      Choose an instance flavor
  image:
    type: string
    label: Server image
  net_id:
    type: string
    label: Network ID
    description: ID of the network to use
  name:
    type: string
    description: Name of instance
  public_network:
    type: string
    description: Public network id
  private_key:
    type: string
    description: Name of private key to be used for the local Cassandra user
    default: my_key
  security_group:
    type: string 
    description: Nmae or ID of security group

  volume_type:
    type: string
    default: Performance

  volume_size:
    type: number
    default: 64


resources:
#  wait_condition:
#    type: OS::Heat::WaitCondition
#    properties:
#      handle: { get_resource: wait_handle }
#      count: 1
#      timeout: 600
 
#  wait_handle:
#    type: OS::Heat::WaitConditionHandle

  volume:
    type: OS::Cinder::Volume
    properties:
      size: {get_param: volume_size}
      volume_type: {get_param: volume_type}
      name: 
        list_join: ["-", [{get_param: name }, "mysql-volume"]]

#      availability_zone: {get_param: avzone}


  instance:
    type: OS::Nova::Server
    properties:
      key_name: { get_param: key_name }
      name: 
        list_join: ["-", [{get_param: name }, "mysqlserver"]]
      image: { get_param: image }
      networks:
        - port: { get_resource: port }
      flavor: { get_param: flavor }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __private_key__: { get_param: private_key }
#            wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
          template: |
            #!/bin/bash<commit_msg>enabled verbose output<commit_after>heat_template_version: 2014-10-16

description: Deploy an instance with mysql installed

parameters:
  key_name:
    type: string
    description: Name of key-pair to be used for the default user
  flavor:
    type: string
    description: |
      Choose an instance flavor
  image:
    type: string
    label: Server image
  net_id:
    type: string
    label: Network ID
    description: ID of the network to use
  name:
    type: string
    description: Name of instance
  public_network:
    type: string
    description: Public network id
  private_key:
    type: string
    description: Name of private key to be used for the local Cassandra user
    default: my_key
  security_group:
    type: string 
    description: Nmae or ID of security group

  volume_type:
    type: string
    default: Performance

  volume_size:
    type: number
    default: 64


resources:
#  wait_condition:
#    type: OS::Heat::WaitCondition
#    properties:
#      handle: { get_resource: wait_handle }
#      count: 1
#      timeout: 600
 
#  wait_handle:
#    type: OS::Heat::WaitConditionHandle

  volume:
    type: OS::Cinder::Volume
    properties:
      size: {get_param: volume_size}
      volume_type: {get_param: volume_type}
      name: 
        list_join: ["-", [{get_param: name }, "mysql-volume"]]

#      availability_zone: {get_param: avzone}


  instance:
    type: OS::Nova::Server
    properties:
      key_name: { get_param: key_name }
      name: 
        list_join: ["-", [{get_param: name }, "mysqlserver"]]
      image: { get_param: image }
      networks:
        - port: { get_resource: port }
      flavor: { get_param: flavor }
      user_data_format: RAW
      user_data:
        str_replace:
          params:
            __private_key__: { get_param: private_key }
#            wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
          template: |
            #!/bin/bash
            set -x
{'fraction_non_alphanumeric': 0.09018087855297158, 'fraction_numerical': 0.007235142118863049, 'mean_word_length': 2.5383912248628886, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1352588', 'n_tokens_mistral': 1227, 'n_tokens_neox': 1175, 'n_words': 347}