Commit 427113774d1475364153564c9c70d2ceb6915e3a
Committed by
Rafael Manzo
1 parent
caa8d6df
Exists in
mezuro_cookbook
Adding db config kalibro_configurations prezento
Signed-off-by: Diego Araújo <diegoamc90@gmail.com>
Showing
2 changed files
with
45 additions
and
14 deletions
Show diff stats
cookbooks/mezuro/recipes/kalibro_configurations.rb
... | ... | @@ -5,16 +5,31 @@ execute 'download:mezuro' do |
5 | 5 | user 'root' |
6 | 6 | end |
7 | 7 | |
8 | -package 'kalibro-configurations' | |
9 | - | |
10 | -service 'kalibro-configurations' do | |
11 | - action [:enable, :start] | |
12 | -end | |
13 | - | |
14 | 8 | template '/etc/mezuro/kalibro-configurations/database.yml' do |
15 | 9 | source 'kalibro_configurations/database.yml.erb' |
16 | 10 | owner 'kalibro_configurations' |
17 | 11 | group 'kalibro_configurations' |
18 | 12 | mode '0600' |
19 | - notifies :restart, 'service[kalibro-configurations]' | |
13 | + notifies :restart, 'service[kalibro-configurations.target]' | |
14 | +end | |
15 | + | |
16 | +package 'kalibro-configurations' | |
17 | + | |
18 | +service 'kalibro-configurations.target' do | |
19 | + action [:enable, :start] | |
20 | +end | |
21 | + | |
22 | +CONFIGURATIONS_DIR='/usr/share/mezuro/kalibro-configurations' | |
23 | + | |
24 | +execute 'kalibro-configurations:schema' do | |
25 | + command 'RAILS_ENV=production bundle exec rake db:schema:load' | |
26 | + cwd CONFIGURATIONS_DIR | |
27 | + user 'kalibro_configurations' | |
28 | +end | |
29 | + | |
30 | +execute 'kalibro-configurations:migrate' do | |
31 | + command 'RAILS_ENV=production bundle exec rake db:migrate' | |
32 | + cwd CONFIGURATIONS_DIR | |
33 | + user 'kalibro_configurations' | |
34 | + notifies :restart, 'service[kalibro-configurations.target]' | |
20 | 35 | end | ... | ... |
cookbooks/mezuro/recipes/prezento.rb
1 | +# change this to COPR repo | |
1 | 2 | execute 'download:mezuro' do |
2 | 3 | command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo' |
3 | 4 | cwd '/etc/yum.repos.d' |
4 | 5 | user 'root' |
5 | 6 | end |
6 | 7 | |
7 | -package 'prezento' | |
8 | - | |
9 | -service 'prezento' do | |
10 | - action [:enable, :start] | |
11 | -end | |
12 | - | |
13 | 8 | template '/etc/mezuro/prezento/database.yml' do |
14 | 9 | source 'prezento/database.yml.erb' |
15 | 10 | owner 'prezento' |
16 | 11 | group 'prezento' |
17 | 12 | mode '0600' |
18 | - notifies :restart, 'service[prezento]' | |
13 | + notifies :restart, 'service[prezento.target]' | |
14 | +end | |
15 | + | |
16 | +package 'prezento' | |
17 | + | |
18 | +service 'prezento.target' do | |
19 | + action [:enable, :start] | |
20 | +end | |
21 | + | |
22 | +PREZENTO_DIR='/usr/share/mezuro/prezento' | |
23 | + | |
24 | +execute 'prezento:schema' do | |
25 | + command 'RAILS_ENV=production bundle exec rake db:schema:load' | |
26 | + cwd PREZENTO_DIR | |
27 | + user 'prezento' | |
28 | +end | |
29 | + | |
30 | +execute 'prezento:migrate' do | |
31 | + command 'RAILS_ENV=production bundle exec rake db:migrate' | |
32 | + cwd PREZENTO_DIR | |
33 | + user 'prezento' | |
34 | + notifies :restart, 'service[prezento.target]' | |
19 | 35 | end |
20 | 36 | ... | ... |