This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
/
node.rb
96 lines (95 loc) · 2.53 KB
/
node.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
# frozen_string_literal: true
# rubocop:disable Metrics/MethodLength
def node(override = {})
item = {
lsb: {
codename: 'trusty'
},
nginx: {
version: '1.4.6',
client_body_timeout: '30'
},
deploy: {
dummy_project: {
database: {
adapter: 'postgresql',
username: 'dbuser',
password: '03c1bc98cdd5eb2f9c75',
host: 'dummy-project.c298jfowejf.us-west-2.rds.amazon.com',
database: 'dummydb',
reaping_frequency: 10
},
scm: {
adapter: 'git',
user: 'dummy',
password: '3aa161d358a167204502',
revision: 'master',
ssh_key: '--- SSH KEY ---',
repository: 'git@git.example.com:repo/project.git',
enable_submodules: false,
ssh_wrapper: 'ssh-wrap',
submodules: false,
wrong_param: 'bad'
},
appserver: {
adapter: 'unicorn',
delay: 3
},
webserver: {
adapter: 'nginx',
client_max_body_size: '125m',
dhparams: '--- DH PARAMS ---'
},
framework: {
adapter: 'rails',
migrate: false
},
worker: {
adapter: 'sidekiq',
require: 'lorem_ipsum.rb'
},
create_dirs_before_symlink: %(../shared/test),
purge_before_symlink: %w(public/test),
symlinks: { 'test' => 'public/test' }
}
},
defaults: {
deploy: {
symlinks: {
system: 'public/system',
assets: 'public/assets',
cache: 'tmp/cache',
pids: 'tmp/pids',
log: 'log'
},
create_dirs_before_symlink: %w(tmp public config ../../shared/cache ../../shared/assets),
purge_before_symlink: %w(log tmp/cache tmp/pids public/system public/assets)
},
scm: {
remove_scm_files: true
},
appserver: {
adapter: 'unicorn',
worker_processes: 8
},
webserver: {
adapter: 'nginx',
keepalive_timeout: '15'
},
framework: {
adapter: 'rails',
migration_command: 'rake db:migrate',
assets_precompile: true,
assets_precompilation_command: 'bundle exec rake assets:precompile'
},
worker: {
adapter: 'null',
process_count: 2,
syslog: true,
config: { 'concurency' => 5, 'verbose' => false, 'queues' => ['default'] }
}
}
}.merge(override)
JSON.parse(item.to_json)
end
# rubocop:enable Metrics/MethodLength