Commit e48e1b7b1c6dc093e421005d8bd1193eaade0975

Authored by Paulo Tada
Committed by Rafael Manzo
1 parent 8ffe23e2
Exists in mezuro_cookbook

Modularizing the service of cookbook mezuro

cookbooks/mezuro/recipes/kalibro_configurations.rb
  1 +include_recipe 'mezuro::service'
  2 +
1 3 # TODO: remove before define main repo
2 4 execute 'download:mezuro' do
3 5 command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo'
... ... @@ -7,10 +9,6 @@ end
7 9  
8 10 package 'kalibro-configurations'
9 11  
10   -service 'kalibro-configurations.target' do
11   - action [:enable, :start]
12   -end
13   -
14 12 template '/etc/mezuro/kalibro-configurations/database.yml' do
15 13 source 'kalibro_configurations/database.yml.erb'
16 14 owner 'kalibro_configurations'
... ...
cookbooks/mezuro/recipes/kalibro_processor.rb
  1 +include_recipe 'mezuro::service'
  2 +
1 3 execute 'download:mezuro' do
2 4 command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo'
3 5 cwd '/etc/yum.repos.d'
... ... @@ -6,10 +8,6 @@ end
6 8  
7 9 package 'kalibro-processor'
8 10  
9   -service 'kalibro-processor.target' do
10   - action [:enable, :start]
11   -end
12   -
13 11 template '/etc/mezuro/kalibro-processor/database.yml' do
14 12 source 'kalibro_processor/database.yml.erb'
15 13 owner 'kalibro_processor'
... ...
cookbooks/mezuro/recipes/prezento.rb
1   -# change this to COPR repo
  1 +include_recipe 'mezuro::service'
  2 +
  3 +# change this to COPR repo when gets ready
2 4 execute 'download:mezuro' do
3 5 command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo'
4 6 cwd '/etc/yum.repos.d'
... ... @@ -7,14 +9,6 @@ end
7 9  
8 10 package 'prezento-spb'
9 11  
10   -service 'prezento.target' do
11   - action [:enable, :start]
12   -end
13   -
14   -service 'nginx' do
15   - action [:enable, :start]
16   -end
17   -
18 12 template '/etc/mezuro/prezento/database.yml' do
19 13 source 'prezento/database.yml.erb'
20 14 owner 'prezento'
... ...
cookbooks/mezuro/recipes/service.rb 0 → 100644
... ... @@ -0,0 +1,6 @@
  1 +# This recipes contains all services to run in the machine
  2 +
  3 +service 'kalibro-configurations.target'
  4 +service 'kalibro-processor.target'
  5 +service 'prezento.target'
  6 +service 'nginx'
... ...