-
Notifications
You must be signed in to change notification settings - Fork 7
/
metadata.rb
167 lines (145 loc) · 6.93 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
name 'rs-storage'
maintainer 'RightScale, Inc.'
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'Provides recipes for managing volumes on a Server in a RightScale supported cloud'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.0.1'
issues_url 'https://github.com/rightscale-cookbooks/rs-storage/issues' if respond_to?(:issues_url)
source_url 'https://github.com/rightscale-cookbooks/rs-storage' if respond_to?(:source_url)
chef_version '>= 12.0' if respond_to?(:chef_version)
depends 'chef_handler'
depends 'filesystem', '>= 0.11.1'
depends 'lvm', '>= 3.0'
depends 'marker'
depends 'rightscale_backup', '~> 2.0.0'
depends 'rightscale_volume', '~> 2.0.0'
depends 'apt'
depends 'build-essential'
recipe 'rs-storage::default', 'Sets up required dependencies for using this cookbook'
recipe 'rs-storage::volume', 'Creates a volume and attaches it to the server'
recipe 'rs-storage::stripe', 'Creates volumes, attaches them to the server, and sets up a striped LVM'
recipe 'rs-storage::backup', description: 'Creates a backup', thread: 'storage_backup'
recipe 'rs-storage::decommission', 'Destroys LVM conditionally, detaches and destroys volumes. This recipe should' \
' be used as a decommission recipe in a RightScale ServerTemplate.'
recipe 'rs-storage::schedule', 'Enable/disable periodic backups based on rs-storage/schedule/enable'
attribute 'rs-storage/device/count',
display_name: 'Device Count',
description: 'The number of devices to create and use in the Logical Volume. If this value is set to more than' \
' 1, it will create the specified number of devices and create an LVM on the devices.',
default: '2',
recipes: ['rs-storage::stripe', 'rs-storage::decommission'],
required: 'recommended'
attribute 'rs-storage/device/mount_point',
display_name: 'Device Mount Point',
description: 'The mount point to mount the device on. Example: /mnt/storage',
default: '/mnt/storage',
recipes: ['rs-storage::volume', 'rs-storage::stripe', 'rs-storage::decommission'],
required: 'recommended'
attribute 'rs-storage/device/nickname',
display_name: 'Device Nickname',
description: 'Nickname for the device. rs-storage::volume uses this for the filesystem label, which is' \
' restricted to 12 characters. If longer than 12 characters, the filesystem label will be set to the' \
' first 12 characters. Example: data_storage',
default: 'data_storage',
recipes: ['rs-storage::volume', 'rs-storage::stripe', 'rs-storage::decommission'],
required: 'recommended'
attribute 'rs-storage/device/volume_size',
display_name: 'Device Volume Size',
description: 'Size of the volume or logical volume to create (in GB). Example: 10',
default: '10',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'recommended'
attribute 'rs-storage/device/iops',
display_name: 'Device IOPS',
description: 'IO Operations Per Second to use for the device. Currently this value is only used on AWS clouds.' \
' Example: 100',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'optional'
attribute 'rs-storage/device/volume_type',
display_name: 'Volume Type',
description: 'Volume Type to use for creating volumes. Example: gp2',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'optional'
attribute 'rs-storage/device/filesystem',
display_name: 'Device Filesystem',
description: 'The filesystem to be used on the device. Defaults are based on OS and determined in' \
' attributes/defaults.rb. Example: ext4',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'optional'
attribute 'rs-storage/device/detach_timeout',
display_name: 'Detach Timeout',
description: 'Amount of time (in seconds) to wait for a single volume to detach at decommission. Example: 300',
default: '300',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'optional'
attribute 'rs-storage/device/destroy_on_decommission',
display_name: 'Destroy on Decommission',
description: 'If set to true, the devices will be destroyed on decommission.',
default: 'false',
recipes: ['rs-storage::decommission'],
required: 'recommended'
attribute 'rs-storage/backup/lineage',
display_name: 'Backup Lineage',
description: 'The backup lineage. Example: production',
recipes: ['rs-storage::backup'],
required: 'required'
attribute 'rs-storage/restore/lineage',
display_name: 'Restore Lineage',
description: 'The lineage name to restore backups. Example: staging',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'recommended'
attribute 'rs-storage/restore/timestamp',
display_name: 'Restore Timestamp',
description: 'The timestamp (in seconds since UNIX epoch) to select a backup to restore from.' \
' The backup selected will have been created on or before this timestamp. Example: 1391473172',
recipes: ['rs-storage::volume', 'rs-storage::stripe'],
required: 'recommended'
attribute 'rs-storage/backup/keep/dailies',
display_name: 'Backup Keep Dailies',
description: 'Number of daily backups to keep. Example: 14',
default: '14',
recipes: ['rs-storage::backup'],
required: 'optional'
attribute 'rs-storage/backup/keep/weeklies',
display_name: 'Backup Keep Weeklies',
description: 'Number of weekly backups to keep. Example: 6',
default: '6',
recipes: ['rs-storage::backup'],
required: 'optional'
attribute 'rs-storage/backup/keep/monthlies',
display_name: 'Backup Keep Monthlies',
description: 'Number of monthly backups to keep. Example: 12',
default: '12',
recipes: ['rs-storage::backup'],
required: 'optional'
attribute 'rs-storage/backup/keep/yearlies',
display_name: 'Backup Keep Yearlies',
description: 'Number of yearly backups to keep. Example: 2',
default: '2',
recipes: ['rs-storage::backup'],
required: 'optional'
attribute 'rs-storage/backup/keep/keep_last',
display_name: 'Backup Keep Last Snapshots',
description: 'Number of snapshots to keep. Example: 60',
default: '60',
recipes: ['rs-storage::backup'],
required: 'optional'
attribute 'rs-storage/schedule/enable',
display_name: 'Backup Schedule Enable',
description: 'Enable or disable periodic backup schedule',
default: 'false',
choice: %w(true false),
recipes: ['rs-storage::schedule'],
required: 'recommended'
attribute 'rs-storage/schedule/hour',
display_name: 'Backup Schedule Hour',
description: "The hour to schedule the backup on. This value should abide by crontab syntax. Use '*' for taking' +
' backups every hour. Example: 23",
recipes: ['rs-storage::schedule'],
required: 'required'
attribute 'rs-storage/schedule/minute',
display_name: 'Backup Schedule Minute',
description: 'The minute to schedule the backup on. This value should abide by crontab syntax. Example: 30',
recipes: ['rs-storage::schedule'],
required: 'required'