-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmetadata.rb
473 lines (414 loc) · 15.6 KB
/
metadata.rb
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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# encoding: UTF-8
#
# Cookbook Name:: owncloud
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# Copyright:: Copyright (c) 2015 Xabier de Zuazo
# Copyright:: Copyright (c) 2013-2015 Onddo Labs, SL.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name 'owncloud'
maintainer 'Xabier de Zuazo'
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description <<-EOH
Installs and configures ownCloud, an open source personal cloud for data and
file sync, share and view.
EOH
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.1.0' # WiP
if respond_to?(:source_url)
source_url "https://github.com/zuazo/#{name}-cookbook"
end
if respond_to?(:issues_url)
issues_url "https://github.com/zuazo/#{name}-cookbook/issues"
end
supports 'centos'
supports 'debian'
supports 'scientific'
supports 'ubuntu'
depends 'apache2', '~> 3.0'
depends 'apt', '~> 2.0'
depends 'cron', '~> 1.6'
depends 'database', '~> 4.0'
depends 'encrypted_attributes', '~> 0.2'
depends 'mysql2_chef_gem', '~> 1.0.1'
depends 'mysql', '~> 6.0'
depends 'nginx', '~> 2.7'
depends 'openssl', '~> 4.0'
depends 'php', '~> 1.4'
depends 'php-fpm', '~> 0.7'
depends 'postfix', '~> 3.0'
depends 'postgresql', '~> 3.4.18'
depends 'ssl_certificate', '~> 1.1'
recipe 'owncloud::default', 'Installs and configures ownCloud'
attribute 'owncloud/version',
display_name: 'ownCloud Version',
description: 'Version of ownCloud to install',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/download_url',
display_name: 'ownCloud Download Url',
description: 'Url from where ownCloud will be downloaded',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/deploy_from_git',
display_name: 'ownCloud Deploy From Git',
description:
'Whether ownCloud should be deployed from the git repository',
type: 'string',
required: 'optional',
default: 'false'
attribute 'owncloud/git_repo',
display_name: 'ownCloud Git Repo',
description: 'Url of the ownCloud git repository',
type: 'string',
required: 'optional',
default: 'https://github.com/owncloud/core.git'
attribute 'owncloud/git_ref',
display_name: 'ownCloud Git Ref',
description: 'Git reference to deploy',
type: 'string',
required: 'optional',
default: 'nil'
attribute 'owncloud/www_dir',
display_name: 'ownCloud www Dir',
description:
'Root directory defined in Apache where web documents are stored',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/dir',
display_name: 'ownCloud Dir',
description: 'Directory where ownCloud will be installed',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/data_dir',
display_name: 'ownCloud Data Dir',
description: 'Directory where ownCloud data will be stored',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/server_name',
display_name: 'ownCloud Server Name',
description: 'Sets the server name for the ownCloud virtual host',
calculated: true,
type: 'string',
required: 'recommended'
attribute 'owncloud/server_aliases',
display_name: 'ownCloud Server Aliases',
description:
'Sets the server name aliases for the ownCloud virtual host',
type: 'array',
required: 'optional',
default: []
attribute 'owncloud/install_postfix',
display_name: 'install Postfix?',
description: 'Whether to install Postfix when a local MTA is needed',
choice: %w(true false),
type: 'string',
required: 'optional',
default: 'true'
attribute 'owncloud/web_server',
display_name: 'Web Server',
description: 'Web server to use: apache or nginx',
choice: %w(apache nginx),
type: 'string',
required: 'optional',
default: 'apache'
attribute 'owncloud/php-fpm/pool',
display_name: 'PHP-FPM pool',
description: 'PHP-FPM pool name to use with ownCloud',
type: 'string',
required: 'optional',
default: 'owncloud'
attribute 'owncloud/max_upload_size',
display_name: 'Max Upload Size',
description: 'Maximum allowed size for uploaded files',
type: 'string',
required: 'optional',
default: '512M'
attribute 'owncloud/sendfile',
display_name: 'Sendfile',
description:
'Whether to enable Sendfile on web server. You should set to '\
'false if you use NFS or SMB mounts',
choice: %w(true false),
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/ssl',
display_name: 'ownCloud Use SSL?',
description: 'Whether ownCloud should accept requests through SSL',
choice: %w(true false),
type: 'string',
required: 'optional',
default: 'true'
attribute 'owncloud/admin/user',
display_name: 'ownCloud Admin Username',
description: 'Administrator username',
type: 'string',
required: 'optional',
default: 'admin'
attribute 'owncloud/admin/pass',
display_name: 'ownCloud Admin Password',
description: 'Administrator password',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/config/dbtype',
display_name: 'ownCloud Database Type',
description: 'Type of database, can be sqlite, mysql or pgsql',
choice: %w(mysql pgsql sqlite),
type: 'string',
required: 'optional',
default: 'mysql'
attribute 'owncloud/config/dbname',
display_name: 'ownCloud Database Name',
description: 'Name of the ownCloud database',
type: 'string',
required: 'optional',
default: 'owncloud'
attribute 'owncloud/config/dbuser',
display_name: 'ownCloud Database User',
description: 'User to access the ownCloud database',
type: 'string',
required: 'optional',
default: 'owncloud'
attribute 'owncloud/config/dbpassword',
display_name: 'ownCloud Database Password',
description: 'Password to access the ownCloud database',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/config/dbhost',
display_name: 'ownCloud Database Host',
description: 'Host running the ownCloud database',
type: 'string',
required: 'optional',
default: '127.0.0.1'
attribute 'owncloud/config/dbport',
display_name: 'ownCloud Database Port',
description: 'Port the ownCloud database is running at',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/config/dbtableprefix',
display_name: 'ownCloud Database Table Prefix',
description: 'Prefix for the ownCloud tables in the database',
type: 'string',
required: 'optional',
default: ''
attribute 'owncloud/config/mail_smtpmode',
display_name: 'ownCloud Mail SMTP Mode',
description:
'Mode to use for sending mail, can be sendmail, smtp, qmail or php',
choice: %w(sendmail smtp qmail php),
type: 'string',
required: 'optional',
default: 'sendmail'
attribute 'owncloud/config/mail_smtphost',
display_name: 'ownCloud Mail SMTP Host',
description:
'Host to use for sending mail, depends on mail_smtpmode if this '\
'is used',
type: 'string',
required: 'optional',
default: '127.0.0.1'
attribute 'owncloud/config/mail_smtpport',
display_name: 'ownCloud Mail SMTP Port',
description:
'Port to use for sending mail, depends on mail_smtpmode if this '\
'is used',
type: 'string',
required: 'optional',
default: '25'
attribute 'owncloud/config/mail_smtptimeout',
display_name: 'ownCloud Mail SMTP Timeout',
description:
'SMTP server timeout in seconds for sending mail, depends on '\
'mail_smtpmode if this is used',
type: 'string',
required: 'optional',
default: '10'
attribute 'owncloud/config/mail_smtpsecure',
display_name: 'ownCloud Mail SMTP Secure',
description:
'SMTP connection prefix or sending mail, depends on mail_smtpmode '\
'if this is used. Can be "", ssl or tls',
choice: ['', 'ssl', 'tls'],
type: 'string',
required: 'optional',
default: ''
attribute 'owncloud/config/mail_smtpauth',
display_name: 'ownCloud Mail SMTP Auth',
description:
'Whether authentication is needed to send mail, depends on '\
'mail_smtpmode if this is used',
choice: %w(true false),
type: 'string',
required: 'optional',
default: 'false'
attribute 'owncloud/config/mail_smtpauthtype',
display_name: 'ownCloud Mail SMTP Auth Type',
description:
'Authentication type needed to send mail, depends on '\
'mail_smtpmode if this is used. Can be LOGIN, PLAIN or NTLM',
choice: %w(LOGIN PLAIN NTLM),
type: 'string',
required: 'optional',
default: 'LOGIN'
attribute 'owncloud/config/mail_smtpname',
display_name: 'ownCloud Mail SMTP Name',
description:
'Username to use for sendmail mail, depends on mail_smtpauth if '\
'this is used',
type: 'string',
required: 'optional',
default: ''
attribute 'owncloud/config/mail_smtppassword',
display_name: 'ownCloud Mail SMTP Password',
description:
'Password to use for sendmail mail, depends on mail_smtpauth if '\
'this is used',
type: 'string',
required: 'optional',
default: ''
attribute 'owncloud/cron/enabled',
display_name: 'ownCloud cron enabled',
description: 'Whether to enable ownCloud cron',
type: 'string',
required: 'optional',
default: 'true'
attribute 'owncloud/cron/min',
display_name: 'ownCloud cron minute',
description: 'Minute to run ownCloud cron at',
type: 'string',
required: 'optional',
default: '*/15'
attribute 'owncloud/cron/hour',
display_name: 'ownCloud cron hour',
description: 'Hour to run ownCloud cron at',
type: 'string',
required: 'optional',
default: '*'
attribute 'owncloud/cron/day',
display_name: 'ownCloud cron day',
description: 'Day of month to run ownCloud cron at',
type: 'string',
required: 'optional',
default: '*'
attribute 'owncloud/cron/month',
display_name: 'ownCloud cron month',
description: 'Month to run ownCloud cron at',
type: 'string',
required: 'optional',
default: '*'
attribute 'owncloud/cron/weekday',
display_name: 'ownCloud cron weekday',
description: 'Weekday to run ownCloud cron at',
type: 'string',
required: 'optional',
default: '*'
attribute 'owncloud/skip_permissions',
display_name: 'Skip permissions',
description:
'Whether to skip settings the permissions of the ownCloud '\
'directory. Set this to true when using NFS synced folders.',
choice: %w(true false),
type: 'string',
required: 'optional'
attribute 'owncloud/manage_database',
display_name: 'database manage',
description: 'Whether to manage database creation.',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/mysql/instance',
display_name: 'MySQL database instance name',
description:
'MySQL database instance name to run by the mysql_service lwrp '\
'from the mysql cookbook.',
type: 'string',
required: 'optional',
default: 'default'
attribute 'owncloud/database/data_dir',
display_name: 'MySQL server data dir',
description: 'MySQL data files path.',
type: 'string',
required: 'optional',
calculated: true
attribute 'owncloud/database/run_group',
display_name: 'MySQL run group',
description: 'MySQL system group.',
type: 'string',
required: 'optional',
calculated: true
attribute 'owncloud/database/run_user',
display_name: 'MySQL run user',
description: 'MySQL system user.',
type: 'string',
required: 'optional',
calculated: true
attribute 'owncloud/database/version',
display_name: 'MySQL server version',
description:
'MySQL version to install by the mysql_service lwrp. Refer to '\
'https://github.com/chef-cookbooks/mysql#platform-support',
type: 'string',
required: 'optional',
default: 'nil'
attribute 'owncloud/mysql/server_root_password',
display_name: 'Database Root Password',
description: 'Database admin password to access a database instance.',
calculated: true,
type: 'string',
required: 'optional'
attribute 'owncloud/encrypt_attributes',
display_name: 'owncloud encrypt attributes',
description: 'Whether to encrypt ownCloud attributes containing '\
'credential secrets.',
type: 'string',
choice: %w(true false),
default: 'false'
grouping 'owncloud/packages',
title: 'owncloud packages',
description: 'ownCloud packages'
attribute 'owncloud/packages/core',
display_name: 'owncloud packages core',
description: 'ownCloud core package names as array.',
type: 'array',
required: 'optional',
calculated: true
attribute 'owncloud/packages/sqlite',
display_name: 'owncloud packages sqlite',
description: 'ownCloud package names array for SQLite.',
type: 'array',
required: 'optional',
calculated: true
attribute 'owncloud/packages/mysql',
display_name: 'owncloud packages mysql',
description: 'ownCloud package names array for MySQL.',
type: 'array',
required: 'optional',
calculated: true
attribute 'owncloud/packages/postgresql',
display_name: 'owncloud packages postgresql',
description: 'ownCloud package names array for PostgreSQL.',
type: 'array',
required: 'optional',
calculated: true