chef_backup 0.0.1.dev.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.kitchen.yml +30 -0
- data/.rubocop.yml +17 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Guardfile +22 -0
- data/LICENSE +13 -0
- data/README.md +33 -0
- data/Rakefile +44 -0
- data/chef_backup.gemspec +33 -0
- data/lib/chef_backup.rb +12 -0
- data/lib/chef_backup/config.rb +57 -0
- data/lib/chef_backup/data_map.rb +44 -0
- data/lib/chef_backup/exceptions.rb +12 -0
- data/lib/chef_backup/helpers.rb +159 -0
- data/lib/chef_backup/logger.rb +39 -0
- data/lib/chef_backup/runner.rb +136 -0
- data/lib/chef_backup/strategy.rb +29 -0
- data/lib/chef_backup/strategy/backup/custom.rb +7 -0
- data/lib/chef_backup/strategy/backup/ebs.rb +28 -0
- data/lib/chef_backup/strategy/backup/lvm.rb +42 -0
- data/lib/chef_backup/strategy/backup/object.rb +29 -0
- data/lib/chef_backup/strategy/backup/tar.rb +165 -0
- data/lib/chef_backup/strategy/restore/custom.rb +0 -0
- data/lib/chef_backup/strategy/restore/ebs.rb +0 -0
- data/lib/chef_backup/strategy/restore/lvm.rb +0 -0
- data/lib/chef_backup/strategy/restore/object.rb +0 -0
- data/lib/chef_backup/strategy/restore/tar.rb +125 -0
- data/lib/chef_backup/version.rb +4 -0
- data/spec/fixtures/chef-server-running.json +584 -0
- data/spec/spec_helper.rb +103 -0
- data/spec/unit/data_map_spec.rb +59 -0
- data/spec/unit/helpers_spec.rb +88 -0
- data/spec/unit/runner_spec.rb +185 -0
- data/spec/unit/shared_examples/helpers.rb +20 -0
- data/spec/unit/strategy/backup/lvm_spec.rb +0 -0
- data/spec/unit/strategy/backup/shared_examples/backup.rb +74 -0
- data/spec/unit/strategy/backup/tar_spec.rb +280 -0
- data/spec/unit/strategy/restore/lvm_spec.rb +0 -0
- data/spec/unit/strategy/restore/shared_examples/restore.rb +84 -0
- data/spec/unit/strategy/restore/tar_spec.rb +238 -0
- data/spec/unit/strategy_spec.rb +36 -0
- metadata +253 -0
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,125 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
require 'pathname'
|
3
|
+
require 'forwardable'
|
4
|
+
require 'chef/mixin/deep_merge'
|
5
|
+
|
6
|
+
# rubocop:disable IndentationWidth
|
7
|
+
module ChefBackup
|
8
|
+
module Strategy
|
9
|
+
# Basic Tar Restore Strategy
|
10
|
+
class TarRestore
|
11
|
+
# rubocop:enable IndentationWidth
|
12
|
+
include ChefBackup::Helpers
|
13
|
+
include ChefBackup::Exceptions
|
14
|
+
include Chef::Mixin::DeepMerge
|
15
|
+
extend Forwardable
|
16
|
+
|
17
|
+
attr_accessor :tarball_path
|
18
|
+
|
19
|
+
def_delegators :@log, :log
|
20
|
+
|
21
|
+
def initialize(path)
|
22
|
+
@tarball_path = path
|
23
|
+
@log = ChefBackup::Logger.logger(private_chef['backup']['logfile'] || nil)
|
24
|
+
end
|
25
|
+
|
26
|
+
def restore
|
27
|
+
log 'Restoring Chef Server from backup'
|
28
|
+
cleanse_chef_server(config['agree_to_cleanse'])
|
29
|
+
restore_configs
|
30
|
+
restore_services unless frontend?
|
31
|
+
touch_sentinel
|
32
|
+
reconfigure_server
|
33
|
+
update_config
|
34
|
+
import_db if restore_db_dump?
|
35
|
+
start_chef_server
|
36
|
+
cleanup
|
37
|
+
log 'Restoration Completed!'
|
38
|
+
end
|
39
|
+
|
40
|
+
def manifest
|
41
|
+
@manifest ||= begin
|
42
|
+
manifest = File.expand_path(File.join(ChefBackup::Config['restore_dir'],
|
43
|
+
'manifest.json'))
|
44
|
+
ensure_file!(manifest, InvalidManifest, "#{manifest} not found")
|
45
|
+
JSON.parse(File.read(manifest))
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def restore_db_dump?
|
50
|
+
manifest['services']['postgresql']['pg_dump_success'] && !frontend?
|
51
|
+
rescue NoMethodError
|
52
|
+
false
|
53
|
+
end
|
54
|
+
|
55
|
+
def import_db
|
56
|
+
start_service('postgresql')
|
57
|
+
sql_file = File.join(ChefBackup::Config['restore_dir'],
|
58
|
+
"chef_backup-#{manifest['backup_time']}.sql")
|
59
|
+
ensure_file!(sql_file, InvalidDatabaseDump, "#{sql_file} not found")
|
60
|
+
|
61
|
+
cmd = ['/opt/opscode/embedded/bin/chpst',
|
62
|
+
"-u #{manifest['services']['postgresql']['username']}",
|
63
|
+
'/opt/opscode/embedded/bin/psql',
|
64
|
+
"-U #{manifest['services']['postgresql']['username']}",
|
65
|
+
'-d opscode_chef',
|
66
|
+
"< #{sql_file}"
|
67
|
+
].join(' ')
|
68
|
+
log 'Importing Database dump'
|
69
|
+
shell_out!(cmd)
|
70
|
+
end
|
71
|
+
|
72
|
+
def restore_services
|
73
|
+
manifest.key?('services') && manifest['services'].keys.each do |service|
|
74
|
+
restore_data(:services, service)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def restore_configs
|
79
|
+
manifest.key?('configs') && manifest['configs'].keys.each do |config|
|
80
|
+
restore_data(:configs, config)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def touch_sentinel
|
85
|
+
dir = '/var/opt/opscode'
|
86
|
+
sentinel = File.join(dir, 'bootstrapped')
|
87
|
+
FileUtils.mkdir_p(dir) unless File.directory?(dir)
|
88
|
+
File.open(sentinel, 'w') { |file| file.write 'bootstrapped!' }
|
89
|
+
end
|
90
|
+
|
91
|
+
def restore_data(type, name)
|
92
|
+
source = File.expand_path(File.join(config['restore_dir'],
|
93
|
+
manifest[type.to_s][name]['data_dir']))
|
94
|
+
destination = manifest[type.to_s][name]['data_dir']
|
95
|
+
FileUtils.mkdir_p(destination) unless File.directory?(destination)
|
96
|
+
cmd = "rsync -chaz --delete #{source}/ #{destination}"
|
97
|
+
log "Restoring the #{name} data"
|
98
|
+
shell_out!(cmd)
|
99
|
+
end
|
100
|
+
|
101
|
+
def backup_name
|
102
|
+
@backup_name ||= Pathname.new(tarball_path).basename.sub_ext('').to_s
|
103
|
+
end
|
104
|
+
|
105
|
+
def reconfigure_server
|
106
|
+
log 'Reconfiguring the Chef Server'
|
107
|
+
shell_out('chef-server-ctl reconfigure')
|
108
|
+
end
|
109
|
+
|
110
|
+
def cleanse_chef_server(agree)
|
111
|
+
log 'Cleaning up any old files'
|
112
|
+
shell_out!("chef-server-ctl cleanse #{agree || ''}")
|
113
|
+
end
|
114
|
+
|
115
|
+
def running_config
|
116
|
+
@running_config ||=
|
117
|
+
JSON.parse(File.read('/etc/opscode/chef-server-running.json')) || {}
|
118
|
+
end
|
119
|
+
|
120
|
+
def update_config
|
121
|
+
ChefBackup::Config.config = deep_merge(config.dup, running_config)
|
122
|
+
end
|
123
|
+
end # Tar
|
124
|
+
end # Strategy
|
125
|
+
end # ChefBackup
|
@@ -0,0 +1,584 @@
|
|
1
|
+
{
|
2
|
+
"private_chef": {
|
3
|
+
"backup": {
|
4
|
+
"strategy": "tar"
|
5
|
+
},
|
6
|
+
"api_version": "11.1.0",
|
7
|
+
"flavor": "ec",
|
8
|
+
"notification_email": "pc-default@opscode.com",
|
9
|
+
"from_email": "\"Opscode\" <donotreply@opscode.com>",
|
10
|
+
"role": "backend",
|
11
|
+
"user": {
|
12
|
+
"username": "opscode",
|
13
|
+
"shell": "/bin/sh",
|
14
|
+
"home": "/opt/opscode/embedded"
|
15
|
+
},
|
16
|
+
"couchdb": {
|
17
|
+
"enable": true,
|
18
|
+
"ha": true,
|
19
|
+
"dir": "/var/opt/opscode/couchdb",
|
20
|
+
"data_dir": "/var/opt/opscode/drbd/data/couchdb",
|
21
|
+
"log_directory": "/var/log/opscode/couchdb",
|
22
|
+
"log_rotation": {
|
23
|
+
"file_maxbytes": 104857600,
|
24
|
+
"num_to_keep": 10
|
25
|
+
},
|
26
|
+
"port": 5984,
|
27
|
+
"bind_address": "0.0.0.0",
|
28
|
+
"vip": "127.0.0.1",
|
29
|
+
"max_document_size": "4294967296",
|
30
|
+
"max_attachment_chunk_size": "4294967296",
|
31
|
+
"os_process_timeout": "300000",
|
32
|
+
"max_dbs_open": 104857600,
|
33
|
+
"delayed_commits": "true",
|
34
|
+
"batch_save_size": 1000,
|
35
|
+
"batch_save_interval": 1000,
|
36
|
+
"log_level": "error",
|
37
|
+
"reduce_limit": "false"
|
38
|
+
},
|
39
|
+
"rabbitmq": {
|
40
|
+
"enable": true,
|
41
|
+
"ha": true,
|
42
|
+
"dir": "/var/opt/opscode/rabbitmq",
|
43
|
+
"data_dir": "/var/opt/opscode/drbd/data/rabbitmq",
|
44
|
+
"log_directory": "/var/log/opscode/rabbitmq",
|
45
|
+
"log_rotation": {
|
46
|
+
"file_maxbytes": 104857600,
|
47
|
+
"num_to_keep": 10
|
48
|
+
},
|
49
|
+
"vhost": "/chef",
|
50
|
+
"user": "chef",
|
51
|
+
"password": "76b619fe244a0ce789599672e9256f4ab907b5ed36cf4e8c621fbf65dfc69ee30313b5bd70d181ed71563da90ae3f6d67bff",
|
52
|
+
"reindexer_vhost": "/reindexer",
|
53
|
+
"jobs_vhost": "/jobs",
|
54
|
+
"jobs_user": "jobs",
|
55
|
+
"jobs_password": "5fd81f6f26ce5855238cbd82bc2cbe340981e6aaf1daaa3ecd305dd7aa41281031b1e1ad50bd61fe559120333005c1fb9495",
|
56
|
+
"actions_user": "actions",
|
57
|
+
"actions_password": "c55f6e21d62e9862825d23d795a55d1ca89378982d81053cdc90bf4a1c5a627844993f150ad8087bc55377cb72dc90c0fc36",
|
58
|
+
"actions_vhost": "/analytics",
|
59
|
+
"actions_exchange": "actions",
|
60
|
+
"node_ip_address": "0.0.0.0",
|
61
|
+
"node_port": "5672",
|
62
|
+
"nodename": "rabbit@localhost",
|
63
|
+
"vip": "127.0.0.1",
|
64
|
+
"consumer_id": "hotsauce"
|
65
|
+
},
|
66
|
+
"jetty": {
|
67
|
+
"enable": false,
|
68
|
+
"ha": false,
|
69
|
+
"log_directory": "/var/opt/opscode/opscode-solr/jetty/logs"
|
70
|
+
},
|
71
|
+
"opscode-solr": {
|
72
|
+
"enable": true,
|
73
|
+
"ha": true,
|
74
|
+
"dir": "/var/opt/opscode/opscode-solr",
|
75
|
+
"data_dir": "/var/opt/opscode/drbd/data/opscode-solr",
|
76
|
+
"log_directory": "/var/log/opscode/opscode-solr",
|
77
|
+
"log_rotation": {
|
78
|
+
"file_maxbytes": 104857600,
|
79
|
+
"num_to_keep": 10
|
80
|
+
},
|
81
|
+
"heap_size": 626,
|
82
|
+
"new_size": 39,
|
83
|
+
"java_opts": " -XX:NewSize=39M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC",
|
84
|
+
"url": "http://localhost:8983",
|
85
|
+
"ip_address": "0.0.0.0",
|
86
|
+
"vip": "127.0.0.1",
|
87
|
+
"port": 8983,
|
88
|
+
"ram_buffer_size": 200,
|
89
|
+
"merge_factor": 25,
|
90
|
+
"max_merge_docs": 2147483647,
|
91
|
+
"max_field_length": 100000,
|
92
|
+
"max_commit_docs": 1000,
|
93
|
+
"commit_interval": 60000,
|
94
|
+
"poll_seconds": 20,
|
95
|
+
"command": "java -Xmx626M -Xms626M -XX:NewSize=39M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xloggc:/var/log/opscode/opscode-solr/gclog.log -verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintTenuringDistribution -Dsolr.data.dir=/var/opt/opscode/drbd/data/opscode-solr -Dsolr.solr.home=/var/opt/opscode/opscode-solr/home -server -jar '/var/opt/opscode/opscode-solr/jetty/start.jar'"
|
96
|
+
},
|
97
|
+
"opscode-expander": {
|
98
|
+
"enable": true,
|
99
|
+
"ha": true,
|
100
|
+
"dir": "/var/opt/opscode/opscode-expander",
|
101
|
+
"log_directory": "/var/log/opscode/opscode-expander",
|
102
|
+
"log_rotation": {
|
103
|
+
"file_maxbytes": 104857600,
|
104
|
+
"num_to_keep": 10
|
105
|
+
},
|
106
|
+
"reindexer_log_directory": "/var/log/opscode/opscode-expander-reindexer",
|
107
|
+
"consumer_id": "default",
|
108
|
+
"nodes": 2
|
109
|
+
},
|
110
|
+
"opscode-erchef": {
|
111
|
+
"enable": true,
|
112
|
+
"ha": true,
|
113
|
+
"dir": "/var/opt/opscode/opscode-erchef",
|
114
|
+
"log_directory": "/var/log/opscode/opscode-erchef",
|
115
|
+
"log_rotation": {
|
116
|
+
"file_maxbytes": 104857600,
|
117
|
+
"num_to_keep": 10
|
118
|
+
},
|
119
|
+
"vip": "127.0.0.1",
|
120
|
+
"listen": "127.0.0.1",
|
121
|
+
"port": 8000,
|
122
|
+
"auth_skew": "900",
|
123
|
+
"bulk_fetch_batch_size": "5",
|
124
|
+
"max_cache_size": "10000",
|
125
|
+
"cache_ttl": "3600",
|
126
|
+
"db_pool_size": "20",
|
127
|
+
"udp_socket_pool_size": "20",
|
128
|
+
"couchdb_max_conn": "100",
|
129
|
+
"ibrowse_max_sessions": 256,
|
130
|
+
"ibrowse_max_pipeline_size": 1,
|
131
|
+
"base_resource_url": "host_header",
|
132
|
+
"s3_bucket": "bookshelf",
|
133
|
+
"s3_url_ttl": 900,
|
134
|
+
"s3_parallel_ops_timeout": 5000,
|
135
|
+
"s3_parallel_ops_fanout": 20,
|
136
|
+
"authz_timeout": 1000,
|
137
|
+
"authz_fanout": 20,
|
138
|
+
"root_metric_key": "chefAPI",
|
139
|
+
"depsolver_worker_count": 5,
|
140
|
+
"depsolver_timeout": 5000,
|
141
|
+
"max_request_size": 1000000
|
142
|
+
},
|
143
|
+
"opscode-chef": {
|
144
|
+
"checksum_path": "/var/opt/opscode/drbd/data/opscode-chef/checksum"
|
145
|
+
},
|
146
|
+
"opscode-webui": {
|
147
|
+
"enable": false,
|
148
|
+
"ha": true,
|
149
|
+
"dir": "/var/opt/opscode/opscode-webui",
|
150
|
+
"log_directory": "/var/log/opscode/opscode-webui",
|
151
|
+
"log_rotation": {
|
152
|
+
"file_maxbytes": 104857600,
|
153
|
+
"num_to_keep": 10
|
154
|
+
},
|
155
|
+
"environment": "privatechef",
|
156
|
+
"url": "http://127.0.0.1:9462",
|
157
|
+
"listen": "127.0.0.1:9462",
|
158
|
+
"vip": "127.0.0.1",
|
159
|
+
"port": 9462,
|
160
|
+
"backlog": 1024,
|
161
|
+
"tcp_nodelay": true,
|
162
|
+
"worker_timeout": 3600,
|
163
|
+
"validation_client_name": "chef",
|
164
|
+
"umask": "0022",
|
165
|
+
"worker_processes": 2,
|
166
|
+
"session_key": "_sandbox_session",
|
167
|
+
"cookie_domain": "all",
|
168
|
+
"cookie_secret": "138af2876602f3ee507de496e86fd04d97365949aa6dc986b349c95782246f79cb9d1ed5b3305710cfe79cfd6c3d36328f66"
|
169
|
+
},
|
170
|
+
"oc-chef-pedant": {
|
171
|
+
"dir": "/var/opt/opscode/oc-chef-pedant",
|
172
|
+
"log_directory": "/var/log/opscode/oc-chef-pedant",
|
173
|
+
"log_http_requests": true,
|
174
|
+
"log_rotation": {
|
175
|
+
"file_maxbytes": 104857600,
|
176
|
+
"num_to_keep": 10
|
177
|
+
},
|
178
|
+
"debug_org_creation": false
|
179
|
+
},
|
180
|
+
"redis_lb": {
|
181
|
+
"enable": true,
|
182
|
+
"ha": true,
|
183
|
+
"dir": "/var/opt/opscode/redis_lb",
|
184
|
+
"data_dir": "/var/opt/opscode/drbd/data/redis_lb",
|
185
|
+
"log_directory": "/var/log/opscode/redis_lb",
|
186
|
+
"log_rotation": {
|
187
|
+
"file_maxbytes": 1000000,
|
188
|
+
"num_to_keep": 10
|
189
|
+
},
|
190
|
+
"port": "16379",
|
191
|
+
"bind": "127.0.0.1",
|
192
|
+
"vip": "127.0.0.1",
|
193
|
+
"keepalive": "60",
|
194
|
+
"timeout": "300",
|
195
|
+
"loglevel": "notice",
|
196
|
+
"databases": "16",
|
197
|
+
"appendonly": "no",
|
198
|
+
"appendfsync": "always",
|
199
|
+
"activerehashing": "no",
|
200
|
+
"aof_rewrite_percent": "50",
|
201
|
+
"aof_rewrite_min_size": "16mb",
|
202
|
+
"maxmemory": "8m",
|
203
|
+
"maxmemory_policy": "noeviction",
|
204
|
+
"save_frequency": {
|
205
|
+
"900": "1",
|
206
|
+
"300": "10",
|
207
|
+
"60": "1000"
|
208
|
+
},
|
209
|
+
"listen": "0.0.0.0"
|
210
|
+
},
|
211
|
+
"lb": {
|
212
|
+
"enable": true,
|
213
|
+
"vip": "127.0.0.1",
|
214
|
+
"api_fqdn": "api.opscode.kryptonite",
|
215
|
+
"web_ui_fqdn": "api.opscode.kryptonite",
|
216
|
+
"cache_cookbook_files": false,
|
217
|
+
"debug": false,
|
218
|
+
"upstream": {
|
219
|
+
"opscode-erchef": [
|
220
|
+
"127.0.0.1"
|
221
|
+
],
|
222
|
+
"opscode-account": [
|
223
|
+
"127.0.0.1"
|
224
|
+
],
|
225
|
+
"opscode-webui": [
|
226
|
+
"127.0.0.1"
|
227
|
+
],
|
228
|
+
"oc_bifrost": [
|
229
|
+
"127.0.0.1"
|
230
|
+
],
|
231
|
+
"opscode-solr": [
|
232
|
+
"127.0.0.1"
|
233
|
+
],
|
234
|
+
"bookshelf": [
|
235
|
+
"127.0.0.1"
|
236
|
+
]
|
237
|
+
},
|
238
|
+
"redis_connection_timeout": 1000,
|
239
|
+
"redis_keepalive_timeout": 2000,
|
240
|
+
"redis_connection_pool_size": 250,
|
241
|
+
"maint_refresh_interval": 600,
|
242
|
+
"ban_refresh_interval": 600,
|
243
|
+
"chef_min_version": 10,
|
244
|
+
"chef_max_version": 11,
|
245
|
+
"xdl_defaults": {
|
246
|
+
"503_mode": false,
|
247
|
+
"couchdb_containers": true,
|
248
|
+
"couchdb_groups": true
|
249
|
+
},
|
250
|
+
"ha": true
|
251
|
+
},
|
252
|
+
"lb_internal": {
|
253
|
+
"enable": true,
|
254
|
+
"vip": "127.0.0.1",
|
255
|
+
"chef_port": 9680,
|
256
|
+
"account_port": 9685,
|
257
|
+
"oc_bifrost_port": 9683
|
258
|
+
},
|
259
|
+
"nginx": {
|
260
|
+
"enable": true,
|
261
|
+
"ha": true,
|
262
|
+
"dir": "/var/opt/opscode/nginx",
|
263
|
+
"log_directory": "/var/log/opscode/nginx",
|
264
|
+
"log_rotation": {
|
265
|
+
"file_maxbytes": 104857600,
|
266
|
+
"num_to_keep": 10
|
267
|
+
},
|
268
|
+
"ssl_port": 443,
|
269
|
+
"enable_non_ssl": false,
|
270
|
+
"non_ssl_port": 80,
|
271
|
+
"x_forwarded_proto": "https",
|
272
|
+
"server_name": "api.opscode.kryptonite",
|
273
|
+
"url": "https://api.opscode.kryptonite",
|
274
|
+
"ssl_protocols": "SSLv3 TLSv1",
|
275
|
+
"ssl_ciphers": "RC4-SHA:RC4-MD5:RC4:RSA:HIGH:MEDIUM:!LOW:!kEDH:!aNULL:!ADH:!eNULL:!EXP:!SSLv2:!SEED:!CAMELLIA:!PSK",
|
276
|
+
"ssl_certificate": "/var/opt/opscode/nginx/ca/api.opscode.kryptonite.crt",
|
277
|
+
"ssl_certificate_key": "/var/opt/opscode/nginx/ca/api.opscode.kryptonite.key",
|
278
|
+
"ssl_country_name": "US",
|
279
|
+
"ssl_state_name": "WA",
|
280
|
+
"ssl_locality_name": "Seattle",
|
281
|
+
"ssl_company_name": "YouCorp",
|
282
|
+
"ssl_organizational_unit_name": "Operations",
|
283
|
+
"ssl_email_address": "you@example.com",
|
284
|
+
"worker_processes": 2,
|
285
|
+
"worker_connections": 10240,
|
286
|
+
"sendfile": "on",
|
287
|
+
"tcp_nopush": "on",
|
288
|
+
"tcp_nodelay": "on",
|
289
|
+
"gzip": "on",
|
290
|
+
"gzip_http_version": "1.0",
|
291
|
+
"gzip_comp_level": "2",
|
292
|
+
"gzip_proxied": "any",
|
293
|
+
"gzip_types": [
|
294
|
+
"text/plain",
|
295
|
+
"text/css",
|
296
|
+
"application/x-javascript",
|
297
|
+
"text/xml",
|
298
|
+
"application/xml",
|
299
|
+
"application/xml+rss",
|
300
|
+
"text/javascript",
|
301
|
+
"application/json"
|
302
|
+
],
|
303
|
+
"keepalive_timeout": 65,
|
304
|
+
"client_max_body_size": "250m",
|
305
|
+
"cache_max_size": "5000m",
|
306
|
+
"enable_ipv6": false
|
307
|
+
},
|
308
|
+
"postgresql": {
|
309
|
+
"version": "9.2",
|
310
|
+
"enable": true,
|
311
|
+
"ha": true,
|
312
|
+
"dir": "/var/opt/opscode/postgresql/9.2",
|
313
|
+
"data_dir": "/var/opt/opscode/drbd/data/postgresql_9.2",
|
314
|
+
"log_directory": "/var/log/opscode/postgresql/9.2",
|
315
|
+
"log_rotation": {
|
316
|
+
"file_maxbytes": 104857600,
|
317
|
+
"num_to_keep": 10
|
318
|
+
},
|
319
|
+
"username": "opscode-pgsql",
|
320
|
+
"shell": "/bin/sh",
|
321
|
+
"home": "/var/opt/opscode/postgresql",
|
322
|
+
"user_path": "/opt/opscode/embedded/bin:/opt/opscode/bin:$PATH",
|
323
|
+
"sql_user": "opscode_chef",
|
324
|
+
"sql_password": "a3852363df1bc9cd0ff2bf162242d293d28a63b12be73dbfa3766e1c304fd42e97c7fc38a62e95782b012792cbba4e7cff2a",
|
325
|
+
"sql_ro_user": "opscode_chef_ro",
|
326
|
+
"sql_ro_password": "467f2a886d52faf054947bc6869c624ae229d9a367bdb52c90b9d1c9fcfb1adda7b68c930464c0938e8d7ac17cc90fd42c77",
|
327
|
+
"vip": "127.0.0.1",
|
328
|
+
"port": 5432,
|
329
|
+
"listen_address": "*",
|
330
|
+
"max_connections": 350,
|
331
|
+
"md5_auth_cidr_addresses": [
|
332
|
+
"0.0.0.0/0"
|
333
|
+
],
|
334
|
+
"shmmax": 17179869184,
|
335
|
+
"shmall": 4194304,
|
336
|
+
"shared_buffers": "626MB",
|
337
|
+
"work_mem": "8MB",
|
338
|
+
"effective_cache_size": "128MB",
|
339
|
+
"checkpoint_segments": 3,
|
340
|
+
"checkpoint_timeout": "5min",
|
341
|
+
"checkpoint_completion_target": 0.5,
|
342
|
+
"checkpoint_warning": "30s"
|
343
|
+
},
|
344
|
+
"oc_bifrost": {
|
345
|
+
"enable": true,
|
346
|
+
"ha": true,
|
347
|
+
"dir": "/var/opt/opscode/oc_bifrost",
|
348
|
+
"log_directory": "/var/log/opscode/oc_bifrost",
|
349
|
+
"log_rotation": {
|
350
|
+
"file_maxbytes": 104857600,
|
351
|
+
"num_to_keep": 10
|
352
|
+
},
|
353
|
+
"vip": "127.0.0.1",
|
354
|
+
"listen": "127.0.0.1",
|
355
|
+
"port": 9463,
|
356
|
+
"superuser_id": "ef82513b04d7281f5c3657a7827b788b",
|
357
|
+
"db_pool_size": "20",
|
358
|
+
"sql_user": "bifrost",
|
359
|
+
"sql_password": "c8a50853c658070a591545035f67a7849d37228d2fe6a877b7d540b0298ad2340b3fa99de48be19ab35410a9ef99ffe49ed9",
|
360
|
+
"sql_ro_user": "bifrost_ro",
|
361
|
+
"sql_ro_password": "95cfe03e796a0fe700254e6761de846e7f530c526c2425f17691e9c334ff88defe4389bdac70a0e36f0a0e29ba19695d90d9",
|
362
|
+
"extended_perf_log": true
|
363
|
+
},
|
364
|
+
"oc_chef_authz": {
|
365
|
+
"http_init_count": 25,
|
366
|
+
"http_max_count": 100,
|
367
|
+
"http_cull_interval": "{1, min}",
|
368
|
+
"http_max_age": "{70, sec}",
|
369
|
+
"http_max_connection_duration": "{70, sec}",
|
370
|
+
"ibrowse_options": "[{connect_timeout, 5000}]"
|
371
|
+
},
|
372
|
+
"bookshelf": {
|
373
|
+
"enable": true,
|
374
|
+
"ha": true,
|
375
|
+
"dir": "/var/opt/opscode/bookshelf",
|
376
|
+
"data_dir": "/var/opt/opscode/drbd/data/bookshelf",
|
377
|
+
"log_directory": "/var/log/opscode/bookshelf",
|
378
|
+
"log_rotation": {
|
379
|
+
"file_maxbytes": 104857600,
|
380
|
+
"num_to_keep": 10
|
381
|
+
},
|
382
|
+
"vip": "backend1.opscode.kryptonite",
|
383
|
+
"listen": "0.0.0.0",
|
384
|
+
"port": 4321,
|
385
|
+
"stream_download": true,
|
386
|
+
"access_key_id": "09a81344e4b0cb0eb9a710f4c70b641cff6f4382",
|
387
|
+
"secret_access_key": "db005c3aaf86ce39176e73fd7d57593ae67c2b35ca1f757211d1a817124ef013a041408e1e1b730c",
|
388
|
+
"external_url": "host_header"
|
389
|
+
},
|
390
|
+
"opscode-certificate": {
|
391
|
+
"enable": true,
|
392
|
+
"ha": true,
|
393
|
+
"dir": "/var/opt/opscode/opscode-certificate",
|
394
|
+
"log_directory": "/var/log/opscode/opscode-certificate",
|
395
|
+
"log_rotation": {
|
396
|
+
"file_maxbytes": 104857600,
|
397
|
+
"num_to_keep": 10
|
398
|
+
},
|
399
|
+
"port": 5140,
|
400
|
+
"vip": "127.0.0.1",
|
401
|
+
"num_workers": "2",
|
402
|
+
"num_certificates_per_worker": "50"
|
403
|
+
},
|
404
|
+
"opscode-org-creator": {
|
405
|
+
"enable": true,
|
406
|
+
"ha": true,
|
407
|
+
"dir": "/var/opt/opscode/opscode-org-creator",
|
408
|
+
"log_directory": "/var/log/opscode/opscode-org-creator",
|
409
|
+
"log_rotation": {
|
410
|
+
"file_maxbytes": 104857600,
|
411
|
+
"num_to_keep": 10
|
412
|
+
},
|
413
|
+
"ready_org_depth": 10,
|
414
|
+
"max_workers": 1,
|
415
|
+
"create_wait_ms": 30000,
|
416
|
+
"create_splay_ms": 25000,
|
417
|
+
"port": 4369
|
418
|
+
},
|
419
|
+
"dark_launch": {
|
420
|
+
"quick_start": false,
|
421
|
+
"new_theme": true,
|
422
|
+
"private-chef": true,
|
423
|
+
"sql_users": true,
|
424
|
+
"add_type_and_bag_to_items": true,
|
425
|
+
"reporting": true,
|
426
|
+
"actions": false
|
427
|
+
},
|
428
|
+
"opscode-account": {
|
429
|
+
"enable": true,
|
430
|
+
"ha": true,
|
431
|
+
"dir": "/var/opt/opscode/opscode-account",
|
432
|
+
"log_directory": "/var/log/opscode/opscode-account",
|
433
|
+
"log_rotation": {
|
434
|
+
"file_maxbytes": 104857600,
|
435
|
+
"num_to_keep": 10
|
436
|
+
},
|
437
|
+
"proxy_user": "pivotal",
|
438
|
+
"session_secret_key": "4bd0ee0680f2df4ecbb1a30f2e7bd8bf2dac351c099a0625a90c528fbda52c1e2005f345159d62457dd9858663c562c424f8",
|
439
|
+
"environment": "privatechef",
|
440
|
+
"vip": "127.0.0.1",
|
441
|
+
"port": 9465,
|
442
|
+
"url": "http://127.0.0.1:9465",
|
443
|
+
"listen": "127.0.0.1:9465",
|
444
|
+
"backlog": 1024,
|
445
|
+
"tcp_nodelay": true,
|
446
|
+
"worker_timeout": 3600,
|
447
|
+
"validation_client_name": "chef",
|
448
|
+
"umask": "0022",
|
449
|
+
"worker_processes": 4
|
450
|
+
},
|
451
|
+
"opscode-chef-mover": {
|
452
|
+
"enable": true,
|
453
|
+
"ha": false,
|
454
|
+
"dir": "/var/opt/opscode/opscode-chef-mover",
|
455
|
+
"data_dir": "/var/opt/opscode/opscode-chef-mover/data",
|
456
|
+
"log_directory": "/var/log/opscode/opscode-chef-mover",
|
457
|
+
"log_rotation": {
|
458
|
+
"file_maxbytes": 1073741824,
|
459
|
+
"num_to_keep": 10
|
460
|
+
},
|
461
|
+
"bulk_fetch_batch_size": "5",
|
462
|
+
"max_cache_size": "10000",
|
463
|
+
"cache_ttl": "3600",
|
464
|
+
"db_pool_size": "5",
|
465
|
+
"ibrowse_max_sessions": 256,
|
466
|
+
"ibrowse_max_pipeline_size": 1
|
467
|
+
},
|
468
|
+
"bootstrap": {
|
469
|
+
"enable": false
|
470
|
+
},
|
471
|
+
"estatsd": {
|
472
|
+
"enable": true,
|
473
|
+
"dir": "/var/opt/opscode/estatsd",
|
474
|
+
"log_directory": "/var/log/opscode/estatsd",
|
475
|
+
"vip": "127.0.0.1",
|
476
|
+
"port": 9466
|
477
|
+
},
|
478
|
+
"drbd": {
|
479
|
+
"enable": true,
|
480
|
+
"dir": "/var/opt/opscode/drbd",
|
481
|
+
"data_dir": "/var/opt/opscode/drbd/data",
|
482
|
+
"sync_rate": "40M",
|
483
|
+
"shared_secret": "f0da25577477516bd833d7c706329dddc128a45ba89ef75fd4a2222d58b3",
|
484
|
+
"device": "/dev/drbd0",
|
485
|
+
"disk": "/dev/opscode/drbd",
|
486
|
+
"flexible_meta_disk": "internal",
|
487
|
+
"primary": {
|
488
|
+
"fqdn": "backend1.opscode.kryptonite",
|
489
|
+
"ip": "33.33.34.5",
|
490
|
+
"port": 7788
|
491
|
+
},
|
492
|
+
"secondary": {
|
493
|
+
"fqdn": "backend2.opscode.kryptonite",
|
494
|
+
"ip": "33.33.34.6",
|
495
|
+
"port": 7788
|
496
|
+
},
|
497
|
+
"version": "8.4.3",
|
498
|
+
"ipv6_on": false
|
499
|
+
},
|
500
|
+
"keepalived": {
|
501
|
+
"enable": true,
|
502
|
+
"dir": "/var/opt/opscode/keepalived",
|
503
|
+
"ipv6_on": false,
|
504
|
+
"log_directory": "/var/log/opscode/keepalived",
|
505
|
+
"log_rotation": {
|
506
|
+
"file_maxbytes": 104857600,
|
507
|
+
"num_to_keep": 10
|
508
|
+
},
|
509
|
+
"smtp_server": "127.0.0.1",
|
510
|
+
"smtp_connect_timeout": "30",
|
511
|
+
"vrrp_sync_group": "PC_GROUP",
|
512
|
+
"vrrp_sync_instance": "PC_VI",
|
513
|
+
"vrrp_instance_state": "BACKUP",
|
514
|
+
"vrrp_instance_interface": "eth1",
|
515
|
+
"vrrp_instance_virtual_router_id": "1",
|
516
|
+
"vrrp_instance_priority": "100",
|
517
|
+
"vrrp_instance_advert_int": "1",
|
518
|
+
"vrrp_instance_password": "018f9cc7f33377d8b54c70494f5c433255f581b2d9e679762ff83dab83ee5bfac109ed8e9af2efccae041438cf73b0ad6a83",
|
519
|
+
"vrrp_instance_ipaddress": "33.33.33.20",
|
520
|
+
"vrrp_instance_ipaddress_dev": "eth1",
|
521
|
+
"vrrp_instance_vrrp_unicast_bind": "33.33.33.21",
|
522
|
+
"vrrp_instance_vrrp_unicast_peer": "33.33.33.22",
|
523
|
+
"vrrp_instance_preempt_delay": 30,
|
524
|
+
"vrrp_instance_nopreempt": true,
|
525
|
+
"service_posthooks": {
|
526
|
+
"rabbitmq": "/opt/opscode/bin/wait-for-rabbit"
|
527
|
+
}
|
528
|
+
},
|
529
|
+
"ldap": {
|
530
|
+
},
|
531
|
+
"upgrades": {
|
532
|
+
"dir": "/var/opt/opscode/upgrades"
|
533
|
+
},
|
534
|
+
"lb-internal": {
|
535
|
+
},
|
536
|
+
"topology": "ha",
|
537
|
+
"servers": {
|
538
|
+
"backend1.opscode.kryptonite": {
|
539
|
+
"ipaddress": "33.33.33.21",
|
540
|
+
"cluster_ipaddress": "33.33.34.5",
|
541
|
+
"role": "backend",
|
542
|
+
"bootstrap": true,
|
543
|
+
"peer_ipaddress": "33.33.33.22"
|
544
|
+
},
|
545
|
+
"backend2.opscode.kryptonite": {
|
546
|
+
"ipaddress": "33.33.33.22",
|
547
|
+
"cluster_ipaddress": "33.33.34.6",
|
548
|
+
"role": "backend",
|
549
|
+
"bootstrap": false
|
550
|
+
},
|
551
|
+
"frontend1.opscode.kryptonite": {
|
552
|
+
"ipaddress": "33.33.33.23",
|
553
|
+
"role": "frontend"
|
554
|
+
}
|
555
|
+
},
|
556
|
+
"backend_vips": {
|
557
|
+
"fqdn": "backend.opscode.kryptonite",
|
558
|
+
"ipaddress": "33.33.33.20",
|
559
|
+
"device": "eth1",
|
560
|
+
"heartbeat_device": "eth2",
|
561
|
+
"ipaddress_with_netmask": "33.33.33.20"
|
562
|
+
},
|
563
|
+
"logs": {
|
564
|
+
"log_retention": {
|
565
|
+
},
|
566
|
+
"log_rotation": {
|
567
|
+
}
|
568
|
+
}
|
569
|
+
},
|
570
|
+
"run_list": [
|
571
|
+
"recipe[private-chef]"
|
572
|
+
],
|
573
|
+
"runit": {
|
574
|
+
"sv_bin": "/opt/opscode/embedded/bin/sv",
|
575
|
+
"chpst_bin": "/opt/opscode/embedded/bin/chpst",
|
576
|
+
"service_dir": "/opt/opscode/service",
|
577
|
+
"sv_dir": "/opt/opscode/sv",
|
578
|
+
"lsb_init_dir": "/opt/opscode/init",
|
579
|
+
"executable": "/sbin/runit",
|
580
|
+
"start": "start runsvdir",
|
581
|
+
"stop": "stop runsvdir",
|
582
|
+
"reload": "reload runsvdir"
|
583
|
+
}
|
584
|
+
}
|