heat_template_version: 2013-05-23 description: | This is a Heat template to deploy a single Linux server running Drupal. parameters: # Server settings server_hostname: label: Server Name description: Hostname to use for the server that's built. type: string default: Drupal-Web 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. image: label: Operating System description: | Required: Server image used for all servers that are created as a part of this deployment. type: string default: Debian 7 (Wheezy) (PVHVM) constraints: - allowed_values: - Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - Debian 7 (Wheezy) (PVHVM) - CentOS 7 (PVHVM) - Red Hat Enterprise Linux 6 (PVHVM) description: Must be a supported operating system. flavor: label: Server Size description: | Required: Rackspace Cloud Server flavor to use. The size is based on the amount of RAM for the provisioned server. type: string default: 4 GB General Purpose v1 constraints: - allowed_values: - 1 GB General Purpose v1 - 2 GB General Purpose v1 - 4 GB General Purpose v1 - 8 GB General Purpose v1 - 15 GB I/O v1 - 30 GB I/O v1 - 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. # Durpal settings domain: label: Site Domain description: Domain to be used with Drupal site type: string default: "example.com" constraints: - allowed_pattern: "^[a-zA-Z0-9.-]{1,255}.[a-zA-Z]{2,15}$" description: Must be a valid domain name drupal_dir: type: string description: "Directory Drupal will be installed in" version: label: Drupal Version description: Version of Drupal to install type: string default: "7.35" constraints: - allowed_values: - "7.35" # Lsync config lsync_pub: type: string description: Public key for lsync config # Varnish Master backend varnish_master_backend: description: Master backend host for admin calls in Varnish type: string default: "localhost" # SSH config ssh_keypair_name: type: string description: Name of SSH keypair ssh_private_key: type: string description: Private key for SSH # Database and system user configuration kitchen: label: Kitchen URL description: "URL for a git repo containing required cookbooks" type: string default: https://github.com/rackspace-orchestration-templates/drupal-multi.git chef_version: label: Chef Version description: Version of chef client to use type: string default: 11.16.4 parent_stack_id: type: string description: Stack ID of the Parent Template resources: # Server resources drupal_server: type: "OS::Nova::Server" properties: name: { get_param: server_hostname } flavor: { get_param: flavor } image: { get_param: image } key_name: { get_param: ssh_keypair_name } metadata: rax-heat: { get_param: parent_stack_id } # Chef resources drupal_setup: type: "OS::Heat::ChefSolo" depends_on: drupal_server properties: username: root private_key: { get_param: ssh_private_key } host: { get_attr: [drupal_server, accessIPv4] } kitchen: { get_param: kitchen } chef_version: { get_param: chef_version } node: apache: listen_ports: [8080] timeout: 30 serversignature: "Off" traceenable: "Off" drupal: server_name: { get_param: domain } server_alias: { get_param: domain } version: { get_param: version } dir: { get_param: drupal_dir } apache: port: "8080" varnish: listen_port: "80" version: "3.0" rax: apache: domain: { get_param: domain } firewall: tcp: [80] lsyncd: ssh: pub: { get_param: lsync_pub } varnish: master_backend: { get_param: varnish_master_backend } purge_acl: [{ get_param: varnish_master_backend }] run_list: ["recipe[apt]", "recipe[rax-drupal-dir]", "recipe[rax-drupal::websetup]", "recipe[varnish::repo]", "recipe[varnish]", "recipe[rax-drupal::user]", "recipe[rax-drupal::varnish]", "recipe[rax-drupal::apachepostsetup]", "recipe[rax-firewall]"] outputs: accessIPv4: value: { get_attr: [drupal_server, accessIPv4] } privateIPv4: value: { get_attr: [drupal_server, networks, private, 0] }