-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (26 loc) · 736 Bytes
/
Rakefile
File metadata and controls
30 lines (26 loc) · 736 Bytes
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
task :default => [:up]
desc 'Bring up the Postgres cluster (default)'
task :up => :setup do
sh('chef-client -z -o postgresql-cluster::provision')
end
desc 'Destroy the Postgres cluster'
task :destroy do
sh('chef-client -z -o postgresql-cluster::destroy')
end
task :cleanup => :destroy
desc 'Destroy and rebuild each node of the cluster individually'
task :rolling_rebuild => :setup do
sh('chef-client -z -o postgresql-cluster::rolling_rebuild')
end
desc 'Chef setup tasks'
task :setup do
unless Dir.exist?('vendor')
sh('berks install --quiet')
Dir.mkdir('vendor')
sh('berks vendor vendor/ --quiet')
else
sh('berks update --quiet')
sh('rm -rf vendor/*')
sh('berks vendor vendor/ --quiet')
end
end