/
drupal-web-server.yaml
185 lines (167 loc) · 5.02 KB
/
drupal-web-server.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
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] }