<commit_before>heat_template_version: 2013-05-23

description: |
  Heat template to deploy a load balancer and multiple servers running a PHP app under apache

parameters:

  load_balancer_hostname:
    description: Hostname for the Load Balancer
    type: string
    default: PHP-Load-Balancer
    constraints:
    - length:
        min: 1
        max: 64
    - allowed_pattern: "^[a-zA-Z][a-zA-Z0-9-]*$"
      description: |
        Must begin with a letter and contain only alphanumeric characters.

  server_hostname:
    description: Server Name
    type: string
    default: php
    constraints:
    - length:
        min: 1
        max: 64
    - allowed_pattern: "^[a-zA-Z][a-zA-Z0-9-]*$"
      description: |
        Must begin with a letter and contain only alphanumeric characters.

  server_count:
    description: Number of servers to deploy
    type: number
    default: 1
    constraints:
    - range:
        min: 0
        max: 24
      description: Must be between 0 and 24 servers.

  image:
    description: Server Image
    type: string
    default: Ubuntu 12.04 LTS (Precise Pangolin)
    constraints:
    - allowed_values:
      - Ubuntu 12.04 LTS (Precise Pangolin)
      description: Must be a supported operating system.

  flavor:
    description: Rackspace Cloud Server flavor
    type: string
    default: 4 GB Performance
    constraints:
    - allowed_values:
      - 1 GB Performance
      - 2 GB Performance
      - 4 GB Performance
      - 8 GB Performance
      - 15 GB Performance
      - 30 GB Performance
      - 60 GB Performance
      - 90 GB Performance
      - 512MB Standard Instance
      - 1GB Standard Instance
      - 2GB Standard Instance
      - 4GB Standard Instance
      - 8GB Standard Instance
      - 15GB Standard Instance
      - 30GB Standard Instance
      description: |
        Must be a valid Rackspace Cloud Server flavor for the region you have
        selected to deploy into.

  ssh_keypair_name:
    description: Nova keypair name for ssh access to the server
    type: string
    default: php-app

  revision:
    description: Git Branch/Ref
    type: string
    default: HEAD

  packages:
    description: PHP Packages
    type: string
    default: ''

  repo:
    description: Git Repo URL
    type: string
    default: ''

  url:
    description: URL for site
    type: string
    default: 'http://example.com'

  deploy_key:
    description: Git deploy key for private repositories.
    type: string
    default: ''

  destination:
    description: Deploy Directory
    default: /var/www/vhosts/application
    type: string

  public:
    description: The public facing directory of your application relative to the destination.
    type: string
    default: /

  sslcert:
    description: SSL Certificate
    type: string
    default: false

  sslkey:
    description: SSL Key
    type: string
    default: false

  sslcacert:
    description: SSL CA Certificate
    type: string
    default: false

  varnish:
    description: Install Varnish
    type: string
    default: false

  http_port:
    description: HTTP Port
    type: string
    default: 80

  https_port:
      description: HTTPS Port
      type: string
      default: 443

  memcached_size:
    description: Memcached memory size limit
    type: number
    default: 128

resources:

  ssh_key:
    type: "OS::Nova::KeyPair"
    properties:
      name: { get_param: ssh_keypair_name }
      save_private_key: true

  php_setup:
    type: "OS::Heat::ResourceGroup"
    properties:
      count: { get_param: server_count }
      resource_def:
        type: https://raw.github.com/hhoover/php-app-multi/master/php-app-single.yaml<commit_msg>Fix GitHub reference link in template to this repo<commit_after>heat_template_version: 2013-05-23

description: |
  Heat template to deploy a load balancer and multiple servers running a PHP app under apache

parameters:

  load_balancer_hostname:
    description: Hostname for the Load Balancer
    type: string
    default: PHP-Load-Balancer
    constraints:
    - length:
        min: 1
        max: 64
    - allowed_pattern: "^[a-zA-Z][a-zA-Z0-9-]*$"
      description: |
        Must begin with a letter and contain only alphanumeric characters.

  server_hostname:
    description: Server Name
    type: string
    default: php
    constraints:
    - length:
        min: 1
        max: 64
    - allowed_pattern: "^[a-zA-Z][a-zA-Z0-9-]*$"
      description: |
        Must begin with a letter and contain only alphanumeric characters.

  server_count:
    description: Number of servers to deploy
    type: number
    default: 1
    constraints:
    - range:
        min: 0
        max: 24
      description: Must be between 0 and 24 servers.

  image:
    description: Server Image
    type: string
    default: Ubuntu 12.04 LTS (Precise Pangolin)
    constraints:
    - allowed_values:
      - Ubuntu 12.04 LTS (Precise Pangolin)
      description: Must be a supported operating system.

  flavor:
    description: Rackspace Cloud Server flavor
    type: string
    default: 4 GB Performance
    constraints:
    - allowed_values:
      - 1 GB Performance
      - 2 GB Performance
      - 4 GB Performance
      - 8 GB Performance
      - 15 GB Performance
      - 30 GB Performance
      - 60 GB Performance
      - 90 GB Performance
      - 512MB Standard Instance
      - 1GB Standard Instance
      - 2GB Standard Instance
      - 4GB Standard Instance
      - 8GB Standard Instance
      - 15GB Standard Instance
      - 30GB Standard Instance
      description: |
        Must be a valid Rackspace Cloud Server flavor for the region you have
        selected to deploy into.

  ssh_keypair_name:
    description: Nova keypair name for ssh access to the server
    type: string
    default: php-app

  revision:
    description: Git Branch/Ref
    type: string
    default: HEAD

  packages:
    description: PHP Packages
    type: string
    default: ''

  repo:
    description: Git Repo URL
    type: string
    default: ''

  url:
    description: URL for site
    type: string
    default: 'http://example.com'

  deploy_key:
    description: Git deploy key for private repositories.
    type: string
    default: ''

  destination:
    description: Deploy Directory
    default: /var/www/vhosts/application
    type: string

  public:
    description: The public facing directory of your application relative to the destination.
    type: string
    default: /

  sslcert:
    description: SSL Certificate
    type: string
    default: false

  sslkey:
    description: SSL Key
    type: string
    default: false

  sslcacert:
    description: SSL CA Certificate
    type: string
    default: false

  varnish:
    description: Install Varnish
    type: string
    default: false

  http_port:
    description: HTTP Port
    type: string
    default: 80

  https_port:
      description: HTTPS Port
      type: string
      default: 443

  memcached_size:
    description: Memcached memory size limit
    type: number
    default: 128

resources:

  ssh_key:
    type: "OS::Nova::KeyPair"
    properties:
      name: { get_param: ssh_keypair_name }
      save_private_key: true

  php_setup:
    type: "OS::Heat::ResourceGroup"
    properties:
      count: { get_param: server_count }
      resource_def:
        type: https://raw.github.com/rackspace-orchestration-templates/php-app-multi/master/php-app-single.yaml
{'fraction_non_alphanumeric': 0.0666756647320826, 'fraction_numerical': 0.01754622756107437, 'mean_word_length': 2.3820173436786853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3903805', 'n_tokens_mistral': 2294, 'n_tokens_neox': 2094, 'n_words': 739}