Commit 427113774d1475364153564c9c70d2ceb6915e3a

Authored by Paulo Tada
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>
cookbooks/mezuro/recipes/kalibro_configurations.rb
@@ -5,16 +5,31 @@ execute &#39;download:mezuro&#39; do @@ -5,16 +5,31 @@ execute &#39;download:mezuro&#39; do
5 user 'root' 5 user 'root'
6 end 6 end
7 7
8 -package 'kalibro-configurations'  
9 -  
10 -service 'kalibro-configurations' do  
11 - action [:enable, :start]  
12 -end  
13 -  
14 template '/etc/mezuro/kalibro-configurations/database.yml' do 8 template '/etc/mezuro/kalibro-configurations/database.yml' do
15 source 'kalibro_configurations/database.yml.erb' 9 source 'kalibro_configurations/database.yml.erb'
16 owner 'kalibro_configurations' 10 owner 'kalibro_configurations'
17 group 'kalibro_configurations' 11 group 'kalibro_configurations'
18 mode '0600' 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 end 35 end
cookbooks/mezuro/recipes/prezento.rb
  1 +# change this to COPR repo
1 execute 'download:mezuro' do 2 execute 'download:mezuro' do
2 command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo' 3 command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo'
3 cwd '/etc/yum.repos.d' 4 cwd '/etc/yum.repos.d'
4 user 'root' 5 user 'root'
5 end 6 end
6 7
7 -package 'prezento'  
8 -  
9 -service 'prezento' do  
10 - action [:enable, :start]  
11 -end  
12 -  
13 template '/etc/mezuro/prezento/database.yml' do 8 template '/etc/mezuro/prezento/database.yml' do
14 source 'prezento/database.yml.erb' 9 source 'prezento/database.yml.erb'
15 owner 'prezento' 10 owner 'prezento'
16 group 'prezento' 11 group 'prezento'
17 mode '0600' 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 end 35 end
20 36